Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to make PHP-Nuke use a frame-like target


Goto page 1, 2, 3, 4  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
glock
Corporal
Corporal


Joined: 15 Sep 2003
Posts: 18

PostPosted: Tue Jan 27, 2004 6:40 am    Post subject: How to make PHP-Nuke use a frame-like target
Reply with quote

I want to create a block which will do the following. I need the block to have links which (when clicked) open in the center (Module) portion of the page. These links display an external page from http://waterdata.usgs.gov/wa/nwis/uv/?station=12094000 . I just want this date to appear in the center when the link is clicked.
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Tue Jan 27, 2004 8:54 am    Post subject:
Reply with quote

You must write a block and a module. Let's say the module is called "Waterdata". Then you must create a folder named "Waterdata" in the modules folder. In that folder you put an index.php file that does what you want, i.e. reads the waterdata page, parses it (or not), and displays some result. See the index.php's in the other module folders for examples.

Activate the Waterdata module. Test it if it works. Then create a block with a link in it. The link must be of the form:

http://www.yoursite.com/modules.php?name=Waterdata

Actually, you don't need the block. As soon as you create the module and activate it, it will appear in the Modules block with the title "Waterdata". You users need only click that link to see the output in the center column.

If you still need an extra block, hover your mouse over the "Waterdata" link in the modules block and see how that link looks like in the status bar. The link in the extra block must look exactly like that one.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
glock
Corporal
Corporal


Joined: 15 Sep 2003
Posts: 18

PostPosted: Wed Jan 28, 2004 2:44 am    Post subject:
Reply with quote

The module needs to display different water stations. I need to be able to select a drop down list or static link for different rivers.. Example, block could say - big River , Little River, My River. Click on on of these in the block and it would display the information in the center or module. The only differences in my http://waterdata.usgs.gov/wa/nwis/uv/?station=12094000 link is the change of the station.

Is this still possible? The index.php for the module would need to be able to display different data displayed from the links. I am not parsing any data, rather, just displaying the whole page.
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Wed Jan 28, 2004 8:45 am    Post subject:
Reply with quote

Then the link to the module would look like

http://www.yoursite.com/modules.php?name=Waterdata&station=12094000

In the module's code, you would read the station URL parameter, do sanity checks, then either read the HTTP page of the link

http://waterdata.usgs.gov/wa/nwis/uv/?station=the-station-URL-parameter

into a variable and echo it (as you would do in a block with the $content variable), or use iframes to display it (will not work with any browser).

To include a HTML file and its links in a PHP-Nuke module using an iframe, use the following as the index.php file of the module:

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";
$go_to_address1="http://www.karakas-online.de/EN-Book/book1.html";

$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;

?>


You only have to enter the HTTP address of the page to be included in $go_to_address1 and the desired theme in $theme (or, if you want to use whatever theme is currently used, comment the $theme line). Activate the module and you are done!
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mikez
Private
Private


Joined: 20 Sep 2003
Posts: 3

PostPosted: Wed Apr 06, 2005 12:11 pm    Post subject:
Reply with quote

I have been looking for something similar to this for over a year Shocked

Can this code be altered to use in weblinks???

For example - when the links are visited, it opens in a new window and a top frame still gives the feel of my site.

Further to this header - whilst visiting the page this top frame would allow users to 'rate this resource' as well as 'report broken link' etc...

As such I may need to create a different ‘header.php’ to accommodate this… but need to know how to achieve the above first.

Any tips??

Many thanks in advance,

Mike Wink
Back to top
View user's profile Send private message Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Wed Apr 06, 2005 8:39 pm    Post subject:
Reply with quote

I can imagine that you can achieve the effect you want by trying the following:

Create a new module. This module looks exactly as the module shown above, with the only exception that it takes the $go_to_address1 from the URL Suppose that the name of this new module is "Show_Link", it would be called as follows:

http://xxx.yyy.zzz/modules.php?name=Show_Link?go_to_address1=SOME-URL

where SOME-URL would be (to stay with the above example):

www.karakas-online.de/EN-Book/book1.html

Of course, instead of

www.karakas-online.de/EN-Book/book1.html

you would have to pass the URL of the link from the Web Links module.

To achieve the latter, you will have to change the Web Links module in such a way that instead of the link, it prints

http://xxx.yyy.zzz/modules.php?name=Show_Link?go_to_address1=SOME-URL

That is, instead of

SOME-URL

it must print

http://xxx.yyy.zzz/modules.php?name=Show_Link?go_to_address1=SOME-URL
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Trippy
Private
Private


Joined: 10 Jun 2005
Posts: 1

PostPosted: Fri Jun 10, 2005 9:10 am    Post subject:
Reply with quote

I use the code that u provided ( thanks btw ) Smile

But the iframe is 2 big can it be set to auto size ? damn scroll bars are every where Crying or Very sad
Back to top
View user's profile Send private message
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Fri Jun 10, 2005 11:31 am    Post subject:
Reply with quote

Not sure if it can be done. The problem is, if the original page, the one that is displayed inside the iframe, requires by design that it be displayed in so many pixels, then what is your iframe supposed to do? Do a graphical resize of the icons, fonts, boxes, images and other elements to fit the design of the displaying page? If you want the displayed page to use the "available space", then you should design it around relative sizes (like percent values for table widths, for example) and not absolute pixel widths.
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
thomasnagus
Lance Corporal
Lance Corporal


Joined: 26 Jul 2005
Posts: 9
Location: Denver CO USA

PostPosted: Tue Jul 26, 2005 6:27 am    Post subject: TOO MANY STRING ERRORS
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="karate";
$go_to_address1="http://www.geocities.com/thomasnagus/LiquidVitaminsProductRef.htm”;
$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;

?>


I keep getting a line 13 T_STRING ERROR

WHAT IS IT!

[edit] Included code in code tags. Chris [/edit]
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Tue Jul 26, 2005 8:02 am    Post subject: Re: TOO MANY STRING ERRORS
Reply with quote

thomasnagus wrote:
Open quote
Code:

echo "<iframe SRC=”\"".$go_to_address."\" width=\"100%\" height=\"1200\"
framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";
Close quote


This line has a ” too much. It should be:

Code:

echo "<iframe SRC=\"".$go_to_address."\" width=\"100%\" height=\"1200\"
framespacing=0 frameborder=no border=0 scrolling=auto></iframe>";

_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 4
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

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