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-23-2000 Last Update: Never Installs: 0
 
No support by the author.

Okay i thought i'd start a new thread ... how did tech talk do the today's active topics code hack to include it on a non vb page..

i have added most of the includes that tech talk released on my test index page at

now all i am missing are

1. active topics includes
2. displaying total threads
3. displaying total posts
4. displaying total registered members
5. displaying most recent registered member

any help is appreciated


[Edited by eva2000 on 01-04-2001 at 12:43 PM]

Show Your Support

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

Comments
  #42  
Old 11-03-2000, 04:09 AM
Guest
 
Posts: n/a
Default

Eva, I do not see your .txt file anywhere in these posts that show what you have here:

The Center Links Displaying Actual tables


I want to display the actual tables of last 5 posts like you did in
http://animeboards.net/index4.php3


Also forgot.. For y our top posters, I did what you have, but how can I put the number of posts next to it like in yours?


i.e. :

Top 25 Posters
? eva2000 (4571)
? Commander Atomic (3594)
? Oogami Ichirou (3076)
? Ko Hakaisha (2263)
? fireguy (2132)
? Wolfpac (2104)

thanks

I would really appreciate it if you can post the code for this.

Thanks A BUNCH!
Reply With Quote
  #43  
Old 11-03-2000, 05:11 AM
Guest
 
Posts: n/a
Default

note these were not written by me but techtalk, and others... you're need to include these into the non vb page i.e.

<?php
include("/path/to/activetopics.php");
?>

<?php
include("/path/topposters.php");
?>

last 5 active topics code:

Code:
<?

	$num_active = 5;
	$num_chars  = 75;

	$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='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='32' or forumid='34' or forumid='35' or forumid='36' or forumid='37' or forumid='38' or forumid='44' or forumid='45' or forumid='46' 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, ArialHelveticasans-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, ArialHelveticasans-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, ArialHelveticasans-serif\" size=\"1\"><img src=\"/forums/images/icons/icon%s.gif\">?Last Post By: %s<hr>%s...<br></font><a href=\"/forums/showthread.php?threadid=%s\"><font face=\"Verdana, ArialHelveticasans-serif\" size=\"1\">Click here for more</font></a></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>");
?>
top posters with post count:
Code:
<?php
// Set this to the max number top posters to display
$num = 25;


$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);
$query = "SELECT * FROM user ORDER BY  posts DESC LIMIT $num";
$resultlatest = mysql_query($query,$db);
while ($latest_array = mysql_fetch_array($resultlatest)) {
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\">??
<A HREF=\"http://animeboards.net/forums/member.php?action=getinfo&userid=$latest_array[userid]\">$latest_array[username]</A>?($latest_array[posts])</FONT><BR>";
}
 
?>
Reply With Quote
  #44  
Old 11-09-2000, 03:23 PM
Guest
 
Posts: n/a
Default

Hi, Eva2000
Can I get http://animeboards.net/index3.php3 source?
I couldn't find this source.
The source link doesn't exist.
Please....
Reply With Quote
  #45  
Old 12-02-2000, 05:17 PM
Guest
 
Posts: n/a
Default

Eva, I installed successfully the active topics hack, but I see that there is not the last time of update in each thread.

The same updated time in active topics is missing in http://www.animeboards.net

Thanks

[Edited by sinotto on 12-02-2000 at 02:22 PM]
Reply With Quote
  #46  
Old 12-07-2000, 07:16 AM
Guest
 
Posts: n/a
Default

I've sort of tidied it up a bit. And mine only displays the news (1st post of thread) from the news forum. If I wanted to do all forums, and mask off I would use forumid != whatever.

I've put the values in variables, which I then use in print(), rather than having to concatenate long strings and using printf() which I don't like.

Also a few additions: comment count, user email link.

So here goes:
Code:
<?
chdir("/home/ymuk/public_html/forum/");
include("global.php");

        $num_active = 7;

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

        $querylatest="SELECT * FROM thread WHERE forumid='2' ORDER BY dateline DESC LIMIT $num_active";

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

        while ($latest_array = mysql_fetch_array($resultlatest)) {

        // split the date up a bit
        $datestr1 = substr($latest_array["dateline"],0,10);
        $datetime = substr($latest_array["dateline"],11,8);

        $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);

        $newstitle = $latest_array["title"];
        $newsposter = $latest_array["postusername"];
        $newsposterid = $result_thread_array["userid"];
        $newsdate = date("D j M Y", $latest_array["dateline"]);
        $newstext = bbcodeparse($result_thread_array["pagetext"],2,1);
        $newsthreadid = $latest_array["threadid"];
        $newscomments = $latest_array["replycount"];

        print("<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"3\"><b>$newstitle</b></font><br>");
        print("<font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\">Posted by
                <a href=\"http://forum.ymuk.net/member.php?action=mailform&userid=$newsposterid\">$newsposter</a> on $newsdate
                <br>$newstext<br><a href=\"http://forum.ymuk.net/showthread.php?threadid=$newsthreadid
                  \"><br>($newscomments comments...)</a></font></br></p>");
        }

?>
Reply With Quote
  #47  
Old 12-14-2000, 08:05 PM
Guest
 
Posts: n/a
Default

I'm not sure, but there might be something wrong with the code in the Top Posters code above by eva2000. I keep getting this error message:
Quote:
Warning: Supplied argument is not a valid MySQL result resource in /home/jjr512/jjr512-www/bbs/topposters.php on line 10
I assume this is line 10, if the count starts at 0:
Code:
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ?
Is that last character, the degree symbol, the problem? What is it supposed to be?
Reply With Quote
  #48  
Old 12-14-2000, 08:45 PM
Guest
 
Posts: n/a
Default

Actually, I've tried several of the scripts in here, and I get a similar error message each time.
Reply With Quote
  #49  
Old 12-14-2000, 09:18 PM
Guest
 
Posts: n/a
Default

Your problem is most probably something completely different, as I found out first-hand.

If you are including theses scripts in home.php for example, then right at the top of home.php, you need to do an include(/homes/whatever/public_html/forum/global.php);

if you don't do it, then your passing it a non-existing servername, so it doesn't return a handle, so everything breaks.

Please note that if you are using lots of these scriptlets (funny word ) on one page, then you only need the one include at the top of the page that includes all the scriptlets.

Also, if you put the global include anywhere else in the file (ie. not top), you'll get a horrible header error.

That's my 2p's worth (UK Sterling you see!)
Reply With Quote
  #50  
Old 12-14-2000, 11:53 PM
Guest
 
Posts: n/a
Default

OK, thanks! It works now.

Now I have another question: When a user starts a post with no icon, this script tries to display icon0.gif, but because that file doesn't exist, I get a broken-image symbol. Can you write something to insert into the code, and show me what and where, that checks to see if the icon is icon0.gif, and if so, not try to display it? Thanks!
Reply With Quote
  #51  
Old 12-15-2000, 01:18 AM
Guest
 
Posts: n/a
Default

Did somebody find out how to get the current active users on a non-vB page hack yet?
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 05:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04563 seconds
  • Memory Usage 2,288KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (1)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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