I am wondering if it is possible to create a conditioning statement for a new user's first login for example:
Code: Select all
<!-- IF S_FIRST_LOGIN -->
Thanks
Antony
Code: Select all
<!-- IF S_FIRST_LOGIN -->
Code: Select all
$template->assign_vars(array(
'S_SOME_BOOL' => (!empty($use_pcre)) ? true : false,
));
Code: Select all
<!-- IF_S_ZERO_POSTER -->some object<!-- ENDIF -->
Code: Select all
$template->assign_var( 'S_USER_ZERO_POSTS', ( !empty( $user->data['user_posts'] ) && ( $user->data['user_posts'] == 0 ) ) ? true : false );
Code: Select all
Notice: Undefined variable: template in /misc/39/000/169/186/5/user/web/tributetothem.com/test area/phpBB3/includes/functions.php on line 4643
Fatal error: Call to a member function assign_var() on a non-object in /misc/39/000/169/186/5/user/web/tributetothem.com/test area/phpBB3/includes/functions.php on line 4643
Code: Select all
if($user->data['user_posts'] < 1)
{
$template->assign_var('S_NO_POSTS', true);
}
Code: Select all
<!-- IF S_NO_POSTS -->
Code to show 0 posters
<!-- ENDIF -->
There is a couple of ways you can go about this, but i think the simplest one is creating a function that inputs the info in the database then calling that function in every page kinda like $user->setup( ) does.Munkeyboi wrote:Hey, i'm very sorry to hijack this thread, but i think i would like something very similar, but am utterly new at all this.
I would like to create conditional statements in memberlist.php and perhaps view topic.
IF a users ID is in a certain table, then return yes, else no.
This is so i can put user status on their profile, ie Is user chatting: Yes/no, are they viewing pictures in the Gallery: Yes/No. Are they playing games in the arcade: Yes/No. etc etc
if you could help me, i'd be very grateful.
Thank you