![]() |
Inspired in wluke's hack:
open forumdisplay.php find code: $threads=$DB_site->query(" SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')." thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postus erid, lastposter,thread.dateline, replace it with: $threads=$DB_site->query(" SELECT $dotuserid $votequery ".iif($foruminfo[allowicons],'icon.title as icontitle,icon.iconpath,','')." thread.threadid,thread.title,lastpost, forumid,pollid,open,replycount,postusername,postus erid, lastposter,thread.dateline AS threadstart, find code:(2x) $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]); $thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]); insert after it: $thread[threadstartdate]=vbdate($dateformat,$thread[threadstart]); $thread[threadstarttime]=vbdate($timeformat,$thread[threadstart]); save and close forumdisplay.php edit forumdisplaybit template find: <td bgcolor="{secondaltcolor}" width="30%" nowrap><normalfont>$thread[postedby] replace it with: <td bgcolor="{secondaltcolor}" width="30%" nowrap><smallfont>$thread[threadstartdate] <font color="{timecolor}">$thread[threadstarttime]</font><br> by $thread[postedby]</smallfont></td> save it done |
What does this hack do and where can we see an example of it?
|
It displays you when the thread was started.
For example: thread starter nuno on 05-26-2001 05:28 PM |
|
Nice hack man !!! its working great ! easy to install, i had it working in 3 minutes. nice !!!
My members are very happy now, tnx again. RoseValleY |
Great hack :), install it with ease!
|
Odd. I've been doing the same thing all along, only my version is much simpler.
Here are my instructions for the same thing: Find this code in forumdisplay.php: (NOTE: it appears TWICE. You are looking ONLY for the SECOND instance of this code!) PHP Code:
PHP Code:
Next, edit the forumdisplaybit template. Look for: PHP Code:
PHP Code:
Code:
align="right" *** So you can see the differences between my version and nuno's version is that I get the thread start time and date from the dateline directly: "$timeformat,$thread[dateline]", whereas in nuno's version you have to edit a select query earlier in the code, and get the start time and date from the query results. It's just simpler this way, although obviously either way works. :) Example: http://www.jjr512.com/forums/forumdi...p?s=&forumid=1 |
I'd also like to add that in the forumdisplay_threadslist template, I changed Thread Starter to Thread Started, because with the new information in that column, the word "started" is more accurate. It follows more naturally: "Thread Started date by username", rather than "Thread Starter date by username". :)
|
Thanks For the hack, worked great!
Joey |
One issue that I can't figure out is why the username link is underlined in the "Thread Started" column, but not in the Last Post column. I followed the instructions to the letter! :)
Ethan |
ethank, that's not the case with my board. Which version of the hack did you use, mine or nuno's?
|
ethank, the thread starter was already "underlined" without this hack and the last post members name wasnt.
It has nothing to do with the hack m8, Although i cant see where the underline is comming from |
thanks a lot /\/uno !!!
it was very simple and it works great and now my members are very pleased... :) |
Quote:
|
just my opinion but wouldnt it look better if it had the posters name then the date and time? maybe it is easy to do i havent even tried to install it maybe ill do this and have the name appeare above time thanx for hack
|
While looks are subjective, I prefer a consistent look with the Last Post, inlcuding no undeline and red time in Thread Starter. Anyone know how to change them?
Thanks in advance. |
Seems how we just launch the site last week, this is a nice feature I never thought of..
Thanks! Worked Great JJR... almighty one, just re arrange stuff in "forumdisplaybit" template... EX: http://forums.yourhostsucks.com/foru...php?&forumid=5 I removed by: and align=center.. not sure if I like it yet... But the name on top is the way to go... *I think* ;) If you would like the name on the front (last post) to be on top.. That is in "forumhome_lastpostby" template.. http://www.yourhostsucks.com |
Quote:
and the post time? |
No, I want the Thread Starter to look similar to Last Post, that is, the user name is not underlined and the time stamp is in red because the time stamp is also in read in Last Post.
|
In "forumdisplaybit" template :
PHP Code:
PHP Code:
Then I just got vBulletin a week or so ago.. So I am not sure why those links look different.. but you can remove the line by editing forumdisplay.php Around line 598 or so: Find: PHP Code:
PHP Code:
... If someone knows the proper "vBulletin" way to remove the line.. please post so.. ;) |
THANK YOU THANK YOU THANK YOU! It worked and now the site is mroe consistent looking!
|
No Problem,, I am sure it is not the correct "vBulletin" way to do it.. (someone will prob fix my mistake)
But it works.. I modified it so all of mine are like that.... |
Thanks, very usefull hack!
Is it possible to use it in "View New Posts" and in "Search - Show results as threads" ? |
I have installed this hack - but am still wondering...
Quote:
|
Does this hack work at all for 2.2.6? I got the username showing up but no date at all on top, just a blank. The code I edit in the php file is around 597-598, and I stick the:
Code:
$thread[firstpostdate]=vbdate($dateformat,$thread[dateline]); |
bump
|
@ Mr. X
I have JJR512's version working on 2.2.6 with no problems whatsoever. According to his instructions, you are looking only for the second instance of this code... PHP Code:
PHP Code:
EDIT: I think you have the first instance of the code, not the second - my first instance of the code to find is around line 575, and the second around 655 - while our files are obviously different, your location of around 597 or so seems likely that you've inserted the code in the wrong spot. :D |
Still not working. The first instance of the code shows up at line 524 and 525 respectively. The 2nd instance shows up at 598 and 599 respectively. I posted the hack right after line 599, but it still doesnt show up. I've also reverted the forumdisplaybit back to the original and put in the code but it also doesnt show up (no date).
|
It's always the 'simple' ones that end up being a pain, eh.
It's a little hard to tell exactly what you are seeing when you say 'no date' shows up - do you mean that it displays just like it did before? It should show... DD-DD-DD TT:TT AM/PM by Thread-Starter Now - does it show the word 'by' prior to thread starter? Or, does it just show the name? Knowing this will tell us if there is an error in the forumdisplaybit template, or if the problem is somewhere else. The relvant portion of my forumdisplay.php looks like this... PHP Code:
PHP Code:
PHP Code:
(Removing the space after the {'s in { secondaltcolor} and { timecolor} of course) If you are still having problems, maybe a small screen shot? |
Ok. I've attached a preview of how it looks. Just the date is missing.
Here is what that code looks like in my forumdisplay.php (without hack applied). These are from lines 595 to 604: PHP Code:
Here is what my forumdisplaybit template looks like: Code:
<tr align="center"> |
In your template you have 'postdate' and 'posttime' instead of 'firstpostdate' and 'firstposttime'
In the 5th line of your template, try changing... <smallfont>$thread[postdate] $thread[posttime]<br> to <smallfont>$thread[firstpostdate] $thread[firstposttime]<br> Hope this get's it! |
Its working now. The template was weird. For some reason, my on/off graphics were linked to:
Code:
<td bgcolor="#F1F1F1"><img src="https://vborg.vbsupport.ru/greentek/$thread[newoldhot].gif" border="0" alt=""></td> Perhaps I copied the URL by mistake and pasted in there, but I dont ever recall (certainly not today at least) wanting the URL to the new/off buttons, so I wonder wtf happened? Well anyway thanks for all the help! |
LOL - don't rip on yer poor co-desingner - it's the way VB handles replacement varialbles, even in code - it's happened to all of us!
Just be careful when copying code directly from the site - if it says { imagesfolder} (without the space after the {) it will give you the local reference path to it... Glad it's working for you now - it's a great little hack! PS - for clarity the following are the same except for the space following the {... In both cases I typed in the word imagesfolder and imagesfolder - in the first case the {} brackets are around the statement, in the second, I left a leading space after the first { - and here is the result - the absolute local path to this installations 'imagesfolder' shows up in the first case!! Welcome to the world of replacement variables... https://vborg.vbsupport.ru/greentek { imagesfolder} In both cases, I typed in imagesfolder - but in the first example, I left no spaces between { and the name. vBulletin then parses it as the path to the local 'imagesfolder' (which is https://vborg.vbsupport.ru/greentek) - which is what happened to you. This can be annoying at times, but one of the things you have to watch for! :D Try it for yourself and see... |
cool, nice little hack
|
All times are GMT. The time now is 05:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|