Pligg CMS Forums


Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials



[MOD] 10 second mod to use small avatars in story or summary

Advanced Tutorials for Modifying your Pligg site


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-17-2008, 12:01 AM
catchpen's Avatar
Coder
 
Join Date: Jan 2008
Posts: 210
[MOD] 10 second mod to use small avatars in story or summary

This will give you the option to use small or large Avatars in the story or link summary pages
Open up your pligg root/ libs folder/ link.php
find this line. around line 473 in 9.9 version
Code:
$smarty->assign('Avatar_ImgSrc', get_avatar('large', "", "", "", $this->userid));
add this line right underneath:
Code:
$smarty->assign('Avatar_ImgSrcs', get_avatar('small', "", "", "", $this->userid));
Now just use
Code:
{if $UseAvatars neq "0"}<span id="ls_avatar-{$link_shakebox_index}"><img src="{$Avatar_ImgSrcs}" align="absmiddle"/></span>
(changes in red) in the link_summary.tpl of your template where you want a small avatar, you might not need the align="absmiddle".

or just the default
Code:
{if $UseAvatars neq "0"}<span id="ls_avatar-{$link_shakebox_index}"><img src="{$Avatar_ImgSrc}" alt="Avatar"/></span>{/if}
is still usable for the large avatar

Now if only this would work in sidebar modules.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
In story page, only summary shown observer_24_7 General Help 7 06-25-2008 08:53 PM
How to direct story title in summary page to the original story? chris79 General Help 4 02-03-2008 07:28 PM
How do I change the story summary Romac Template Support 1 01-20-2008 01:04 AM
Removing part of the story from summary, but not from the complete story not2serious General Help 10 12-29-2007 10:56 AM
full story (not summary) on index page revolver General Help 2 06-24-2007 11:03 AM

Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Use the coupon code PLIGG at Dreamhost.com to receive a discount of up to $84.00 Make a donation to support Pligg CMS development