PDA

View Full Version : Thread Stats w/ Title In ShowThread


sabret00the
28 Oct 2005, 12:59
in the "SHOWTHREAD" template find:

$poll

and above it add

<h2>$thread[title]</h2>
<div id="h2stats">this thread has $thread[replycount] replies and has been viewed $thread[views] times</div>

now add to your additional css definitions

h2
{
font-size: 200%;
text-align: center;
margin: 0;
padding: 0;
}

#h2stats
{
font-size: 125%;
text-align: center;
}

thanks to Xenon for pointing out the data is already caches and available for the showthread.php

Text File Thanks To MichaelBenson http://www.vbulletin.org/forum/attachment.php?attachmentid=36760

uzman59
28 Oct 2005, 14:24
can you give the screenshot

sabret00the
28 Oct 2005, 14:32
sorry about that, completely forgot, added :)

ed2k_2
28 Oct 2005, 14:40
Done without problem! Simple but useful hack!

Snake
28 Oct 2005, 15:15
Thanks, all installed! ;)

Gizmo5h1t3
29 Oct 2005, 00:45
the "viewed x number of times seems to be sticking at 0 on mine m8...any ideas>?

Tony G
29 Oct 2005, 01:22
Could you please attach the instructions in a .txt file too? Thanks. :)

sabret00the
29 Oct 2005, 10:30
Could you please attach the instructions in a .txt file too? Thanks. :)

is that a rule?

sabret00the
29 Oct 2005, 10:30
the "viewed x number of times seems to be sticking at 0 on mine m8...any ideas>?

it'll go up though it's done via cron job so yo have to wait until it's done automatically.

VBUsers
29 Oct 2005, 10:47
installed thanks

Gizmo5h1t3
29 Oct 2005, 10:59
it'll go up though it's done via cron job so yo have to wait until it's done automatically.

cheers for clearing that up...nice addition mate..

portalimiz
31 Oct 2005, 08:40
very nice thnx

michaelbenson
31 Oct 2005, 10:10
Here an instruction file for those lazy people :) aka, me

sabret00the
05 Nov 2005, 09:42
Here an instruction file for those lazy people :) aka, me

thank you :)

Warrior
28 Nov 2005, 19:11
Nice! Thanks...

[INSTALLED]

Tony G
29 Nov 2005, 02:57
is that a rule?

I don't say things for the sake of it. The reason I asked you to do that is because it is easier for members to re-install the mod from a downloaded .txt file rather than having to find this thread all over again.

The Chief
29 Nov 2005, 03:44
Nice and efficient!

*clicks install

sabret00the
29 Nov 2005, 09:41
I don't say things for the sake of it. The reason I asked you to do that is because it is easier for members to re-install the mod from a downloaded .txt file rather than having to find this thread all over again.

in all honesty. it was a simple question, should you have come back into the thread and said "yes sabret00the it's a rule" i would've been like "sure Tony, i'm sorry for the inconvenience" however simply doing it for the ease of use after i've done all the hard work at your personal preference is a whole other issue. that's why i asked. i'm sorry you feel you have to take this tone.

ayaam
04 Dec 2005, 14:27
hi

Thanks ,, I like basic :rolleyes:

Dollah
26 Dec 2005, 02:16
hey this is excellent this should improve post threads and etc....

ReZ
27 Dec 2005, 16:06
[Installed]

Thanks!

Warrior
28 Dec 2005, 06:19
Just curious as how to add the thread starter's username to this... is it just a variable? I can't seem to get it right...

hotwheels
30 Dec 2005, 21:47
Now this is a great hack.......i really like this one. Clicks *install*

hotwheels
01 Oct 2006, 22:03
Loaded into 3.6 and works like a champ.........thanks again.

PoetJA-1975
03 Oct 2006, 07:53
very nice addition - Thanx for sharing it with us :)

Jacquii.

yoyoyoyo
10 Dec 2006, 01:43
is there any way to correct the english so it will say "this thread has 1 reply" or "this thread has 2 replies" etc.?

siggen
24 Jan 2008, 21:05
I'm really a newbie, and this was the first time I've ever tried to mod anything, and as expected, I couldn't get it to work.

I opened the thread.php in wordpad, searced up the "$poll", and found it right under the "show poll" embedded in xxx'es

Then wrote it like this...



################################################################################
############################### SHOW POLL ######################################
################################################################################
<h2>$thread[title]</h2>
<div id="h2stats">denne traden har $thread[replycount] svar og har blitt vist $thread[views] ganger</div>
h2
{
font-size: 200%;
text-align: center;
margin: 0;
padding: 0;
}
#h2stats
{
font-size: 125%;
text-align: center;
}
$poll = '';



I translated the text to Norwegian, as my forum is going to be in Norwegian.

I then copied the whole modified file into the showthread.php file on my forum server, saved it, and tried to open a post on my forum...

I'm using the 3-6-8_Patch_Level_2 version

As expected, I got an error message...


Parse error: syntax error, unexpected '<' in /home/xxxx*/public_html/forum/showthread.php on line 589


*= I removed this name, naturally...

I then put back the original file, without the mods, and the threads showed as before...

What did I do wrong?

Did I put the mod in at the wrong place?

Can anyone please help me???

TCE Killa
23 Feb 2008, 01:11
I'm really a newbie, and this was the first time I've ever tried to mod anything, and as expected, I couldn't get it to work.

I opened the thread.php in wordpad, searced up the "$poll", and found it right under the "show poll" embedded in xxx'es

Then wrote it like this...



I translated the text to Norwegian, as my forum is going to be in Norwegian.

I then copied the whole modified file into the showthread.php file on my forum server, saved it, and tried to open a post on my forum...

I'm using the 3-6-8_Patch_Level_2 version

As expected, I got an error message...



*= I removed this name, naturally...

I then put back the original file, without the mods, and the threads showed as before...

What did I do wrong?

Did I put the mod in at the wrong place?

Can anyone please help me???


You don't find $poll in your showthread.php through notepad on your FTP server.

You go to your AdminCP - Styles & Templates > Style Manager > Edit Templates > SHOWTHREAD > Search/Find $poll then add whatever it was under it, above it or whatever the mod said.

I'm going to try this in a minute.

TCE Killa
23 Feb 2008, 01:16
Works like a charm, thanks alot. I use 3.6.8 PL 2. Marked installed.

danyz81
18 Jun 2009, 17:05
Great! Installed thanks!!

Anyone known how put also who have started the thread and when (date)?

Thanks!!

bestmilan
22 Aug 2009, 00:57
is there any way to correct the english so it will say "this thread has 1 reply" or "this thread has 2 replies" etc.?


Ok, I wrapped some conditionals around the code and it seems to work...

<if condition="$thread[replycount] == 1"> This thread has 1 reply and has been viewed $thread[views] times </if>
<if condition="$thread[replycount] > 1"> This thread has $thread[replycount] replies and has been viewed $thread[views] times </if>
<if condition="$thread[replycount] == 0"> This thread has $thread[replycount] replies and has been viewed $thread[views] times </if>