Author |
Message |
brentnhunter
Client

Joined: Sep 10, 2004
Posts: 166
|
Posted:
Fri Oct 15, 2004 5:04 pm |
|
I have installed software that I would like to be accessible as a module (not a block) on my Nuke site.
I would also like to create an "About this Site" module, so when a person gets into that module and clicks on links in the module, they see other integrated pages that explain things and don't take them off my site.
Does anyone know how to accomplish these two goals?
Thank you for your help!
Brent Hunter
http://www.EarthCommCenter.com |
|
|
|
 |
ecvej
Hangin' Around

Joined: Oct 10, 2004
Posts: 45
Location: Northampton, UK
|
Posted:
Sun Oct 17, 2004 12:33 pm |
|
Are you asking us how one goes about writing a module? If yes I reckon after you've read Only registered users can see links on this board! Get registered or login! you'll understand how to make an "About this Site" module with links to other pages within the module.
If you get stuck on a specific thing just post but all you really need is an index page containing links to some other pages. |
|
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 12:48 pm |
|
Hi ecvej,
Thanks for your reply. As far as the About This Site question, I didn't know it at the time but you're right, I guess I am asking how to create a module. Are there any hints or pointers or references to other websites you might be able to point me to?
Thanks very much for your help!
Brent |
|
|
|
 |
ecvej

|
Posted:
Sun Oct 17, 2004 1:23 pm |
|
The link I posted pretty much covers the rules of module making. I'll start you off a bit though...
Code:<?php
//First prevent direct access to the file
if(!eregi("modules.php", $PHP_SELF)) {
die("You can't access this file directly");
}
//all module pages need to include the following to work
if(!isset($mainfile)){
include("mainfile.php");
}
$index = 1;
include ("header.php");
//code goes here to make the module do whatever you want
//eg to create a link to the faq page of this module..
echo "<a href="modules.php?name=MODULENAMEHERE%20&%20file=faq">Click here for the site faq</a>";
//all module pages need to include the footer to work
include ("footer.php");
?>
|
The above page should be saved as index.php in your modules/modulename folder. You need to change MODULENAMEHERE in your code to the name of your module for it to work.
Basically the above creates a page that shows a link to another page within the module. Put as many different links in as you want and make other pages using the template above. |
Last edited by ecvej on Sun Oct 17, 2004 4:12 pm; edited 1 time in total |
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 1:30 pm |
|
Oh cool, now I see. I will give it a try latyer today.
Thank you so much for your help, ecvej!
Brent |
|
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 1:41 pm |
|
Cool, it works! I would like to show the right side blocks like appears on my main site. Any suggestions on how to do that?
Thank you again for any help you can provide,
Brent
http://www.EarthCommCenter.com |
|
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 1:52 pm |
|
Now that I almost have the About This Site feature done, I'd like to get back to my first question, how to turn an application into a module. However maybe I didn't explain enough of what I would like to do.
I have some blog software that I would like to be accessed as if it were a module. That way someone could click on a link on the left hand side of the page where the module links are, and the link would be followed.
So for example if I wanted the module to link to www.mysite.com/blogger , how would I handle that as a module? I could create a module that links to a page that contains a link to the URL, but that would be an extra unnecessary step that I would like to get rid of.
Thank you!
Brent |
|
|
|
 |
ecvej

|
Posted:
Sun Oct 17, 2004 4:12 pm |
|
brentnhunter wrote: | Cool, it works! I would like to show the right side blocks like appears on my main site. Any suggestions on how to do that? |
You need that in your code, I'll edit into the code i posted above
As regards turning your blogger into a module, assuming its php it should be possible. Need more details though, do you want to still be in the phpnuke environment (eg your blocks etc showing) or do you simply want a link that will take you out of nuke to your blogger @ www.yoursite.com/blog ? The latter can be done with a simple redirect or open in a new page avoiding the two click problem you have
Also, I'm assure you're aware there's probably already a module blog in existence (i havent looked) so could you use an existing one?
If you want the blog to appear in your nuke environment, I cant really help with that without knowing something about the blogger. I would tell you that the blog pages would probably need to include the code I told you above which forms the base of any page in a nuke module. Hope I'm making sense  |
|
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 5:52 pm |
|
$index=1 YES, I love it!
The question I am asking is actually a generic question about how do I link to any URL from a module link? For example, if I wanted to allow people to click on a module link and be taken to, say, CNN in a new window... how do I do that?
Thanks!
Brent |
|
|
|
 |
ecvej

|
Posted:
Sun Oct 17, 2004 6:14 pm |
|
Last reply for the night, bed time
You want Only registered users can see links on this board! Get registered or login! link this time. Have a scroll down the index of the whole nuke how to guide whilst you're there, bet you'll see loads of things you never know you wanted to do until you see it
Btw checked out you site, cool fade effect when I click on a link. You code that yourself?
In case it helps, I'll show you the following block I'm using on my site which is nothing but links (I use it to display in just one module atm.)
Code:<?php
if (eregi("block-menuSample.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "
<font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">
<B><u>Navigation</u>
<BR>
<STRONG><BIG>·</BIG></STRONG>
<a href=modules.php?name=Beta%20&%20file=main>Status Page</a><br>
<STRONG><BIG>·</BIG></STRONG>
<a href=modules.php?name=Beta%20&%20file=battlefield>Battlefield</a><br>
<STRONG><BIG>·</BIG></STRONG>
<a href=modules.php?name=Beta%20&%20file=map>Map</a><br>
<STRONG><BIG>·</BIG></STRONG>
<a href=modules.php?name=Beta%20&%20file=rankings>Rankings</a><br>
<br><BR>
<u>ecvej.com</u>
<BR>
<STRONG><BIG>·</BIG></STRONG>
<A href=\"index.php\">Main Page</A><BR>
<STRONG><BIG>·</BIG></STRONG>
<A href=\"forums.html\">Forum</A><BR>";
?>
|
|
|
|
|
 |
brentnhunter

|
Posted:
Sun Oct 17, 2004 7:33 pm |
|
|
|
 |
ecvej

|
Posted:
Mon Oct 18, 2004 11:33 am |
|
Thanks, might have a look at that code myself. I have zero graphics on my site at the moment :O |
|
|
|
 |
sharlein
Member Emeritus

Joined: Nov 19, 2002
Posts: 322
Location: On the Road
|
Posted:
Mon Oct 18, 2004 1:53 pm |
|
I have found a quick and easy way to create modules. On my site, left, near the bottom, you will find some usefull tools. (PHP-Nuke Tools v3.00
By Disipal) |
_________________ Give Me Ambiguity Or Give Me Something Else! |
|
|
 |
brentnhunter

|
Posted:
Tue Oct 19, 2004 11:43 pm |
|
Awesome, thank you Sharlein!
Brent |
|
|
|
 |
brentnhunter

|
Posted:
Tue Nov 02, 2004 11:48 am |
|
ecvej, I once got this to work on my site but now I am having trouble again. I can get to the main page of my new module but if I try to link to any pages, I can't get them. I get an error that says file not found. I have a question about one of the lines of code you recommended that I use above:
echo "<a href="modules.php?name=MODULENAMEHERE%20&%20file=faq">Click here for the site faq</a>";
What is the %20&%20 and what does it do? I am thinking maybe that is somehow the cause of my errors.
Thank you,
Brent |
|
|
|
 |
ecvej

|
Posted:
Tue Nov 02, 2004 12:31 pm |
|
Don't see why %20 would be causing you problems, it works for me and it simply means a space: the actual url is modules.php?name=MODULENAMEHERE & file=faq
Could try with %20 removed I guess and post some code for us to have a look at if still not working. |
|
|
|
 |
brentnhunter

|
Posted:
Tue Nov 02, 2004 12:34 pm |
|
I removed the %20's and just used the & sign and now it works fine (with no spaces). Thanks for the reply though! |
|
|
|
 |
ecvej

|
Posted:
Tue Nov 02, 2004 12:38 pm |
|
Weird, wonder why the %20 works for me and not for you? Different nuke version maybe? Who knows
So can we get a url to have look yet or are you keeping it under wraps until finished? |
|
|
|
 |
brentnhunter

|
Posted:
Tue Nov 02, 2004 12:41 pm |
|
Oh, well sure if you want to look it is very simple now -- the About This Site section, my site is located at http://www.EarthCommCenter.com It doesn't actually have any links yet, that part IS under wraps.  |
|
|
|
 |
|