vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help! Please review this code: Trying to get "latest topics" to show on front page. (https://vborg.vbsupport.ru/showthread.php?t=10932)

03-10-2001 03:20 PM

I have set it up that way, through SSI calls, and I can tell you it works just fine, as tubedogg said :)
I have been using this syntax without problems:
Code:

<!--#include virtual="/forums/active.inc.php"-->

03-10-2001 03:29 PM

good job tubedog :p

03-10-2001 03:32 PM

Thank you :D

I help where I can. ;)

03-10-2001 03:33 PM

<seriously off-topic emotional outburst>
YES!!!!!!!! With that previous post I have become a Senior Member! YAY YAY YAY!
</seriously off-topic emotional outburst>

:D

03-10-2001 03:38 PM

<seriously off-topic emotional outburst>
good job tubedogg
</seriously off-topic emotional outburst>

On another off topic note only 60+ more good job tubedoggs and I will also be a senior member :p

03-12-2001 02:13 PM

Great! It finally worked.

Now, I've searched through the site, but could not find the codes for these. Does anybody know how to display polls and currently active users on non vb pages?
Thanks again

Evoir 08-17-2001 02:22 AM

I got this beautiful little hack to work (not sure who to thank-but I thank whoever is responsible) :)

BUT, it seems to be showing even our private forums, including the moderators chat. NOT COOL. I had to take it down.

Is there some modification that will stop any private forum from showing on this non-vb page?

I know nothing about php, but I can follow good directions :D

Evoir 08-17-2001 02:51 AM

ok. I still know nothing about php :D

but, it seems to me that it shouldn't be difficult to add usergroups to this little hack. Anyone have any idea how this would be done?

in other words: I'd like to be able to list the usergroups from whom this information is pulled.

Here is the hack code, how would I make it so it only shows posts of, say... usergroup: members?

Code:

<?php
// Set this to the max number of threads to display
$maxthreads = 5;

require("/path/to/my/admin/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread ORDER BY lastpost DESC LIMIT $maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"2\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ?
<A HREF=\"http://www.mysite.com/forum/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</A></FONT><BR>";
}
 
?>


BDJ 08-17-2001 08:59 AM

Well, here's some code to make it so it doesn't show threads private forums:
(I'm guessing this will work)

Code:

SELECT * FROM thread LEFT JOIN forumpermission ON (forumpermission.forumid=thread.forumid) WHERE forumpermission.canview=1 ORDER BY lastpost DESC LIMIT 0,$maxthreads
Try that..

Evoir 08-17-2001 04:58 PM

Ok, what I did was replace the code in the hack that resembled your suggestion :)

Now, it ONLY shows the private forums. I tried switching the word ON to OFF and it showed nothing when I did that. here is the modified code:

Code:

<?php
// Set this to the max number of threads to display
$maxthreads = 5;

require("/path/to/my/admin/config.php");
$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM thread LEFT JOIN forumpermission ON (forumpermission.forumid=thread.forumid) WHERE forumpermission.canview=1 ORDER BY lastpost DESC LIMIT 0,$maxthreads";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"2\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ?
<A HREF=\"http://www.domain.com/forum/showthread.php?threadid=$latest_array[threadid]\">$latest_array[title]</A></FONT><BR>";
}
 
?>

can anyone help me? I really would like to sue this, but I must have the private forums NOT listed in the output.


All times are GMT. The time now is 02:39 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.01104 seconds
  • Memory Usage 1,736KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete