I recently implemented the v4bJournal and a pretty nifty code it is too.
However I have just received a request to add avatars to the output (list of last 20 entries). I was wondering if anyone has tried this and how easy it might be. Also wondering if there is an off the peg library code that could be pasted in and modified to do this- knowing nothing at all about PHP I have largely used modules "as is" though I am confident enough with the HTML side of this and getting my output to look how I wish I couldnt for the life of me begin to figure out how to grab a members avatar to stick on the screen
Any help would be appreciated. Thank you
herman
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
V4bJournal etc
-
- Rank: Team Member
- Registered: Jan 05, 2003
- Last visit: May 28, 2010
- Posts: 775
Quote
I recently implemented the v4bJournal and a pretty nifty code it is too.
Thank you :P
Quote
However I have just received a request to add avatars to the output (list of last 20 entries)
All you want to do is show the personal avatar next to the username in the "Last 20" list? That should be easy to do ... give me a little while and I'll get back to you. If you don't hear from me within a few days (lets say by Monday), then this means that life interrupted me (or my thoughts); in that case just reply to this thread to get my attention again
Greetings
--> R -
- Rank: Team Member
- Registered: Jan 05, 2003
- Last visit: May 28, 2010
- Posts: 775
OK, try the following: in the file v4bJournal/inc/display_journal_list.inc on line 136, just after
Code
$output->TableRowStart();
add the following:
Code
$uservars = pnUserGetVars ($journal['owner_uid']);
$avatar = $uservars['pn_user_avatar'];
if ($avatar)
$avatar = "images/avatar/$avatar";
else
$avatar = 'v4bJournal/img/spacer.gif';
$output->Text('<td align="left" valign="middle" bgcolor="'.$bc1.'">');
$output->Text("<img src='$avatar' width='15' height='15'>");
$output->TableColEnd();
If you want to full sized avatar, just remove the 'width' and 'height' tags from the img tag.
You'll also have to add another column on the list header, right around line 63; this should be trivial ...
Please try this and let me know if it works for you ...
Greetings
--> R
- Moderated by:
- Support
