Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 09-01-2001, 11:09 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$invposts=$DB_site->query_first("SELECT replycount FROM forum WHERE forumid=1");
$invthreads=$DB_site->query_first("SELECT COUNT(*) AS threadcount FROM thread WHERE forumid=1"); 
Now use $invposts[replycount] and $invthreads[threadcount].
The thread count doesn't show up. Grr...
Reply With Quote
  #12  
Old 09-01-2001, 11:23 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh wait, they do show up. I had the wrong forumid set for me.
Reply With Quote
  #13  
Old 09-01-2001, 11:25 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:


<tr>
<
td bgcolor="#FFFFFF" colspan="6"><normalfont color="{categoryfontcolor}"><p align="left"Look under here for all information pretaining to WNG listed hereIncludes News ReleasesCourt ProceedingsRaytheon and other.<br>$invposts[replycount] <br>$invthreads[threadcount]<br><br>

Information Here:<b><a href="http://forums.realwebhost.net/forumdisplay.php?forumid=29">Latest News Items</a></b></p></normalfont></td>
</
tr
Reply With Quote
  #14  
Old 09-01-2001, 11:31 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh right, you have subforums IN the subforums... hold on.
Reply With Quote
  #15  
Old 09-01-2001, 11:39 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, here it is:
PHP Code:
$invposts=$DB_site->query_first("SELECT replycount FROM forum WHERE forumid=29");
$invthreads=$DB_site->query_first("SELECT count(*) AS threadcount FROM thread WHERE forumid=66 OR forumid=23 OR forumid=36 OR forumid=27 OR forumid=25 OR forumid=21 OR forumid=24 OR forumid=87"); 
Reply With Quote
  #16  
Old 09-01-2001, 11:54 AM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 09-01-2001, 12:07 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #18  
Old 09-05-2001, 08:30 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #19  
Old 09-06-2001, 10:50 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
// dates for subs
$hiddenforum=$DB_site->query_first("SELECT lastpost FROM forum WHERE forumid=1 OR forumid=2 ORDER BY lastpost DESC LIMIT 1");
if (
$hiddenforum['lastpost']>0) {
 
$hiddenforum['lastpostdate']=vbdate($dateformat,$hiddenforum['lastpost']);
 
$hiddenforum['lastposttime']=vbdate($timeformat,$hiddenforum['lastpost']);
} else {
 
$hiddenforum['lastpostdate']='Never';
 
$hiddenforum['lastposttime']='';

I think that should work. (replace the forumids of course)
Use $hiddenforum[lastpostdate] and $hiddenforum[lastposttime].
Reply With Quote
  #20  
Old 09-06-2001, 12:51 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
$boardviews $DB_site->query_first(
SELECT SUM(views) AS threadviews FROM thread"
); 
$totalviews number_format($boardviews[threadviews]);

$invposts=$DB_site->query_first("SELECT replycount FROM forum WHERE forumid=29");
$invthreads=$DB_site->query_first("SELECT count(*) AS threadcount FROM thread WHERE forumid=66 OR forumid=23 OR forumid=36 OR forumid=27 OR forumid=25 OR forumid=21 OR forumid=24 OR forumid=87");

 
// dates for subs
$hiddenforum=$DB_site->query_first("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");
if (
$hiddenforum['lastpost']>0) {
 
$hiddenforum['lastpostdate']=vbdate($dateformat,$hiddenforum['lastpost']);
 
$hiddenforum['lastposttime']=vbdate($timeformat,$hiddenforum['lastpost']);
} else {
 
$hiddenforum['lastpostdate']='Never';
 
$hiddenforum['lastposttime']='';
}

// get newest member
$getnewestusers=$DB_site->query_first("SELECT userid,username FROM user WHERE userid=$numbersmembers[max]");
$newusername=$getnewestusers['username'];
$newuserid=$getnewestusers['userid']; 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:36 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
  • Page Generation 0.04470 seconds
  • Memory Usage 2,285KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete