I've been doing some major work on my site the last few months trying to clean it up. Very old theme and content, since the upgrade to 2.4 one of the things I've been shooting to do is get rid of the use of iframes in my modules. Most of the modules that called an html file I was able to use the following code to accomplish just that, writing my page in xhtml and removing the head, body, and html tags.
Code:
<?php
if ( !defined('MODULE_FILE') )
{
die("You can't access this file directly...");
}
Where I am stuck at is my use of groups and the modules I have for those groups, I have certain forum shortcuts in the modules block that are visable to certain users. I use the following code to direct them to that particular forum, but it uses an iframe and I would certainly like to drop the use of the iframe I have yet to figure out how to accomplish this any help would be appreciated.
Code:
<?
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("You can't access this file directly...");
}
if(!IsSet($mainfile)) { include_once ("mainfile.php"); }
$index=0;
$go_to_address1="./modules.php?name=Forums&file=viewforum&f=5";
$go_to_address=rawurldecode($go_to_address1);
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>";
CloseTable();
die;
?>
Joined: Mar 30, 2006 Posts: 2456 Location: Pittsburgh, Pennsylvania
Posted:
Thu Feb 11, 2010 10:43 am
Can you post a screen shot of what this does. I am having a hard time visualizing what this is supposed to be doing. I guess I understand what this particular file does, but not where.
Here's a screenshot as you can see by clicking on the Trades module in the NukeNav box what the code above does is open the particular forum into an iframe bypassing the forum index so that you do not see the other forums listed. You then have to click the click to close at top to close out the iframe. What I'm attempting to do is get rid of iframes all together if it can be done. Thanks
Joined: Mar 11, 2007 Posts: 1536 Location: North Carolina
Posted:
Sat Feb 13, 2010 7:32 am
If you just want to redirect to a certain page, you could create a module with an index.php that has something like the following:
Code:
<?php
/************************************************************************/
/* 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. */
/************************************************************************/
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