Simple way to make WowRoster work as a module in PhP-Nuke

phpNuke integration forum

Simple way to make WowRoster work as a module in PhP-Nuke

Postby JBabey » Thu Feb 08, 2007 4:04 am

Admittedly I had been working for days on end on how to seamlessly integrate the roster with my nuke portal. After spending hours here, and elsewhere on other forums it occured to me that the easy way to do this would be to simply embed the whole page into an iframe module that would show up on the front page.

:thumright:

I wrote a single index.php file, put it into a folder called Guild_Roster in the "modules" section of the site. Activated it so it would show up on the menu and VIOLA! it now loads as a module.

_____________

why do this?
~> there is ZERO modification to the wowroster files or your phpnuke files!
~> you can install the roster and follow all of the defaults with no need to worry about portal integration.

installation
~> less than 1 minute!

can i see a sample
~> of course, please follow this URL http://www.soulpirates.net/modules.php? ... ild_Roster (please forgive, i just got the site up about 5 days ago, and were still working on a logo & graphics etc.

can i modify this file to suit my own purposes
~> absolutely, the ability to load *ANY* url into an iframe as a module has countless uses


Code: Select all
<?php

/****************************************************************************/
/* ----> Module file used to load external URL's into an I-Frame            */
/*       Many thanks to forum users everywhere & specifically the           */
/*       wowroster team for inspiring me to figure this out!         <----  */
/****************************************************************************/

if (!defined('MODULE_FILE')) {
   die (
"You can't access this file directly...");
}
require_once(
"mainfile.php");
$module_name basename(dirname(__FILE__));
get_lang($module_name);

/****************************************************************************/
/* ----> change the site URL information that you wish to load here         */

$index=0;
$go_to_address1="http://www.yoursitehere/roster/index.php";
$go_to_address=rawurldecode($go_to_address1);

/* end url input <---- */

include("header.php");
define('INDEX_FILE'true);
OpenTable();


/****************************************************************************/
/*  Modify the height= information to enlarge the i-frame if needed         */
/*  Default height=\"1200\"                                                 */
/* ----> iframe code to load above URL                                      */

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

/* end iframe load <---- */

CloseTable();
include(
"footer.php");

?>




I know im a little comment happy.

INSTRUCTIONS

1: create a new file and name it "index.php"

2: copy & paste the above code into the file

3: change the URL to meet your needs

4: save and close the file

5: login to your FTP and go into the "/modules/" folder

6: create a new folder and name it what you would like the module to show up as

7: copy the newly created "index.php" into the folder you created

8: login to the admin page of your phpnuke installation

9: click on "Modules"

10: scroll the list until you see the name of your new folder/module

11: edit the name as you want it to show up in the menu and then activate the module

12: enjoy! :oops:

Example can be seen on my own website www.soulpirates.net
click on the ROSTER on the left nav menu
Last edited by JBabey on Tue Aug 28, 2007 1:58 am, edited 2 times in total.
JBabey
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Thu Feb 08, 2007 3:15 am

Simple way to make WowRoster work as a module in PhP-Nuke

Postby Verderf » Thu Feb 08, 2007 10:56 am

Welldone mate! I found that package just a few minutes ago but it didnt contain any install information.

G/j! allready got it running!
Verderf
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Feb 08, 2007 8:49 am

Simple way to make WowRoster work as a module in PhP-Nuke

Postby Ghostmaster » Thu Feb 08, 2007 12:01 pm

Can only say Thank You verry verry much :thumright: :salute:
Ghostmaster
WR.net Apprentice
WR.net Apprentice
 
Posts: 23
Joined: Sun Jul 30, 2006 3:54 am

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby skidrow » Fri Feb 09, 2007 9:39 am

I can't seem to get it working i did what you said but when i click on the module all i get is a blank page am i doing something wrong.

Do you need an addon for php nuke "IE iframe"

Is iframe a module that works with php-nuke?
skidrow
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jan 31, 2007 1:27 pm

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby DrSuSE » Fri Feb 09, 2007 2:45 pm

Nice... now if only I could eliminate the double scroll bars...

http://www.darkrevelation.org/html/modu ... ame=Roster

Thanks.
DrSuSE
WR.net Apprentice
WR.net Apprentice
 
Posts: 16
Joined: Mon Nov 13, 2006 11:23 pm

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby DrSuSE » Fri Feb 09, 2007 3:01 pm

Not sure why I was dumb for a second... depending on the length of your roster pages, you may need to adjust a little to avoid having double scroll bars.

In this line:

Code: Select all
echo "<iframe SRC=\"".$go_to_address."\" width=\"100%\" height=\"4800\"


Adjust the height value. Changing 4800 to about 8000 worked well for me.
DrSuSE
WR.net Apprentice
WR.net Apprentice
 
Posts: 16
Joined: Mon Nov 13, 2006 11:23 pm

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby Ghostmaster » Sat Feb 10, 2007 2:05 pm

skidrow wrote:I can't seem to get it working i did what you said but when i click on the module all i get is a blank page am i doing something wrong.

Do you need an addon for php nuke "IE iframe"

Is iframe a module that works with php-nuke?


Hi Skidrow

Is
Code: Select all
$go_to_address1="http://www.yoursitehere/roster/index.php"


Correct for your site ? ... remember, if your site is on a Unix/Linux server, you have spell the link correct with upper/low case chars.

/Ghostmaster
Ghostmaster
WR.net Apprentice
WR.net Apprentice
 
Posts: 23
Joined: Sun Jul 30, 2006 3:54 am

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby skidrow » Sat Feb 10, 2007 4:29 pm

hi Ghostmaster,

Yeah the address is right.
skidrow
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jan 31, 2007 1:27 pm

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby JBabey » Tue Feb 13, 2007 7:20 am

Im not sure why you are getting a blank page. if you type the URL manually does the page open up?

I went back and tested it on my own site and changed the URL to lots of different web pages, even other sites roster and it seems to load fine. You may need to adjust the file permissions on your files once they are uploaded, and make sure public execute is enabled..... to test try CHMOD the file to 777.

If you still need help let me know and maybe i can whip something up for ya real quick that will work for you.

_______________

and thanks guys for helping out with the "double scroll bar" thing, i didnt make that really clear in the instructions
JBabey
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Thu Feb 08, 2007 3:15 am

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby skidrow » Tue Feb 13, 2007 12:39 pm

Thanks guys,

just to let you all know i got it working all i was doing wrong was i did't have a "/" were i was spose to :)
skidrow
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jan 31, 2007 1:27 pm

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby bgribbins » Tue Feb 13, 2007 6:24 pm

Anyone know how to do this with PostNuke?

I tried these exact directions on my postnuke site but I get a 'file can't be accessed directly...' message. I CHMOD the index.php file 777 for the heck of it, still get that. I took out the IF statement at the beginning but then i just get a blank page.

Thanks.
User avatar
bgribbins
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Thu Nov 23, 2006 1:54 am

Re: Simple way to make WowRoster work as a module in PhP-Nuk

Postby JBabey » Wed Feb 14, 2007 10:29 pm

If you have some sort of enhanced site security, such as NukeSentinel, you may need to allow that link to be accessed.

Question: does the error message you receive show up in the iframe, or does the error show up on the whole site.... what im getting at is, if you type the URL in MANUALLY to your browser....

www.yoursite.com/roster/index.php do you still get the error or does the roster load....

you can narrow it down to see if the newly created php script is your issue (permissions) or if its the location you chose to put your roster.
JBabey
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Thu Feb 08, 2007 3:15 am

Simple way to make WowRoster work as a module in PhP-Nuke

Postby Ghostmaster » Thu Feb 15, 2007 1:12 am

Some questions:

Is is possible to make the height dynamic, so you don't have to change the code all the time when new members are joined the guild ?

And is it possible so secure the roster Index.php to deny direct access and only accept access from the Iframe Index.php file ?

/Ghostmaster
Ghostmaster
WR.net Apprentice
WR.net Apprentice
 
Posts: 23
Joined: Sun Jul 30, 2006 3:54 am

Simple way to make WowRoster work as a module in PhP-Nuke

Postby cennis » Thu Feb 15, 2007 1:29 am

Great info, thx JBabey. I had tried using an IFrame before but didn't know you could increase the default height so it just never looked good enough for me to use with the double scroll bars. This solution is great.

I have one issue that I hope maybe someone else has come across. My right blocks are showing up when I view the module now. The $index is, of course, set to = 0 as you have done in your example. I have tried cutting and pasting directly from your example and also spacing and placing the line of code in different places with no success.

It isn't a global thing because I have other modules that hide the right blocks fine. I can't find anything special in the code for those modules that might make them different. I am stumped. Does anyone have any ideas?


Any feedback would be great.
-CEnnis
Last edited by cennis on Thu Feb 15, 2007 5:26 am, edited 1 time in total.
User avatar
cennis
WR.net Apprentice
WR.net Apprentice
 
Posts: 6
Joined: Mon Jul 17, 2006 11:51 pm

Simple way to make WowRoster work as a module in PhP-Nuke

Postby Ghostmaster » Thu Feb 15, 2007 1:39 am

Hi Cennis

I had the same problem, and I just comment out "define('INDEX_FILE', true);"

Changed
Code: Select all
define('INDEX_FILE'true); 


to

Code: Select all
// define('INDEX_FILE', true); 


/Ghostmaster
Ghostmaster
WR.net Apprentice
WR.net Apprentice
 
Posts: 23
Joined: Sun Jul 30, 2006 3:54 am

Next

Return to phpNuke

Who is online

Users browsing this forum: No registered users and 1 guest

cron