vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Active topics ? how did you do it tech talk ? (https://vborg.vbsupport.ru/showthread.php?t=2658)

09-14-2000 03:45 AM

anybody knows how to make top posters in specific forum?

09-29-2000 05:15 PM

Quote:

Originally posted by eva2000
yeah i put each hack into a php file and used a php include command to add them to the index page
I want to include these things on a portal page so that people visiting my site can see what the hot topics are going on at the moment.

Canb I include these hacks (and by the way, I need them :)) into an html page or do they have to be on a php page? if they have to be in a php page.

Any help would be great.

09-29-2000 05:20 PM

Yes they need to be in a PHP page, if your server doesn't parse .html for PHP code. Just copy any of the code snippets here that you need, and save them as something.php. Then your name your portal page index.php and inside there just use the include command to call something.php. It should look something like this:
Code:

<html>
<?php
    include("something.php");
?>
</html>

Of course with all of your other html code for your main page in there as well.

-Chris

09-29-2000 06:58 PM

Quote:

Originally posted by Chris Schreiber
Yes they need to be in a PHP page, if your server doesn't parse .html for PHP code. Just copy any of the code snippets here that you need, and save them as something.php. Then your name your portal page index.php and inside there just use the include command to call something.php. It should look something like this:
Code:

<html>
<?php
    include("something.php");
?>
</html>

Of course with all of your other html code for your main page in there as well.

-Chris

Now I'm confused (I'm new at this) When people type in my url they will not get the .php index file, they get my .html index file. This is where I want to include this stuff. If there is a way that when people go to my url they will get the index.php file that would be great.

Another point where I'm lost is: I don't have a template in my list (from the admin control panel) for Index.php Should I be using the Forumhome.php file for this? Also, I copied the code for the topposts list that I want (one that I see on Eva2000's site and on Paintball.com) and created a template called Toppost. I then tried to insert the include command you gave me in the Forumhome file, but nothing showed up. I changed the "something.php" to toppost.php of course, but nothing, not even a bit of code showing through.

I really like the paintball home page, as it has everything I want to include in mine. But......

10-03-2000 05:51 PM

Thanks for your help.

I was thinking in totally the wrong terms. I started looking around my server at the php files and realized what I have to do. I was thinking I had to do this through the template files that are in the admin section. My bad. All straight now. :)

10-03-2000 06:18 PM

Quote:

Originally posted by SoccerGazette.com
Thanks for your help.

I was thinking in totally the wrong terms. I started looking around my server at the php files and realized what I have to do. I was thinking I had to do this through the template files that are in the admin section. My bad. All straight now. :)

sorry i missed the posts in here... glad to see it's working.

10-07-2000 09:31 PM

Any way to display members currently on the boards?

10-12-2000 08:54 PM

Hi! Can me anybody pleas send the "Active topics" File? Thank you!
Tho

10-13-2000 03:28 AM

Quote:

Originally posted by eva2000
that's what i did i excluded forums by not specifying them

i.e. for me

Code:

<?
require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php");

        $num_active = 10;
        $num_chars  = 90;

        $db=mysql_connect($servername,$dbusername,$dbpassword);
        mysql_select_db($dbname);

        $querylatest="select * from thread where forumid='1' or forumid='2' or forumid='3' or forumid='4' or forumid='5' or forumid='6' or forumid='7' or forumid='8' or forumid='9' or forumid='10' or forumid='11' or forumid='12' or forumid='13' or forumid='14' or forumid='15' or forumid='16' or forumid='17' or forumid='18' or forumid='19' or forumid='20' or forumid='22' or forumid='23' or forumid='25' or forumid='26' or forumid='27' or forumid='28' or forumid='29' or forumid='30' or forumid='31' or forumid='32' or forumid='34' or forumid='35' or forumid='36' or forumid='37' or forumid='38' order by lastpost desc limit $num_active";

        $resultlatest = mysql_query($querylatest,$db);

        print("<center><table width=\"100%%\" cellspacing=\"0\" cellpadding=\"2\">");

        while ($latest_array = mysql_fetch_array($resultlatest)) {
       
        // Get Forum Infomation
        $query_forum = "select * from forum where forumid='$latest_array[forumid]'";
        $result_forum = mysql_query($query_forum,$db);
        $forum_info_array = mysql_fetch_array($result_forum);
       
        printf("<tr><td colspan=\"2\" bgcolor=\"#87A4C2\"><b><font color=\"#000000\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">%s: %s</font></b></td></tr>",$forum_info_array["title"],$latest_array["title"]);

        // split the date up a bit
        $datestr1 = substr($latest_array["dateline"],0,10);
        $datetime = substr($latest_array["dateline"],11,8);       
        printf ("<tr valign=\"top\"><td width=\"15%%\" bgcolor=\"#B9B9B9\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><b>%s</b><br>Updated: %s<br>Replies: %s</font></td>", $latest_array["postusername"], $datetime, $latest_array["replycount"]);

        $querythread="select * from post where threadid='$latest_array[threadid]' order by dateline asc limit 1";

        $result_thread_text= mysql_query($querythread,$db);

        $result_thread_array = mysql_fetch_array($result_thread_text);
        printf ("<td width=\"85%%\" bgcolor=\"#cccccc\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><img src=\"/forums/images/icons/icon%s.gif\">?Last Post By: %s<hr>%s...<br><a href=\"/forums/showthread.php?threadid=%s\">Click here for more</font></td></tr>",$result_thread_array["iconid"],$latest_array["lastposter"],substr(strip_tags($result_thread_array["pagetext"]),0,$num_chars),$latest_array["threadid"]);
        printf ("<tr><td colspan=\"2\" width=\"100%%\">?</td></tr>");
        }

        printf ("</table></center>");
?>

the part where is shows

forumid='1' or forumid='2' etc... it tells which forums to show... so leaving it out, hides the private forums :)




If I run the above script I get this error


Warning: 0 is not a MySQL result index in /www/tuffsports/forum/test1.php3 on line 15

I keep will keep playing around but any guidence is appreciated.

10-13-2000 03:32 AM

Ok - dumb me

didnt have the require command in for some reason


All times are GMT. The time now is 01:27 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.01114 seconds
  • Memory Usage 1,757KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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