Version: 1.1.4, by IdanB
Developer Last Online: May 2010
Category: Forum Display Enhancements -
Version: 3.8.2
Rating:
Released: 05-28-2009
Last Update: 06-11-2009
Installs: 93
Uses Plugins Auto-Templates
Additional Files Is in Beta Stage
No support by the author.
Alternate Last Post Display
By: Idan B.
1. Description & Usage:
Alternate Last Post hack will allow the forum admin to make the "Last Post" column on forum look different (have another/better layout):
Hack will make it with user avatar picture & instead of showing post date, it will show "time diff" since the post (for example: 4 Hours, 5 Minutes ago") - See pictures in attachment for better understanding. :up:
This Hack can be enabled on both Forum Home & forum Display or Forum Display Only.
The hack was develop for request of Theater (request was made here: https://vborg.vbsupport.ru/showthread.php?t=214212 )
I assumed this request might be "handy" to other users of community, so developed it to be a fully working modification.
2. Installation:
Please click Mark as Installed.
Installation is pretty easy - just download & install:
Extract zip for product xml & no-avatar picture.
Goto: AdminCP->Plugin System->Manage Products : Choose "Add/Import Product" and import this product xml (product-alt_last_post.xml)
Upload the "anonymous_avatar.gif" file onto /images/avatars/ directory. If testing it on your develop board, be sure to upload there as well.
3. Upgrade From Older Version:
1. uninstall previous version
2. Download new version xml & install as instructed in previous section.
4. Configuration:
Once installed, the "Vbulletin Options" under admincp will have extra section:
Section name: "Alternate Last Post Display"
Enabled ? - Yes/No (default YES)
Enable on Forum Home ? - Yes/No (default NO)
Enable on Forum Display ? - Yes/No (default YES)
Use "Last Post" text as title ? - Yes/No (default YES)
Show differential time ? - Yes/No (default YES)
Align "Never" to LEFT ? - Yes/No (default YES)
Use profile picture instead of avatar ? - Yes/No (default NO)
Picture width - INT (default: 40)
Picture height - INT (default: 40)
5. Known Bugs:
Forum Tabbbed modification has known competability with this mod - result it is not showing on forumhome. Currently debugging this one to allow fix on next version.
v1.1.4 released. Since v.1.1.0 code was re-writeen completely from "scratch" and now it should support multi-languages (other than english) ! Note: Cyrillic & Latin chars reported to have some issues, still under check)
See changelog below for full description of stuff fixed.
6. TO-DO's LIST (Next Versions):
Allow thread view option on admincp.
Other mods (such as Forum Tabbed Modification) conflict fixes - under checking !.
[S]Admincp option to set avatar width/height.[/S] added in v.1.1.4
[S]Admincp option to select between profile and avatar picture.[/S] added in v.1.1.4
NOTE: Currently supported format chars for date/time (v1.1.4) are :
Date: "j","d", "m", "n", "F", "M", "Y", "y","S"
Time: "h", "H", "g", "G", "i", "s", "a", "A".
Any other chars will result with Post Time: N/A displayed !
NOTE: i've left v1.1.3 and added in addition the v1.1.4, just in case anyone has problem, he can download old version & rollback.
Enjoy hack & dont forget to click Mark as Installed
Ok IdanB... in the actual xml I modified this part you'll see what I added...
Code:
// Code written by Idan Bismut (c) 2009
// Copy and/or re-use of this code (or part of it) without author approval in writing is forbidden
if ( $vbulletin->options['alt_lp_global_enabled'] == 1)
{
if ( ( ($vbulletin->options['alt_lp_enable_on_forumhome'] == 1) && (THIS_SCRIPT == 'index') ) || ( ($vbulletin->options['alt_lp_enable_in_forumdisplay'] == 1) && (THIS_SCRIPT == 'forumdisplay') ) || ( ($vbulletin->options['alt_lp_enable_in_forumdisplay'] == 1) && (THIS_SCRIPT == 'tabforumhome') ) )
{
Plus another instance near the bottom:
Code:
<title>Forum Home - Template Change</title>
<hookname>forumhome_start</hookname>
<phpcode><![CDATA[// Alternate Last Post Display Modification
// ----------------------------------------
// Code written by Idan Bismut (c) 2009
// Copy and/or re-use of this code (or part of it) without author approval in writing is forbidden
if ( $vbulletin->options['alt_lp_global_enabled'] == 1)
{
if ( ($vbulletin->options['alt_lp_enable_on_forumhome'] == 1) && (THIS_SCRIPT == 'index') || ( ($vbulletin->options['alt_lp_enable_on_forumhome'] == 1) && (THIS_SCRIPT == 'tabforumhome') ) )
{
// Fixed in v.1.1.4 - now all inside template, so user may update it as they please !
//$vbulletin->templatecache['forumhome_lastpostby'] = "<div align='left'><table width='100%'><tr><td align='left' width='40'>\$vbulletin->options['usefileavatar']</td><td align='left' NOWRAP><a href='\$GLOBALS[alt_lp_last_post_link]'>\$GLOBALS[alt_lp_last_post_title]</a> $vbphrase[alt_lp_by] <a href='\$GLOBALS[alt_lp_last_poster_profle_link]'>\$GLOBALS[alt_lp_last_poster]</a><br>\$GLOBALS[alt_lp_last_post_time_ago]</td></tr></table></div>";
$vbulletin->templatecache['forumhome_lastpostby'] = $vbulletin->templatecache['forumhome_lastpostby_alternate_view'];
//eval('$vbulletin->templatecache[\'forumhome_lastpostby\'] = "' . fetch_template('forumhome_lastpostby_alternate_view') . '";');
// Reload template so the first bit will be updated as well
eval('$forum[\'lastpostinfo\'] = "' . fetch_template('forumhome_lastpostby') . '";');
}
}]]></phpcode>
</plugin>
And I believe that was it... I had another similar mod for Avatars in another area of the forum so I had to change that as well but don't think they were directly related. So to sum it up all I did (sorry I had to backtrack due to heavily modifying that similar mod that was for threadbit etc) was add in another && this script etc w/ the forumhometab named as the if this script.
S-MAN
Edit: See attached copy of XML that has been modified for my forum w/ this && this_script for Tabbed Forum Home.
When I install the attached XML I get this error.
Quote:
Fatal error: Call to a member function query_first() on a non-object in /home/nascartr/public_html/community/includes/functions_forumlist.php(393) : eval()'d code on line 402
I'll double check it later I'm just in the middle of something and need to find a mod real quick but hold tight I'll see what I can fix up for you but better to let the developer fix imo.
Michael, you think it's safe for me to use your product for my site? I haven't been following this one too closely as of late, but noticed this post tonight :up:
sorry Arny I completely missed that post but no, I would wait for IdanB to re-release with an update, I had to change other codes for mine considering how we store our avatars something with avatar[0] I believe but let me look into it again real quick for nascartr as I said last night.
I have DNP Media Installed with the forumhome addon. So this Mod works on forum display and on forumhome but on forumhome I get the following errors at the top of the site. I have disabled forumhome until I get hopefully some feedback. I am running a heavily modded VB 3.82 @ http://freeonlinemoviesforum.com
Warning: Cannot use a scalar value as an array in [path]/index.php(67) : eval()'d code(200) : eval()'d code on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at [path]/includes/class_core.php:3318) in [path]/musicajax.php on line 15
please help, i dont know why i am getting this link on all the avatars on forumhome
they come up as the anonymous avatar even when user has avatar selected and it links to
mysite/forums/User%20Was%20Deleted%20From%20DB