PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  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
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Wed Jul 06, 2005 5:41 am Reply with quote Back to top

Well I've finally got a nuke installation (7.8 patched, sentinel, other goodies) that I'm happy with. I've been messing with calendars and all sorts of other crap. I'm almost there Wink

I just have one more need though. We've got another website (php site) that keeps track of some member data and our members frequently need to access this. Rather than just have a link from our phpnuke site to open a new browser window for the other php site, is there a good/easy way to port a page into nuke?

I guess what I'm asking is...when a registered user clicks on a link under modules or wherever...I would like it to open the other site in sort of a frame within the phpnuke site. I would also like it to cut out the blocks on the right, but leave the rest (top, left blocks, bottom) of the phpnuke site intact.

If I had any skills in coding I could maybe just combine the other php site into nuke, but that's beyond my abilities at this point in time. Any thoughts/recommendations are GREATLY appreciated Very Happy

Thanks all!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Jul 06, 2005 6:53 am Reply with quote Back to top

Try something like this. This does require that your php.ini file has allow_url_fopen = On . Try it and if it works then you're ok Smile. Save this as modules/YOUR_MODULE/index.php and activate through the acp. You may have different code as your first line ( if ( !defined('MODULE_FILE') ) ) depending on what version and patch level you are at.
Code:
<?
if ( !defined('MODULE_FILE') )
{
   die("You can't access this file directly...");
}
$index=0; //supress right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
@get_lang($module_name);
include ('header.php');
OpenTable();
echo file_get_contents('http://yahoo.com');
CloseTable;
include('footer.php');
die();
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Wed Jul 06, 2005 7:31 am Reply with quote Back to top

very neat raven! I think I'm pretty darn close now. The only problem is it sort of affects the whole site (the colors/formatting) of the phpnuke site all change when it loads up the other php site. Other than that, there's a few issues with hyperlink references and such, but I'm working those out I think.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Jul 06, 2005 7:44 am Reply with quote Back to top

Great! Post back if you get stuck.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Fri Jul 08, 2005 2:05 am Reply with quote Back to top

I've been playing with the iframes stuff, and things seem to be working decently now Smile

One quick question tho. Is there a way to disable the left blocks too? I notice $index=0 takes care of the right blocks, but what about the left? I've tried to search for the answer, but haven't been able to find it Sad
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Fri Jul 08, 2005 8:05 am Reply with quote Back to top

RTM
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Sun Jul 10, 2005 4:17 am Reply with quote Back to top

Once again thanks. I guess my searches weren't good enough Sad Didn't type HIDE left blocks.

Everything is working very very nicely now and looking great. I have one small problem though.

The content of the iframe is a php site as i said, and the links at the top (all main navigation links) completely overtake the browser window when clicked, rather than staying nicely confined to its iframe like a good little script.

Just about all of the other links are ones in tables (the site is basically a large database viewer, lots of tables/rows/columns and everything is sortable and has details when clicked. It's just these darn links at the top that don't seem to use the same method.

I wish i knew enough about php to hypothesize what the problem is, but all I can guess is the links in the tables use some different method than the ones at the top. I've dug into the files a bit in hopes of spotting something obvious, but I guess you could say it's a different "language" to me Wink

anyone else that has used iframes run into this type of problem? it happens in both IE and firefox (first thing i checked) so i can't just blame IE this time


EDIT: Found out what it was. I did a bit more research into iframes and found that target="_top" will destroy them Wink Maybe someone else will come across this and find this info helpful


Last edited by sak on Sun Jul 10, 2005 6:07 am; edited 1 time in total
View user's profile Send private message Visit poster's website
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Sun Jul 10, 2005 4:51 am Reply with quote Back to top

[Ignore] Groovy I hate to post another question here, but here goes:

If one wished to hide the main logo of the site for a certain module, would one have to create an alternate header.html file that excludes the logo? And then use an if/else to decide which header.html file to load based upon which module is in use? This is the only way apparent to me, but had to ask just in case there's something much easier im missing Groovy [/Ignore]

edit: figured it out ^_^


Last edited by sak on Sun Jul 10, 2005 5:37 am; edited 3 times in total
View user's profile Send private message Visit poster's website
sak
Worker
Worker


Joined: Jul 06, 2005
Posts: 167

PostPosted: Sun Jul 10, 2005 5:00 am Reply with quote Back to top

This is what I come up with, gonna test it out in a sec. just modified a random theme file

Code:
    if ($name=="MODULE_NAME") {
    $tmpl_file = "themes/THEME_NAME/altheader.html";
    }
    else $tmpl_file = "themes/THEME_NAME/header.html";
    $thefile = implode("", file($tmpl_file));
    $thefile = addslashes($thefile);
    $thefile = "\$r_file=\"".$thefile."\";";
    eval($thefile);
    print $r_file;
    if ($name=="MODULE_NAME") {}
    else blocks(left);


one working way to do it
View user's profile Send private message Visit poster's website
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