[Add-on] Welcome Mod 2.0.0 (Beta)

Misc MOD Downloads for phpBB3 -- Any MOD that does not fit into any other category
Forum rules
Image Please feel free to download any MOD's here, support for each MOD is located it's own thread.

To post your own MOD, please first read the MOD Guidelines

Re: [DEV]Welcome Mod

Postby stitch626 » 11 Nov 2007, 22:10

Hello sarajane,

Sorry I haven't gotten back to you sooner but I came down with a case of the flu bug and all I did was sleep all weekend.

Anyway For now try this code:
Code: Select all
FIND:
<!-- IF S_USER_LOGGED_IN --><li class="rightside">{LAST_VISIT_DATE}</li><!-- ENDIF -->
<!-- IF S_USER_LOGGED_IN --><li class="rightside">{CURRENT_TIME}<strong>:</strong></li><!-- ENDIF -->


Code: Select all
REPLACE WITH:
<!-- IF S_USER_LOGGED_IN --><li class="rightside">{CURRENT_TIME}<strong>:</strong><br />{LAST_VISIT_DATE}</li><!-- ENDIF -->


I haven't had time to check out your code for the guest users yet.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7


Re: [DEV]Welcome Mod

Postby Ladysarajane » 12 Nov 2007, 13:34

I went through the flu bug last week also. I am still recuperating from it. Hope you are feeling better.

I did those changes and it looks much better! :thumbsup: Nice clean appearance to it.
Thank you!
Warning: Stay away from Deck 15 if you don't have security clearance level 6 or above! Unauthorized access is prohibited.
Image
User avatar
Ladysarajane
STG Moderator
STG Moderator
 
Posts: 1962
Joined: 21 Mar 2007, 23:35
Favorite Team: Bengals
Gender: Female
phpBB Knowledge: 5

Re: Welcome Mod

Postby stitch626 » 18 Dec 2007, 19:45

Just tested this mod out with phpBB3 Gold and works just fine. It has been running solid on my live board since RC1. I have not had any bug reports on this mod since it's original release on July 16th, 2007 here at STG or at .com. So therefore I have moved this mod to the "Miscellaneous MODs, Hacks and Downloads" forum and is no longer in Development.

Mod status updated to Gold.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

Re: Welcome Mod

Postby CelticSpirits » 05 Jan 2008, 14:29

Need a little help here, :doh: I installed this mod and this is the error I am getting. Parse error: syntax error, unexpected ';', expecting ')' in /home/aussi16/public_html/includes/functions.php on line 3310

I copied the add codes, and this is what happened after install.... :confused:

Ideas? What do I need to fix here?

Code: Select all
// Welcome Mod
// Let's welcome the member in style with color!
$welcome_colour = ($user->data['user_colour']) ? $welcome_colour = ' style="color:#' . $user->data['user_colour'] . '"' : $welcome_colour = '';

if ( $user->data['user_id'] != 1 )
{
$welcome_name = '<strong><a' . $welcome_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user->data['user_id']) . '">' . $user->data['username'] . '</a></strong>';
}
else
{
$welcome_name = '<strong><a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register') . '" title="Click to Register">' . $user->lang['GUEST'] . '</a></strong>';
}
// Welcome Mod


Thanks!
Image
User avatar
CelticSpirits    
Cadet I
Cadet I
 
Posts: 16
Joined: 24 Dec 2007, 16:15
Location: Santa Barabra, Ca
Favorite Team: San Diego Chargers
Gender: Female

Re: Welcome Mod

Postby Highway of Life » 05 Jan 2008, 14:48

Can you paste lines 3300 through 3325 of your functions.php, should be pretty simple. :)
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Welcome Mod

Postby CelticSpirits » 05 Jan 2008, 15:10

Okay here is 3300 to 3325 of the code:

Code: Select all
      }
   }

   // Which timezone?
   $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
   
   // The following assigns all _common_ variables that may be used at any point in a template.
   $template->assign_vars(array(
// Welcome Mod
// Let's welcome the member in style with color!
$welcome_colour = ($user->data['user_colour']) ? $welcome_colour = ' style="color:#' . $user->data['user_colour'] . '"' : $welcome_colour = '';

if ( $user->data['user_id'] != 1 )
{
$welcome_name = '<strong><a' . $welcome_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user->data['user_id']) . '">' . $user->data['username'] . '</a></strong>';
}
else
{
$welcome_name = '<strong><a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register') . '" title="Click to Register">' . $user->lang['GUEST'] . '</a></strong>';
}
// Welcome Mod

      'SITENAME'                  => $config['sitename'],
      'SITE_DESCRIPTION'            => $config['site_desc'],
      'PAGE_TITLE'               => $page_title,
      'SCRIPT_NAME'               => str_replace('.' . $phpEx, '', $user->page['page_name']),


I hope that is what you meant...still new to all of this... :blush:
Image
User avatar
CelticSpirits    
Cadet I
Cadet I
 
Posts: 16
Joined: 24 Dec 2007, 16:15
Location: Santa Barabra, Ca
Favorite Team: San Diego Chargers
Gender: Female

Re: Welcome Mod

Postby Highway of Life » 05 Jan 2008, 15:35

ehm, you pasted that code in the $template->assign_vars array.
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

Re: Welcome Mod

Postby CelticSpirits » 05 Jan 2008, 15:44

Yup I am a moron...LOL I added it AFTER instead of BEFORE :doh:
Image
User avatar
CelticSpirits    
Cadet I
Cadet I
 
Posts: 16
Joined: 24 Dec 2007, 16:15
Location: Santa Barabra, Ca
Favorite Team: San Diego Chargers
Gender: Female

Re: Welcome Mod

Postby CelticSpirits » 05 Jan 2008, 16:05

Okay I altered the code, to the correct position, and I checked to make sure that the rest of the codes were put in the correct spot. Now I am getting this:

Parse error: syntax error, unexpected '}' in /home/aussi16/public_html/includes/functions.php on line 3424

Code 3338 to 3424

Code: Select all
// Welcome Mod
'U_WELCOME_NAME' => $welcome_name,
// Welcome Mod

      'SID'            => $SID,
      '_SID'            => $_SID,
      'SESSION_ID'      => $user->session_id,
      'ROOT_PATH'         => $phpbb_root_path,

      'L_LOGIN_LOGOUT'   => $l_login_logout,
      'L_INDEX'         => $user->lang['FORUM_INDEX'],
      'L_ONLINE_EXPLAIN'   => $l_online_time,

      'U_PRIVATEMSGS'         => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
      'U_RETURN_INBOX'      => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;folder=inbox'),
      'U_POPUP_PM'         => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup'),
      'UA_POPUP_PM'         => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=popup')),
      'U_MEMBERLIST'         => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
      'U_MEMBERSLIST'         => append_sid("{$phpbb_root_path}memberlist.$phpEx"),
      'U_VIEWONLINE'         => ($auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$phpbb_root_path}viewonline.$phpEx") : '',
      'U_LOGIN_LOGOUT'      => $u_login_logout,
      'U_INDEX'            => append_sid("{$phpbb_root_path}index.$phpEx"),
      'U_SEARCH'            => append_sid("{$phpbb_root_path}search.$phpEx"),
      'U_REGISTER'         => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
      'U_PROFILE'            => append_sid("{$phpbb_root_path}ucp.$phpEx"),
      'U_MODCP'            => append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id),
      'U_FAQ'               => append_sid("{$phpbb_root_path}faq.$phpEx"),
      'U_SEARCH_SELF'         => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'),
      'U_SEARCH_NEW'         => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'),
      'U_SEARCH_UNANSWERED'   => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unanswered'),
      'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
      'U_DELETE_COOKIES'      => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
      'U_TEAM'            => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=leaders'),
      'U_RESTORE_PERMISSIONS'   => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
//-- mod : AJAX Chat ----------------------------------------------------
//-- add
'U_CHAT'                    => append_sid("{$phpbb_root_path}chat.$phpEx"),
//-- fin mod : AJAX Chat ------------------------------------------------
      'U_PORTAL'            => append_sid("{$phpbb_root_path}bb3portal.$phpEx"),
      'S_PORTAL_COPY'         => $user->lang['PORTAL_COPY'],

      'S_USER_LOGGED_IN'      => ($user->data['user_id'] != ANONYMOUS) ? true : false,
      'S_AUTOLOGIN_ENABLED'   => ($config['allow_autologin']) ? true : false,
      'S_BOARD_DISABLED'      => ($config['board_disable']) ? true : false,
      'S_REGISTERED_USER'      => $user->data['is_registered'],
      'S_IS_BOT'            => $user->data['is_bot'],
      'S_USER_PM_POPUP'      => $user->optionget('popuppm'),
      'S_USER_LANG'         => $user->lang['USER_LANG'],
      'S_USER_BROWSER'      => (isset($user->data['session_browser'])) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'],
      'S_USERNAME'         => $user->data['username'],
      'S_CONTENT_DIRECTION'   => $user->lang['DIRECTION'],
      'S_CONTENT_FLOW_BEGIN'   => ($user->lang['DIRECTION'] == 'ltr') ? 'left' : 'right',
      'S_CONTENT_FLOW_END'   => ($user->lang['DIRECTION'] == 'ltr') ? 'right' : 'left',
      'S_CONTENT_ENCODING'   => 'UTF-8',
      'S_TIMEZONE'         => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
      'S_DISPLAY_ONLINE_LIST'   => ($l_online_time) ? 1 : 0,
      'S_DISPLAY_SEARCH'      => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
      'S_DISPLAY_PM'         => ($config['allow_privmsg'] && $user->data['is_registered'] && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,
      'S_DISPLAY_MEMBERLIST'   => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
      'S_NEW_PM'            => ($s_privmsg_new) ? 1 : 0,

      'T_THEME_PATH'         => "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme',
      'T_TEMPLATE_PATH'      => "{$phpbb_root_path}styles/" . $user->theme['template_path'] . '/template',
      'T_IMAGESET_PATH'      => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset',
      'T_IMAGESET_LANG_PATH'   => "{$phpbb_root_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->data['user_lang'],
      'T_IMAGES_PATH'         => "{$phpbb_root_path}images/",
      'T_SMILIES_PATH'      => "{$phpbb_root_path}{$config['smilies_path']}/",
      'T_AVATAR_PATH'         => "{$phpbb_root_path}{$config['avatar_path']}/",
      'T_AVATAR_GALLERY_PATH'   => "{$phpbb_root_path}{$config['avatar_gallery_path']}/",
      'T_ICONS_PATH'         => "{$phpbb_root_path}{$config['icons_path']}/",
      'T_RANKS_PATH'         => "{$phpbb_root_path}{$config['ranks_path']}/",
      'T_UPLOAD_PATH'         => "{$phpbb_root_path}{$config['upload_path']}/",
      'T_STYLESHEET_LINK'      => (!$user->theme['theme_storedb']) ? "{$phpbb_root_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : "{$phpbb_root_path}style.$phpEx?sid=$user->session_id&amp;id=" . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'],
      'T_STYLESHEET_NAME'      => $user->theme['theme_name'],

      'SITE_LOGO_IMG'         => $user->img('site_logo'))
   );

   // application/xhtml+xml not used because of IE
   header('Content-type: text/html; charset=UTF-8');

   header('Cache-Control: private, no-cache="set-cookie"');
   header('Expires: 0');
   header('Pragma: no-cache');

   return;
}


Now what have I done wrong? :banghead:
Image
User avatar
CelticSpirits    
Cadet I
Cadet I
 
Posts: 16
Joined: 24 Dec 2007, 16:15
Location: Santa Barabra, Ca
Favorite Team: San Diego Chargers
Gender: Female

Re: Welcome Mod

Postby stitch626 » 05 Jan 2008, 16:32

Hi CelticSpirits,

I think you still have a problem with where you placed this code
Code: Select all
// Welcome Mod
// Let's welcome the member in style with color!
$welcome_colour = ($user->data['user_colour']) ? $welcome_colour = ' style="color:#' . $user->data['user_colour'] . '"' : $welcome_colour = '';

if ( $user->data['user_id'] != 1 )
{
$welcome_name = '<strong><a' . $welcome_colour . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $user->data['user_id']) . '">' . $user->data['username'] . '</a></strong>';
}
else
{
$welcome_name = '<strong><a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register') . '" title="Click to Register">' . $user->lang['GUEST'] . '</a></strong>';
}
// Welcome Mod

Please double check your edits and make sure this block of code is placed directly before this line of code.
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.

Or if you'd like, you can place your entire functions.php file in a spoiler here and I will take a look at it for you.
User avatar
stitch626    
STG Moderator Leader
STG Moderator Leader
 
Posts: 3185
Joined: 08 Feb 2007, 20:47
Location: Michigan
Favorite Team: Detroit Red Wings
Gender: Male
phpBB Knowledge: 7

PreviousNext

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests