Page 1 of 1

I love PHPNuke - Dont laugh i really do

Posted: Mon Sep 19, 2005 10:44 am
by lastminutenuke
feyd | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


Hi

I have been trying to do a simple operation in PHPNuke, for example, I would like to know how to open links inside my home page without opening the link in a new browser window. if this was an HTML then I would do

Code: Select all

<A HREF = "http://www.yourURL.com/">Test Links </a>
but the phpnuke code below forces my linked URL to appear in a new browser window. i.e. it is doing this at the moment <A HREF = "http://www.yourURL.com/" TARGET = "_blank">your link </a>

which I dont want.

All I want to do is to create a module, when you click on the module, it displays a list of links. when you click on one of the links, it should display the results in the current block.

But, No, it has its own ideas. The link below is what some1 proposed (Even though, Im very grateful for his solution, it doesnt resolved problem completely)

http://www.karakas-online.de/forum/view ... 4724#14724

any ideas?

Code: Select all

<?php

if (!eregi("modules.php", $PHP_SELF))
{
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
OpenTable();
echo "<html>\n";
echo "\n";
echo "<head>\n";
echo "<meta http-equiv=\"Content-Language\" content=\"en-gb\">\n";
echo "<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\">\n";
echo "<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">\n";
echo "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"backend.php\">\n";
echo "<LINK REL=\"StyleSheet\" HREF=\"themes/GMITheme/style/gmistyle.css\" TYPE=\"text/css\">\n";
echo "<title>Useful Sites</title>\n";
echo "</head>\n";
echo "\n";
echo "<body>\n";
echo "\n";
echo "<p>&nbsp;</p>\n";
echo "<p align=\"center\"><b><span style=\"font-family: Verdana; color: red\">\n";
echo "<font size=\"3\">Useful Sites</font></span></b></p>\n";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"100%\" id=\"AutoNumber1\">\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"5%\" rowspan=\"10\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo "\n";
echo " <td width=\"20%\">\n";
echo " <a style=\"text-decoration: none; font-weight: 700\" class=\"lbody\" href=\"http://www.gmiservices.com/gmihtml/ghana_govinfo.html\">Governance</font></span></a>\n";
echo " </td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">\n";
echo " <a style=\"text-decoration: none; font-weight: 700\" class=\"lbody\" href=\"http://www.gmiservices.com/gmihtml/adverts.html\">Downloads</font></span></a>\n";
echo " </td>\n";
echo " \n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">\n";
echo " \n";
echo " <a style=\"text-decoration: none; font-weight: 700\" class=\"lbody\" href=\"http://www.gmiservices.com/gmihtml/contact.html\">Immigration</font></span></a>\n";
echo " \n";
echo " </td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " <td width=\"18%\">&nbsp;</td>\n";
echo " <td width=\"17%\">&nbsp;</td>\n";
echo " <td width=\"20%\">&nbsp;</td>\n";
echo " </tr>\n";
echo "</table>\n";
echo "\n";
echo "</body>\n";
echo "\n";
echo "</html>\n";
echo "";
CloseTable();
include("footer.php");
?>

feyd | Please use

Code: Select all

and

Code: Select all

tags where approriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Mon Sep 19, 2005 11:55 am
by jayshields
if you want a link in php nuke to appear in the same browser window it must be hosted locally. personally i have never used an external link and seen it open in the current browser window, whether its to do with the code or browser settings i dont know. to open a local file in the same browser window just refer to the file name.

if you want to embed an external page in a the nuke content block, try an iframe. if that isnt what your looking for, try nuke wrap, a nuke module. youll find it through google.

Posted: Wed Sep 21, 2005 3:26 am
by lastminutenuke
Jay

I have the html files hosted locally, for example, I created this module( http://www.gmiservices.com/modules.php?name=Usefullinks )

the module calls an html file which has 3 links. when you click on any of the links it opens it contents in a new browser windows. for example (http://www.gmiservices.com/gmihtml/ghana_govinfo.html). Im not using external links. like i mentioned, Im only calling locally stored htmls file.


is it because im not calling or referring to the files incorrectly? please help if you can. thanks.