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
shotokan
Worker
Worker


Joined: Aug 27, 2006
Posts: 153

PostPosted: Sat May 05, 2007 11:38 am Reply with quote Back to top

I have this server block running on my site (nuke 7.8 patched 3.3) and working fine but since it's taking too much space of my main page i was wondering to convert it to a module instead, this way i could use the center portion os the site to better show he NEWS which is what i want.

Well i try doing the conventional but it is not working 100%. As a block it was a two piece code. First the block itself that is an IFRAME calling another program into a different directory and like i said it's working like that.

Here is the first code that call the monitor code:
Only registered users can see links on this board!
Get registered or login to the forums!


This one above is working fine and create my dropdown list option but when it comes to the second code below i am getting the famous page not found. I try but couldn't find the problem since using as a block before was working fine.

Here is the monitor code:
Only registered users can see links on this board!
Get registered or login to the forums!


Any help here to find where my problem is will be greatly appreciated.
Thanks,


Last edited by shotokan on Sun May 06, 2007 11:22 am; edited 1 time in total
View user's profile Send private message
shotokan
Worker
Worker


Joined: Aug 27, 2006
Posts: 153

PostPosted: Sat May 05, 2007 4:16 pm Reply with quote Back to top

I managed to make the module to work but know there is only one small isssue. When the first program (index.php) call the second program (modules.php) into the IFRAME i got the message "you can't access this file directly". should i remove this condition from my program?
View user's profile Send private message
fkelly
Moderator


Joined: Aug 30, 2005
Posts: 2090
Location: near Albany NY

PostPosted: Sat May 05, 2007 8:20 pm Reply with quote Back to top

You shouldn't remove that message. That's a means to assure that everything within nuke accesses files within modules by going thru modules.php. If you look at the address bar when you click on a module name you will see something like this:

Quote:
http://yoursite.org/html/modules.php?name=HTML_Newsletter


If you go thru modules then the constant 'MODULE_FILE' will be defined and you won't get that message.
View user's profile Send private message Visit poster's website
shotokan
Worker
Worker


Joined: Aug 27, 2006
Posts: 153

PostPosted: Sun May 06, 2007 11:12 am Reply with quote Back to top

OK. I haveadded the message back but now look what happens to my module.
You can look at the codes on the zip's above since i have updated them to show what i have now.

Look at the module here. On the left menu it is called "Server Monitor"
Only registered users can see links on this board!
Get registered or login to the forums!


Look that is my program index.php that is calling the monitor.php inside an IFRAME and both codes are in the same place /modules/Monitor/ so i don't know why the message is appearing to me as it was being accessed outside of the modules.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7330
Location: Arizona

PostPosted: Mon May 07, 2007 7:18 pm Reply with quote Back to top

shotokan, the URL within the IFRAME really needs to have a similar structure that the above posted one has if this is a nuke module.

You current have: location.href='modules/Monitor/monitor.php?id=nn' for the iframe URL.

You need to figure out how to turn that into something more like this:

location.href='modules.php?name=Monitor&id=nn'

See what we mean by needing the module to go through modules.php?

I wondering if the following would work:

location.href='modules.php?name=Monitor&file=monitor&id=nn'

Not sure...
View user's profile Send private message Visit poster's website
shotokan
Worker
Worker


Joined: Aug 27, 2006
Posts: 153

PostPosted: Mon May 07, 2007 7:28 pm Reply with quote Back to top

montego wrote:
shotokan, the URL within the IFRAME really needs to have a similar structure that the above posted one has if this is a nuke module.

You current have: location.href='modules/Monitor/monitor.php?id=nn' for the iframe URL.
You need to figure out how to turn that into something more like this:
location.href='modules.php?name=Monitor&id=nn'
See what we mean by needing the module to go through modules.php?
I wondering if the following would work:
location.href='modules.php?name=Monitor&file=monitor&id=nn'
Not sure...


Hey Montego,

You're a genius... It worked like charm.
Thanks man.
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7330
Location: Arizona

PostPosted: Mon May 07, 2007 7:55 pm Reply with quote Back to top

Quote:

You're a genius... It worked like charm.


Wow. I can honestly say that I am pleasantly surprised! Dance-Stick
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-2008 by Raven
Proud to be listed at Lobo Links Web Directory

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 Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum