Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > PHP-Nuke 6.5 to 6.9 > Nuke 6.5 to 6.9 - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Restrict Forums Scroller block
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2003
Restrict Forums Scroller block - 06-16-2003, 09:03 PM

I was wondering how hard would it be to restrict the Forums Scroller block from showing certain private Forums. I'm sure this wouldn't be too hard. I basically want it to query only certain "forum ids" ?

Any help would be appreciated as I'm learning, but it's slow due to serious time constraints.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
06-16-2003, 09:34 PM

Glad we covered this before :wink:
http://www.nukemods.com/modules.php?...ewtopic&t=1539

mikem
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2003
06-16-2003, 11:06 PM

thanks, I did searches on 3 different sites and didn't find anything but as usual if you don't know what was already discussed it's sometimes hard to find it.

Thx man.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
06-16-2003, 11:19 PM

Quote:
Originally Posted by jwalsh8888
thanks, I did searches on 3 different sites and didn't find anything but as usual if you don't know what was already discussed it's sometimes hard to find it.

Thx man.
you are exactly right there :wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2003
06-16-2003, 11:28 PM

well this won't be easy as I thought, maybe I will download your center block so I can see what it's doing so I guess at what needs to be done one this specific block. Will ask for help when I fail :wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2003
06-16-2003, 11:48 PM

sorry should have maybe clarified that I wasn't use the Center Forums Block that comes with some themes. I'm using this small code below

Code:
......

include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id, $user_prefix;
$count = 1;
$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"200\" scrollamount= \"1.9\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\">Last 10 Forum Messages</center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT 10", $dbi);
$content .= "
";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\">Message: $count
";

$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\"alt=\"\"><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"> $topic_title </a>
<font color=\"#666666\">Last post by <A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> on $post_time</font>

";
$count = $count + 1;
}
$content .= "
<center>[ <a href=\"modules.php?name=Forums\"STYLE=\"text-decoration: none\">$sitename ]</center>";
$content .= "<center><img src=\"images/banners/logosmall.gif\" border=\"0\"></center>
</a>";
cookiedecode($user);
$username = $cookie[1];
$result = sql_query("select user_new_privmsg from ".$user_prefix."_users where username='$username'", $dbi);
list($numrow) = sql_fetch_row($result, $dbi);
......
}
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Junior Member
 
Status: Offline
Posts: 8
Join Date: Jun 2003
06-17-2003, 01:30 AM

nevermind I suck... If I knew anything about programming for databases this would have been easier for me. All I did was change the code:
Code:
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT 10", $dbi);
to
Code:
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics where forum_id=1 ORDER BY topic_last_post_id DESC LIMIT 10", $dbi);
obviously forum_id=(whatever forum you want displayed)
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Senior Member
 
Status: Offline
Posts: 2,905
Join Date: Sep 2002
06-17-2003, 10:44 AM

:wink:
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forums block? protegechris Nuke 7.x - Blocks 1 05-29-2005 11:48 PM
Seeing Hidden forums on Recent Forums Block... Jazket Open topics 0 04-08-2005 11:09 AM
Forums Center Block Virgil Nuke 6.5 to 6.9 - Blocks 3 05-21-2003 04:24 PM
Forum Block Scroller div Nuke 6.5 to 6.9 - Blocks 6 04-19-2003 10:47 AM
FI Black Forums Block Ganja_Hamster Nuke 6.5 to 6.9 - Blocks 9 04-03-2003 07:39 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31