PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
helidoc
Hangin' Around


Joined: Jul 09, 2006
Posts: 43

PostPosted: Thu Feb 11, 2010 7:56 am Reply with quote Back to top

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...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);

include_once('header.php');
include('somepage.html');
include_once('footer.php');

?>


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;
?>
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Feb 11, 2010 10:43 am Reply with quote Back to top

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.
View user's profile Send private message
helidoc
Hangin' Around


Joined: Jul 09, 2006
Posts: 43

PostPosted: Fri Feb 12, 2010 5:55 pm Reply with quote Back to top

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 Very Happy

Image
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1536
Location: North Carolina

PostPosted: Sat Feb 13, 2010 7:32 am Reply with quote Back to top

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.       */
/************************************************************************/

if(!defined('MODULE_FILE')) {
  header('Location: ../../index.php');
  die();
}

Header("Location: modules. php?name=Forums&file=viewforum&f=5");

?>

You would need to remove the space between modules. and php.

Just change the Location to the forum you want it to point to.
View user's profile Send private message Send e-mail Visit poster's website
helidoc
Hangin' Around


Joined: Jul 09, 2006
Posts: 43

PostPosted: Sat Feb 13, 2010 9:06 am Reply with quote Back to top

That worked perfect thanks, I know my users will appreciate the missing iframes Very Happy
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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