| Author |
Message |
BigTy |
|
Post subject: Guild info block
Posted: Mar 22, 2007 - 11:22 PM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
I have added a Guild info block to my site (www.norrathwanderers.com)
And it works but the outline is missing from the block could someone lend a hand with this? |
|
|
| |
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 12:25 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
Strange, it is getting rendered OUTSIDE of the block.
Looks like bad coding on the block, can you email me the block? |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:25 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
| sure But I dont have your email addy coud you PM it to me? |
|
|
| |
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:26 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
| mikemaynard {AT] ccnyi {DOT] com |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:31 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:53 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
Can you tell me where you got the block?
It isn't even close to being a functional Nuke block. |
|
|
| |
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:57 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
Nevermind, I fixed it.
Replace the contents of the file with this
Code:
<?php
/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* Copyright Phil Barbier 2006 */
/************************************************************************/
if (eregi("eqrssblock.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "";
$guildid = "417206"; //Put your guild ID in here!
// ************************************* Globals Definiton **************************************
$url = "http://eq2players.station.sony.com/guilds/guild_profile.vm?guildId=$guildid";
// ************************************* Main Body of code **************************************
function GIdispError() {
print "There was an error, please try again later.";
}
if ($pagedata = file($url)) {
$i = 0;
$newarr = array();
foreach($pagedata as $k => $v) {
if ($k > 679 && $k < 705) {
if (!empty($v) || $v != '' || $v!="") {
$newarr[$i] = trim(strip_tags($v));
$i++;
}
}
}
unset($pagedata);
$i = 0;
$d = array();
foreach($newarr as $k => $v) {
if ($v!="") {
// horrible hard coding to try and cleanup the data a little more
if ($k==23 || $k==349 || $k==354 || $k==359 || $k==365 || $k==387 || $k==412) {
$d[$i-1] = $d[$i-1] . ' ' . $v;
} else {
$d[$i] = $v;
}
$i++;
}
}
unset($d[4], $d[5]); // removes the website information
// re-index the array
$i=0;
$guildinfo = array();
foreach($d as $k => $v) {
$guildinfo[$i] = $v;
$i++;
}
$t1 = $guildinfo[16];
$t2 = $guildinfo[17];
$guildinfo[16] = $t2;
$guildinfo[17] = $t1;
unset($d, $t1, $t2);
/*
print '<pre>Raw data:<br />';
print_r($guildinfo);
print '<br />/Raw Data</pre>';
*/
$content .= '<table border="0" width="100%">';
$i=0;
for ($y=0; $y < count($guildinfo); $y++) { // as $key => $v) {
$content .= '<tr>';
$x=0;
for ($z=0; $z < 2; $z++) {
if ($z==1) {
$content .= '<td>' . $guildinfo[$y+$z] . '</td>';
$y++;
} else {
$content .= '<td>' . $guildinfo[$y] . '</td>';
}
}
}
$content .= '</tr>';
$content .= '</table>';
} else {
GIdispError();
}
?>
|
|
|
| |
|
|
|
 |
BigTy |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 01:58 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
| A guy I know coded it for me, I can provide an emaill addy if you need it. |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 02:01 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
blamo and she is good what needed to be fixed? |
|
|
| |
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 02:05 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
He wasn't outputting the data as $content
That is what tells PHPNuke what to put in the content area of the block. |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 02:09 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
| could you click on guild roster? here is another project that was being converted if you want to use any of the code for your mod let me know ill send it to you. |
|
|
| |
|
|
|
 |
mars |
|
Post subject: RE: Guild info block
Posted: Mar 23, 2007 - 03:32 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
| We've paused development on it for now as we are keeping an eye on another one being coded. |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject:
Posted: Apr 06, 2007 - 01:24 AM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
new issue for some reason any idea how to fix this?
Oasis Guild Status
1,724,795 Website
var str = 'http://www.norrathwanderers.com'; if(str.search(/http/i) == -1) {
document.write("http://http://www.norrathwanderers.com"); }
else { document.write("http://www.norrathwanderers.com");
} Guild Members
60 Date Formed
Unique Members Mar 6, 2005
18 Guild Level
35 Average Member |
|
|
| |
|
|
|
 |
mars |
|
Post subject:
Posted: Apr 06, 2007 - 03:02 AM
|
|
Site Admin

Joined: Aug 15, 2004
Posts: 4277
Status: Offline
|
|
| no idea, it looks like maybe Sony changed the formatting of the page? |
|
|
| |
|
|
|
 |
BigTy |
|
Post subject:
Posted: Apr 06, 2007 - 12:51 PM
|
|
Joined: Nov 02, 2005
Posts: 64
Status: Offline
|
|
| Sorry to ask do you know a way I could fix it? |
|
|
| |
|
|
|
 |
|
|