Jump to content

Forum Join Date


IKilledBambi

Recommended Posts

I gave a few tries this is both a learning experience, and its also cool to have a hardcore join date in my forums  ;D.

			'username'			=> $row['username'],
			'user_colour'		=> $row['user_colour'],

			'warnings'			=> 0,
			'allow_pm'			=> 0,
		);
	}
	else
	{
		$user_sig = '';

		// We add the signature to every posters entry because enable_sig is post dependant
		if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
		{
			$user_sig = $row['user_sig'];
		}

		$id_cache[] = $poster_id;

		$user_cache[$poster_id] = array(
		if ($row['username'] = IKilledBambi)
		{
			$username = $row['username'];
		{
			'joined'		=> $user->format_date($row['user_regdate'], x38),
		}

That's from viewtopic.php, I'm trying to make it so that, if username = IKilledBambi joindate x38(times 38 to be clear). I have tried and tried and I'm giving up and seeking help.  For all I know I'm going about this the wrong way, but google found nothing, and a search here didn't help.

Link to comment
https://forums.phpfreaks.com/topic/140121-forum-join-date/
Share on other sites

if (!isset($user_cache[$poster_id]))
{
	if ($poster_id == ANONYMOUS)
	{
		$user_cache[$poster_id] = array(
			'joined'		=> '',
			'posts'			=> '',
			'from'			=> '',

			'sig'					=> '',
			'sig_bbcode_uid'		=> '',
			'sig_bbcode_bitfield'	=> '',

			'online'			=> false,
			'avatar'			=> '',
			'rank_title'		=> '',
			'rank_image'		=> '',
			'rank_image_src'	=> '',
			'sig'				=> '',
			'profile'			=> '',
			'pm'				=> '',
			'email'				=> '',
			'www'				=> '',
			'icq_status_img'	=> '',
			'icq'				=> '',
			'aim'				=> '',
			'msn'				=> '',
			'yim'				=> '',
			'jabber'			=> '',
			'search'			=> '',
			'age'				=> '',

			'username'			=> $row['username'],
			'user_colour'		=> $row['user_colour'],

			'warnings'			=> 0,
			'allow_pm'			=> 0,
		);
	}
	else
	{
		$user_sig = '';

		// We add the signature to every posters entry because enable_sig is post dependant
		if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
		{
			$user_sig = $row['user_sig'];
		}

		$id_cache[] = $poster_id;
{
		$user_cache[$poster_id] = array(
		{

			'joined'		=> $user->format_date($row['user_regdate']),
			'posts'			=> $row['user_posts'],
			'warnings'		=> (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
			'from'			=> (!empty($row['user_from'])) ? $row['user_from'] : '',

			'sig'					=> $user_sig,
			'sig_bbcode_uid'		=> (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
			'sig_bbcode_bitfield'	=> (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',

			'viewonline'	=> $row['user_allow_viewonline'],
			'allow_pm'		=> $row['user_allow_pm'],

			'avatar'		=> ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
			'age'			=> '',

			'rank_title'		=> '',
			'rank_image'		=> '',
			'rank_image_src'	=> '',

			'username'			=> $row['username'],
			'user_colour'		=> $row['user_colour'],

			'online'		=> false,
			'profile'		=> append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"),
			'www'			=> $row['user_website'],
			'aim'			=> ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '',
			'msn'			=> ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '',
			'yim'			=> ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '',
			'jabber'		=> ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '',
			'search'		=> ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&sr=posts') : '',
		}
	);

Link to comment
https://forums.phpfreaks.com/topic/140121-forum-join-date/#findComment-733147
Share on other sites

Try this: (disclaimer: I know nothing about how the forum works, I just removed the errors)

 

   if (!isset($user_cache[$poster_id]))
   {
      if ($poster_id == ANONYMOUS)
      {
         $user_cache[$poster_id] = array(
            'joined'      => '',
            'posts'         => '',
            'from'         => '',

            'sig'               => '',
            'sig_bbcode_uid'      => '',
            'sig_bbcode_bitfield'   => '',

            'online'         => false,
            'avatar'         => '',
            'rank_title'      => '',
            'rank_image'      => '',
            'rank_image_src'   => '',
            'sig'            => '',
            'profile'         => '',
            'pm'            => '',
            'email'            => '',
            'www'            => '',
            'icq_status_img'   => '',
            'icq'            => '',
            'aim'            => '',
            'msn'            => '',
            'yim'            => '',
            'jabber'         => '',
            'search'         => '',
            'age'            => '',

            'username'         => $row['username'],
            'user_colour'      => $row['user_colour'],

            'warnings'         => 0,
            'allow_pm'         => 0,
         );
      }
      else
      {
         $user_sig = '';

         // We add the signature to every posters entry because enable_sig is post dependant
         if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs'))
         {
            $user_sig = $row['user_sig'];
         }

         $id_cache[] = $poster_id;

         $user_cache[$poster_id] = array(
         
            'joined'      => $user->format_date($row['user_regdate']),
            'posts'         => $row['user_posts'],
            'warnings'      => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
            'from'         => (!empty($row['user_from'])) ? $row['user_from'] : '',

            'sig'               => $user_sig,
            'sig_bbcode_uid'      => (!empty($row['user_sig_bbcode_uid'])) ? $row['user_sig_bbcode_uid'] : '',
            'sig_bbcode_bitfield'   => (!empty($row['user_sig_bbcode_bitfield'])) ? $row['user_sig_bbcode_bitfield'] : '',

            'viewonline'   => $row['user_allow_viewonline'],
            'allow_pm'      => $row['user_allow_pm'],

            'avatar'      => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '',
            'age'         => '',

            'rank_title'      => '',
            'rank_image'      => '',
            'rank_image_src'   => '',

            'username'         => $row['username'],
            'user_colour'      => $row['user_colour'],

            'online'      => false,
            'profile'      => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"),
            'www'         => $row['user_website'],
            'aim'         => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '',
            'msn'         => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '',
            'yim'         => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&.src=pg' : '',
            'jabber'      => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '',
            'search'      => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&sr=posts') : '',
      );

Link to comment
https://forums.phpfreaks.com/topic/140121-forum-join-date/#findComment-733156
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.