Icy Phoenix

     
 


This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post FAP SUPPORT - FAP Guestion 
 
Hello all!

I have just one guestion.

Artie has helped me already with the code so that only registered users can see full images.

Code: [Download] [Hide] [Select]
#
##------------------- [ OPEN ] ------------------------------------------------
#
 
album_showpage.php

#
##----------------- [ FIND ] ----------------------------------------------------
#

// ------------------------------------
// TEMPLATE ASSIGNEMENT
// ------------------------------------

#
##--------------- [ BEFORE ADD ] -----------------------------------------------------------
#
if ((!$userdata['session_logged_in']) && ($full_size_param == '&full=true'))
    {
        redirect(append_sid(album_append_uid(LOGIN_MG . "?redirect=album_showpage.$phpEx&pic_id=$pic_id&full=true")));
    }
#
## --------- [ SAVE FILE ] ---------------------------------------------
#EoM


Now im using hide links mod (http://www.phpbbhacks.com/download/4543),
and i would like that only registered users with more than 10 post can see full images,
and all other`s can see thumbnails and medium images.

I already done this in my wap upload script,but i just can`t get it to work in FAP.
This is what i done in my wap script and it`s working.

Code: [Download] [Hide] [Select]
if( $userdata['session_logged_in'] & $userdata['user_posts'] >= 10 )
   {
=======some php  comes here======
   }
elseif ( $userdata['user_posts'] >= 10 )
   {
               header("location:===login location===");
   }
else
       {
               header("location:===location for users that have less than 10 posts===");
       }


Like i said in my wap script is working but in FAP can`t get it to work.
Is there any solution?

Sorry for my english i`m from slovenia

Please help.
 



 
SiljoSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Try this:
Take the code ( from above) that I gave you and...


REPLACE
Code: [Download] [Hide] [Select]
if ((!$userdata['session_logged_in']) && ($full_size_param == '&full=true'))
   {
       redirect(append_sid(album_append_uid(LOGIN_MG . "?redirect=album_showpage.$phpEx&pic_id=$pic_id&full=true")));
   }

WITH
Code: [Download] [Hide] [Select]
if (($userdata['user_posts'] < 10) && ($full_size_param == '&amp;full=true'))
   {
        // YOUR CODE TO REDIRECT USERS OF LESS THAN 10 POST  
   }

 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Not working

How about something like all users ( unregistered & members ) see tumbnails and medium pictures and only members of a specific group can see full pics?

This is the code i`m using in my download center and i tried to usit in FAP,but no luck!

First part.
Code: [Download] [Hide] [Select]
$userid = $userdata['user_id'];
$sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE user_id = '$userid'";
$result = $db->sql_query($sql);
$isauth = 0;
while ($row = $db->sql_fetchrow($result))
{
if ($row['group_id'] == '//GROUP ID NUMBER//'' || $row['group_id'] == '//GROUP ID NUMBER//')
{
$isauth = 1;
}
}


Second part.
Code: [Download] [Hide] [Select]
if( $userdata['session_logged_in'] & $isauth == '1')
   {
($full_size_param == '&amp;full=true')
   }
elseif ( $userdata['session_logged_in'] & $isauth == '0')
   {
               header("//NOT IN GROUP LINK//");
   }
else
   {
               header("//LOGIN LINK//");
   }



any idea?
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Can this even be done?
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Artie wrote: [View Post]
Try this:
Take the code ( from above) that I gave you and...


REPLACE
Code: [Download] [Hide] [Select]
if ((!$userdata['session_logged_in']) && ($full_size_param == '&amp;full=true'))
   {
       redirect(append_sid(album_append_uid(LOGIN_MG . "?redirect=album_showpage.$phpEx&pic_id=$pic_id&full=true")));
   }

WITH
Code: [Download] [Hide] [Select]
if (($userdata['user_posts'] < 10) && ($full_size_param == '&amp;full=true'))
   {
        // YOUR CODE TO REDIRECT USERS OF LESS THAN 10 POST  
   }

This works for me.

I do not understand what does not work for you....
Did you place the code as I originally instructed ?
What code did you put in to redirect your users ?
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
The code that i put in
Code: [Download] [Hide] [Select]
if (($userdata['user_posts'] < 10) && ($full_size_param == '&amp;full=true'))
   {
         message_die(GENERAL_ERROR, "You do not have permission to access this page");  
   }


The code works for registered users,but it doesent work for unregistered users?

Any idea?
Please help
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
That should work for all.

Maybe check that this '&amp;full=true' is not like this '&full=true'
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
No it`s correct!

Why this code doesent work right?

First part.
Code: [Download] [Hide] [Select]
$userid = $userdata['user_id'];
$sql = "SELECT * FROM " . USER_GROUP_TABLE . " WHERE user_id = '$userid'";
$result = $db->sql_query($sql);
$isauth = 0;
while ($row = $db->sql_fetchrow($result))
{
if ($row['group_id'] == '//GROUP ID NUMBER//'' || $row['group_id'] == '//GROUP ID NUMBER//')
{
$isauth = 1;
}
}


Second part.
Code: [Download] [Hide] [Select]
if( $userdata['session_logged_in'] & $isauth == '1')
   {
($full_size_param == '&amp;full=true')
   }
elseif ( $userdata['session_logged_in'] & $isauth == '0')
   {
               header("//NOT IN GROUP LINK//");
   }
else
   {
               header("//LOGIN LINK//");
   }


any idea?
please help
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Artie wrote: [View Post]
That should work for all.

Maybe check that this '&amp;full=true' is not like this '&full=true'


No like i said this is what i put in

Code: [Download] [Hide] [Select]
if (($userdata['user_posts'] < 10) && ($full_size_param == '&amp;full=true'))
   {
         message_die(GENERAL_ERROR, "You do not have permission to access this page");  
   }

 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Well it should work as expected.
Did you place/replace it as described above ....

IN album_showpage.php

BEFORE
// ------------------------------------
// TEMPLATE ASSIGNEMENT
// ------------------------------------
 



 
ArtieSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Yes i did

Code: [Download] [Hide] [Select]
        $picm = false;
        $full_size_param = '&amp;full=true';
    }
}
if (($userdata['user_posts'] < 10) && ($full_size_param == '&amp;full=true'))
   {
         message_die(GENERAL_ERROR, "You do not have permission to access this page");  
   }
// ------------------------------------
// TEMPLATE ASSIGNEMENT
// ------------------------------------
if ((isset($_GET['slideshow']) && (intval($_GET['slideshow']) > 0)) || (isset($_POST['slideshow']) && (intval($_POST['slideshow']) > 0)))
{
    $gen_simple_header = true;
    $show_template = 'album_slideshow_body.tpl';
    $nuffimage_pic = ( $picm == false ) ? 'album_pic.' : 'album_picm.';
}


I don`t think that this 10 post is a good idea,this will bring spamers and usefull stuff to forum.Is there any way to do a group access?
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Anybody?
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Bump
 



 
SiljoSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
It seems you didn't forget your attitude to bump your own topics even more than once.

I think I'm giving you a yellow card...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: FAP Guestion 
 
Thanks for the yellow card

I dont like bumping posts,but if i don`t get an answer i have to bump it.

It`s sad that i can`t get a simple answer on my question.If it can`t be done just say so....don`t ignore me
 



 
SiljoSend private message  
Back to topPage bottom
This forum is locked: you cannot post, reply or edit topics.  This topic is locked: you cannot edit posts or make replies.  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron