Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8
Author Message
shotokan
Worker
Worker



Joined: Aug 27, 2006
Posts: 172

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

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! ]

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! ]

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

_________________
Shotokan

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







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

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?
 
fkelly
Former Moderator in Good Standing



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

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

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







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

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! ]

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.
 
montego
Site Admin



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

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

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

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
shotokan







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

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.
 
montego







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

Quote:

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


Wow. I can honestly say that I am pleasantly surprised! Dance-Stick
 
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.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.8

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©