Sub Menu
Links Menu
Online Users

In total there are 312 users online :: 3 registered, 0 hidden and 309 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot] based on users active over the past 60 minutes

[MOD] - phpRaider Block for IMPortal

Mods etc.

Moderator: Integra Moderator

[MOD] - phpRaider Block for IMPortal

PostAuthor: Tholin » Tue Oct 30, 2007 12:58 am

So, errrm. This was my 1st stab at creating a block for IMPortal. I maintain a WoW guild website, and we've decided to use phpRaider for raid sign-ups. This block will display the upcoming 10 raids in a chronological order. Demo:

[align=left:31hct5b3][flash=,:31hct5b3]http://www.prepared-guild.com/forum/phpRaiderBlock.jpg[/flash:31hct5b3][/align:31hct5b3]

Mousing over the icons will display the "location" entered in phpRaider. Also, the dates are a link to open the relevant phpRaider raid display in a new browser window. The bottom link will open phpRaider's main window in a new browser window. There shouldn't be any problems with language, as the only written data which is used is entered manually in phpRaider.

Since I have very little experience in coding in an IntegraMOD environment, coding in a phpBB2 environment, and coding anything whatsoever, I do not have plans to add new features by request. This thing could've probably been coded better, and if there are any bugs/possible vulnerabilities I'd gladly take some tips and modify accordingly.

Installation Pre-requisites:
  • Have phpRaider installed (d-uh!)

Download:
[url=http]http://www.prepared-guild.com/forum/phpraider_block.zip[/url]

Installation
[list type=decimal][*]Unzip the file to your local computer[*]If necessary customize settings according to the direction below[*]Copy the customized blocks_imp_phpraider.php to your /blocks directory (in the I-MOD root folder)[*]Copy the customized phpraider_block.tpl to /templates/*/blocks/ for each template you are using (i.e. /templates/fisubice/blocks/)[*]Add the block using the ACP (ACP->IMPortal->Blocks Management->Your Site's IMPortal->Add Blocks). The block file should be called phpraider.[/list]

Customization
Suggestion: I suggest u do all the editing before uploading the files to your website <img>
The Zipped files contain settings for a specific path of phpRaider, and are customized for a WoW guild. This could be changed quite easily though.

Installation path:
If the installation path of your phpRaider is different than "/phpraider", this needs to be changed. To specify your phpRaider installtion path (I used a relative path, you could use the absolute path as well) open blocks_imp_phpraider.php and edit this line:

Code: Select all
$phpraiderpath = './phpraider';


to point to your phpRaider installation path. i.e.

Code: Select all
$phpraiderpath = './raider';


Another place this needs to be done is the blocks_phpraider.tpl file. Open blocks_phpraider.tpl and edit this line]<span><a>phpRaider</a>[/code]

To point to your phpRaider installation path. i.e.

Code: Select all
<span><a>phpRaider</a>


Game Icons path]open[/b] blocks_imp_phpraider.php and edit this line:

Code: Select all
 $text .='<tr><td> </td><td><img src="'.$raiderpath.'/games/WoW/images/raids/'.$config_row['icon_name'].'"...  


to point to your game's image store. i.e.

Code: Select all
 $text .='<tr><td> </td><td><img src="'.$raiderpath.'/games/LOTRO/images/raids/'.$config_row['icon_name'].'"...  


I think thats it. It's my 1st time posting here, so I hope I haven't broken any rules or whatever. This is also my 1st mod, so I'd appreciate calm and constructive comments/criticism (like]). A big thank you to Jere Pà¤ÃƒÆ’ ¤kkà¶nen for his help, and a final big Thank you to Whiskey, which this mod is greatly inspired (read: copy+pasted) by/from.

Have fun with it.
Tholin.
Last edited by Tholin on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Tholin
Newbie
Newbie
 
Posts: 6
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 24, 2007 5:14 am
Cash on hand: 0.00

Re: [MOD] - phpRaider Block for IMPortal

PostAuthor: ubelong2matt » Tue Dec 11, 2007 6:52 am

You rock dude. I was looking for something along these lines and if I can figure out how to include this in a phpbb hack for a calendar week bar, you'll be the first to know!

EDIT: I ran into a small snag and some of you may run into the same problem as well. My webhost sets up all of my databases to have the same prefix. This created a problem with this block as it kept looking for phpraider_ for the prefix in my SQL database. Of course, this prefix did not exist so I kept breaking my page.

To fix this, here's what I did:

Find:
Code: Select all
/**Selects 10 non-expired raids sorted by date**/


Below it you will see the sql query]$query = "SELECT icon_name, location, raid_id, start_time FROM phpraider_raid WHERE expired = '0' ORDER BY invite_time LIMIT 10";[/code]

Because my table prefix started with uuuguild_, I changed the:
Code: Select all
phpraider_raid


To]uuuguild_phpraider.uuuguild_raid[/code]

You'll of course need to change your prefix to whatever your host sets your mySQL database prefix, but it should work.

In the event you run into an error stating your login is incorrect for the SQL database, you'll need to add whatever SQL user you have for phpbb to your phpraider website as well.
Last edited by ubelong2matt on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

ubelong2matt
Newbie
Newbie
 
Posts: 6
Likes: 0 post
Liked in: 0 post
Joined: Thu Jul 12, 2007 11:04 pm
Cash on hand: 0.00

Re: [MOD] - phpRaider Block for IMPortal

PostAuthor: Nisse666 » Wed Feb 06, 2008 12:00 pm

How could I get this to work using different DBs for IMportal and phpraider ?
Last edited by Nisse666 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Nisse666
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Joined: Sat Jan 12, 2008 1:31 am
Cash on hand: 0.00

PostAuthor: Tholin » Mon Feb 11, 2008 7:54 am

"Nisse666";p="31164" wrote:How could I get this to work using different DBs for IMportal and phpraider ?


Like I said on the original post. I'm really not a coder, this MOD is basically a copy+paste with some changes to someone else's code (Whiskey's recruitment block). From my limited understanding since phpRaider is supposed to save session data from phpBB/IMPortal (to enable joint logins), it uses global variables from phpBB/IMPortal ($db in the blocks_imp_phpraider.php).

I'm assuming here (and whatever changes you do are your responsibility alone...) that for testing you could try printing the value of $db (something like Echo $db), and if the result makes sense (points to the phpBB db), remove $db from the global list and just assign it a value.

Again, I'm no coder, I can barely believe I made this work ;)
Last edited by Tholin on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Tholin
Newbie
Newbie
 
Posts: 6
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 24, 2007 5:14 am
Cash on hand: 0.00

PostAuthor: salmercker » Fri Mar 07, 2008 10:15 am

is there a way to get this to work for RunUO? Ultima Online Emulator?
Last edited by salmercker on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

salmercker
Members
Members
 
Posts: 42
Likes: 0 post
Liked in: 0 post
Joined: Sat Sep 01, 2007 8:42 pm
Cash on hand: 0.00

PostAuthor: Tholin » Thu Mar 13, 2008 4:27 am

"salmercker";p="32081" wrote:is there a way to get this to work for RunUO? Ultima Online Emulator?

The Block takes information from phpRaider. If you can set up phpRaider to work with UO, I'm quite sure the block would work too.
Last edited by Tholin on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Tholin
Newbie
Newbie
 
Posts: 6
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 24, 2007 5:14 am
Cash on hand: 0.00

Re: [MOD] - phpRaider Block for IMPortal

PostAuthor: Nisse666 » Tue Mar 18, 2008 3:36 am

Is there another way to use 2 separate DBs with this block, than just "merging" the two ?
Last edited by Nisse666 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Nisse666
Newbie
Newbie
 
Posts: 12
Likes: 0 post
Liked in: 0 post
Joined: Sat Jan 12, 2008 1:31 am
Cash on hand: 0.00

PostAuthor: Tholin » Tue Mar 18, 2008 6:45 am

"Nisse666";p="32241" wrote:Is there another way to use 2 separate DBs with this block, than just "merging" the two ?

There probably is, I'm just not confident enough in my knowledge to find out a solution. Besides that, the site I had for testing this block, is no longer under my control, so I can't really test this to help (quit playing WoW).

Sorry but I can't help you with this one <img> I'm sure there are other people with much better experience than mine here who could help.
Last edited by Tholin on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Tholin
Newbie
Newbie
 
Posts: 6
Likes: 0 post
Liked in: 0 post
Joined: Tue Apr 24, 2007 5:14 am
Cash on hand: 0.00


Return to IntegraMOD Modifications

Who is online

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]