Modules Menu - Modifications..

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Modules Menu - Modifications..
redgerry
CZ Newbie
uk.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Sep 02, 2003
0.00 posts per day
Posts: 2
Points: 606
   ICQ Number
I ran int some problems with your modules menu due to a clash with another block.. anyway got that fixed but have made some mods to the block which can be seen here at
[ Register or login to view links on this board. ]

I'm using sql generated custom links for my RG_Sports module. They add a league automatically into the menu as soon as it's created. I've also done the same for individual coppermine galleries.

The code below is what makes the football site work and thought it might be of use to someone else. It is entered prior to the last } in the mcid loop. If anyone needs a hand or help i can send a copy of the complete modded block. The first section (mcid=1) is particular to the RG_Sports block but shows principle to anyone wishing to change this to another custom module.

Sorry about the copyright at the bottom but will be adding your site banner on to the right hand panel. Gorgeous site you've got here guys :-)

******************** Code ****************

/* Include external link if mcid matches */
if ($mcid == 1){
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"leagues.html\" title=\"Leagues\" onmouseover=\"self.status=' Leagues ';return true\" onmouseout=\"self.status='';return true\">Leagues</a><br />";

$sql = "SELECT * FROM ".$prefix."_rgdivisions WHERE season_id='$season_id' AND div_id < 50 ORDER BY div_id";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$div_id = $row[div_id];
$div_name = $row[description];


$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\" alt=\"Information on Scotland $div_name\">&nbsp;<a href=\"league-$div_id.html\" title=\"$div_name\" onmouseover=\"self.status=' $div_name ';return true\" onmouseout=\"self.status='';return true\">$div_name</a><br />";
}

$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"results.html\" title=\"Results\" onmouseover=\"self.status=' Results of games played ';return true\" onmouseout=\"self.status='';return true\">Results</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"fixtures.html\" title=\"Fixtures\" onmouseover=\"self.status=' Fixtures to be played ';return true\" onmouseout=\"self.status='';return true\">Fixtures</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"alphaplayers.html\" title=\"Players\" onmouseover=\"self.status=' Registered players ';return true\" onmouseout=\"self.status='';return true\">Players</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"fixtures.html\" title=\"Teams\" onmouseover=\"self.status=' Registered Teams ';return true\" onmouseout=\"self.status='';return true\">Teams</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"teamadmins.html\" title=\"Team Admins\" onmouseover=\"self.status=' Team Admin Information ';return true\" onmouseout=\"self.status='';return true\">Team Admins</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=RG_Sports&do=enterteam\" title=\"Register Team\" onmouseover=\"self.status=' If your division is listed you can register your team now ';return true\" onmouseout=\"self.status='';return true\">Register Team</a><br />";
$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=RG_Sports&do=enterteam\" title=\"Register Player\" onmouseover=\"self.status=' If your team is listed you can open your player record now ';return true\" onmouseout=\"self.status='';return true\">Register Player</a><br />";

$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=RG_Sports&do=enterfixture1\" title=\"Enter Fixture\" onmouseover=\"self.status=' Team Admins can enter fixtures involving their team ';return true\" onmouseout=\"self.status='';return true\">Enter Fixture</a><br />";

$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=RG_Sports&do=enterresult\" title=\"Enter Result\" onmouseover=\"self.status=' Results can be entered for fixtures already on the system ';return true\" onmouseout=\"self.status='';return true\">Enter Result</a><br />";
}

if ($mcid == 4){
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"links.html\" title=\"Web Links\" onmouseover=\"self.status=' Web Links ';return true\" onmouseout=\"self.status='';return true\">Web Links</a><br/>";


$sql = "SELECT * FROM ".$prefix."_links_categories ORDER BY cid";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$cid = $row[cid];
$title = $row[title];
$cdescription = $row[cdescription];

$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"link-$cid.html\" title=\"$title\" onmouseover=\"self.status=' Link Categories ';return true\" onmouseout=\"self.status='';return true\">$title</a><br />";
}

$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"linkop-AddLink.html\" title=\"Add Link\" onmouseover=\"self.status=' Add a Link ';return true\" onmouseout=\"self.status='';return true\">Add Link</a><br/>";


}

if ($mcid == 5){
$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/arrow.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=coppermine\" title=\"Galleries\" onmouseover=\"self.status=' Galleries ';return true\" onmouseout=\"self.status='';return true\">All Galleries</a><br />";

$content .= "&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=coppermine&file=upload\" title=\"Upload Picture\" onmouseover=\"self.status=' Add a picture to the gallery ';return true\" onmouseout=\"self.status='';return true\">Upload Picture</a><br/>";

$sql = "SELECT * FROM ".$prefix."_cpg_categories ORDER BY cid";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$cid = $row[cid];
$catname = $row[catname];
$description = $row[description];

$content .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"images/CZModules/ball.gif\" align=\"middle\">&nbsp;<a href=\"modules.php?name=coppermine&cat=$cid\" title=\"$catname\" onmouseover=\"self.status=' Gallery ';return true\" onmouseout=\"self.status='';return true\">$catname</a><br/>";

}



Back to top Reply with quote
#2   re: Modules Menu - Modifications..
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Hey thanks alot. And if anyone uses it the ;; ;; ;; ;; ;; ;; are actually & n b s p ; Thats something im still working on the GT seems to parse them too icon_mad.gif




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum