Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
msimonds
Regular
Regular



Joined: Jul 15, 2003
Posts: 56
Location: Dallas

PostPosted: Mon Nov 10, 2003 3:15 pm Reply with quote

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 Question 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
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Nov 10, 2003 4:35 pm Reply with quote

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 Smile


Last edited by Raven on Mon Nov 10, 2003 8:37 pm; edited 1 time in total 
View user's profile Send private message
msimonds







PostPosted: Mon Nov 10, 2003 8:09 pm Reply with quote

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







PostPosted: Mon Nov 10, 2003 8:16 pm Reply with quote

Make sure that there are no spaces after the _MIKE_ and _MIKE_; tags, only carriage returns. The code works perfectly.
 
msimonds







PostPosted: Mon Nov 10, 2003 8:49 pm Reply with quote

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







PostPosted: Mon Nov 10, 2003 8:53 pm Reply with quote

never mind I got it thanks
 
Raven







PostPosted: Mon Nov 10, 2003 8:55 pm Reply with quote

Just put a space before the image tag.
 
msimonds







PostPosted: Mon Nov 10, 2003 9:57 pm Reply with quote

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. Razz


fixed now
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©