vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Active Topics Issue (https://vborg.vbsupport.ru/showthread.php?t=8827)

SystemLogic 02-16-2001 12:38 AM

Does anybody know how I can get exactly the same output as the active topics (10 latest threads) on sitepoint.com. Just go to the site and scroll down, you'll see the list...

02-16-2001 01:03 AM

There are a few components to that script...

1. We started with the active topics script by Techtalk posted here in the forums.

2. We decided to add active users. This is done by a script called via CRON every 5 minutes. It writes a text file that is in turn included in the script.

3. To do the row alternating stuff you can do something like....

Code:

$rowtoggle=0;
.... Within the while statment.
  if ($rowtoggle==0) {
    $rowcolor="gray";
  } else {
    $rowcolor="white";
  }
  echo "<tr bgcolor=$rowcolor><td>Thread Stuff</td></td>";
  $rowtoggle=$rowtoggle?0:1;
.... end while statement.


4. We have different copies of the script with forum lists that are used to show different active topics on the sub-sites as well. Each sub-site only shows topics from those forums that pertain to it.

5. Some forums are excluded from the active topics list. This is controlled by a field we can set when we add or modify a new forum. It is called "showactive". Doing it this way allows us to add forums or delete forums and not have to worry about whether they will show in the list if they are not supposed to.

I personally didn't create this as it is outside the forums and we have some very good programmers working for us. I also can't release the exact code. However the above should give you ideas on how it was done.

02-16-2001 01:08 AM

Thanks for your help, I really appreciate it :-) Unfortunately I have barely any knowledge of doing anything cool for coding....

Anybody that does have good programming skills, would they be able to take on this little project and see if they can come up with some code to make this work?

I'm sure others would love to use this feature as well.

This should also help (The original active topics hack):

http://www.vbulletin.com/forum/showt...?threadid=2658


All times are GMT. The time now is 03:50 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.01021 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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