You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 59 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Working on a new block [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
msimonds
Premium
Premium


Joined: Jul 11, 2003
Posts: 240

Location: Dallas, Texas

PostPosted: Wed Aug 06, 2003 10:04 am Reply with quoteBack to top

I am working on a new block for my front page and it works fine so far. It is to go to the individual team forum pages! My question is: Is there way to call this from the database table to auto populate the teams instead of typing in each line:

Quote:
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=229\">Bears";


like the following that I got out of the phpbb user menu:

Quote:
$result = sql_query("SELECT username FROM ".$prefix."_users order by user_id DESC limit 0,1", $dbi);
list($lastuser) = sql_fetch_row($result, $dbi);


maybe like this:

Quote:
$result = sql_query("SELECT forum_id FROM ".$prefix."_bbforums order by forum_id DESC limit 0,1", $dbi);
list($forum_id) = sql_fetch_row($result, $dbi);





Quote:
<?php

if (eregi("block-test.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n";
$content .= "<TR><FORM METHOD=GET ACTION=\"modules.php\">\n";
$content .= "<TD>&nbsp;<SELECT NAME=\"name\" CLASS=\"boxcontent\" onChange=\"top.location.href=this.options[this.selectedIndex].value\">\n";
$content .= "<OPTION VALUE=\"\">Team Forums";
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=229\">Bears";
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=230\">Lions";
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=231\">Packers";
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=232\">Vikings";
$content .= "<OPTION VALUE=\"modules.php?name=Forums&file=viewforum&f=242\">49ers";
$content .= "</SELECT></TD></TR></FORM></TABLE>";
$content .= "</option>";
$content .= "</select><noscript><input type=\"Submit\" value=\"GO\" onsubmit=\"gotosite(document.forms[0].url.options[document.forms[0].url.selectedIndex].value);return false\"></noscript>
";
$content .= "</p>";
?>



Can anyone help me!!

Thanks

Mike
Find all posts by msimondsView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
msimonds
Premium
Premium


Joined: Jul 11, 2003
Posts: 240

Location: Dallas, Texas

PostPosted: Wed Aug 06, 2003 11:41 am Reply with quoteBack to top

this is what i have so far and I knew that I would get errors:



<?php


if (eregi("block-test1.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$result = sql_query("SELECT forum_id FROM ".$prefix."_bbforums order by forum_id DESC");

Quote:
$content .= "<table border=0 cellpadding=0 cellspacing=0>\n";
$content .= "<tr><form method=\"get\" action=\"modules.php\">";
$content .= "<td> <select name=\"name\" CLASS=\"boxcontent\" onChange=\"top.location.href=this.options[this.selectedIndex].value\">\n";
$content .= "<option value=\"\">Team Forums";
while($row = mysql_fetch_array($result)){
$content .= "<option value=\"modules.php?name=Forums&file=viewforum&f={$row['forum_id']}\">{$row['name']}</option>";
}
$content .= "</select></td></tr></form></table>";

$content .= "</select><noscript><input type=\"Submit\" value=\"GO\" onsubmit=\"gotosite(document.forms[0].url.options[document.forms[0].url.selectedIndex].value);return false\"></noscript>
";
$content .= "</p>";
?>



here is the error and I know that I am missing some type of $result2 (example) to include the fourm_name from the nuke_bbforums table. Can anyone help me out

Mike
Find all posts by msimondsView user's profileSend private messageSend e-mailVisit poster's websiteAIM AddressYahoo MessengerMSN Messenger
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.164 Seconds - 224 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::