PDA

View Full Version : Forum Display Enhancements - Alternate Last Post Display


IdanB
05-28-2009, 10:00 PM
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 !.
Admincp option to set avatar width/height. added in v.1.1.4
Admincp option to select between profile and avatar picture. 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 :)

IdanB
05-29-2009, 10:45 AM
12 Jun 2009 (19:20) - Version 1.1.4 released :

FEATURE ADD: The template used for this mod no longer resides inside plugin code. Now it's installed as new template, so everyone can edit for their own needs.
FEATURE ADD: New admincp option: set width/height of picture shown
FEATURE ADD: New admincp option: allow selection between avatar and profile picture
FEATURE ADD: Now mod supports date format string with "j" & "S" chars.


06 Jun 2009 (20:25) - Version 1.1.3 released :

BUG FIX: Fixed regexp again to support more non-english chars on date.
VISUAL FIX: avatar picture now set to 40x40, so any non square pictures wont look "ugly" on display.
ADMINCP OPTION REMOVED: vbSEO admincp option removed - now works automatically inside code, doesnt need to select it
ADMINCP OPTION ADDED: select time display : differential (xxx ago) or orignal date & time as configured for vbulletin
ADMINCP OPTION ADDED: select "align to left" for the "Never" (if forum has no posts


05 Jun 2009 (21:08) - Version 1.1.2 released :

BUG-FIX: Fixed regexp to better support non-english chars on date
FEATURE-REMOVED: "D" letter on date time format not supported. I was mistaken at first to think i could. Having date showing as "Sunday" rather than number of day (1..31) doesnt allow me to take that & gnerate exact date from it. Therefore, this letter has been removed & no longer supported!


05 Jun 2009 (19:35) - Version 1.1.1 released :

BUG-FIX: Add code that handle case where last post showing poster nick of user that doesnt exsits anymore inside db (eg. deleted). In the above case, the profile link will be showing as "User Was Deleted From DB"
BUG-FIX: changed name of vars used in templates to have known prefix, should avoid any chance of conflict with some other mod.


05 Jun 2009 (13:15) - Version 1.1.0 released :

Code was re-written. Now mod support any language.
New admincp options for both vbSEO & the text used for thread title.


30 May 2009 (13:15) - Version 1.0.3 released :

BUG-FIX: now supporting any date / time string that user configured into admincp. Note the following chars are supported: "d","m","n","D","F","M","Y","y","h","H","g","G","i","s","a","A"
BUG-FIX: nicks now support space (also vbSEO fix that convert space to +)
FEATURE-ADD: Yesterday/Today & by now used as part of vbphrase & not hard-coded into plugin code.
BUG FIX: avoid any case of negative time in some condition.
VISUAL-FIX: added LEFT align inside Last Post column, so it will look much better.
Note: till any official announcement, this modification does not support any non-english boards (date locale will not be matched so likely to show Post Time N/A). I'm still trying to find workaround that will support any language & not attempt to patch code to be language specific.


29 May 2009 (18:33) - Version 1.0.2 released :

BUG-FIX: all mktime() added precondition to determine the nature of vars passed to it, to avoid input it with NULL. Should time variable(s) be missing, the hack will display "Post Time N/A" (phrase named: alt_lp_post_time_na);
vbSEO should now be fully fixed to show links correclty & according to vbSEO way. Eventually, no admincp were added, this was auto detected inside code.
BUG-FIX: some more extra checking were added to avoid some other coding pitfalls.


29 May 2009 (16:46) - Version 1.0.1 released :

BUG-FIX (*): did not read thread link correctly with vbSEO installed. This should be fixed & working - please report any further problems. (*) Note this still display links using showthread.php & member.php . Further support to vbSEO will be available on v.1.1.0 due to be released by tonight/tomorrow.
BUG-FIX: The table missing NOWRAP tag, so if skin doesnt set minimum width to "Last Post" column, it will looked bit streched.
BUG-FIX: Global plugin enable/disable option on admincp didnt work properly
BUG-DIX: date that was showing as "Yesterday" / "Today" was not properly handled by code. now fixed.
FEATURE-ADD: All text were created as phrases, allowing easy translation without need to go into code:
phrases added are:
alt_lp_last_post
alt_lp_by
alt_lp_years
alt_lp_year
alt_lp_weeks
alt_lp_week
alt_lp_days
alt_lp_day
alt_lp_hours
alt_lp_hour
alt_lp_min
alt_lp_mins
alt_lp_sec
alt_lp_secs
alt_lp_ago

4nawadir.com
05-29-2009, 10:57 AM
Nice mod
Installed
will be translated to arabic

4nawadir.com
05-29-2009, 11:04 AM
there is a probleme
you can see it here
http://leenkat.com/vbtest/forumdisplay.php?f=1

IdanB
05-29-2009, 11:07 AM
there is a probleme
you can see it here
http://leenkat.com/vbtest/forumdisplay.php?f=1

Did you upload the no avatar image to the images/avatar/ folder ?
if you look at the missing image path you'll see it's looking for:
http://www.leenkat.com/vbtest/images/avatars/anonymous_avatar.gif
that isnt there. Upload it.

Also note if you translate this you might need to go into code, as the "Last Post" & days/weeks/minutes text are hardcoded into plugin.
I'll try to place these expressions text out to vbphrase on next version.

EDIT: about the block width, it depands on skin, lemme try to place spacer gif to make this better.

EDIT2: wait 10m, will place text into phrase & will force minimum width to block, so your skin wont wrap text to break it.

4nawadir.com
05-29-2009, 11:20 AM
Done i upload it
but there is an author probleme
see it

IdanB
05-29-2009, 11:27 AM
Done i upload it
but there is an author probleme
see it

Like said, it's the skin thingy.
Gimme 10 minutes, i'll upload v1.0.1 that has both external phrases for every text & i'll also place some spacer inside table to force minimum width to colum.

saviola8x
05-29-2009, 11:40 AM
Not work on forum install vbSEO ~~"

IdanB
05-29-2009, 11:45 AM
Not work on forum install vbSEO ~~"

gimme html fragement of the link as seen by vbSEO when install, i'll re-do the regexp to support them as well

EDIT: gimme an hour, it will fixed now. will be working on v.1.0.1 once uploaded.

IdanB
05-29-2009, 01:00 PM
Version 1.0.1 posted.
Read changelog for full details of what's fixed & changed.

Few notes about vbSEO:

a "work-around" patch was made to make modification work with vbSEO installed till next version is out (1.1.0).
Patched revision allows to read vbSEO links & properly "translate" it to non-vbSEO links (showthread.php & member.php).
Note: since the vbSEO knows to read normal links and convert them to it's own link, it still works. Yea, i'm aware the vbSEO users would want the links to show same as vbSEO display it. That will be implnated as admincp option in next revision as mentioned above.

hotwheels
05-29-2009, 01:04 PM
Okay, right now it isn't working in forumdisplay in its default mode. When i set the second setting to no so the product will show on forumhome, it works, but i have this error all over the place "Warning: mktime() expects parameter 1 to be long, string given in [path]/includes/functions_forumlist.php(393) : eval()'d code on line 387"

Great idea though

IdanB
05-29-2009, 01:09 PM
Okay, right now it isn't working in forumdisplay in its default mode. When i set the second setting to no so the product will show on forumhome, it works, but i have this error all over the place "Warning: mktime() expects parameter 1 to be long, string given in [path]/includes/functions_forumlist.php(393) : eval()'d code on line 387"

Great idea though

o.O

ok, investigating it it now.
Changed mod status to beta till this matter resolved.
Expect revision update to fix this within next hour.

hotwheels
05-29-2009, 01:19 PM
Awesome........thanks.

IdanB
05-29-2009, 02:47 PM
version 1.0.2 uploaded.
Please report any problems.
The vbSEO should now be fully fixed, inlcuding links fix.

Once i'll get feedback this is working properly, i'll remove the beta status.

Extra Notes:
should any user see "Post Time NA", please be sure to check this plugin on default skin too before posting feedback & mention if this fails on both of the skins.
Since this plugin uses regular expression to fetch certain information (post time & link of last post) it is possible that someone has way-custom skin installed, a skin that not using "default" format for the "last post" (most custom skins are ok, so this should be rare case, but it's possible)

Hasann
05-29-2009, 02:57 PM
without vBSEO not working for me.

IdanB
05-29-2009, 03:05 PM
without vBSEO not working for me.

version 1.0.2 ?
Can you give more information as to what not working ?
Errors showing on page ? empty links ?

EDIT: also, have you checked it with default skin ?
I will gladly debug this to support other unforseen factors, but i'll need as much information as possible.
Could you please add screenshot that shows problem ?

Hasann
05-29-2009, 03:20 PM
sure I've installed version 1.0.2 on default skin and if I select turkish language it shows nothing.

http://img12.imageshack.us/img12/5281/altlastpost.jpg

IdanB
05-29-2009, 03:27 PM
I see.
Well few things:
1. minor: align to left, it's minor issue - will be fixed on next rev.
2. i see it detects avatar & nicks correctly, with exceptions of 2 users. Can you please paste their nicks, so i'll see what chars the regexp not catching. Is it English / Arab chars ?
3. As to the "Post Time: N/A" is it using non mm-dd-yyyy format on forum ? non english numbers ?

Any chance you can paste the html as seen on your forum, while mod is disabled ? (specific the html block inside the last post cell)
i want to match the regular expression in mod to ones you have, and understand what's different between what you have & what i have in mine.

EDIT2: As long as i can find in html some anchor in english (some html char / tag) that can be used to grabbing, this issue can be fixed in a common way to all languages. About fact turkish language showing nothing - this is due to regular expression. if we fail to find some common tags to use as refrence to fetch fields, this might require version specific code, as i'm not sure it's possible to make turkish & english regexp code that cover all cases...

Hasann
05-29-2009, 03:38 PM
I see.
Well few things:
1. minor: align to left, it's minor issue - will be fixed on next rev.
2. i see it detects avatar & nicks correctly, with exceptions of 2 users. Can you please paste their nicks, so i'll see what chars the regexp not catching. Is it English / Arab chars ?
3. As to the "Post Time: N/A" is it using non mm-dd-yyyy format on forum ? non english numbers ?

Any chance you can paste the html as seen on your forum, while mod is disabled ? (specific the html block inside the last post cell)
i want to match the regular expression in mod to ones you have, and understand what's different between what you have & what i have in mine.

2. no it is Turkish chars.
3. Im using tr_TR on Linux with %d %B %Y format on my forum

here is the html block inside the last post cell while mod is disabled.


<td class="alt2" width="36%">
<div class="smallfont" align="left">
<div>
<span style="white-space:nowrap">
<img class="inlineimg" src="http://www.vbulletin-turkey.com/forum/images/icons/document.png" alt="" border="0" />

<a href="showthread.php?goto=newpost&amp;t=4240" style="white-space:nowrap" title=" 'Css dosyası' Konusundaki birinci okunmamış Mesaja git"><strong>Css dosyası</strong></a></span>
</div>
<div style="white-space:nowrap; float:left">
G?nderen: <a href="member.php?find=lastposter&amp;f=9" rel="nofollow">Hasann</a>
</div>
<div align="right" style="white-space:nowrap">
29 Mayıs 2009 <span class="time">17:26</span>
<a href="showthread.php?p=30473#post30473"><img class="inlineimg" src="images/turkce/buttons/lastpost.gif" alt="son yazılan Mesajı g?ster" border="0" /></a>
</div>
</div>
</td>

IdanB
05-29-2009, 03:50 PM
about different non-default date - it's a "pitfall" i've indeed neglected - that will be fixed on next rev.
About turkish chars, lemme investiage this for some "work-around" solution, i might need your help too. I've sent yu a pm - if you have msn, that would help.

I'll update on any progress.

IdanB
05-29-2009, 05:21 PM
Update:
Till next version uploaded, i've updated "Known Bugs" sections - please be aware of them:
1. This mod supports english chars only.
2. The date format currently supported is only "m-d-Y".
3. vbSEO has problem with some of the nicks - sometimes shows as '' & link to profile with "a".
4. Time Diff sometimes shows incorrect negative value - still under check to locate cause.

EDIT:
Bug #1 - is under work but will take rather time to resolve (as this affect regular expressins) & every different language might have different "symptoms-bugs" . (a fix that will support all languages might be matter of days/weeks)
Bug #2 - is under work, i hope a fix is hours/days away.
Bugs #3 & #4 - currently being investigated.

Seems alot of factors that users has control of inside admincp can cause conflicts/pitfalls thats needs consideration in code.
Since i want as frequent updates as possible (but not too much, not to trouble you to keep re-download it), i'll release next revision when i have several bugs fixed.

IdanB
05-30-2009, 09:24 AM
version 1.0.3 was uploaded.
See changelog for complete bugs fixed.
I've also uploaded recent screenshot showing how it looks.

The most critical issue currently fixed in this version is the date / time string - now supporting any format input by user on admincp. The chars supported are : "d", "m", "n", "D", "F", "M", "Y", "y", "h", "H", "g", "G", "i", "s", "a", "A".

About vbSEO, i know few people with it, so i'll closely debug this with them, hoping that next version should be vbSEO bugs free (should any of those bugs in there still exists)

ArnyVee
05-30-2009, 12:04 PM
Very cool hack :)

Going to wait until most of the vBSEO bugs are fixed, but definitely installing this one :up:

goxy63
05-30-2009, 05:58 PM
Cool mod but as I can see not supporting other languages but english

Cant wait that other languages will be supported

Rated

IdanB
05-30-2009, 06:42 PM
EDIT2:

I have the solution !!! i dont understand why i didnt see it earlier :p
Expect v1.1.0 in next 30 minutes

EDIT3: will be uploaded tomorrow night, need to sleep. Waking to work in 5h.

dancue
05-30-2009, 09:53 PM
I'm not seeing any time data under the user info.

Before and after images attached.

whitetigergrowl
05-31-2009, 01:04 AM
'Last Post' doesn't tell the members anything about what the post is about. Any way to better fix that?

IdanB
05-31-2009, 04:07 AM
'Last Post' doesn't tell the members anything about what the post is about. Any way to better fix that?

Original request for mod was it be without full title so didnt add it.
Indeed fair point - i'll add it on as feature into admincp so this can be controlled.
I'm Currently at work, when i'll get back home tonight i'll upload v.1.1.0 (including this feature).

IdanB
05-31-2009, 04:09 AM
I'm not seeing any time data under the user info.

Before and after images attached.

The fixed version that will be uploaded tonight will resolve all of these, as i'm gonna to re-code entire mod in a different approach that has zero possible errors.

dancue
05-31-2009, 04:12 AM
sounds good. can't wait!

ArnyVee
05-31-2009, 10:07 AM
The fixed version that will be uploaded tonight will resolve all of these, as i'm gonna to re-code entire mod in a different approach that has zero possible errors.

Sounds good Idan! Got my eye on this one! :)

Darkgardevoir
06-01-2009, 07:16 AM
this is'nt working

IdanB
06-01-2009, 05:12 PM
v1.1.0 been postponed to weekend. There is some issue that needs resolving + i would like to better test it with vbSEO, and i rather make it 100% working & upload a working ver than upload something that will again work for some & for others will not.
Sadly this week been for me much longer hours @ work than i estimated. I'm too tired to debug this now. So this mod will be updated on the weekend (Saturday probably).

IdanB
06-05-2009, 01:05 PM
version 1.1.0 uploaded - code been through major face-up, rewritten it - the entire concept was changed. It should now support any language & fix all the known bugs !

romolus
06-05-2009, 01:58 PM
Hy, i have einstalled this mod.

but it is not working on the forum home.
on the Forum display it is ok!

i activated the forum home and an Error message is coming:

Pleas help.
my site: www.terramystik.lu

Thank's

Datenbankfehler in vBulletin 3.8.2:

Invalid SQL:
SELECT dateline, userid FROM `customavatar` WHERE userid =;

MySQL-Fehler : Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen bei '' in Zeile 1
Fehler-Nr. : 1064
Fehler-Zeit : Friday, 05.06.2009 @ 16:57:21
Datum : Friday, 05.06.2009 @ 16:57:21
Skript : http://www.terramystik.lu/index.php
Referrer : http://www.terramystik.lu/forumdisplay.php?f=1
IP-Adresse : 87.240.211.83
Benutzername : Heliopolis
Klassenname : vB_Database
MySQL-Version : 5.0.32-Debian_7etch6

troll2
06-05-2009, 02:23 PM
Installed latest version. Picture does not show on forum home or forum display.

IdanB
06-05-2009, 02:35 PM
but it is not working on the forum home.
on the Forum display it is ok!

Looking into it now.

EDIT: found the problem !!
The sub category on your forums called "LEHRE DES VERBORGENEN" has forum with last post from user with nick of "Kangiska" that user was deleted from your database. As result when i query for his userid i get no user_id which used later on for given query you've qouted.
My assumption was that any user shown on last post exsits on db & not deleted. (Prooved wrong)

EDIT2: Fixed it in code. Once other bug reported will be fixed i'll upload v1.1.1 that should fix the issue for you.

IdanB
06-05-2009, 02:49 PM
Installed latest version. Picture does not show on forum home or forum display.

can you provide plese with screenshot, or better with the image url loaded ?
(right clickj on image, properties & copy paste the "address" shown)

troll2
06-05-2009, 02:59 PM
Its a site under development. http://hmsplan.com/forum.php ...it looks like a conflict with some another forumbit code??

IdanB
06-05-2009, 03:05 PM
Its a site under development. http://hmsplan.com/forum.php ...it looks like a conflict with some another forumbit code??

might be conflict with other mod, only way to be sure of that is disable the rest & see if this still remains.
Does this show "broken image" where the avatar supposed to be ? as i think might be no image tag at all, and that might means some other mod uses var named $GLOBALS[avatar_img].
Will await on your reply, if when other mods disabled this works, i'll change var name to be unique for this mod, and i'll upload v1.1.1.

EDIT: if possible upload screenshot, i want to be sure if it's adds broken img tag or non at all.

troll2
06-05-2009, 03:14 PM
It does not show "broken image", most likely a conflict, but I have not been able to inentify which mod yet

IdanB
06-05-2009, 03:18 PM
It does not show "broken image", most likely a conflict, but I have not been able to inentify which mod yet

lemme change var names to unique, v1.1.1 will be uploaded in few minutes, lets just see if this solves it...

IdanB
06-05-2009, 03:41 PM
uploaded v1.1.1 - changed:
1. check for user id if not available.
2. renamed template vars to be unique.

Will check your reply later on.

troll2
06-05-2009, 03:55 PM
Installed v1.1.1. Shows on forum display http://hmsplan.com/forumdisplay.php?f=18 but not at forum home and Post Time reads N/A. ACP is correct set.

IdanB
06-05-2009, 04:03 PM
Installed v1.1.1. Shows on forum display http://hmsplan.com/forumdisplay.php?f=18 but not at forum home. ACP is correct set.

Please pay attention the fact the "default settings" on admincp is set to show plugin on forumdisplay only.
If needs to show on forumhome, go into admincp, vbulletin options -> vbulletin options, scroll down to "Alternate Last Post Display" click "Edit Settings" & on options screen make sure "Enable on Forum Home ?" is set to YES.

If above is set to YES & still not showing, can you please mention if this shows any errors ? And if indeed errors, please provide more information about it.

EDIT: About post time showing as N/A, can you please post your date/time strings used under admincp.

troll2
06-05-2009, 04:08 PM
Thanks for your support! :-) Enable on Forum Home is set to "YES" in ACP and no errors are showing at board. No picture is showing at forum home. date/time strings ?? not sure where to locate it. (F jS, Y) Also, please notice the left alignment when forum name is longer and "Use "Last Post" text as title ?" in ACP is set to "NO". http://hmsplan.com/forumdisplay.php?f=18 It would be great if your mod support / show on thread list too.

BlueNinjaGo
06-05-2009, 04:13 PM
Compatible with 3.7.x?

IdanB
06-05-2009, 04:41 PM
No picture is showing at forum home. date/time strings ?? not sure where to locate it. (F jS, Y) Also, please notice the left alignment when forum name is longer and "Use "Last Post" text as title ?" in ACP is set to "NO". http://hmsplan.com/forumdisplay.php?f=18 It would be great if this show on thread list too.

About date/time, i'm working right now on a fix that will better handle date locale in case of non-english months names. perhaps i didnt handle it as well as i thought.

About left align, Last i tested it it worked fine.
please provide some screenshot if you can, so i may better understand the problem you reffering to.

As a reminer note i'll mention the template generated by this plugin is using NOBR tag inside the TD table element. (This was added so it wont get "tiny & long" for people without proper minimum width hadle on their skin). Guess this is tradeoff as when need to support majority of people need to provide something that works best to all. But what's "hides" behind prevent statement means know how to handle your forum width. If not enough width available, then use the "Last Post" text option with YES, to save extra pixerls there. The "Last Post" block will NOT be resized due to NOBR tag.

About Thread List, i'll consider it as an option for future versions, at the moment trying to get this stable as possible before attempting to further add features.

IdanB
06-05-2009, 04:43 PM
Compatible with 3.7.x?

As far as i'm aware i didnt used any 3.8.x var that isnt available on 3.7.x, so i believe it should be compatible with 3.7.x or lower as well.
Since this mod doesnt perform any DB structure changes, you can safely install it without worrying about any "damage" being made. at worst case it just wont work & you can simply uninstall it from admincp.
I would appreciate if you could confirm compatibility for me.

troll2
06-05-2009, 05:17 PM
Thanks for adding thread list to your future dev list, l have attached a screenshot do display the left allignment issue

IdanB
06-05-2009, 05:21 PM
Uploaded v.1.1.2, should fix date problem for non english languages. Fixed the regexp for better support also added some neglected handle code for it.

IdanB
06-05-2009, 05:22 PM
Thanks for adding thread list to your future dev list, l have attached a screenshot do display the left allignment issue

When no post original template remains untouched.
I'll replace it with aligned code (as an option on admincp) on future version.

IdanB
06-05-2009, 05:42 PM
Note: i was reported the vbSEO auto convert the normal plugin links & properly handle it, so just keep the vbSEO option on admincp set to "NO".
Seems that feature is note need. It will be removed on next version.

Brandon Sheley
06-05-2009, 05:42 PM
* Brandon Sheley installed & it works great :)

mindhunter77
06-05-2009, 06:11 PM
Needs the ability to trim usernames, it throws styles way out wack when you have a long username.

IdanB
06-05-2009, 06:31 PM
Needs the ability to trim usernames, it throws styles way out wack when you have a long username.
how many nick chars would you advise to show before showing ... to it ?

I will add it as feature to next version.

dancue
06-05-2009, 07:42 PM
Why am I getting "Last Post Time N/A"?

goxy63
06-05-2009, 10:49 PM
1.Can you please edit mod for non english languages (serbian latin and cyrillic in my case)
Nicknames with lets say these signs šđčćž dont have avatars displayed

2.Also I would like to use original title with normal date and time (06-06-09 00:17)

Thanks for awesome hack but I just cant use it if its only for english letters

ArnyVee
06-06-2009, 01:35 AM
IdanB,

I have the tabbed forum home mod and this isn't showing for me. What do you suggest I do to get this to show?

IdanB
06-06-2009, 05:50 AM
Why am I getting "Last Post Time N/A"?

What time string are you using ?

IdanB
06-06-2009, 05:58 AM
1.Can you please edit mod for non english languages (serbian latin and cyrillic in my case)
Nicknames with lets say these signs šđčćž dont have avatars displayed

2.Also I would like to use original title with normal date and time (06-06-09 00:17)

Thanks for awesome hack but I just cant use it if its only for english letters

1. It should support non-english chars. For nick display i'm using built-in vbulletin variable called $lastpostinfo[lastposter] (same var that's inside the forumhome_lastpostby template). So unless some other mod that modify this var, it should display it correctly.

Only possible language problem conflict might be the date when using time string of "F" or "M". However, that should be also covered. I'm currently using the following regexp [a-zA-Z\xE0-\xFF]+ - as far as i know it should cover all language characters. If i'm mistaken, please provide feedback of your language range.

EDIT: i've tested some of the chars you've mentioned to the regexp, and indeed found 2 chars didnt catch by the regexp.
changing the regexp to: [a-zA-Z\x00-\xFF]+ should fix the problem. i'll upload it on v1.1.3

2.Original title already available as an option, check admincp (last option).

3. About "normal date", i'll see what i can do, perhaps i'll add it as admincp option in future version.

IdanB
06-06-2009, 06:06 AM
IdanB,

I have the tabbed forum home mod and this isn't showing for me. What do you suggest I do to get this to show?

hmmm, the forumhome page displayed relays on THIS_SCRIPT php define.
On normal case it's set to "index" & this is what i'm currently checking.
I think the tabbed home mod is based on forumdisplay categories, sending each tab to it's own sub category, but that should work (as currently forumdisplay is covered), unless the mod changes this define value.

If you want to help me code support for it, add some dummy plugin hook to "forumbit_display" with single line in it:

die(THIS_SCRIPT);

Then when reloading tabbed home page, it should kill echo (white page), but will print on top the value of define shown for the tabbed home.
Once that made (and you've written the value down), you can just delete the hook we've just created & everything will be back to normal.
With that i can allow certain bypass for the mentioned mod)

dancue
06-06-2009, 11:50 AM
What time string are you using ?
Are you referring to the time string within vbulletin?

h:i A

IdanB
06-06-2009, 02:31 PM
Are you referring to the time string within vbulletin?

h:i A

Yes. Dont think that time string is the problem.
What is current configuration for "Format For Date" ? and what language are you using ?

goxy63
06-06-2009, 03:32 PM
woooowww
This is what I call mod is supported, thanks for your kind reply

regarding to those chars, these are problem at my board but if you fixed those above that resolves my main problem

Please if you have time check these too

Cyrillic Alphabet
Б б, Г г, Д д, Ђ ђ, Ж ж, З з, И и, Л л, Љ љ, Њ њ, П п, Ћ ћ, У у, Ф ф, Ц ц, Ч ч, Џ џ, Ш ш

Latin alphabet
Đ, đ, Ž, Ć, Č, Š

Thanks a lot

cheers

keyness
06-06-2009, 03:49 PM
Nice hack! Thanks!

However I uninstalled because it looks untidy because of different dimensions of avatars. Also I had time issue too.

I'll reinstall when it looks more charming. Thanks again!

dancue
06-06-2009, 04:05 PM
Yes. Dont think that time string is the problem.
What is current configuration for "Format For Date" ? and what language are you using ?

m-d-Y

English

IdanB
06-06-2009, 04:07 PM
v1.1.3 will be uploaded in a few minutes.
Amoung fixes that should be within are:
1. fix for regexp for more non-english chars.
2. avatar pictures now will be forced to 40x40
3. vbSEO admincp option removed - no needed, automatically detected & handled.
4. 2 more admincp options:
A] option to select time format: xxx ago / normal date & time.
B] option to align left the "never" phrase

IdanB
06-06-2009, 04:08 PM
Nice hack! Thanks!

However I uninstalled because it looks untidy because of different dimensions of avatars. Also I had time issue too.

I'll reinstall when it looks more charming. Thanks again!

was fixed in code already - grab v1.1.3 when it's online.

dancue
06-06-2009, 04:14 PM
Very nice! Quick!!

ArnyVee
06-06-2009, 04:36 PM
Idan, great job on those quick fixes. :D

I'm going to try and do the debugging for the folks that have the Tabbed Forum Home mod and see if we can get that solved! :up:

IdanB
06-06-2009, 04:36 PM
uploaded version 1.1.3
Awaiting feedback on other stuff that might not be working.

@goxy63 - i tried to test it best i can, some characters i couldnt get to display on my text window (only getting it as ?, probably missing encoding installed on my pc).
Eventually I've set the regexp to \x30-\xFF, to avoid it seelct "space", as this would "screw" algorithm inside.

@dancue - the m-d-Y was tested on english & found to be working, if latest version (1.1.3) still giving you problem, add me to msn, will try to make some live chat to better debug this one (possibly some mod conflict).

IdanB
06-06-2009, 04:39 PM
Idan, great job on those quick fixes. :D

I'm going to try and do the debugging for the folks that have the Tabbed Forum Home mod and see if we can get that solved! :up:

Thanks for the help :)
When we find out whats missing i'll upload it as fix in v.1.1.4

troll2
06-06-2009, 04:50 PM
Great work, left alignment works, selecting "YES" does not show time passed since last post (xxx ago). Selecting "NO" to set the default date & time as configured by admincp works. It still does not show on forum home, but I think I am experiencing the same problem as described above as I am using "Tabbed Forum Home"

dancue
06-06-2009, 04:53 PM
Looks good, except "last post" is not appearing. And it would look a bit better and easier to understand if you added a "by" right before the user's name.

eg..."Last Post by xxx" or "Thread title by xxx"

IdanB
06-06-2009, 04:58 PM
Great work, left alignment works, selecting "YES" does not show time passed since last post (xxx ago). Selecting "NO" to set the default date & time as configured by admincp works. It still does not show on forum home, but I think I am experiencing the same problem as described above as I am using "Tabbed Forum Home"

Can you please post the time string you see on one of the forums under Last Post ?
(exact text as appears on your forum ##/##/## ##:##AM or any other pattern you have)

About the forum home, once we get this debbuged with this mod, i'll release fix for it.

IdanB
06-06-2009, 05:02 PM
Looks good, except "last post" is not appearing. And it would look a bit better and easier to understand if you added a "by" right before the user's name.

eg..."Last Post by xxx" or "Thread title by xxx"

It has "by" already, see the picture i've attached.
it's should be <link>Last Post</link> by <link>xxx</link>
Can you please provide screenshot so i may see what you mean, maybe i'm not following your exact intentions.

dancue
06-06-2009, 05:10 PM
It has "by" already, see the picture i've attached.
it's should be <link>Last Post</link> by <link>xxx</link>
Can you please provide screenshot so i may see what you mean, maybe i'm not following your exact intentions.

That's how I want it to be, but it is not showing up that way.

hmm...I just checked it out on Safari and it's showing up.

Let me clear my cache.

dancue
06-06-2009, 05:12 PM
Nope. Cleared my cache on FF and it still does not show.

goxy63
06-06-2009, 05:13 PM
Well none of characters mentioned above are not working with latest version
šđčćž
as well
Б б, Г г, Д д, Ђ ђ, Ж ж, З з, И и, Л л, Љ љ, Њ њ, П п, Ћ ћ, У у, Ф ф, Ц ц, Ч ч, Џ џ, Ш ш

If you need acces to my test forums let me know, I would be glad to help in this way

Cheers

troll2
06-06-2009, 05:26 PM
Can you please post the time string you see on one of the forums under Last Post ?
(exact text as appears on your forum ##/##/## ##:##AM or any other pattern you have)

About the forum home, once we get this debbuged with this mod, i'll release fix for it.

The time string is; May 6th, 2009 20:18 when set to "NO" and shows "Post Time N/A" when set to "YES".

Thanks for adding the fix (support) for "tabbed Forum home" to your list.

IdanB
06-06-2009, 05:54 PM
The time string is; May 6th, 2009 20:18 when set to "NO" and shows "Post Time N/A" when set to "YES".

Thanks for adding the fix (support) for "tabbed Forum home" to your list.

Please note the "S" format char currently not supported (not showing on supported char list i've written)
Currently supported format chars for date/time are : "d", "m", "n", "F", "M", "Y", "y", "h", "H", "g", "G", "i", "s", "a", "A"

I'll try to add support for it on next version as well.
Meanwhile, you can try to remove "S" char from the "Format For Date" string on admincp, and you'll see time show correctly.

IdanB
06-06-2009, 05:56 PM
Well none of characters mentioned above are not working with latest version
šđčćž
as well
Б б, Г г, Д д, Ђ ђ, Ж ж, З з, И и, Л л, Љ љ, Њ њ, П п, Ћ ћ, У у, Ф ф, Ц ц, Ч ч, Џ џ, Ш ш

If you need acces to my test forums let me know, I would be glad to help in this way

Cheers

Do you have msn ?
If so, please add me to there, i'll debug this on your test board next weekend.

IdanB
06-06-2009, 06:04 PM
Nope. Cleared my cache on FF and it still does not show.

Can you check if you have phrase called "alt_lp_by" showing on the phrase manager (on admincp) ?

g0dfather1984
06-06-2009, 06:08 PM
Works like a charm, grazie.

dancue
06-06-2009, 06:11 PM
ah...you know what it was?

It was vbOptimise.

I had to flush the cache from the options they provide.

Thanks man. Everything looks great. Hopefully you can add the option to allow the user to select the size (h and w) of the image, including allowing them to insert "0" for unlimited.

IdanB
06-06-2009, 06:13 PM
ah...you know what it was?

It was vbOptimise.

I had to flush the cache from the options they provide.

Thanks man. Everything looks great. Hopefully you can add the option to allow the user to select the size (h and w) of the image, including allowing them to insert "0" for unlimited.

sure, wouldnt be too hard to do :).
Expect it as feature on next version.

* feature added to TO-DO's list.

RedeemedWarrior
06-06-2009, 06:23 PM
any chance you can make it work so it will show last posts in subforum on forumhome?

currently only last post in a master forum shows

troll2
06-06-2009, 06:23 PM
Removing "S" from the date / time string in ACP did not have any effect, I`ll wait for your update :)

IdanB
06-06-2009, 07:45 PM
Removing "S" from the date / time string in ACP did not have any effect, I`ll wait for your update :)

ok. I'll debug that code section again, maybe it's something minor i overlooked.
Next revision expected to be released next Friday. I' hope v1.1.4 will eliminate all the bugs left :)

IdanB
06-06-2009, 07:48 PM
any chance you can make it work so it will show last posts in subforum on forumhome?

currently only last post in a master forum shows

Please provide some screenshot so i'll better understand what you reffering to.

keyness
06-06-2009, 09:11 PM
Nice job! Thanks!

compact123
06-07-2009, 01:26 AM
Good work sir. i have a problem;

Installed latest version. Picture does not show on forum display.

and add an option to change the icon size you can do?

thanks so much...

JMEWLS`
06-07-2009, 01:57 AM
What's the template so I can edit it a little. It doesn't span with "small font" CSS, and I want to adjust the arrangement like I can in the lastpost template.

saviola8x
06-07-2009, 06:05 AM
very nice.
Thanks : http://forum.svmtcn.net/ =)

denman75
06-07-2009, 06:07 AM
looks great ,great hack thank you sir

IdanB
06-07-2009, 09:22 AM
What's the template so I can edit it a little. It doesn't span with "small font" CSS, and I want to adjust the arrangement like I can in the lastpost template.

It's auto-template edit. You will find in mod 2 plugins named that end with " - Template Change" - one for Forum Home & other for Forum Display.
I'll allow the small font as an option for admincp on next version.

ArnyVee
06-07-2009, 01:42 PM
ok. I'll debug that code section again, maybe it's something minor i overlooked.
Next revision expected to be released next Friday. I' hope v1.1.4 will eliminate all the bugs left :)

Idan, did someone do the Tabbed Forum Home bug fix with you already? I haven't had a chance yet and just checking that you have something to work with already for 1.1.4 on that one.

compact123
06-07-2009, 03:57 PM
How do I like in this picture? Last post I want to look like the picture of the message. Thank you.

https://vborg.vbsupport.ru/

IdanB
06-07-2009, 04:21 PM
How do I like in this picture? Last post I want to look like the picture of the message. Thank you.

http://img193.imageshack.us/img193/1416/47940051.png

You can make this look like the picture with minor tweaks. (only edit required is to move the <br> location). All the rest is under admincp options.

1. Inside admincp, under "Plugin & products" -> "Plugin Manager".
Edit templates "Forum Display - Template Change" & "Forum Home - Template Change":

Locate this line:

$vbulletin->templatecache['forumhome_lastpostby'] = "<div align='left'><table width='100%'><tr><td align='left' width='40'>\$GLOBALS[alt_lp_avatar_img]</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>";


and replace with this line:

$vbulletin->templatecache['forumhome_lastpostby'] = "<div align='left'><table width='100%'><tr><td align='left' width='40'>\$GLOBALS[alt_lp_avatar_img]</td><td align='left' NOWRAP><a href='\$GLOBALS[alt_lp_last_post_link]'>\$GLOBALS[alt_lp_last_post_title]</a><br>$vbphrase[alt_lp_by] <a href='\$GLOBALS[alt_lp_last_poster_profle_link]'>\$GLOBALS[alt_lp_last_poster]</a> \$GLOBALS[alt_lp_last_post_time_ago]</td></tr></table></div>";


2. Inside admincp go to "Vbulletin Options" -> "Vbulletin Options", edit the "Alternate Last Post Display" options, and set the "Show differential time ?" option to NO.

3. Adjust the date/time string on vbulletin "Date and Time Options" as you please.

regards.

IdanB
06-07-2009, 04:23 PM
Idan, did someone do the Tabbed Forum Home bug fix with you already? I haven't had a chance yet and just checking that you have something to work with already for 1.1.4 on that one.

Not yet.
Do you have msn ?

IdanB
06-07-2009, 04:26 PM
and add an option to change the icon size you can do?


Already added to TO-DO's list for next version update.

blind-eddie
06-07-2009, 06:43 PM
On one of my sites, we use usergroup avatars & members can not change them. Would be nice if we had the option in the admincp/vbulletin options/Alternate Last Post Display to select from Profile pic or Avatar.

Thanks for the hack.

dancue
06-07-2009, 06:48 PM
How can I add the word "In" right before the thread title?

dancue
06-07-2009, 06:54 PM
Also, would be nice to have something like this (https://vborg.vbsupport.ru/showthread.php?t=145187) incorporated with this mod.

That mod already has a feature to view last post instead of first.

ArnyVee
06-07-2009, 07:04 PM
Not yet.
Do you have msn ?

I have MSN, AOL and Yahoo. When would you be available to chat?

IdanB
06-08-2009, 03:41 AM
On one of my sites, we use usergroup avatars & members can not change them. Would be nice if we had the option in the admincp/vbulletin options/Alternate Last Post Display to select from Profile pic or Avatar.

Thanks for the hack.

Will be added as feature on upcoming version or the next one.
Added to TO-DO's list.

IdanB
06-08-2009, 03:42 AM
I have MSN, AOL and Yahoo. When would you be available to chat?
I'll try to catch you online on the evenings (when i'm back from work), during next couple of days.

IdanB
06-08-2009, 03:44 AM
How can I add the word "In" right before the thread title?

Mod has 2 plugins ending with "template change" - check them - thats the template.
There you can add/customize it to your own needs.

merk_aus
06-08-2009, 07:28 AM
Wow, looks awesome thanks mate installed without any worries!

ArnyVee
06-08-2009, 10:51 PM
I'll try to catch you online on the evenings (when i'm back from work), during next couple of days.

I'm available now until later tonight Idan. :up:

Darkgardevoir
06-09-2009, 04:12 AM
it works now, but it has a problem with https://vborg.vbsupport.ru/showthread.php?t=177946 can you fix it?

troll2
06-10-2009, 12:46 PM
I installed the latest version of Article Forums which I also use. It looks like their handling of theadbit may have overwritten some of your code, as the Last Post avatar and title does not show anymore. I cannot confirm that this is the actual cause of the problem.

IdanB
06-10-2009, 05:06 PM
On weekend i'll take a look with ArnyVee about the tabbed forum home mod compatibility.

In general i'll say about any other mod(s)-compatibility issues: i can try to take a look, but it really depands on how other mods were implanted. If they are also based on "template replace", i'm not sure it's possible to make all co-exists without doing some manual edits.

Also remember this mod is a re-work of template and not mere add of block into existing template.

IdanB
06-12-2009, 01:00 PM
v1.1.4 is already underway, and several fixes were already made.

Current list of stuff already fixed/added:

New template - now the replaced template html located on master style template, so everyone can edit for his own needs.
bug fix: date/time string was missing proper support for "S" & "j" chars - now fixed & working.
admincp new features:

set width/height of pictures shown.
allow selection between avatar to profile picture.



Now working on solving the non-english chars bugs found by goxy63. Will do my best to find proper regexp there.

About Tabbed Forum Home modification conflict, i need your co-op as i dont have this modification installed myself. I've left ArnyVee pm about his msn, but got no reply yet.
At worst case, that fix will have to wait till next rev.

ArnyVee
06-12-2009, 01:52 PM
I responded to your PM Idan. I'm on vacation, but I have my laptop with me so I might be able to log on later tonight or tomorrow night. :)

blind-eddie
06-12-2009, 02:50 PM
Thanks IdanB

IdanB
06-12-2009, 03:34 PM
v.1.1.4 uploaded & now online.
The mod conflicts (tabbed home) & Cyrillic/Latin possible missing chars support are not fixed yet. See changelog for complete changes made.

Hasann
06-12-2009, 04:09 PM
How many queries ? in this version..

IdanB
06-12-2009, 04:17 PM
Amount of queries should be the same as previous version(s).
The "profile pic" support is alternate query to the avatar picture query.
All the rest of features added are mere variable / admincp options / php code, that does not require any SQL queries or affect stability.
The new template added is cached, so shouldnt be any problem...

troll2
06-12-2009, 05:04 PM
Hi,

Installed lastest for testing. Left alignment does not work anymore.
I added a screenshot

IdanB
06-12-2009, 05:11 PM
hmmm.. weird, it's working fine for me.
Any chance this is some other mod installed causing it ? caching templates / some sort of optimizer ?

aztecboi2003
06-12-2009, 06:18 PM
Downloaded and about to install. How do I find out how many querys my forumhome has, with and without this mod? Thanks.

IdanB
06-12-2009, 06:32 PM
Downloaded and about to install. How do I find out how many querys my forumhome has, with and without this mod? Thanks.

Place forum to debug mode.
Scroll to bottom before installation of this mod, see the queries number, install mod, and check number again.

roughly, there are about 2-3 queries performed per forumbit (for user id, avatar / profile) So it shouldnt be that of a problem.

aztecboi2003
06-12-2009, 06:42 PM
thanks. I'm backing up my db now. Once I figure out the debug mode I will check it out. I love all the support your providing here for this mod.

IdanB
06-12-2009, 07:03 PM
You need to place forums onto debug mode. You have 2 ways to do so:
1) manual: requires edit of config.php (located under /includes/ directory), specific adding this line:

$config['Misc']['debug'] = true;

2) automatic: download debug mode plugin:
https://vborg.vbsupport.ru/showthread.php?t=196422
This plugin will enable you with options to set debug mode on/off on both forums & admincp.

aztecboi2003
06-12-2009, 07:16 PM
Thanks. My querys went from 25 to 61. I still like this mod though.

IdanB
06-12-2009, 07:35 PM
yea, well, like said, it adds max of queries x2/3 per forumbit, meanining the more forums there are, the more queries it will "hog".
(so for "worst case" example, should there be 10 forums visible, it will add 10x3 = 30 more queries)
If you wish better performance, you can enable this on forum display only, and not on forum home.

IdanB
06-12-2009, 07:44 PM
1.Can you please edit mod for non english languages (serbian latin and cyrillic in my case)
Nicknames with lets say these signs šđčćž dont have avatars displayed


Just verified this on your test devbelop board, i can say (without a doubt), this has nothing to do with non-english characters.

Problem showing there is avatar is missing for certain users, but that not due to user characters (user id is obtain inside mod correctly).

In close exmaine & debug of this case, it showed the db is not ok & possibly corrupted.
For example user id of x has inside db avatar id of y, but when doing query for avatar id of y inside avatar table, the query returns NULL. (emtpy).

I could "fix" mod in this case to still show "anoymous" avatar if 2nd query returns NULL, but logic suggest admin better fix the problem rather than cover un-logical cases into mod.

If user has avatarid, then he should have avatar. remove of avatar should have removed his avatarid field from user table in db.
if you have some mod installed that manages your users avatar, there is possible bug with it, as it doesnt update your database in all proper locations.

dancue
06-12-2009, 08:33 PM
Hi,

Installed lastest for testing. Left alignment does not work anymore.
I added a screenshot

Same here.

I've flushed my cache through vboptimise and still not aligning to the left.

dancue
06-12-2009, 08:35 PM
question about the image sizes.

If I place a value for height and nothing for width will it automatically keep it's original ratio?

IdanB
06-13-2009, 07:23 AM
question about the image sizes.

If I place a values for height and nothing for width will it automatically keep it's original ratio?

No. according to feedback & common sense, my initial assumption was that for "esthetic reasons" users would want all pics to have same width & height, else result isnt looking nice (it's really matter of original avatar dimensions).

IdanB
06-13-2009, 07:28 AM
Same here.

I've flushed my cache through vboptimise and still not aligning to the left.

ok, i'll try to find source of problem & fix it.
Pretty much the major difference between 1.1.3 to 1.1.4 is i'v taken the replaced html from plugin code to template, but wierd thing is the "left align" is still same code as version 1.1.3, and it's defined on plugin code.

Can you try to set "left align" to NO, save settings, then set to YES & save again ?
Perhaps since options number are not the same as previous version, the db still has different value for these & needs to be updated.

pet0etie
06-14-2009, 06:44 PM
last night i had the forum crashing after installing this plugin (so nobody could consult the main forum page)

on our forum we have a user called "/!\K.v.K./!\Boechie/!\" who has posted in a thread ... being the last one to post, his name, avatar and posting time is (should be) displayed on the index-page

but ... when i check your code u are using this query :
$q_text = "SELECT userid, avatarid, avatarrevision FROM `" . TABLE_PREFIX . "user` WHERE username = \"".$lastpostinfo[lastposter]."\"";

putting in the name of "/!\K.v.K./!\Boechie/!\" into that query i get :
$q_text = "SELECT userid, avatarid, avatarrevision FROM `user` WHERE username = \"/!\K.v.K./!\Boechie/!\\"";

your query is getting 'screwed up' because he sees the last \ of the name "/!\K.v.K./!\Boechie/!\" as an escape-character

shouldn't the query be changed towards this query ?
$q_text = "SELECT userid, avatarid, avatarrevision FROM `" . TABLE_PREFIX . "user` WHERE username = \"". $vbulletin->db->escape_string($lastpostinfo[lastposter]) ."\"";

thanks for looking up / solving the problem

pet0etie

IdanB
06-15-2009, 06:34 PM
last night i had the forum crashing after installing this plugin (so nobody could consult the main forum page)

on our forum we have a user called "/!\K.v.K./!\Boechie/!\" who has posted in a thread ... being the last one to post, his name, avatar and posting time is (should be) displayed on the index-page

but ... when i check your code u are using this query :
$q_text = "SELECT userid, avatarid, avatarrevision FROM `" . TABLE_PREFIX . "user` WHERE username = \"".$lastpostinfo[lastposter]."\"";

putting in the name of "/!\K.v.K./!\Boechie/!\" into that query i get :
$q_text = "SELECT userid, avatarid, avatarrevision FROM `user` WHERE username = \"/!\K.v.K./!\Boechie/!\\"";

your query is getting 'screwed up' because he sees the last \ of the name "/!\K.v.K./!\Boechie/!\" as an escape-character

shouldn't the query be changed towards this query ?
$q_text = "SELECT userid, avatarid, avatarrevision FROM `" . TABLE_PREFIX . "user` WHERE username = \"". $vbulletin->db->escape_string($lastpostinfo[lastposter]) ."\"";

thanks for looking up / solving the problem

pet0etie

Yes, you are correct.
I'll have it fix on upcoming revision. Thanks for the heads up.

nascartr
07-11-2009, 04:32 PM
Would love to use this, has anyone found a fix for the Tabbed Forum Home mod? Thanks!

goxy63
07-19-2009, 02:54 PM
not working with this mod
"Hide Last Post Date For Guests"
https://vborg.vbsupport.ru/showthread.php?p=1851088#post1851088

Any suggestions, or even better making this mod working with mentioned one?

Thanks

IdanB
07-19-2009, 05:13 PM
I've been busy last few weeks with coding/re-lunch of vBHackers community. Once that goes live & behind me (soon enough) i'll try to address these open issues.

nascartr
07-19-2009, 11:29 PM
Thanks for the reply!

TheLastSuperman
08-08-2009, 10:12 PM
I modified it a bit and have it working w/ the Forum Home Tabs mod by Bobster65!

Only setback.. which I thought was posted previously while reading this mods thread earlier is custom avatars are not showing...

We upload then create custom avatars, several categories and let our users select them... only problem is (even before I modified to work w/ the tabs) with the product installed and enabled to show on forumdisplay only it will show the "dummy" avatar but not the user selected one... if I enable to show custom profile pic it works but I need our admin defined but user selected Avatars to display... I need help with this. If you don't come on here by later tonight I might join on your site and PM if not it will be first thing in the morning... then we can have it updated to fix that as some may not have my problem and can benefit from the update.

Ok, I have some unfinished work to go do so :p installed but disabled for now until I find time to get it working with the custom avatars we let our members choose from.

S-MAN

mike2902
08-09-2009, 01:22 AM
The avatars are showing on Forum home but not inside each individual forum. Any ideas? And yes I have it set to yes in the admin cp.

IdanB
08-09-2009, 05:44 PM
This will be checked as soon as i can.
As mentioned in previous posts, i've been quite busy with other urgent projects, some are still underway.
I will do my best to upload fix for it this weekend (14/8/809 night).

TheLastSuperman
08-09-2009, 09:34 PM
This will be checked as soon as i can.
As mentioned in previous posts, i've been quite busy with other urgent projects, some are still underway.
I will do my best to upload fix for it this weekend (14/8/809 night).

I assume you had already figured out the tabbed forum home and it will be included w/ the update or did I just fall in to the saying? :D

Let me know if not so I can PM you what I found. Also I found another mod for user avatars on threadbit so it shows in all threads and plan to merge it with this one or splice etc.

S-MAN

Front Range 4x4
08-10-2009, 10:31 PM
Marked as Installed. Very nice addition and improves the look considerably. Thanks IdanB!

One issue: Enable on Forum Display? - Yes/No (default YES) isn't working for me. I can't get it to show on Forum Display probably due to some template mods I've made, Forum Home is fine.

Any tip on what to check to try to get it working on Forum Display?

Thanks again.

IdanB
08-11-2009, 02:24 PM
I assume you had already figured out the tabbed forum home and it will be included w/ the update or did I just fall in to the saying? :D


tbh i never had a chance to inspect it closely to figure this one out, as i wasnt using this mod myself.
Few people offered to help use their board as debug platform for this bug, but due to different timezone i had trouble get online same time as other users that offered to help debug this one.

If you can pm me everything you fixed & i'll continue work from there.

Thanks.
Idan.

TheLastSuperman
08-12-2009, 05:22 PM
tbh i never had a chance to inspect it closely to figure this one out, as i wasnt using this mod myself.
Few people offered to help use their board as debug platform for this bug, but due to different timezone i had trouble get online same time as other users that offered to help debug this one.

If you can pm me everything you fixed & i'll continue work from there.

Thanks.
Idan.

I sure will and it will be sent later today, I believe my problem was related to not storing avatars in a folder instead of the DB however I don't want to change that yet... I'll forward what I have so far as some can use it w/ the tabbed mod and some won't depending on the avatar settings I assume. Sit tight, I'll have it forwarded in about an hour or so when I finish up my searches on here ;)

S-MAN

nascartr
08-23-2009, 05:31 PM
I store my avatars in a folder and not the database so I believe the problem is just the way the modification is coded. I'm still hoping for a fix soon for the Tabbed Forum Home mod!

TheLastSuperman
08-23-2009, 10:23 PM
I store my avatars in a folder and not the database so I believe the problem is just the way the modification is coded. I'm still hoping for a fix soon for the Tabbed Forum Home mod!

CRUD!!! I knew I was forgetting something the other night, I found a fix for naother mod and PM'd it thinking I had covered everything lol.. IdanB and nascartr I'll BRB w/ info.

S-MAN

TheLastSuperman
08-23-2009, 10:37 PM
Ok IdanB... in the actual xml I modified this part you'll see what I added...

// 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:

<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_vie w') . '";');

// 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.

ArnyVee
08-23-2009, 11:23 PM
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:

nascartr
08-23-2009, 11:50 PM
Ok IdanB... in the actual xml I modified this part you'll see what I added...

// 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:

<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_vie w') . '";');

// 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.

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

TheLastSuperman
08-24-2009, 05:27 PM
When I install the attached XML I get this error.

That was for IdanB to review not for use!

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.

S-MAN

nascartr
08-25-2009, 04:16 AM
I appreciate it TLS!

TheLastSuperman
08-25-2009, 02:07 PM
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 appreciate it TLS!

No problem :p

kalisekj
08-27-2009, 07:21 PM
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

Aclikyano
09-06-2009, 02:37 AM
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

Log on
09-06-2009, 08:05 AM
very nice

thank u :)

mattwmc2001
09-06-2009, 09:03 PM
Cool!

Looks good.

Wonder if there is a separate way to do this for threads in a forum - so the avatar pics could be smaller?

TimberFloorAu
09-06-2009, 10:08 PM
Looks great thanks.

Installed.

TimberFloorAu
09-06-2009, 10:38 PM
Would like to see:

if we set: Use "Last Post" text as title ? to NO

then

in forum display last post appears: like

TimberFloorAu Avatar
Thread Game: Word Association
by TimberFloorAu
2 Minutes, 11 Seconds ago

instead of

TimberFloorAu Avatar Thread Game: Word Association by TimberFloorAu
2 Minutes, 11 Seconds ago

as it ruins our style. Perhaps its just a <br /> addition within the xml

TimberFloorAu
09-06-2009, 10:49 PM
Sorted:

Changed: template : forumhome_lastpostby_alternate_view

to:

<div align='left'>
<table width='100%'>
<tr>
<td align='left' width='\$GLOBALS[alt_lp_pic_width]'>$GLOBALS[alt_lp_avatar_img]</td>
<td align='left' NOWRAP><a href='$GLOBALS[alt_lp_last_post_link]'>$GLOBALS[alt_lp_last_post_title]</a><br /> $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>

TheTrust
09-07-2009, 05:40 AM
Thanx IdanB, it working well
regards

TimberFloorAu
09-07-2009, 07:23 PM
I am noticing the times arent quite as accurate as you would hope.

at 6.22am this morning, the actual last post on a particular thread was Yesterday, 08:28 PM

On forumhome, it is listed as: 1 Day, 6 Hours ago

hmmm that aint right lol

TimberFloorAu
09-07-2009, 07:28 PM
In fact anything overnight, seems to be reported as 1 day 6 hrs ago

TheTrust
09-08-2009, 12:06 AM
Thank you IdanB for this excellent work
I have tested and it is working fine and so easy to install and configure, and this is my opinion:

* it is not working properly with vBSEO, the lastpost line it is come in different size not fixed as 40px as the width.
* i have succeeded to translated into Arabic, but the font of time and details of last post is in large fonts, so i cant configure the size of the fonts.
=====
If you can make other ((Alternate Last Post hack)) without the time, date and last post by.
just to install the Avatar next to the default of forumhome_lastpostby.

Many thanks again.

Aclikyano
09-08-2009, 09:43 PM
this hack not working at all on my board... do you need SEO installed?

IdanB
01-23-2010, 11:05 AM
I'm sorry for lack of support last 3-4 months, i wasn't online due to personal problems (wont get into it here).
Important thing is now i'm back & active.
I will try to attend any bugs reported here soon enough.

IdanB
01-23-2010, 11:07 AM
TLS - i thank you for your help.
I will check your notes during next 3-4 days & come up with fix if required.

Erica1977
02-04-2010, 12:50 PM
Is there any way that the Users Name get there color Group on this hack just wondering cause before i added this hack the way the forum looked without this would show the color group user name.

IdanB
02-05-2010, 02:18 PM
Is there any way that the Users Name get there color Group on this hack just wondering cause before i added this hack the way the forum looked without this would show the color group user name.

Based on default skin colors ? or we are talking about custom color mod already installed on forum ?

Erica1977
02-05-2010, 11:09 PM
Based on default skin colors ? or we are talking about custom color mod already installed on forum ?

Ok would be on default theme and any other custom theme meaning theres a hack color thread users cant remember name but example right now admins names are red , users green, supermod dark blue, now before i added it your hack on main forum you would see a post by a user or admin or super mod and would show there colors but by me adding this hack on main forum now and users and supermod has there name red color so there colors are gone with this mode.

Erica1977
02-06-2010, 12:05 AM
I found what it's called it's Colors For Usergroup In Forum Last Post heres that link as well.

https://vborg.vbsupport.ru/showthread.php?t=218773&highlight=Username+HTML+Markup

now it use to show there colors but adding your hack now all members from admin and down just on main forum shows the default color to everyone so there names are all same color now instead of it using there user color.

Charles_1
03-12-2010, 09:26 PM
yea, well, like said, it adds max of queries x2/3 per forumbit, meanining the more forums there are, the more queries it will "hog".
(so for "worst case" example, should there be 10 forums visible, it will add 10x3 = 30 more queries)
If you wish better performance, you can enable this on forum display only, and not on forum home.
Well, in our forum (34 forumbits) number of queries in forumhome jumped from 23 to 99, which is quite high :-). Is there some chance to improve this? Becouse idea is great, forum looks really more interesting with this.

goxy63
05-16-2010, 09:30 AM
Anyone using this on vb4?

I-TECH-INN
06-05-2010, 04:56 PM
really would like for this to work with tabbed forum home mod :) im counting on you man

goshalim
06-09-2010, 06:58 AM
Very nice installed , the only problem is the time set up where is shown Post Time N/A

goshalim
06-09-2010, 07:20 AM
Found it

2. Inside admincp go to "Vbulletin Options" -> "Vbulletin Options", edit the "Alternate Last Post Display" options, and set the "Show differential time ?" option to NO.

3. Adjust the date/time string on vbulletin "Date and Time Options" as you please.

goshalim
06-09-2010, 11:40 AM
Hi its me again !!!

I have a question , is it possible instead of the wording Last Post , that it is written the name of the last post.

marshal_ramdev
06-11-2010, 07:42 PM
thanks for this !

grey_goose
11-24-2010, 12:14 AM
Any way to get "by username" on a 2nd line? the thread title and username is just too long on one line...

bada_bing
11-24-2010, 05:51 PM
really would like for this to work with tabbed forum home mod :) im counting on you man

I second this... Nice Mod is the coder can respond and fix some of the bugs

TitanJeff
10-28-2011, 02:15 PM
Nice mod. I know it's been a while since anyone posted here but would like to find a way that avs which are no square are not stretched. Maybe set the width at 40 but leave the depth blank if the goal is to keep it in proportion?

Also, is there a way to adjust the font size for the last post/date text?

Thanks.

bada_bing
11-17-2011, 03:14 AM
I second this... Nice Mod is the coder can respond and fix some of the bugs

Will you ever add this function ?

J19784B5A39B
01-20-2012, 09:41 PM
This product does not work with version v.3.8.7? Thanks

Zylantex
01-21-2012, 11:37 AM
I've just installed this on 3.8.4 PL 2 and it only works on the home page.
It does not work on individual forum pages.
Yes I have checked that I have made the correct selections.

CoffeeLovesYou
01-21-2012, 11:42 PM
MegaUpload was shot down by US so I guess this mod can be thrown in the graveyard or something lol

SBlueman
12-01-2012, 03:40 AM
What do I edit where so I can add this feature to new thread searches and viewing a forum?

SBlueman
12-29-2012, 06:16 PM
Error with install on 3.8.6:

Everything's ok on forum home:
https://vborg.vbsupport.ru/external/2012/12/2.png

But forum display is not changing:
https://vborg.vbsupport.ru/external/2012/12/3.png

Even though the option is selected in the admin panel:
https://vborg.vbsupport.ru/external/2012/12/4.png

Been Told
02-02-2013, 11:58 AM
Not working on 3.8.7

Frosti
02-02-2013, 12:47 PM
I have 3.8.7 and it works just fine!!!

BUT, I have the same problem as SBlueman, does not work on forumdisplay

muimui
04-30-2013, 08:11 AM
im looking for this,but its little different.
https://vborg.vbsupport.ru/showthread.php?t=297552