[RELEASE] Welcome back message on index

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
dookie
Registered User
Posts: 32
Joined: Mon Feb 11, 2002 2:51 pm
Location: Germany
Contact:

[RELEASE] Welcome back message on index

Post by dookie »

It´s a really small mod and I don´t know if it already exists.

It displays a welcome message after logging in like this:
Image

Code: Select all

################################################################# 
## Mod Title: Welcome_message_on_index 
## Mod Version: 1.0.0 
## Author: dookie
## Description: This mod shows a "Welcome back" message when user has logged in. 
## 
## Installation Level: easy 
## Installation Time: 2 Minutes 
## Files To Edit: index.php, index_body.tpl, lang_main.php 
## Included Files: n/a 
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
################################################################# 
## 
## Author Note: 
## Any notes you may want to pass along should go here. 
## (the phpBB Group Reserves The Right To Remove/Edit Author Notes, Should It Be Warranted) 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

# 
#-----[ OPEN INDEX.PHP ]------------------------------------------ 
# 


# 
#-----[ FIND LINE 261 ]------------------------------------------- 
# 


$template->assign_vars(array(
		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),


# 
#-----[ REPLACE WITH ]------------------------------------------- 
# 


$template->assign_vars(array(
        'USER_NAME' => $userdata['username'], 
	'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
	'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
	'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),


# 
#-----[ FIND LINE 280 ]------------------------------------------ 
# 


'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 


# 
#-----[ AFTER, ADD ]--------------------------------------------- 
# 


'L_WELCOME' => $lang['Welcome'],


# 
#-----[ OPEN INDEX_BODY.TPL ]------------------------------------ 
# 


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


<!-- BEGIN switch_user_logged_in -->


# 
#-----[ AFTER, ADD ]--------------------------------------------- 
#


<b>{L_WELCOME}{USER_NAME}</b><br />


# 
#-----[ OPEN LANG_MAIN.PHP ]------------------------------------- 
# 


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


//
// That's all Folks!


# 
#-----[ BEFORE, ADD ]-------------------------------------------- 
#


$lang['Welcome'] = "Welcome back, ";


# 
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------- 
# 
# EoM
Last edited by dookie on Mon Feb 10, 2003 8:45 am, edited 1 time in total.

User avatar
chAos
Former Team Member
Posts: 4032
Joined: Wed Jan 16, 2002 7:05 am
Location: Seattle, WA, US

Post by chAos »

thankyou.

chaosmarker

Bear_nG
Registered User
Posts: 125
Joined: Fri Apr 05, 2002 9:22 am
Location: Brisbane, Australia
Contact:

Post by Bear_nG »

You sir are a GOD DAMN LEGEND!

Was looking for this a little while ago!

Locked

Return to “[2.0.x] MODs in Development”