e107 plugin - Top Players

e107 integration forum

e107 plugin - Top Players

Postby filterban » Wed Feb 07, 2007 12:01 pm

To get my feet wet with this whole PHP thing, I wrote a plugin for e107 that queries the WoW Roster database and shows the top players in certain categories.

(Right now, it's still in an unfinished state, but it won't take long to get it distributable. And, it will only work if your roster tables are in the same database as the e107 tables.)

See screenshot attached.

Would anyone else be interested in this? I'm considering adding the following:

1) Professions.
2) Links from each player to their player detail page.

Any suggestions or comments would be appreciated.
Attachments
wowroster_top.jpg
Screenshot of WoW Roster Top Players
wowroster_top.jpg (13.57 KiB) Viewed 4911 times
User avatar
filterban
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Jul 06, 2006 4:16 am

Re: e107 plugin - Top Players

Postby kalideda » Wed Feb 07, 2007 1:30 pm

that looks nice :-)

I'll be glad to test it when you think it's ready

First suggestion : remove the one database constraint, I think that many ppl are using 2 differents db for e107 & the roster.

I've added 4 lines of php code in the forum_shortcodes.php so ppl can use the roster avatar&sig just by clicking the appropriates radioboxes in the member profil page. If someone is interrested I can post'em here.
Last edited by kalideda on Wed Feb 07, 2007 1:30 pm, edited 1 time in total.
kalideda
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Thu Aug 31, 2006 1:48 pm

Re: e107 plugin - Top Players

Postby filterban » Wed Feb 07, 2007 2:57 pm

kalideda wrote:that looks nice :-)

I'll be glad to test it when you think it's ready

First suggestion : remove the one database constraint, I think that many ppl are using 2 differents db for e107 & the roster.

I've added 4 lines of php code in the forum_shortcodes.php so ppl can use the roster avatar&sig just by clicking the appropriates radioboxes in the member profil page. If someone is interrested I can post'em here.


I'll look into the one database constraint. The problem is that I think connecting to a new database will break e107's database connection... and I have no real way to test with two databases. If we can find someone that has this configured and would be willing to do some testing, it would be a big help.

I'd also love to see your forum_shortcodes that you've added. That would be a big help for people posting in the forums on our site.

Glad to see that there's some interest in my plugin. I'll work on finishing it up (including a configuration screen) and I'll post it here.
User avatar
filterban
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Jul 06, 2006 4:16 am

e107 plugin - Top Players

Postby Alisynn » Tue Feb 20, 2007 8:31 am

I too would definitely use this plugin as well for my e107 site. I'm already using the same DB for both 107 and Roster so the constraint is not a problem here.

:thumleft:
User avatar
Alisynn
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Tue Feb 20, 2007 8:14 am

e107 plugin - Top Players

Postby aniodon » Tue Feb 20, 2007 12:54 pm

I think this would also be a very great WowRoster Addon !!!!
If you think you can easily turn it into an addon (not only e107), that would be very useful =)

Thank you, aniodon.
Last edited by aniodon on Tue Feb 20, 2007 12:55 pm, edited 1 time in total.
aniodon
WR.net Journeyman
WR.net Journeyman
 
Posts: 108
Joined: Mon Dec 18, 2006 8:09 pm

e107 plugin - Top Players

Postby JROCK2004 » Mon Feb 26, 2007 10:35 pm

I too would test it
User avatar
JROCK2004
WR.net Apprentice
WR.net Apprentice
 
Posts: 52
Joined: Wed Feb 21, 2007 6:54 pm
Location: PA

e107 plugin - Top Players

Postby kalideda » Fri Mar 02, 2007 3:39 pm

So I post the e107 tiny mod here, perhaps it'll be usefull for someone
sorry it's not a diff.


I've created 4 e107 "extended variables" (in the e107 admin panel):
user_wowplayer : a textbox (so the e107 username don't have to match the roster/wow one)
user_userostersig : a yes/no radio button
user_userosteravatar : another yes/no radio button
user_guildgrade : a readonly field. that's for another purpose (display the grade, but it need external sync, I use a perl script)

then i've add some lines in this file :
e107/e107_plugins/forum/forum_shortcodes.php

Code: Select all
SC_BEGIN AVATAR
global $post_info, $user, $id;
if ($user = get_user_data($post_info["user_id"])) {
   $userosteravatar = $user["user_userosteravatar"];
   $user_wowplayer = $user["user_wowplayer"];
   $user_guild_grade = $user["user_guildgrade"];
}
if ($post_info['user_id']) {
if ( $userosteravatar == 'oui') {
return "<div class='spacer'><img src='http://myweb.net/wowro/addons/siggen/av.php?name=".$user_wowplayer."' alt='' /></div><br />".$user_guild_grade."<br />";
} else if ($post_info["user_image"]) {
require_once(e_HANDLER."avatar_handler.php");
return "<div class='spacer'><img src='".avatar($post_info['user_image'])."' alt='' /></div><br />".$user_guild_grade."<br />";
} else {
return $user_guild_grade."<br />";
}
} else {
return "<span class='smallblacktext'>".LAN_194."</span>";
}
SC_END

(...)

SC_BEGIN SIGNATURE
global $post_info, $tp, $user;
if ($user = get_user_data($post_info["user_id"])) {
   $userostersig = $user["user_userostersig"];
   $user_wowplayer = $user["user_wowplayer"];
}
if ($post_info['user_id']) {
if ( $userostersig == 'oui') {
return ("<br /><hr style='width:15%; text-align:center' /><img height=76 width=360 src='http://myweb.net/wowro/addons/siggen/sig.php?name=".$user_wowplayer."' alt='' />" ); }
  else {
return ($post_info['user_signature'] ? "<br /><hr style='width:15%; text-align:left' /><span class='smalltext'>".$tp->toHTML($post_info['user_signature'],TRUE)."</span>" : "");
}
}
SC_END
Last edited by kalideda on Fri Mar 02, 2007 3:41 pm, edited 1 time in total.
kalideda
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Thu Aug 31, 2006 1:48 pm

e107 plugin - Top Players

Postby smurfhell » Tue Mar 20, 2007 9:11 am

Anyone get that top players addon running on their site? I'd be interested in using it too...cool idea.
smurfhell
WR.net Apprentice
WR.net Apprentice
 
Posts: 5
Joined: Thu Jul 13, 2006 12:22 am


Return to e107

Who is online

Users browsing this forum: No registered users and 0 guests

cron