vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Thread Stats w/ Title In ShowThread (https://vborg.vbsupport.ru/showthread.php?t=99504)

sabret00the 10-27-2005 10:00 PM

Thread Stats w/ Title In ShowThread
 
in the "SHOWTHREAD" template find:
HTML Code:

  $poll
and above it add
HTML Code:

<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
HTML Code:

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/attachmen...chmentid=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

Quote:

Originally Posted by Tony G
Could you please attach the instructions in a .txt file too? Thanks. :)

is that a rule?

sabret00the 10-29-2005 09:30 AM

Quote:

Originally Posted by Gizmo5h1t3
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

Quote:

Originally Posted by sabret00the
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

Quote:

Originally Posted by michaelbenson
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

Quote:

Originally Posted by sabret00the
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

Quote:

Originally Posted by Tony G
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...

Quote:


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

Quote:

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

Quote:

Originally Posted by siggen (Post 1428190)
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

Quote:

Originally Posted by yoyoyoyo (Post 1135461)
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...

Quote:

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


All times are GMT. The time now is 04:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02505 seconds
  • Memory Usage 1,784KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (31)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete