![]() |
I have a forum with say 7 sub-forums. Is it possible to show the total posts of these just by their selves on the opening page? Like forumid "Name" Total Posts = 37 FOR EXAMPLE
|
I don't understand... :confused:
Where and what do you want to show? |
The total number of posts for all 7 sub-forums on the main forum? Or on the main page?
|
I have a forum with 7 subforums. I have made them invisible because I could not get the color scheme right to match the board because of getting the last thread hack to work with subforums. I didn't want to show all of these sub-forums on the opening page. So like I said I made them invisible. Then in the forumhome template I placed a table to place the link for the hidden sub forums. That way it only takes up one space on the board. This table has the same look as the rest of the board. Same heading color same forum look, and I have a link in it called Latest News Here. When you click it, the 7 subforums open up which shows total threads and total posts in each column for each sub-forum. What I want to do is add all of those subforum posts counts up and display that number on the opening page in the table I have created with the link called Latest News Here, right beside it.
Go to my forums in my signature and look for this at the bottom. Look under here for all information pretaining to WNG listed here. Includes News Releases, Court Proceedings, Raytheon and other. Information Here:Latest News Items Joey |
Umm, I think that if you put this in your index.php:
PHP Code:
EDIT: Place it somewhere here: PHP Code:
|
Small problem, I installed your script in index.php and when tried to open forum I got the error below. I then went and put 2 new fields in forum table in database called invpost and invthread but still got error.
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser. An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. Database error in vBulletin: Invalid SQL: SELECT count(*) FROM post WHERE forumid=29 mysql error: mysql error number: Date: Saturday 01st of September 2001 02:15:35 AM Script: / Referer: |
Sorry, forgot the AS part.
Updated my post, the variables are a bit diff as well. |
Problem still here I placed this index.php
PHP Code:
An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists. We apologise for any inconvenience. Database error in vBulletin: Invalid SQL: SELECT count(*) AS posts FROM post WHERE forumid=29 mysql error: mysql error number: Date: Saturday 01st of September 2001 02:24:14 AM Script: / Referer: |
I added like I said above to the forum table, do you think we need to add fields to the post and thread tables in the database?
|
NO, don't do that.
I'll try this myself and get back to you. This should work damnit. |
PHP Code:
The thread count doesn't show up. Grr... |
Oh wait, they do show up. I had the wrong forumid set for me. :p
|
I am working now, I changed the id the replycount/post show up correctly and the threadcount shows zero, should have a number of 107 according to forum and database. This what I havw in forumhome template.
PHP Code:
|
Oh right, you have subforums IN the subforums... hold on.
|
Sorry, here it is: :)
PHP Code:
|
Thanks that did it I'm sure you probably have something better to do with your time.
Question later on if I wanted to do this again on another forum. Would I just put the same lines again in index.php but change $invposts and $invthreads to something like $inv1posts and $inv1threads ? Thanks again Joey |
Yeah, and don't forget the new IDs. :)
[QUOTE]Originally posted by webhost Thanks that did it I'm sure you probably have something better to do with your time. |
Firefly
Questions First the thread count works great but for some reason when I update my counters it wipes out 70% of the threads in this forum. Second where I installed this post and thread count on my forum, Is there away also I could add some code in the forumhome template along with what I have made already to show the last post not in each sub forum but only the last post in that group of sub forums? Joey |
PHP Code:
Use $hiddenforum[lastpostdate] and $hiddenforum[lastposttime]. |
Database error in vBulletin: Invalid SQL: SELECT lastpost FROM forum WHERE forumid=87 OR forumid=24 OR forumid=23 OR forumid=36 OR forumid=27 OR forumid=21 forumid=25 ORDER BY lastpost DESC LIMIT 1
mysql error: mysql error number: Date: Thursday 06th of September 2001 07:46:28 AM Script: / Referer: This is where I placed in index.php PHP Code:
|
PHP Code:
|
Yes you are correct. I wasn't watching.
It works great, Thanks |
No problem. :)
|
is this a released hack? because i couln't find it over there. and does this hack work with 2.2.0?
i really could need something like that. |
Does it work with 2.2.1? *crosses fingers*
|
It works on my 2.2.1
|
this works great on 2.2.0....cheers
can I add another one that just shows the amount made by the member? |
thanks :)
|
hmm is there a way to make this work with several forums and there subforum? or does this only work with one?
|
All times are GMT. The time now is 02:46 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:
|