| View previous topic :: View next topic |
| Author |
Message |
nuke_noob Guest
|
Posted: Sat Jun 14, 2003 6:39 am Post subject: |
|
|
Hi,
I've just installed php-nuke 6.5 and i have some questions.
How do add a new link to the left side of the website in the moudles area?
I created a new folder in the moudles folder, and made a simple index.php page, but i want that when that new link will be clicked, the explorer will open that link but will still show me the php-nuke blocks,footer,etc. --> i want the link to be opened in the middle.
can anyone help me? |
|
| Back to top |
|
 |
|
|
 |
timekeeper Senior Warrant Officer


Joined: 13 Jun 2003 Posts: 83 Location: Vancouver, BC, Canada
|
Posted: Sat Jun 14, 2003 7:05 am Post subject: |
|
|
| Quote: |
On 2003-06-14 09:39, nuke_noob wrote:
|
You can use the Content Option and add pages that way renaming the Content Block to Site Menu or Main Menu etc...
Go to Content in the admin menu and fill the correct blanks with the text ot html code for the page. These are known as Static Pages. Non-Dynamic pages something like normal html pages.
Hope it helps!
Timekeeper
http://www.vanguard.rpg-group.org
"A rough Road leads to the stars..." |
|
| Back to top |
|
 |
nuke_noob Guest
|
Posted: Sat Jun 14, 2003 7:47 am Post subject: |
|
|
Thanks timekeeper,
Some of the links i needed are static ones so hte content option is really good for me.
But what do i do when i want to link an external page? http://mysite.com ?
only if i write moudles.php?... then it opens it in the same page in the middle but if i write http:// it opens it in full page :[ |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Sat Jun 14, 2003 5:02 pm Post subject: |
|
|
You can make an index.php and put that in a folder with a name of your choosing in the modules folder. Activate in admin/modules
The script for the index.php could be like:
| Quote: |
<?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
$theme="DeepBlue"; ///<------SET A THEME HERE OR PLACE TWO BACKSLASHES IN FRON OF THIS LINE
$go_to_address1="http://THE_SITE_TO_SEE.com/THEPATHAND/FILE.php";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<center><h4><a href=\"index.php\">Click to close.</a></h4></center>";
echo "<iframe SRC=\"".$go_to_address."\" width=\"100%\" height=\"1200\" framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
echo "<br><center>NB. Using iframes!</center><br>";
CloseTable();
include("footer.php");
die;
?>
|
Please note :
On the 28th November 2003 changed the line :
if (!eregi("modules.php", $PHP_SELF)) {
to
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
Last edited by chris-au on Thu Nov 27, 2003 5:19 pm; edited 2 times in total |
|
| Back to top |
|
 |
nuke_noob Guest
|
Posted: Sat Jun 14, 2003 9:31 pm Post subject: |
|
|
Thank alot chris-au!
That was exactly what i needed.
[ This Message was edited by: nuke_noob on 2003-06-15 00:33 ] |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Sat Jun 14, 2003 9:56 pm Post subject: |
|
|
If you wish to make your own menu, there are 2 replacement blocks available at:
http://www.sengers-au.com/downloads.html
These are Simple Menu Builders where you can set all your links through admin. There are many options of how, in what order, with or without images, for users only etc. |
|
| Back to top |
|
 |
tsshadow Private

Joined: 31 Oct 2003 Posts: 1
|
Posted: Fri Oct 31, 2003 12:56 pm Post subject: |
|
|
I hope you see this....I see that this post is old. I added the folder and made an index.php file in it with the above snippet. However when hit the link it goes to a giant wide page instead of inframe and this is what it says
"< if (!eregi("modules.php", $PHP_SELF)) { die ("You can't access this file directly..."); } if(!IsSet($mainfile)) { include ("mainfile.php"); } $index=0; $theme="UniverseMetal"; ///<------SET A THEME HERE OR PLACE TWO BACKSLASHES IN FRON OF THIS LINE $go_to_address1="http://www.teamstorm.net/roster.htm"; $go_to_address=rawurldecode($go_to_address1); include("header.php"); OpenTable(); echo "
Click to close.
"; echo "
Interestingly enough the "Click to close." works....lol... |
|
| Back to top |
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Sat Nov 01, 2003 12:51 am Post subject: |
|
|
Looks like your web server (apache?) does not interpret .php files and rather serves them as normal text. Perhaps you miss a line
| Code: |
AddType application/x-httpd-php .php .php3 .phtml .php4
|
in the httpd.conf file. See also Apache.
For an alternative menu, see Treemenu block for PHPNuke. |
|
| Back to top |
|
 |
clairefun Corporal

Joined: 12 Sep 2003 Posts: 13
|
Posted: Thu Nov 27, 2003 2:15 pm Post subject: |
|
|
I have also used the above code but all I get is the message Parse error: parse error, expecting `','' or `';'' in /home/godless/public_html/nuke/modules/testing/index.php on line 13
but i don't get line numbers, and my layouts are different - I'm not sure which one is line 13. Sorry!
<?
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
//$theme="DeepBlue"; ///<------SET A THEME HERE OR PLACE TWO BACKSLASHES IN FRON OF THIS LINE
$go_to_address1="http://www.b2g5.com/boards/board.cgi?user=clairefun";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<center><h4><a href="index.php">Click to close.</a></h4></center>";
echo "<iframe SRC="".$go_to_address."" width="100%" height="1200" framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
echo "<br><center>NB. Using iframes!</center><br>";
CloseTable();
include("footer.php");
die;
?> |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Thu Nov 27, 2003 6:05 pm Post subject: |
|
|
| Code: | <?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include ("mainfile.php"); }
$index=0;
//$theme="DeepBlue"; ///<------SET A THEME HERE OR PLACE TWO BACKSLASHES IN FRON OF THIS LINE
$go_to_address1="http://www.b2g5.com/boards/board.cgi?user=clairefun";
$go_to_address=rawurldecode($go_to_address1);
include("header.php");
OpenTable();
echo "<center><h4><a href=\"index.php\">Click to close.</a></h4></center>";
echo "<iframe SRC=\"".$go_to_address."\" width=\"100%\" height=\"1200\" framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
echo "<br><center>NB. Using iframes!</center><br>";
CloseTable();
include("footer.php");
die;
?>
|
PLease note that I have changed the first line slightly.
Also, it seems that the backward slashes disappeared in the sample as previously given
The above code works 100% OK for me.  |
|
| Back to top |
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
|
| Back to top |
|
 |
clairefun Corporal

Joined: 12 Sep 2003 Posts: 13
|
Posted: Thu Nov 27, 2003 11:56 pm Post subject: |
|
|
Wonderful! It works for me too! And I could kiss you for getting back to me so quickly...thank you ever so much!  |
|
| Back to top |
|
 |
Kid Antrim Corporal

Joined: 11 Sep 2002 Posts: 14
|
Posted: Sat Dec 06, 2003 10:21 am Post subject: Re |
|
|
I've been tinkering with this and while I have gotten it to work, it's not working the way I'd like. I'm not fluent enough with PHP yet to figure out how to alter this so that the content on the page I'm referring to pops up into a new browser without being framed into my site.
Can anyone help me out? I'd really appreciate it!
Thanks! |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Sat Dec 06, 2003 12:23 pm Post subject: |
|
|
I don't know if it is what you want but you can find A sample of a Center Menu with Pop-ups here
It is a module that displays a menu in the center and each link in that center menu pops-up a new window. |
|
| Back to top |
|
 |
Kid Antrim Corporal

Joined: 11 Sep 2002 Posts: 14
|
Posted: Sat Dec 06, 2003 3:24 pm Post subject: |
|
|
Thank you! I'll play around with this and see what I can come up with.
Thanks again! |
|
| Back to top |
|
 |
Kid Antrim Corporal

Joined: 11 Sep 2002 Posts: 14
|
Posted: Sat Dec 06, 2003 10:05 pm Post subject: |
|
|
Grr... not having any luck. Basically, here's what I'm trying to do...
I want a module that shows up in the modules block, and it's sole function when you click on the module as it appears in the modules block is to do the same thing as this html code:
<a href="www.mysite.com/test/test.php" target="_blank">New Window Module</a>
So, the module shows up in my modules block as "New Window Module" and when I click on it then it opens up a new window with the page I want to go to. Does this make sense? |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Sat Dec 06, 2003 10:38 pm Post subject: |
|
|
I don't know if the following is what you are looking for:
| 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("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
$pagetitle = "- $module_name";
OpenTable();
echo "<p><center>";
echo "<a href=\"http://www.your_Site.com/index.html\" target=\"_blank\">New Window Module</a> ";
echo "</center></p>";
CloseTable();
include("footer.php");
?> |
Don't forget to put the http:// after href= !!!!!
Otherwise it won't find the file. |
|
| Back to top |
|
 |
Kid Antrim Corporal

Joined: 11 Sep 2002 Posts: 14
|
Posted: Sat Dec 06, 2003 10:45 pm Post subject: |
|
|
That's close. Except that I don't want to display a new page framed in my site. I just want the module link in the modules block to pop open a new window when you click it.
Here, go to my site. This is the php code that you gave me above:
http://www.kidantrim.com/modules.php?name=Cars
I would like the action of the cars link on the page on the right, to happen when you click on the cars link in the modules block. So when you click on Cars in the modules block, it opens up my Car Gallery in a new window free of my site. |
|
| Back to top |
|
 |
chris-au President

Joined: 16 Aug 2001 Posts: 1842 Location: Australia
|
Posted: Sat Dec 06, 2003 11:14 pm Post subject: |
|
|
| Doesn't help me, I get access denied. |
|
| Back to top |
|
 |
Kid Antrim Corporal

Joined: 11 Sep 2002 Posts: 14
|
Posted: Sat Dec 06, 2003 11:17 pm Post subject: |
|
|
| Sorry about that, should work now. |
|
| Back to top |
|
 |
|
|
 |
|