Author |
Message |
snyper
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 18, 2010
Posts: 28
|
Posted:
Sat Apr 30, 2011 1:22 am |
|
Do you guys have a top posters block made up?Im looking for one w/o the forum posts just with stats/avatars ect. it would be awsome if it could be added onto my scrolling forums block at the bottom,i dont know if its possible or not. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Sun May 01, 2011 5:35 pm |
|
Our scrolling forums block includes the top posters (configurable) but I take it that's not what you want. I don't know of any other. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 01, 2011 10:38 pm |
|
i actually have your scrolling forums block but it doesnt list top posters,.its from an old forum that you updated n made work for someone.,i like the style of the block and would like to keep it.,I guess what im saying is can you take my block and add top posters say at the bottom of it? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun May 01, 2011 11:10 pm |
|
See heres my scrolling forum block (( in RED ))
And under that in (( GREEN )) is what im trying to incorperate into my current scrolling block. What you see in (( GREEN )) is actually a non scrolling block and i tried to eliminate all but the top posters part of the code so i could maybe paste it into my current block but its still leaving some of the unwanted stuff on.
Hope your catching my drift lol. Like i said im new to this i know a little but not enough.
![Image Image](http://xas.clanservers.com/nuke/modules/Forums/files/untitled_108.png) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon May 02, 2011 1:09 am |
|
Have you tried using the RavenNuke (tm) forum scrolling block like what's on the home page of this site? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Mon May 02, 2011 7:12 am |
|
Here is a quick redo of an old top posters block. Have not tested much, but in theory could be used as side or center block, although the styling may need to be adjusted depending on theme and whether used as side or center. Ideally you would remove the inline styling and place in your style.css, but for now, try this.
http://www.rtsforce.com/files/Top_Posters.zip |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon May 02, 2011 12:59 pm |
|
Yup thats basically what i want..Now i have 2 questions,.,.1) Can it be made to display only the top 5 instead?Right now its displaying 9.
2) can this in any way be added into my current scrolling forums block to display at the bottom of it?
Code:<?php
/*
DHTML Scrolling Forum Block
Written By: gotcha
http://nukecoder.com
Cross browser Marquee II is from http://dynamicdrive.com/
Please do not remove their copyright notice.
Released August 2007
*/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define("_BBFORUM_TOTTOPICS","Topics ");
define("_BBFORUM_TOTPOSTS","Posts ");
define("_BBFORUM_TOTVIEWS","Views ");
define("_BBFORUM_TOTREPLIES","Replies ");
define("_BBFORUM_TOTMEMBERS","Members");
define("_BBFORUM_FORUM","Forums");
define("_BBFORUM_SEARCH","Search");
$theme = get_theme();
$post_image = "themes/$theme/forums/images/icon_latest_reply.gif";
global $prefix, $user_prefix, $db, $sitename, $user, $cookie, $group_id;
$content .= '
<script type="text/javascript">
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=\'\'
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+5))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+5+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout(\'lefttime=setInterval("scrollmarquee()",30)\', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
';
$content .= '
<div id="marqueecontainer" style="position: relative ; width: 216px; height: 0px; overflow: hidden; padding: 100px;padding-right: 300px;" padding-left: 244px;" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: relative; width: 250%;">
';
$content .= '<br /><center><a href="modules.php?name = Forums"><b>'.$sitename.' Forums</b></a><br /><br /></center>';
$sql = "SELECT
t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name,
f.forum_id, u.username, u.user_id, p.poster_id, p.post_time FROM
".$prefix."_bbtopics t, ".$prefix."_bbforums f,
".$prefix."_bbposts p, ".$user_prefix."_users u WHERE
p.post_id = t.topic_last_post_id AND u.user_id = p.poster_id
AND t.forum_id=f.forum_id AND f.auth_view=0
ORDER BY t.topic_last_post_id DESC
LIMIT 10";
$result1 = $db->sql_query($sql);
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result1))
{
$content .= '
<div style="border-bottom: 1px dotted #000000; padding-bottom: 5px; padding-top: 5px;">
<img src="'.$post_image.'" alt="" border="0" />
<a href="forums.html?amp;file=viewtopic&p='.$topic_last_post_id.'#'.$topic_last_post_id.'" title="'.$topic_title.'"><strong>'.$topic_title.'</strong></a><br />
<span class="content"><em>Last post by
<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'" title="'.$username.'">'.$username.'</a>
in <a href="forums.html?amp;file=viewforum&f='.$forum_id.'" title="'.$forum_name.'">'.$forum_name.'</a> on
'.date("m/d/Y h:i a", $post_time).'</em></span>
</div>
';
}
$content .= '
<div style="text-align:center; padding-top: 8px;"><a href="forums.html" title="Forum Index">Forum Index</a></div>
</div>
</div>
<div style="padding-top: 8px;">
<div style="float:left;">
<a href="forums.html">Forum Index</a><br />
<a href="forums.html?file=search">Forum Search</a><br />
</div>
<div style="float:right; text-align: right;">
<span id="fast" style="cursor: pointer;" onClick="copyspeed=copyspeed+1; mqs=marqueespeed; marqueespeed=copyspeed"><img src="images/mini_up.png" alt="" title="Faster" /></span><br />
<span id="slow" style="cursor: pointer;" onClick="copyspeed=copyspeed-1; mqs=marqueespeed; marqueespeed=copyspeed"><img src="images/mini_down.png" alt="" title="Slower" /></span>
</div>
</div>
';
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon May 02, 2011 3:26 pm |
|
try this
http://www.rtsforce.com/files/Scroller.zip
I would suggest uploading a blank.gif for those who don't have an avatar (or may not someday in the future) to:
modules/Forums/images/avatars/blank.gif
modules/Forums/images/avatars/gallery/blank.gif |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue May 03, 2011 12:46 pm |
|
Thanks i have a blank.gif,.im in the middle of looking for a good avatar pack atm..,
As far as the block you linked me,I dunno if you used my code or not but its the same forum scroller i have but i modified mine to display center.,Also its scrolling the top posters i want the top posters stationed at the bottom not scrolling.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue May 03, 2011 2:26 pm |
|
I didn't notice you had customized the block, but I recognized it and used a copy I already had. If you look at the block in a decent text editor like notepad++ it's pretty easy to see the code i added.
Code:// top posters
// number of top posters
$a = 5;
// make all avatars same width
$avatar_width = 50;
$result=$db->sql_query('SELECT user_id, username, user_posts, user_avatar, points FROM '.$user_prefix.'_users ORDER BY user_posts DESC LIMIT 0,'.$a);
while(list($user_id, $username, $user_posts, $user_avatar, $user_points) = $db->sql_fetchrow($result)) {
$content .= '<div style="float:left;width:140px;margin:10px 8px 10px 0;"><table cellpadding="0" cellspacing="5" border="0">';
$content .= '<tr>';
$content .= '<td align="center">';
if (preg_match('/http(s?):\/\//', $user_avatar)) {
$content .= '<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'"><img src="'.$user_avatar.'" border ="0" width="'.$avatar_width.'" /></a></td>';
}else{
$content .= '<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'"><img src="modules/Forums/images/avatars/'.$user_avatar.'" border="0" width="'.$avatar_width.'" /></a></td>';
}
$content .= '<td align="left"><a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'">'.$username.'</a><br />';
$content .= '<a href="modules.php?name=Forums&file=search&search_author='.$username.'">'.$user_posts.'</a><br /><sup>Points: <strong>'.$user_points.'</strong> </sup></td>';
$content .= '</tr>';
$content .= '</table></div>';
}
$content .= '<div style="clear:both;height:1px;"> </div>';
// end top posters
|
I would paste it right before ?> in your modified block |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue May 03, 2011 3:12 pm |
|
After some more editing i got it.,The one you gave me was also scrolling the posters.,
here's the finished block if you gys want it or any one wants a scrolling forum with top posters..Thanks for all your help.
Code:<?php
/*
DHTML Scrolling Forum Block
Written By: gotcha
http://nukecoder.com
Cross browser Marquee II is from http://dynamicdrive.com/
Please do not remove their copyright notice.
Released August 2007
*/
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
define("_BBFORUM_TOTTOPICS","Topics ");
define("_BBFORUM_TOTPOSTS","Posts ");
define("_BBFORUM_TOTVIEWS","Views ");
define("_BBFORUM_TOTREPLIES","Replies ");
define("_BBFORUM_TOTMEMBERS","Members");
define("_BBFORUM_FORUM","Forums");
define("_BBFORUM_SEARCH","Search");
$theme = get_theme();
$post_image = "themes/$theme/forums/images/icon_latest_reply.gif";
global $prefix, $user_prefix, $db, $sitename, $user, $cookie, $group_id;
$content .= '
<script type="text/javascript">
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?
////NO NEED TO EDIT BELOW THIS LINE////////////
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=\'\'
function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+5))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+5+"px"
}
function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout(\'lefttime=setInterval("scrollmarquee()",30)\', delayb4scroll)
}
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
</script>
';
$content .= '
<div id="marqueecontainer" style="position: relative ; width: 216px; height: 0px; overflow: hidden; padding: 100px;padding-right: 300px;" padding-left: 244px;" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">
<div id="vmarquee" style="position: relative; width: 250%;">
';
$content .= '<br /><center><a href="modules.php?name = Forums"><b>'.$sitename.' Forums</b></a><br /><br /></center>';
$sql = "SELECT
t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name,
f.forum_id, u.username, u.user_id, p.poster_id, p.post_time FROM
".$prefix."_bbtopics t, ".$prefix."_bbforums f,
".$prefix."_bbposts p, ".$user_prefix."_users u WHERE
p.post_id = t.topic_last_post_id AND u.user_id = p.poster_id
AND t.forum_id=f.forum_id AND f.auth_view=0
ORDER BY t.topic_last_post_id DESC
LIMIT 10";
$result1 = $db->sql_query($sql);
while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result1))
{
$content .= '
<div style="border-bottom: 1px dotted #000000; padding-bottom: 5px; padding-top: 5px;">
<img src="'.$post_image.'" alt="" border="0" />
<a href="modules.php?name=Forums&file=viewtopic&p='.$topic_last_post_id.'#'.$topic_last_post_id.'" title="'.$topic_title.'"><strong>'.$topic_title.'</strong></a><br />
<span class="content"><em>Last post by
<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'" title="'.$username.'">'.$username.'</a>
in <a href="modules.php?name=Forums&file=viewforum&f='.$forum_id.'" title="'.$forum_name.'">'.$forum_name.'</a> on
'.date("m/d/Y h:i a", $post_time).'</em></span>
</div>
';
}
$content .= '
<div style="text-align:center; padding-top: 8px;"><a href="modules.php?name=Forums" title="Top Posters">Top Posters</a></div>
</div>
</div>
<div style="padding-top: 8px;">
<div style="float:left;">
<a href="">Top Posters</a><br />
<a href="modules.php?name=Forums&file="></a><br />
</div>
<div style="float:top; text-align: right;">
<span id="fast" style="cursor: pointer;" onClick="copyspeed=copyspeed+1; mqs=marqueespeed; marqueespeed=copyspeed"><img src="images/mini_up.png" alt="" title="Faster" /></span><br />
<span id="slow" style="cursor: pointer;" onClick="copyspeed=copyspeed-1; mqs=marqueespeed; marqueespeed=copyspeed"><img src="images/mini_down.png" alt="" title="Slower" /></span>
</div>
</div>
';
// top posters
// number of top posters
$a = 5;
// make all avatars same width
$avatar_width = 50;
$result=$db->sql_query('SELECT user_id, username, user_posts, user_avatar, points FROM '.$user_prefix.'_users ORDER BY user_posts DESC LIMIT 0,'.$a);
while(list($user_id, $username, $user_posts, $user_avatar, $user_points) = $db->sql_fetchrow($result)) {
$content .= '<div style="float:left;width:140px;margin:10px 8px 10px 0;"><table cellpadding="0" cellspacing="5" border="0">';
$content .= '<tr>';
$content .= '<td align="center">';
if (preg_match('/http(s?):\/\//', $user_avatar)) {
$content .= '<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'"><img src="'.$user_avatar.'" border ="0" width="'.$avatar_width.'" /></a></td>';
}else{
$content .= '<a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'"><img src="modules/Forums/images/avatars/'.$user_avatar.'" border="0" width="'.$avatar_width.'" /></a></td>';
}
$content .= '<td align="left"><a href="modules.php?name=Your_Account&op=userinfo&username='.$username.'">'.$username.'</a><br />';
$content .= '<a href="forums.html?amp;file=search&search_author='.$username.'">'.$user_posts.'</a><br /><sup>Points: <strong>'.$user_points.'</strong> </sup></td>';
$content .= '</tr>';
$content .= '</table></div>';
}
$content .= '<div style="clear:both;height:1px;"> </div>';
// end top posters
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Wed May 04, 2011 1:04 am |
|
can you zip it. too much blank spaces. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed May 04, 2011 4:16 pm |
|
Sure,.,.,.,.
Only registered users can see links on this board! Get registered or login! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu May 05, 2011 4:07 am |
|
Thanks I will test this one. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
snyper
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu May 05, 2011 7:00 am |
|
Im sure you will find some stuff you will have to clean up but its working with no errors for me. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|