Author |
Message |
msimonds
Regular


Joined: Jul 15, 2003
Posts: 56
Location: Dallas
|
Posted:
Mon Nov 10, 2003 3:15 pm |
|
I was wondering if anyone could help me here!
I made a custom main menu that I use on my site:
Code:<?php
if (eregi("block-mainmenu.php",$_server[php_self])) {
header("location: ../index.php");
die();
}
$content .= "<strong><big>·</big></strong> <a href=\"index.php\">Home</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Docs&file=about\">About The Rant</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"advertising.html\">Advertise</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Contact\">Contact Us</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"faq.html\">Faq's</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"forums.html\">Forums</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=kisgb\">Guest Book</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=gallery\">Rant Girls</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Shopping_Cart\">Rant Store</a><br \>";
$content .= "<strong><big>·</big></strong> <a href=\"submit.html\">Submit News</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"account.html\">Your Account</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"http://test.sportsrant.com/signon.php?\" target=\"_newwin\">Weekly Picks</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"http://www.fantasyfootballfive.com/football/sportsrant/index.php\" target=\"_newwin\">Rant Fantasy League</a><br />";
?>
|
and I want to add this to the SUBMIT NEWS
link on the menu above!
this is the popup code that I wrote but it does not seem to put the beside the submit news link:
Code:echo"<script>"
. ""
. ""
. "function openpopup(){"
. "var popurl=\"http://www.sportsrant.com/submit.htm\""
. "winpops=window.open(popurl,\"\",\"width=400,height=338,resizable,\")"
. "}"
. ""
. "</script>"
. ""
. "<a href=\"javascript:openpopup()\">"
. "<img border=\"0\" src=\"http://www.sportsrant.com/images/help.gif\" width=\"10\" height=\"10\"></a>";
|
Can someone help me out here, This is what I put the block together to look like but it is not working properly!
Code:<?php
if (eregi("block-mainmenu.php",$_server[php_self])) {
header("location: ../index.php");
die();
}
$content .= "<strong><big>·</big></strong> <a href=\"index.php\">Home</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Docs&file=about\">About The Rant</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"advertising.html\">Advertise</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Contact\">Contact Us</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"faq.html\">Faq's</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"forums.html\">Forums</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=kisgb\">Guest Book</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=gallery\">Rant Girls</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=Shopping_Cart\">Rant Store</a><br \>";
$content .= "<strong><big>·</big></strong> <a href=\"submit.html\">Submit News</a>
echo"<script>"
. ""
. ""
. "function openpopup(){"
. "var popurl=\"http://www.sportsrant.com/submit.htm\""
. "winpops=window.open(popurl,\"\",\"width=400,height=338,resizable,\")"
. "}"
. ""
. "</script>"
. ""
. "<a href=\"javascript:openpopup()\"><br \>";
. "<img border=\"0\" src=\"http://www.sportsrant.com/images/help.gif\" width=\"10\" height=\"10\"></a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"account.html\">Your Account</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"http://test.sportsrant.com/signon.php?\" target=\"_newwin\">Weekly Picks</a><br />";
$content .= "<strong><big>·</big></strong> <a href=\"http://www.fantasyfootballfive.com/football/sportsrant/index.php\" target=\"_newwin\">Rant Fantasy League</a><br />";
?>
|
thanks,
Mike |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Nov 10, 2003 4:35 pm |
|
Code:<?php
if (eregi("block-mainmenu.php",$_server[php_self])) {
header("location: ../index.php");
die();
}
$content = <<< _MIKE_
<script>
function openpopup(){
var popurl="http://www.sportsrant.com/submit.htm";
var winpops=window.open(popurl,"","width=400,height=338,resizable");
}
</script>
<strong><big>·</big></strong> <a href="index.php">Home</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=Docs&file=about">About The Rant</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=Advertising">Advertise</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=Contact">Contact Us</a><br />
<strong><big>·</big></strong> <a href="faq.html">Faq's</a><br />
<strong><big>·</big></strong> <a href="forums.html">Forums</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=kisgb">Guest Book</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=gallery">Rant Girls</a><br />
<strong><big>·</big></strong> <a href="modules.php?name=Shopping_Cart">Rant Store</a><br />
<strong><big>·</big></strong> <a href="submit.html">Submit News</a><a href="javascript:openpopup()"><img border="0" src="http://www.sportsrant.com/images/help.gif" width="10" height="10"></a><br />
<strong><big>·</big></strong> <a href="modules.php?name=Your_Account">Your Account</a><br />
<strong><big>·</big></strong> <a href="http://test.sportsrant.com/signon.php?" target="_newwin">Weekly Picks</a><br />
<strong><big>·</big></strong> <a href="http://www.fantasyfootballfive.com/football/sportsrant/index.php" target="_newwin">Rant Fantasy League</a><br />
_MIKE_;
?>
|
You should always use the WHEREDOC syntax when you need to quote more than a couple lines. Avoids all the \ escaping. This works real nice now  |
Last edited by Raven on Mon Nov 10, 2003 8:37 pm; edited 1 time in total |
|
|
 |
msimonds

|
Posted:
Mon Nov 10, 2003 8:09 pm |
|
i copied the code just like you posted here and uploaded it to my site and it doesn't work sir. I get a
Code:Parse error: parse error in /home/rantman/public_html/blocks/block-mainmenu.php on line 8
|
line 8:
Code:$content = <<< _MIKE_
|
i do not understand why my name is there, lol, I am lost here sorry |
|
|
|
 |
Raven

|
Posted:
Mon Nov 10, 2003 8:16 pm |
|
Make sure that there are no spaces after the _MIKE_ and _MIKE_; tags, only carriage returns. The code works perfectly. |
|
|
|
 |
msimonds

|
Posted:
Mon Nov 10, 2003 8:49 pm |
|
must have been my mistake somewhere.... it is up, one more favor. if you can take a small look at it and see if there is a way that I can put a space between the ? mark and the end of the submit news |
|
|
|
 |
msimonds

|
Posted:
Mon Nov 10, 2003 8:53 pm |
|
never mind I got it thanks |
|
|
|
 |
Raven

|
Posted:
Mon Nov 10, 2003 8:55 pm |
|
Just put a space before the image tag. |
|
|
|
 |
msimonds

|
Posted:
Mon Nov 10, 2003 9:57 pm |
|
u got me there for a moment.. I do not have the google tap in place and it killed my menu becuase of the links were .html.
fixed now |
|
|
|
 |
|