Nuke Toolbar

          
Quick Links 
 [Home Page ][ Category Listings ][ Forum Listings][ Forum FAQs]
[ HomeDNS - Domains ]  [ Nuke Resources ]  [ Nuke Skins and Themes ]  [ Nuke Sites Link Directory ]
[ LearningLinux.com ]  [ Nuke Fixes ]
[ NukeZone Hosting ]  [ Domain Name Database ]
Nuke Forums Forum Index

Nuke Sites Link Directory


Adding Links To The Main Page (Modules)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Discussions
View previous topic :: View next topic  
Author Message
nuke_noob
Guest






PostPosted: Sat Jun 14, 2003 6:39 am    Post subject: Reply with quote

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
Senior Warrant Officer


Joined: 13 Jun 2003
Posts: 83
Location: Vancouver, BC, Canada

PostPosted: Sat Jun 14, 2003 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
nuke_noob
Guest






PostPosted: Sat Jun 14, 2003 7:47 am    Post subject: Reply with quote

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
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Sat Jun 14, 2003 5:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nuke_noob
Guest






PostPosted: Sat Jun 14, 2003 9:31 pm    Post subject: Reply with quote

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
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Sat Jun 14, 2003 9:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tsshadow
Private
Private


Joined: 31 Oct 2003
Posts: 1


PostPosted: Fri Oct 31, 2003 12:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
chris
President
President


Joined: 06 Nov 2002
Posts: 1047
Location: Outer Space

PostPosted: Sat Nov 01, 2003 12:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
clairefun
Corporal
Corporal


Joined: 12 Sep 2003
Posts: 13


PostPosted: Thu Nov 27, 2003 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
chris-au
President
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Thu Nov 27, 2003 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
chris
President
President


Joined: 06 Nov 2002
Posts: 1047
Location: Outer Space

PostPosted: Thu Nov 27, 2003 10:29 pm    Post subject: Reply with quote

chris-au wrote:

Also, it seems that the backward slashes disappeared in the sample as previously given


I have reported this in Backslash in old code blocks of nukeforums disappeared some time ago, but got no answer.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
clairefun
Corporal
Corporal


Joined: 12 Sep 2003
Posts: 13


PostPosted: Thu Nov 27, 2003 11:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Kid Antrim
Corporal
Corporal


Joined: 11 Sep 2002
Posts: 14


PostPosted: Sat Dec 06, 2003 10:21 am    Post subject: Re Reply with quote

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
View user's profile Send private message
chris-au
President
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Sat Dec 06, 2003 12:23 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Kid Antrim
Corporal
Corporal


Joined: 11 Sep 2002
Posts: 14


PostPosted: Sat Dec 06, 2003 3:24 pm    Post subject: Reply with quote

Thank you! I'll play around with this and see what I can come up with.

Thanks again!
Back to top
View user's profile Send private message
Kid Antrim
Corporal
Corporal


Joined: 11 Sep 2002
Posts: 14


PostPosted: Sat Dec 06, 2003 10:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
chris-au
President
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Sat Dec 06, 2003 10:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Kid Antrim
Corporal
Corporal


Joined: 11 Sep 2002
Posts: 14


PostPosted: Sat Dec 06, 2003 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
chris-au
President
President


Joined: 16 Aug 2001
Posts: 1842
Location: Australia

PostPosted: Sat Dec 06, 2003 11:14 pm    Post subject: Reply with quote

Doesn't help me, I get access denied.
Back to top
View user's profile Send private message Visit poster's website
Kid Antrim
Corporal
Corporal


Joined: 11 Sep 2002
Posts: 14


PostPosted: Sat Dec 06, 2003 11:17 pm    Post subject: Reply with quote

Sorry about that, should work now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Discussions All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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


Powered by phpBB © 2001, 2005 phpBB Group




Forum Options
Main Menu
index.phpForums Index
    - Collaped View
    + Expanded View
FAQFAQ
SearchSearch
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Visitor Options
 
Subscribe
Unsubscribe


Keep informed of updates, bug fixes, software releases, news and more!
Installation or Upgrade Services for phpNuke or PostNuke? Require site maintenance, addons, modules or custom themes? Send private message or e-mail for rates and availablity.

Quick Links
  Domain Names
  Firewall Forums
  Joke Crazy
  Learning Linux
  Find your IP Fast!
  Purchase WinRAR

Trusted Nuke Sites
  NukeZone Hosting
  CMS Focus
  NukeFixes.com
  NukeResources.com
  NukeSkins.com
  NukeSites.com
  PHPNuke.org

Sponsor Links


NukeZone Hosting