Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-06-2000 Last Update: Never Installs: 0
 
No support by the author.

This is something I like to do on my homepage. If a post has no replies it needs attention right? I agree so I threw this little hack together that will list your dead topics.

Demo:
http://www.extremeforums.com/include/deadtopics.inc.php

Code:
<?php
// Set this to the max number of dead topics you want to display
$maxthreads = 100;

require("config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread WHERE replycount < 1 ORDER BY dateline DESC LIMIT $maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">&nbsp;°
<A HREF=\"http://www.extremeforums.com/forums/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</A></FONT><BR>";
}
 
?>
Edit the echo statement and the $maxthreads variable as you see fit

~Chris

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-07-2000, 12:50 AM
Guest
 
Posts: n/a
Default

Most people dont want to display threads from private forums so you can do something like this:
Code:
$query = "SELECT * FROM thread WHERE replycount < 1 AND forumid != 34 ORDER BY dateline DESC LIMIT $maxthreads";
"34" would just be the forum id of your private forum

Once again Im not familar enough with the structure of vb right now so if anyone knows a better way please let me know

~Chris
P.S The != doesnt work on win32 systems (so ive been told) so you might want to use NOT= if your on win32
Reply With Quote
  #3  
Old 08-07-2000, 01:12 AM
Guest
 
Posts: n/a
Default

Instead of !=, just use <>

That will clear that issue up.
Reply With Quote
  #4  
Old 08-08-2000, 04:55 PM
Guest
 
Posts: n/a
Default

How did you make it so that it appears on your homepage? Did you use ssi? If so, what is the ssi code?
Reply With Quote
  #5  
Old 08-08-2000, 08:18 PM
Guest
 
Posts: n/a
Default

I put the above code in a file named "deadtopics.inc.php"

and then on my homepage (where I wanted the list to appear)i put:
include("/full/path/to/deadtopics.inc.php");

Hope this helps,
~Chris
Reply With Quote
  #6  
Old 08-16-2000, 03:03 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by TechTalk
I put the above code in a file named "deadtopics.inc.php"

and then on my homepage (where I wanted the list to appear)i put:
include("/full/path/to/deadtopics.inc.php");

Hope this helps,
~Chris
Thanks for sharing the code! It's really nice. Do people respond to this list--I mean does it do what it intends to do?
Reply With Quote
  #7  
Old 08-16-2000, 05:53 PM
Guest
 
Posts: n/a
Default

Sure no problem

And yes it has really helped my users get the answers they need because every visitor to my homepage sees this list and they want to be the one to answer a question first....

~Chris
Reply With Quote
  #8  
Old 08-22-2000, 09:28 PM
Guest
 
Posts: n/a
Default

How can I exclude more then one forum?

Just use:
$query = "SELECT * FROM thread WHERE replycount < 1 AND forumid <> 21 22 23 ORDER BY dateline DESC LIMIT $maxthreads";

Forum ID 21 22 23 or how do I do it?

Another Problem:
Got some old topics in the list! But they are allready deleted? Why do the y show up an d how kann I delete them?

http://std.krawall.de/vbb/dead.php

[Edited by The_Sisko on 08-22-2000 at 06:45 PM]
Reply With Quote
  #9  
Old 08-22-2000, 11:20 PM
Guest
 
Posts: n/a
Default

[QUOTE]Originally posted by The_Sisko
[B]How can I exclude more then one forum?

Just use:
$query = "SELECT * FROM thread WHERE replycount < 1 AND forumid <> 21 22 23 ORDER BY dateline DESC LIMIT $maxthreads";

Forum ID 21 22 23 or how do I do it?

Another Problem:
Got some old topics in the list! But they are allready deleted? Why do the y show up an d how kann I delete them?

http://std.krawall.de/vbb/dead.php

[Edited by TechTalk on 08-22-2000 at 08:22 PM]
Reply With Quote
  #10  
Old 08-22-2000, 11:23 PM
Guest
 
Posts: n/a
Default

Well I tried to edit the above thread 10 times but it never would change so here we go again:

Quote:
Originally posted by The_Sisko
How can I exclude more then one forum?

Just use:
$query = "SELECT * FROM thread WHERE replycount < 1 AND forumid <> 21 22 23 ORDER BY dateline DESC LIMIT $maxthreads";

Forum ID 21 22 23 or how do I do it?

Another Problem:
Got some old topics in the list! But they are allready deleted? Why do the y show up an d how kann I delete them?

http://std.krawall.de/vbb/dead.php

[Edited by The_Sisko on 08-22-2000 at 06:45 PM]

Code:
[B]$query = "SELECT * FROM thread WHERE replycount < 1 AND forumid <> 21 AND forumid <> 22 AND forumid <> 23 ORDER BY dateline DESC LIMIT $maxthreads";
Your other problem you are having is (im guessing) a problem with your database. It only selects records that exist in the database so if you deleted it then their would be no way that it would appear (because it querys the db each time and is always up to date)

Maybe someone else can shine some light on this problem?

~Chris
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 03:01 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.05028 seconds
  • Memory Usage 2,271KB
  • Queries Executed 23 (?)
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
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (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
  • 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