[2.0.8] Welcome & Avatar On phpBB Index

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
42
58%
Very Good
14
19%
Good
8
11%
Fair
2
3%
Poor
6
8%
 
Total votes: 72

murnauvsbuñuel
Registered User
Posts: 177
Joined: Mon Jun 20, 2005 9:49 am

Post by murnauvsbuñuel »

i cant download this mod.... i think that the link isn´t work, is broke
wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator »

Superb
wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator »

This mod is great and it works fine when your logged in but when you not it says welcome guest but underneath it it has a x which comes up when an image doesn't exist but the whosonline.gif does exist it just doesn't appear.
wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator »

*Bump*
wilsonator
Registered User
Posts: 217
Joined: Sun Jul 03, 2005 7:57 am
Location: St.Helens, UK
Contact:

Post by wilsonator »

wilsonator wrote: This mod is great and it works fine when your logged in but when you not it says welcome guest but underneath it it has a x which comes up when an image doesn't exist but the whosonline.gif does exist it just doesn't appear.


Its ok now i'v sorted it. :D
User avatar
maxarüs
Registered User
Posts: 21
Joined: Tue Nov 09, 2004 5:45 pm

Post by maxarüs »

i've installed it..... it's really cool! but i had a problem... try to help me please... look how does it look: www.argox.com.ar

there, we would see a "#".... i dont want it!!! :P

thank you all
bigbear
Registered User
Posts: 129
Joined: Sat Aug 17, 2002 6:21 pm
Location: Kuala Lumpur
Contact:

Post by bigbear »

Hi!

Where should I put this code if I have CH installed?

Code: Select all

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

'FORUM_LOCKED_IMG' => $images['forum_locked'],


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

        //
        // START MOD: Avatar On Index  - AbelaJohnB
        //
        'L_NAME_WELCOME' => $lang['Welcome'],
        'U_NAME_LINK' => $name_link,
        'AVATAR_IMG' => $avatar_img,
        //
        // END MOD: Avatar On Index  - AbelaJohnB
        //
My Gallery
My Photography Forum
Looking for kind php souls to improve my site.
bigbear
Registered User
Posts: 129
Joined: Sat Aug 17, 2002 6:21 pm
Location: Kuala Lumpur
Contact:

Post by bigbear »

Managed to get things working. However is it possible to have the avatar and username on other pages besides index?
My Gallery
My Photography Forum
Looking for kind php souls to improve my site.
bello5
Registered User
Posts: 12
Joined: Sat Nov 27, 2004 2:40 pm

Post by bello5 »

this mod won't work with the latest version of phpbb!
PokeSensei
Registered User
Posts: 5
Joined: Sun Oct 30, 2005 10:33 pm
Location: King, North Carolina, United States of America
Contact:

Edited for phpBB2.0.17

Post by PokeSensei »

Here is the changes for the SubSilver templete to phpBB2.0.17

Compliant with EasyMod 0.2.1a

Code: Select all

## EasyMod 0.2.1a compliant
############################################################## 
## MOD Title: Welcome & Avatar On phpBB Index
## MOD Author: AbelaJohnB < [email protected] > (John B. Abela) http://www.JohnAbela.Com/ 
## MOD Description: This MOD will place a 'welcome your_name' and your avatar
##   (if you have one) within the 'who is online' section of the index page.
##   If you do not have an avatar, it will display the default 'whosonline.gif'
##
## MOD Version: 3.0.3
##
## Installation Level: Easy
## Installation Time: ~10 minutes
## Files To Edit: 
##                   index.php
##                   includes/functions.php
##                   language/lang_english/lang_main.php
##                   templates/subSilver/index_body.tpl
## Included Files: n/a
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
## Copyright © John B. Abela, < [email protected] >
##
## I do not support my MOD's anywhere except http://www.phpBB.com/ or my own site,
## (in full or partial format). If you intend to take my work and add to it, you must retain my
## above Copyright and notify me of your actions via email.
##
## ~ John B. Abela - (aka: AbelaJohnB) http://www.johnabela.com/  - [email protected]
##   Stop By And Sign My Guestbook If You Feel Like It :)
##############################################################
## MOD History:
##
##   2003-07-05 - Version 3.0.3
##      - Added new function to get users template (might be useful for other mod authors!)
##      - Made EasyMod 0.0.9 Compliant, as best as I can tell.
##
##   2003-06-21 - Version 3.0.2
##      - Bug Fix: $profiledata != $userdata <sigh>
##
##   2003-06-17 - Version 3.0.1
##      - Updated for phpBB 2.0.5
##
##   2003-06-09 - Version 3.0.0
##      - Rewrote for phpBB2.0.4+
##
##   2002-05-12 - Version 1.0.0
##      - Initial Release
##############################################################
## MOD Localisation:
##
##  N/A
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

# 
#-----[ OPEN ]------------------------------------------ 
# 
index.php

# 
#-----[ FIND ]------------------------------------------ 
# 
	$template->set_filenames(array(
		'body' => 'index_body.tpl')
	);


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

    //
    // START MOD: Avatar On Index  - AbelaJohnB
    //
    $avatar_img = '';
    if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
    {
        switch( $userdata['user_avatar_type'] )
        {
            case USER_AVATAR_UPLOAD:
                $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_GALLERY:
                $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
        }
    }
    if ($avatar_img == '')
    {
        //
        // Set up style
        //
        if ( !$board_config['override_user_style'] )
        {
            if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
            {
                $template_name = get_template_name($board_config['default_style']);
                $avatar_img = '<img src="'. $phpbb_root_path . 'templates/' . $template_name . '/images/whosonline.gif" >';
            }
        }
        else
        {
            $avatar_img = '<img src="templates/subSilver/images/whosonline.gif" >';
        }
    }
    // Check For Anonymous User
    if ($userdata['user_id'] != '-1')
    {
        $name_link = '<a href="' . append_sid("profile.$phpEx?mode=editprofile&amp;" . $userdata['user_id']) . '" />' . $userdata['username'] . '</a>';
    }
    else
    {
        $name_link = $lang['Guest'];
    }
    //
    // END MOD: Avatar On Index  - AbelaJohnB
    //

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

	'FORUM_LOCKED_IMG' => $user->img('forum_locked'),


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

        //
        // START MOD: Avatar On Index  - AbelaJohnB
        //
        'L_NAME_WELCOME' => $lang['Welcome'],
        'U_NAME_LINK' => $name_link,
        'AVATAR_IMG' => $avatar_img,
        //
        // END MOD: Avatar On Index  - AbelaJohnB
        //

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/functions.php

# 
#-----[ FIND ]------------------------------------------ 
# 
function encode_ip($dotquad_ip)

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

//
// START MOD: Avatar On Index  - AbelaJohnB
//
//
// Get Template Value
//
function get_template_name($style)
{
	global $db, $board_config, $template, $images, $phpbb_root_path;

	$sql = "SELECT template_name 
		FROM " . THEMES_TABLE . "
		WHERE themes_id = $style";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, 'Could not query database for theme info');
	}

	if ( !($row = $db->sql_fetchrow($result)) )
	{
		message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
	}
	$template_name = $row['template_name'] ;

	return $template_name;
}
//
// END MOD: Avatar On Index  - AbelaJohnB
//

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_main.php

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

$lang['Welcome_subject'] = 'Welcome to %s Forums'; // Welcome to my.com forums

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

//
// START MOD: Avatar On Index  - AbelaJohnB
//
$lang['Welcome'] = "Welcome"; // Welcome
//
// END MOD: Avatar On Index  - AbelaJohnB
//

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/index_stats_box.tpl

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

	<td class="row1" width="50" align="center" valign="middle" rowspan="2"><img src="{I_VIEWONLINE}" alt="{L_WHO_IS_ONLINE}" /></td>

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

<!--
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="{I_VIEWONLINE}" alt="{L_WHO_IS_ONLINE}" /></td>
 -->
	<td class="row1" align="center" valign="middle" rowspan="2"><span class="mainmenu">{L_NAME_WELCOME}</span><BR /><span class="mainmenu">{U_NAME_LINK}</span><BR /><BR />{AVATAR_IMG}</td>


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
User avatar
acidworm
Registered User
Posts: 36
Joined: Tue Apr 12, 2005 5:02 pm
Contact:

Post by acidworm »

awesome. this is a really good mod.
User avatar
The Suite
Registered User
Posts: 617
Joined: Sat Jul 30, 2005 11:11 am
Location: NYC, USA
Contact:

Post by The Suite »

Has anyone tested this on .18 yet?

Please advise.
Much appreciloved,

The Suite
Thank you :-)
The IT Security Information Center
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Scotland
Name: Kenny Cameron
Contact:

Post by stickerboy »

The Suite wrote: Has anyone tested this on .18 yet?

Please advise.

i'm on .18 and it works just fine ;)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
User avatar
The Suite
Registered User
Posts: 617
Joined: Sat Jul 30, 2005 11:11 am
Location: NYC, USA
Contact:

Post by The Suite »

cherokee red,

Thanks a mil, i'm going to try it now :-)

Kewl, it works but if I wanted to get that Who is online panel at the top of the forum how could I do that?

Instead of being at the bottom I want it displayed at the top.

Any ideas?
Much appreciloved,

The Suite
Thank you :-)
The IT Security Information Center
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Scotland
Name: Kenny Cameron
Contact:

Post by stickerboy »

open index_body.tpl, find the who's online table and place it before this

Code: Select all

<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr> 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
*NOTE* the code i posted above may differ on your forums ;)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
Post Reply

Return to “[2.0.x] MOD Database Cleanup”