Avatar on index 0.3.0

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: Avatar on index 0.1.0

Postby Unknown42 » 11 Sep 2006, 23:25

Is there anyway I can make this show up elsewhere BESIDES the index?

I already added the code elsewhere, but the avatar's won't show up. How can I make it show elsewhere instead of the index?
Unknown42
Lieutenant
Lieutenant
 
Posts: 235
Joined: 07 Aug 2006, 17:15
Gender: Male




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Avatar on index 0.1.0

Postby Highway of Life » 12 Sep 2006, 05:39

Sure... it's really very easy...
Just add the following elements to the PHP page you want to add it to... otherwise, if you will be using it in several places, you can put it in /includes/functions.php

Add this function:
Spoiler:
Code: Select all
$avatar_img = '';

if (
$user->data['user_avatar'])
    {
        switch (
$user->data['user_avatar_type'])
        {
            case
AVATAR_UPLOAD:
            
$avatar_img = $phpbb_root_path . $config['avatar_path'] . '/';
            break;
    
            case
AVATAR_GALLERY:
            
$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
            break;
        }
        
$avatar_img .= $user->data['user_avatar'];

        
$avatar_img = '<img src="' . $avatar_img . '" width="' . $user->data['user_avatar_width'] . '" height="' . $user->data['user_avatar_height'] . '" alt="" />';
}



In the template->assign_vars add...
Spoiler:
Code: Select all
'AVATAR'        => $avatar_img,
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: Avatar on index 0.1.0

Postby Handyman » 12 Sep 2006, 14:39

Then in the tamplate add
Spoiler:
Code: Select all
{AVATAR}
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Avatar on index 0.1.0

Postby Unknown42 » 15 Sep 2006, 15:47

Thanks guys Grin
Unknown42
Lieutenant
Lieutenant
 
Posts: 235
Joined: 07 Aug 2006, 17:15
Gender: Male

Re: Avatar on index 0.1.0

Postby Handyman » 24 Oct 2006, 16:01

Moved to Unapproved mods until Nedka provides a new link or attaches the mod.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Avatar on index 0.1.0

Postby LEW21 » 26 Oct 2006, 12:03

Download from my server added.
phpBB3.PL - User-friendly Polish phpBB 3.0 support
LEW21    
Translator
Translator
 
Posts: 901
Joined: 01 Jun 2006, 03:51
Location: Warsaw, Poland
Gender: Male
phpBB Knowledge: 10

Re: Avatar on index 0.1.0

Postby Handyman » 26 Oct 2006, 14:03

Moved back to Mods Database.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Avatar on index 0.1.0

Postby Handyman » 26 Oct 2006, 22:20

Moved again... this time to the proper location.
Please contact me if you have any news to submit to SCOFF News.
SCOFFing at the candidates while you sleep.
My Mods || My Mod Queue
Image
User avatar
Handyman    
Rear Fleet Admiral
Rear Fleet Admiral
 
Posts: 7459
Joined: 08 May 2006, 04:45
Location: Where no man has gone before!
Favorite Team: Seattle Seahawks
Gender: Male

Re: Avatar on index 0.1.0

Postby mashmight » 06 Nov 2006, 17:21

well done adding it now.

thanks
edit// ok this is strange!
You are not authorised to view, download or link from/to this site.


Blink
Image
mashmight
Cadet IV
Cadet IV
 
Posts: 46
Joined: 22 Oct 2006, 19:40
Gender: Male

Re: Avatar on index 0.1.0

Postby Highway of Life » 06 Nov 2006, 18:46

What did you click on to see that?

Was it here on STG? details?
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

PreviousNext

Return to Miscellaneous MODs, Hacks and Downloads

Who is online

Users browsing this forum: EasouSpider and 9 guests