View Full Version : Miscellaneous Hacks - Vanguard Guild Roster Integration Hack
Gandiel
03-13-2007, 10:00 PM
Vanguard - Saga of Heroes
Guild Roster Integration Hack
WHAT IS THIS?
This plugin integrates your guild's data obtained from vgplayers.station.sony.com with vBulletin
FEATURES:
Automatically updates your guild's data once per hour. No more manually downloading the XML or CSV files.
Allows you to specify the text for the headers of guild roster display
Allows you to turn off certain columns is you so desire
Ability to sort on most data... i.e. Name, Class, Level, Crafting Level, etc.
INSTALLATION:
Easy! Takes only a few minutes:
Edit line 27 of vgroster_import.php to include your guild's ID on vgplayers.station.sony.com
The line should look like this:
$file ="http://vgplayers.station.sony.com/includes/guilds/guildsRosterCSV.vm?guildId=123456789";
Upload vgroster.php to the root of your forums. Upload vgroster_import.php to /includes/cron/
Import the xml into products. (AdminCP -> Plugin System -> Manage Products -> Add/Import Product)
Edit the options. (AdminCP -> vBulletin Options -> Vanguard Roster Settings)
Enter in the information specific to your guild... and the text you'd like displayed for the headers.
Also gives you the ability to turn off certain columns if you'd like.
Run the Scheduled Task once to populate the database with your guilds information. The task will run once per hour afterwards.
(AdminCP -> Scheduled Task Manager -> Vanguard Roster Update -> Run Now)
View your roster at http://www.yourwebsite.org/yourforums/vgroster.php You're done!
NOTE TO USER:
I am VERY new to vBulletin and .php coding. This is my first hack. I'll do my best to support it the best I can. I know if Sigil changes their format of the .csv file, we'll all need to do a little more work on it. Hope you enjoy this!
Please be gentle with your comments. :D
UPDATES:
Version 1.0.2: Initial Release (March 14, 2007)
MAKE SURE YOU CLICK INSTALL
You will get an email when a new version is released.
This hack is created for your use free of charge. No payment is requested. However, if you would like to donate money for the work I put in to this hack, a donation would show your appreciation.
https://vborg.vbsupport.ru/external/2010/02/12.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=gandiel%40legendsguild%2eorg&item_name=Donation%20for%20Vanguard%20Roster%20Hac k&no_shipping=0&tax=0¤cy_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8)
Gandiel
03-14-2007, 06:32 PM
Reserved
Sarcoth
03-21-2007, 12:57 PM
Very nicely done. Installed. I've been working on something similiar myself but this far surpasses my plans. You figured out a way to do a few things I was stuck on. I'm going to play with it a little bit to get it the way I want.
My plans at the moment:
1) Get the vgroster and memberlist connected. I'd like to have a column for usernames and then only display users on the roster if they have an account on the forum. They must also be in one of the following usergroups (5,6,9,10) to appear on the roster. Having a roster identical to VGPlayers means I could have just gone to VGPlayers instead; no offense.
2) Add a class counter at the bottom.
I already have these things working on my Showroster Hack (https://vborg.vbsupport.ru/showthread.php?t=141311), but I haven't been able to get the sorting to work. Plus, it is still tied to showgroups which I haven't gotten around to maniplulating yet. I just need to figure a way to merge this with mine. I really like what you put together. Thanks!
Feel free to take a look at what I have for any idea's. My Guild Roster (http://vanguard.sacredhaven.org/forums/showroster.php).
TrIn@dOr
03-21-2007, 01:26 PM
Would be nice making this for any kind of roster.
Gandiel
03-21-2007, 04:00 PM
Very nicely done. Installed.
Thanks!
My plans at the moment:
1) Get the vgroster and memberlist connected. I'd like to have a column for usernames and then only display users on the roster if they have an account on the forum. They must also be in one of the following usergroups (5,6,9,10) to appear on the roster. Having a roster identical to VGPlayers means I could have just gone to VGPlayers instead; no offense.
No offense taken. I'd like to incorporate a lot of your ideas into mine as well. I just wanted to get this initial release out there so people could start using it.
2) Add a class counter at the bottom.
Same...
Would be nice making this for any kind of roster.
This might be more difficult than what you think. Each gaming site (Everquest, World of Warcraft, Vanguard, etc... ) has their own format to their CSV/XML files. This hack wouldn't be too terribly difficult to recode to use those others... just the hack itself can't be generic enough to allow any game's feed.
At least I don't think so......
Sarcoth
03-21-2007, 06:55 PM
The best way I can think of accomplishing #1 is having users enter a CharID in their profile. That means adding an additional profile field. Once they enter a correct ID, you can have their userfield.field# match up with the vgroster_roster.CharID. Only members of certain usergroups AND with a good CharID would then appear on the roster. I am just having trouble getting my code to work. Going to continue looking into it later.
Sarcoth
03-22-2007, 01:37 AM
Gandiel, I hope you don't mind me posting this here. I apologize if you do.
I just threw the instructions for the class statistics counter together that works with your hack. I've been using it for my showroster hack already. I only had to make a few changes. One change was having to put a space after each class name. It should be easy to change later if one of us get the roster working with the forum usernames.
Instructions are attached.
Atakan KOC
03-25-2007, 05:50 PM
Thanks....
Kavious
03-29-2007, 12:40 PM
This is the message I get when trying to run the update:
Vanguard Roster Update
Could not open file for reading
Any Ideas?
Gandiel
03-29-2007, 12:50 PM
The VGPlayers website might have been down. Their website usually goes down when they do their daily restarts.
Check the VGPlayers website manually. If you can't get to it, then that's why you can't update. If you CAN get to it, post back here and we'll see if we can't work it out.
Kavious
03-29-2007, 12:58 PM
Yeah I can get it to it tried it a few times, and also tried reloading the entire product a couple of times to make sure it was not something I did.
Gandiel
03-29-2007, 01:01 PM
Did you put in your guildID at the end of this line in vgroster_import.php?
$file ="http://vgplayers.station.sony.com/includes/guilds/guildsRosterCSV.vm?guildId=123456789";
Replacing 123456789 with your guild's ID?
Kavious
03-29-2007, 01:06 PM
yes I did
Gandiel
03-29-2007, 03:50 PM
Kavious,
Email me your $file ="http://vgplayers.station.sony.com/includes/guilds/guildsRosterCSV.vm?guildId=123456789"; line so I can test it, please.
Gandiel
Kavious
03-29-2007, 05:08 PM
Sent it via PM since it wont give me your email.
TrIn@dOr
03-29-2007, 05:45 PM
This might be more difficult than what you think. Each gaming site (Everquest, World of Warcraft, Vanguard, etc... ) has their own format to their CSV/XML files. This hack wouldn't be too terribly difficult to recode to use those others... just the hack itself can't be generic enough to allow any game's feed.
At least I don't think so......
This is the kind of roster that we use, http://aaotracker.com/clanprofile.php?clanid=1295
http://img113.imageshack.us/img113/7439/screenshot00059pi8.jpg
What do u think?
Gandiel
03-29-2007, 06:12 PM
I have no idea how somebody could interface to that. It looks like the game America's Army has it's own memberslist (like you show above).
I didn't see anywhere on their site the "raw" feed that you could use for your own purposes.
Gandiel
03-30-2007, 12:50 PM
Kavious,
I've been doing some research on your problem...
What version of PHP do you have? Do you know if safe mode is on?
http://us.php.net/fopen -- This is the function that opens the VGPlayers CSV file.
If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.
And here is the allow_url_fopen:
allow_url_fopen boolean
This option enables the URL-aware fopen wrappers that enable accessing URL object like files. Default wrappers are provided for the access of remote files using the ftp or http protocol, some extensions like zlib may register additional wrappers.
Note: This setting can only be set in php.ini due to security reasons.
Note: This option was introduced immediately after the release of version 4.0.3. For versions up to and including 4.0.3 you can only disable this feature at compile time by using the configuration switch --disable-url-fopen-wrapper.
So it looks like you may be unable to run the scheduled task because safe mode for PHP is turned on.
Something you can try....
Download the CSV from VGPlayers manually. From your guild's page on VGPlayers, right-click the CSV List link and choose Save-As. The file will be something like "guildsRosterCSV.vm"
Rename that file to "guildsRosterCSV.csv" and upload it to your webserver.
Change line #27 in "vgroster_import.php" to the location of where you uploaded the CSV file in Step 2. Don't use a URL... use something similar to this:
$file = "/forum_root/vgroster/guildsRosterCSV.csv";
Try the Scheduled Task and see if it works locally rather than trying to grab the CSV from a URL.
TrIn@dOr
03-30-2007, 01:01 PM
I have no idea how somebody could interface to that. It looks like the game America's Army has it's own memberslist (like you show above).
I didn't see anywhere on their site the "raw" feed that you could use for your own purposes.
But is imposible to parse that?
Gandiel
03-30-2007, 01:21 PM
Trin,
Yes. You'd need a raw feed.
(unless someone else has any ideas...)
Maybe try posting in the "Modifications not Available" forum. https://vborg.vbsupport.ru/forumdisplay.php?f=112
Gandiel
TrIn@dOr
03-30-2007, 01:37 PM
Here we have :D
http://aaotracker.com/livefeed/xml_clanprofile.php?clanid=1295
Gandiel
03-30-2007, 04:33 PM
Hrmmm.. well... I'll certainly look into it then.
It may have to wait until I get the next release of this hack out the door... which should be soon.
Gandiel
Kavious
03-30-2007, 11:01 PM
Kavious,
I've been doing some research on your problem...
What version of PHP do you have? Do you know if safe mode is on?
http://us.php.net/fopen -- This is the function that opens the VGPlayers CSV file.
And here is the allow_url_fopen:
So it looks like you may be unable to run the scheduled task because safe mode for PHP is turned on.
Something you can try....
Download the CSV from VGPlayers manually. From your guild's page on VGPlayers, right-click the CSV List link and choose Save-As. The file will be something like "guildsRosterCSV.vm"
Rename that file to "guildsRosterCSV.csv" and upload it to your webserver.
Change line #27 in "vgroster_import.php" to the location of where you uploaded the CSV file in Step 2. Don't use a URL... use something similar to this:
$file = "/forum_root/vgroster/guildsRosterCSV.csv";
Try the Scheduled Task and see if it works locally rather than trying to grab the CSV from a URL.
Worked great I have PHP 5.1 dont know why it would be set to safe mode but contacted the hosting company to have them change it, your work around worked great though!
Thanks a bunch
TrIn@dOr
03-31-2007, 04:18 AM
Hrmmm.. well... I'll certainly look into it then.
It may have to wait until I get the next release of this hack out the door... which should be soon.
Gandiel
Hooah!, thanks man!
Xaices
04-19-2007, 05:57 PM
edit: Found the problem, fixed it myself. Disregaurd.
I was missing images in a directory that the template coding points to for the sort buttons, causing the roster to not be sortable.
Gandiel
04-19-2007, 07:00 PM
Hey Xaices!
Was just about to reply. =)
Maybe see you on tonight. Kinsie and I "should" be there.
Xaices
04-20-2007, 06:27 PM
Holy hell, Bro
You know it realy did not dawn on me that you were the Coder of this Hack, till just now. Damn bro nice work by the way.
Sorry I missed you in game last night. I was only on for a short time, Althrom and Tom were running the Unicorn Quest, and I, well Can you realy see a LG DK on a unicorn, well any ways just helped some of the Bladesworn guys try and down a few named in Thelaseen. Unfortunately no names where up all that were there were PH's. Lots of friken Heavy Ancient Drops tho, the most I have seen in 14 levels. 4 puldrons droped in the course of 3 hours, and numerous other pieces.
PM me any time on my site if you want to link up with the IRE Crew.
ttyl
Xaices
SuprSurfr
06-08-2007, 10:48 PM
I installed the hack exactly the way the instructions stated.
I get the following at this url:
http://www.vgchronicle.org/vgroster.php
any help would be appreciated.
Thanks.
Ev!L ErN!E
07-09-2007, 08:48 AM
could you please make an Everquest 2 roster hack?
Mother_Dee
07-09-2007, 03:02 PM
could you please make an Everquest 2 roster hack?
https://vborg.vbsupport.ru/showthread.php?t=149275
Xaices
12-18-2007, 11:09 PM
Gandiel,
Need some help please. I get this when I run a scheduled task.
Database error in vBulletin 3.6.8:
Invalid SQL:
INSERT INTO vbvgroster_roster VALUES ('','','');
MySQL Error : Column count doesn't match value count at row 1
Error Number : 1136
Date : Tuesday, December 18th 2007 @ 07:55:53 PM
Script : http://www.blackwatchguild.com/forums/admincp/cronadmin.php?do=runcron&cronid=19
Referrer : http://www.blackwatchguild.com/forums/admincp/index.php
IP Address :
Username :
Classname : vB_Database
http://vgplayers.station.sony.com/includes/guilds/guildsRosterCSV.vm?guildId=481036338348
Thanks for you help in this matter.
Xaices
12-19-2007, 11:53 PM
Ok Gandiel is no longer supporting this. Can any one assist?
That error is due to a problem with the MySQL coding/syntax. The vbvgroster_roster has a total of 12 values in each row. That SQL query is only trying to write to 3 of them. Unless you define what specific columns you are filling in, you must have the exact number of columns that the table has in the VALUES portion of the query. This will need to be fixed in the script, and I would suggest contacting the developer of the script, or browsing support forums for the product.
I can't code so any assistance on this would be most appreciated.
Gandiel
12-20-2007, 11:52 AM
Xaices and anyone else,
Seeing Xaices last post with that quote in it gave me some insight to the problem. I've provided a fix (for now) to the problem. You'll need to UNINSTALL the product first, then REINSTALL the new product-vgroster.xml file attached to this post and overwrite the vgroster_import.php in includes/cron/
The reason I say this is a temporary fix is because there's a problem with Vanguard's CSV output. They only want to display 11 headings:
name, id, prefixTitle,advtClass,advtLevel,craftingClass,craf tingLevel,diplomacyClass,diplomacyLevel,dateJoined ,guildRank
But in reality they're outputting 12 fields:
Xaices,81604385483,Founder,Dread Knight (20),50,Crafter (1050),1,Diplomat,4,,2007-12-10,Initiate
Notice the double commas between "4" and "2007-12-10"
If Vanguard ever fixes that, the cron job will break again.
I stopped supporting this months ago. I haven't even played Vanguard since April 2007. I just had some spare time this morning to take a deeper look into the problem.
GL to you all.
Gandiel
Xaices
12-20-2007, 05:15 PM
Thank you Gandiel!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.