View Full Version : Thread started date plugin?
I am seeking for a plugin, which would enable to show to my users when thread was started.
I tried to locate it in the functions, but it looks like manual code changes are required (this value simply does not exist in functions). This is something what I would like to avoid, as with each new version of vB I would have to redo this job once more.
Question: is there any plugin or coder skilled and willing to write a short & working plugin/product for that?
Marco van Herwaarden
12-23-2005, 09:03 AM
Where do you want to show this?
Where do you want to show this?
On the forumdisplay.php :)
Marco van Herwaarden
12-23-2005, 02:41 PM
The info is available there in either $thread['dateline'] or $threadinfo['dateline']
The info is available there in either $thread['dateline'] or $threadinfo['dateline']
This I know - but this is unformated Unix date format like "1133293626".
Is there any way of formatting dates directly in templates, which would be threadbits in this case? :)
Sorry, maybe I am asking stupid questions, but I need to know it.
-=Sniper=-
12-27-2005, 07:44 PM
put this in the threadbit_process hook if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threadtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
then in the threadbit template you can use <span class="smallfont">$thread[threaddate]</span>
<span class="time">$thread[threadtime]</span>
put this in the threadbit_process hook if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threadtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
then in the threadbit template you can use <span class="smallfont">$thread[threaddate]</span>
<span class="time">$thread[threadtime]</span>
Thanks - it works. :)
Works in 3.6.0 as well :)
AndrusW
10-27-2006, 03:56 AM
Excuse my ignorance, but where would I find this threadbit_process hook?
Anyone know?
functions_forumdisplay.php :)
Smoothie
11-12-2006, 05:34 PM
Could someone with a bit more knowledge than me please explain where this goes??
Could someone with a bit more knowledge than me please explain where this goes??
1. Find & edit the file includes/functions_forumdisplay.php;
2. Insert this:
if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threadtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
} at line 183
2. Go to template threadbit and insert there new code like this one:
<span class="smallfont">$thread[threaddate]</span>
<span class="time">$thread[threadtime]</span>
Reload forumdisplay.php of any forum and you will see thread creation date there.
Ciao
Tom
Smoothie
11-17-2006, 01:39 AM
zlos,
Thanks!
ragtek
11-25-2006, 10:43 PM
by me there's something by just 6 thread's
by the others thers nothing standing
Smoothie
11-25-2006, 10:46 PM
by me there's something by just 6 thread's
by the others thers nothing standing
Link or screenshot?
ragtek
11-25-2006, 11:02 PM
here are some screenshots
thx 4 help
the code is:if ($thread['dateline'])
{
$thread['threaddate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1);
$thread['threadtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);
}
hook:threadbit_precess
template: <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
$thread[movedprefix]
$thread[typeprefix]
$thread[moderatedprefix]
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
<if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav]<if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></if>)<span class="smallfont" style="float:right">Thema erstellt: $thread[threaddate] <span class="time">$thread[threadtime]</span></span>
</span></if>
</div>
Smoothie
11-25-2006, 11:12 PM
<a href="https://vborg.vbsupport.ru/showpost.php?p=1116105&postcount=15" target="_blank">https://vborg.vbsupport.ru/showp...5&postcount=15</a>
Works for me
ragtek
11-25-2006, 11:17 PM
and without a fileedit it wount work?
($hook = vBulletinHook::fetch_hook('threadbit_process')) ? eval($hook) : false;
why this hook don't work?
when i insert the code there it should work i think
edit: ok i have fix it
my error was the place in the template
ragtek
11-26-2006, 12:37 AM
if someone needs it: heres the plugin
for this thing you DONT NEED fileupdates!
so the updatewarranty is given!
bada_bing
11-26-2006, 01:44 AM
if someone needs it: heres the plugin
for this thing you DONT NEED fileupdates!
so the updatewarranty is given!
Will this work for vb 3.5.3 ?
ragtek
11-26-2006, 07:21 AM
sorry i'm not realy sure if the threadtable is the same and i have no time to test it
but i think it will
Narcootic
11-26-2006, 07:23 PM
Perfect, just what I was looking for. Thank you for the explenation Zlos and Sniper. Works on my 3.5.4 done manually with file edit.
Smoothie
11-26-2006, 09:41 PM
I ended up removing the file edit from functions_forumdisplay.php and adding it as a plugin.
ragtek
11-27-2006, 05:06 AM
Perfect, just what I was looking for. Thank you for the explenation Zlos and Sniper. Works on my 3.5.4 done manually with file edit.
when it works with the fileedit it work with the plugin to!
if someone needs it: heres the plugin
for this thing you DONT NEED fileupdates!
so the updatewarranty is given!
Tested on 3.6.4 as product - works perfectly :)
zylstra
02-22-2007, 07:13 AM
No, don't modify any files.
ACP -> Plugin System -> Add New Plugin. Select threadbit_process from the hook location drop down menu, and put the code in the Plugin PHP Code box.
EDIT: Oops, this was in response to a question that was already answered.
digger3d
12-25-2009, 08:17 AM
tried in vb4 with this template code:
<vb:if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></vb:if>
$thread[movedprefix]
$thread[typeprefix]
$thread[moderatedprefix]
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<vb:if condition="$show['gotonewpost']"> style="font-weight:bold"</vb:if>>$thread[threadtitle]</a>
<vb:if condition="$thread['pagenav']">$stylevar[dirmark]<span class="smallfont" style="white-space:nowrap">(<img class="inlineimg" src="$stylevar[imgdir_misc]/multipage.gif" alt="$vbphrase[multipage_thread]" border="0" /> $thread[pagenav]<vb:if condition="$show[pagenavmore]"> ... <a href="showthread.php?$session[sessionurl]t=$thread[threadid]&page=$thread[totalpages]$thread[highlight]">$vbphrase[last_page]</a></vb:if>)<span class="smallfont" style="float:right">Thema erstellt: $thread[threaddate] <span class="time">$thread[threadtime]</span></span>
</span></vb:if>
</div>
got what you see here:
https://vborg.vbsupport.ru/attachment.php?attachmentid=108095&stc=1&d=1261736021
ragtek
12-25-2009, 08:27 AM
You can't use variables this way in vB4
it's now {vb:raw varname}
digger3d
12-30-2009, 10:41 PM
For VB4 worked the following code:
<span class="smallfont" style="float:right">({vb:raw thread[threaddate]} <span class="time">{vb:raw thread[threadtime]}</span>)</span>
Thank you ragtek
ragtek
12-30-2009, 10:54 PM
No prob:)
by me there's something by just 6 thread's
by the others thers nothing standing
OMG had to laugh as i read that.
Nice to see, that my english is getting better and better since i'm active here:D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.