Log in

View Full Version : Thread Stats w/ Title In ShowThread


sabret00the
10-27-2005, 10:00 PM
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 https://vborg.vbsupport.ru/attachment.php?attachmentid=36760

uzman59
10-28-2005, 01:24 PM
can you give the screenshot

sabret00the
10-28-2005, 01:32 PM
sorry about that, completely forgot, added :)

ed2k_2
10-28-2005, 01:40 PM
Done without problem! Simple but useful hack!

Snake
10-28-2005, 02:15 PM
Thanks, all installed! ;)

Gizmo5h1t3
10-28-2005, 11:45 PM
the "viewed x number of times seems to be sticking at 0 on mine m8...any ideas>?

Tony G
10-29-2005, 12:22 AM
Could you please attach the instructions in a .txt file too? Thanks. :)

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

is that a rule?

sabret00the
10-29-2005, 09:30 AM
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
10-29-2005, 09:47 AM
installed thanks

Gizmo5h1t3
10-29-2005, 09:59 AM
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
10-31-2005, 07:40 AM
very nice thnx

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

sabret00the
11-05-2005, 08:42 AM
Here an instruction file for those lazy people :) aka, me

thank you :)

Warrior
11-28-2005, 06:11 PM
Nice! Thanks...

[INSTALLED]

Tony G
11-29-2005, 01:57 AM
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
11-29-2005, 02:44 AM
Nice and efficient!

*clicks install

sabret00the
11-29-2005, 08:41 AM
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
12-04-2005, 01:27 PM
hi

Thanks ,, I like basic :rolleyes:

Dollah
12-26-2005, 01:16 AM
hey this is excellent this should improve post threads and etc....

ReZ
12-27-2005, 03:06 PM
[Installed]

Thanks!

Warrior
12-28-2005, 05:19 AM
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
12-30-2005, 08:47 PM
Now this is a great hack.......i really like this one. Clicks *install*

hotwheels
10-01-2006, 09:03 PM
Loaded into 3.6 and works like a champ.........thanks again.

PoetJA-1975
10-03-2006, 06:53 AM
very nice addition - Thanx for sharing it with us :)

Jacquii.

yoyoyoyo
12-10-2006, 12:43 AM
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
01-24-2008, 08:05 PM
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
02-23-2008, 12:11 AM
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
02-23-2008, 12:16 AM
Works like a charm, thanks alot. I use 3.6.8 PL 2. Marked installed.

danyz81
06-18-2009, 04:05 PM
Great! Installed thanks!!

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

Thanks!!

bestmilan
08-21-2009, 11:57 PM
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>