The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#42
|
|||
|
|||
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! |
#43
|
|||
|
|||
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>"); ?> 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>"; } ?> |
#44
|
|||
|
|||
Hi, Eva2000
Can I get http://animeboards.net/index3.php3 source? I couldn't find this source. The source link doesn't exist. Please.... |
#45
|
|||
|
|||
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] |
#46
|
|||
|
|||
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>"); } ?> |
#47
|
|||
|
|||
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:
Code:
echo "<FONT SIZE=\"1\" FACE=\"Verdana, Arial, Helvetica, sans-serif\"> ? |
#48
|
|||
|
|||
Actually, I've tried several of the scripts in here, and I get a similar error message each time.
|
#49
|
|||
|
|||
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!) |
#50
|
|||
|
|||
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! |
#51
|
|||
|
|||
Did somebody find out how to get the current active users on a non-vB page hack yet?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|