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