PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
morpheus_75
Involved
Involved


Joined: Oct 07, 2003
Posts: 302

PostPosted: Tue Oct 07, 2003 9:32 am Reply with quote Back to top

Hi everyone! I'm new to this forum and to PHP, so I'm sorry in advance for the silliness of my question.
I added three links in a block which are supposed to open a popup. Here's the code of the block:

Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

if (eregi("block-Crew_Block.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

include "includes/my_header.php";

$content = "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('morpheus.htm','morpheuspop','width=450,height=480')\">Morpheus</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('trinity.htm','trinitypop','width=450,height=480')\">Trinity</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('neo.htm','neopop','width=450,height=480')\">Neo</a>"
."";

?>


I also put the following code in the file my_header.php:

Code:
<?php

echo"<Script language=\"javascript\">"
. "<!--"
. "function OpenWind(dest){window.open(dest,\"finestra\",\"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=480,top=50,left=350\");}"
. ""
. "function MM_openBrWindow(theURL,winName,features) { //v2.0"
. " window.open(theURL,winName,features);"
. "}"
. "//-->"
. "</Script>"
."";

?>


Result: The block displays quite well. No errors... BUT... the popups won't open. WHY?

Thamks a lot!!


Last edited by morpheus_75 on Wed Oct 15, 2003 4:02 am; edited 1 time in total
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Oct 07, 2003 10:48 am Reply with quote Back to top

Try this. Be sure there is NOTHING except a carriage return after the _JS_ and _JS_; tags.
Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

if (eregi("block-Crew_Block.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

$content = <<<_JS_
<script language="javascript">
<!--
function OpenWind(dest){
   window.open(dest,"finestra","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=480,top=50,left=350");
}

function MM_openBrWindow(theURL,winName,features) {
   //v2.0
   window.open(theURL,winName,features);
}
//-->
</script>
_JS_;

$content .= "\n\n<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('morpheus.htm','morpheuspop','width=450,height=480')\">Morpheus</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('trinity.htm','trinitypop','width=450,height=480')\">Trinity</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('neo.htm','neopop','width=450,height=480')\">Neo</a>";
?>
Save this as a block and remove that code from the my_header.php file.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
morpheus_75
Involved
Involved


Joined: Oct 07, 2003
Posts: 302

PostPosted: Tue Oct 07, 2003 11:51 am Reply with quote Back to top

Tnx for ur kind help, Raven!

Unfortunately I had this error:

Parse error: parse error, unexpected $end in D:\Inetpub\webs\whatisthematrixit\portale\blocks\block-Crew_Block.php on line 38

Line 38 is the last line (ending with ?>)
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Oct 07, 2003 11:59 am Reply with quote Back to top

Let's try the copy again. This is working on my machine.
Code:
<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

if (eregi("block-Crew_Block.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}

$content = <<<_JS_
<script language="javascript">
<!--
function OpenWind(dest){
   window.open(dest,"finestra","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=450,height=480,top=50,left=350");
}

function MM_openBrWindow(theURL,winName,features) {
   //v2.0
   window.open(theURL,winName,features);
}
//-->
</script>
_JS_;

$content .= "\n\n<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('morpheus.htm','morpheuspop','width=450,height=480')\">Morpheus</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('trinity.htm','trinitypop','width=450,height=480')\">Trinity</a><br>"
. "<strong><big>·</big></strong> <a href=\"javascript:;\" onClick=\"MM_openBrWindow('neo.htm','neopop','width=450,height=480')\">Neo</a>";
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
morpheus_75
Involved
Involved


Joined: Oct 07, 2003
Posts: 302

PostPosted: Tue Oct 07, 2003 12:09 pm Reply with quote Back to top

I'll award u a Nobel Prize for skill and patience!!! Very Happy Razz

IT WORKS, I can't believe it, IT WORKS!

I've been on this for 2 weeks...

Goda save Raven! Razz

Ok. You have gained a new soldier, my general ehehehehe
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum