So-das Ganze mal in Deutsch:
Diese Änderungen beziehen sich auf eine neue Installation von AJAX Userinfo 1.0.4 und wurden von @
Mahony vorgeschlagen.
Wer nicht weiß wie er den Mod updaten soll: die alte Version komplett rückgängig machen und danach die neue Version installieren.
Du machst alles so wie es in der install.xml (außer die Änderung der includes/functions_content.php) und in der subsilver2.xml von AJAX Userinfo 1.0.4 steht
Dann änderst Du die root/includes/functions_content.php:
suche in root/includes/functions_content.php:
Code: Alles auswählen
if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
{
return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
}
return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
}
ersetze damit:
Code: Alles auswählen
$_uinfo_profile = '<a href="{PROFILE_URL}" onmouseover="show_popup(' . $user_id . ')" onmouseout="close_popup()">{USERNAME}</a>';
$_uinfo_profile_colour = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured" onmouseover="show_popup(' . $user_id . ')" onmouseout="close_popup()">{USERNAME}</a>';
if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
{
return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
}
return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_uinfo_profile : $_uinfo_profile_colour);
}
Dann tauschst Du den kompletten Inhalt folgender Dateien gegen diesen Code aus:
root/styles/prosilver/template/ajax_userinfo.html
Code: Alles auswählen
<script type="text/javascript">
// <![CDATA[
// show the popup
function show_popup(UserID) {
if(http_getuser) {
document.getElementById('popup').style.display='block'; sendRequest(UserID);
}
}
// hide the popup
function close_popup() {
document.getElementById('popup').style.display='none';
document.getElementById('ajax_username').innerHTML = ' ';
document.getElementById('ajax_registert').innerHTML = ' ';
document.getElementById('ajax_posts').innerHTML = ' ';
document.getElementById('ajax_website').innerHTML = ' ';
document.getElementById('ajax_from').innerHTML = ' ';
document.getElementById('ajax_last_visit').innerHTML = ' ';
document.getElementById('ajax_rank').innerHTML = ' ';
document.getElementById('ajax_avatar').innerHTML = ' ';
document.getElementById('ajax_rankimage').innerHTML = ' ';
}
// Make the request
function createRequestObject() {
if(window.XMLHttpRequest){
ro = new XMLHttpRequest();
} else if(window.ActiveXObject) {
ro = new ActiveXObject("Msxml2.XMLHTTP");
if(!ro) {
ro = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return ro;
}
var http_getuser = createRequestObject();
function sendRequest(UserID) {
var userinfo_url = '{AJAX_USERINFO_PATH}';
http_getuser.open('get', userinfo_url.replace('USERID', UserID));
http_getuser.onreadystatechange = handleResponse;
http_getuser.send(null);
}
// fill in the response
function handleResponse() {
if(http_getuser.readyState == 4 ){
var xmlDoc = http_getuser.responseXML;
if(xmlDoc.hasChildNodes()) {
document.getElementById('ajax_username').innerHTML = xmlDoc.getElementsByTagName('username')[0].firstChild.nodeValue;
document.getElementById('ajax_registert').innerHTML = xmlDoc.getElementsByTagName('regdate')[0].firstChild.nodeValue;
document.getElementById('ajax_posts').innerHTML = xmlDoc.getElementsByTagName('posts')[0].firstChild.nodeValue;
document.getElementById('ajax_website').innerHTML = xmlDoc.getElementsByTagName('website')[0].firstChild.nodeValue;
document.getElementById('ajax_from').innerHTML = xmlDoc.getElementsByTagName('from')[0].firstChild.nodeValue;
document.getElementById('ajax_last_visit').innerHTML = xmlDoc.getElementsByTagName('lastvisit')[0].firstChild.nodeValue;
document.getElementById('ajax_rank').innerHTML = xmlDoc.getElementsByTagName('rank')[0].firstChild.nodeValue;
document.getElementById('ajax_avatar').innerHTML = xmlDoc.getElementsByTagName('avatar')[0].firstChild.nodeValue;
document.getElementById('ajax_rankimage').innerHTML = xmlDoc.getElementsByTagName('rankimage')[0].firstChild.nodeValue;
//document.getElementById('popup').style.display='block';
}
}
}
// set popup to mouse possition
function set_div_to_mouse(e) {
var docX, docY;
if(e) {
if(typeof(e.pageX) == 'number') { docX = e.pageX; docY = e.pageY;}
else {docX = e.clientX; docY = e.clientY;}
} else {
e = window.event;
docX = e.clientX; docY = e.clientY;
if(document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
docX += document.documentElement.scrollLeft; docY += document.documentElement.scrollTop;
}
else if(document.body && (document.body.scrollTop || document.body.scrollLeft)) {
docX += document.body.scrollLeft; docY += document.body.scrollTop;
}
}
if (docX > document.body.offsetWidth - 400) {
document.getElementById('popup').style.left = (docX - 350) + "px";
} else {
document.getElementById('popup').style.left = (docX - 5) + "px";
}
document.getElementById('popup').style.top = (docY + 30) + "px";
}
document.onmousemove = set_div_to_mouse;
// ]]>
</script>
<div class="forabg" id="popup" style="display: none;">
<div class="inner">
<span class="corners-top"><span></span></span>
<ul class="topiclist fullwidth">
<li class="header"><dl><dt>{L_READ_PROFILE}</dt></dl></li>
</ul>
<ul class="topiclist forums">
<li><dl>
<dd style="width:100%">
<div id="ajax_avatar"></div>
<strong>{L_USERNAME}:</strong> <span id="ajax_username"></span><br />
<strong>{L_TOTAL_POSTS}:</strong> <span id="ajax_posts"></span><br />
<strong>{L_SORT_RANK}:</strong> <span id="ajax_rank"></span><br />
<strong>{L_JOINED}:</strong> <span id="ajax_registert"></span><br />
<strong>{L_LAST_VISIT}:</strong> <span id="ajax_last_visit"></span><br />
<strong>{L_LOCATION}:</strong> <span id="ajax_from"></span><br />
<strong>{L_WEBSITE}:</strong> <span id="ajax_website"></span>
<br style="clear: both;" />
</dd>
</dl></li>
</ul>
<span class="corners-bottom"><span></span></span>
</div>
</div>
root/styles/subsilver2/template/ajax_userinfo.html:
Code: Alles auswählen
<script type="text/javascript">
// <![CDATA[
// show the popup
function show_popup(UserID) {
if(http_getuser) {
document.getElementById('popup').style.display='block'; sendRequest(UserID);
}
}
// hide the popup
function close_popup() {
document.getElementById('popup').style.display='none';
document.getElementById('ajax_username').innerHTML = ' ';
document.getElementById('ajax_registert').innerHTML = ' ';
document.getElementById('ajax_posts').innerHTML = ' ';
document.getElementById('ajax_website').innerHTML = ' ';
document.getElementById('ajax_from').innerHTML = ' ';
document.getElementById('ajax_last_visit').innerHTML = ' ';
document.getElementById('ajax_rank').innerHTML = ' ';
document.getElementById('ajax_avatar').innerHTML = ' ';
document.getElementById('ajax_rankimage').innerHTML = ' ';
}
// Make the request
function createRequestObject() {
if(window.XMLHttpRequest){
ro = new XMLHttpRequest();
} else if(window.ActiveXObject) {
ro = new ActiveXObject("Msxml2.XMLHTTP");
if(!ro) {
ro = new ActiveXObject("Microsoft.XMLHTTP");
}
}
return ro;
}
var http_getuser = createRequestObject();
function sendRequest(UserID) {
var userinfo_url = '{AJAX_USERINFO_PATH}';
http_getuser.open('get', userinfo_url.replace('USERID', UserID));
http_getuser.onreadystatechange = handleResponse;
http_getuser.send(null);
}
// fill in the response
function handleResponse() {
if(http_getuser.readyState == 4 ){
var xmlDoc = http_getuser.responseXML;
if(xmlDoc.hasChildNodes()) {
document.getElementById('ajax_username').innerHTML = xmlDoc.getElementsByTagName('username')[0].firstChild.nodeValue;
document.getElementById('ajax_registert').innerHTML = xmlDoc.getElementsByTagName('regdate')[0].firstChild.nodeValue;
document.getElementById('ajax_posts').innerHTML = xmlDoc.getElementsByTagName('posts')[0].firstChild.nodeValue;
document.getElementById('ajax_website').innerHTML = xmlDoc.getElementsByTagName('website')[0].firstChild.nodeValue;
document.getElementById('ajax_from').innerHTML = xmlDoc.getElementsByTagName('from')[0].firstChild.nodeValue;
document.getElementById('ajax_last_visit').innerHTML = xmlDoc.getElementsByTagName('lastvisit')[0].firstChild.nodeValue;
document.getElementById('ajax_rank').innerHTML = xmlDoc.getElementsByTagName('rank')[0].firstChild.nodeValue;
document.getElementById('ajax_avatar').innerHTML = xmlDoc.getElementsByTagName('avatar')[0].firstChild.nodeValue;
document.getElementById('ajax_rankimage').innerHTML = xmlDoc.getElementsByTagName('rankimage')[0].firstChild.nodeValue;
//document.getElementById('popup').style.display='block';
}
}
}
// set popup to mouse possition
function set_div_to_mouse(e) {
var docX, docY;
if(e) {
if(typeof(e.pageX) == 'number') { docX = e.pageX; docY = e.pageY;}
else {docX = e.clientX; docY = e.clientY;}
} else {
e = window.event;
docX = e.clientX; docY = e.clientY;
if(document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
docX += document.documentElement.scrollLeft; docY += document.documentElement.scrollTop;
}
else if(document.body && (document.body.scrollTop || document.body.scrollLeft)) {
docX += document.body.scrollLeft; docY += document.body.scrollTop;
}
}
if (docX > document.body.offsetWidth - 400) {
document.getElementById('popup').style.left = (docX - 350) + "px";
} else {
document.getElementById('popup').style.left = (docX - 5) + "px";
}
document.getElementById('popup').style.top = (docY + 30) + "px";
}
document.onmousemove = set_div_to_mouse;
// ]]>
</script>
<div id="popup" style="display: none;">
<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>{L_READ_PROFILE}</th>
</tr>
<tr>
<td class="row1" nowrap="nowrap">
<div class="box1" style="width:100px; float: left;" align="center">
<span id="ajax_avatar"></span>
</div>
<div class="box1" style="margin-left: 100px;">
<strong>{L_USERNAME}:</strong> <span id="ajax_username"></span><br />
<strong>{L_TOTAL_POSTS}:</strong> <span id="ajax_posts"></span><br />
<strong>{L_SORT_RANK}:</strong> <span id="ajax_rank"></span><br />
<strong>{L_JOINED}:</strong> <span id="ajax_registert"></span><br />
<strong>{L_LAST_VISIT}:</strong> <span id="ajax_last_visit"></span><br />
<strong>{L_LOCATION}:</strong> <span id="ajax_from"></span><br />
<strong>{L_WEBSITE}:</strong> <span id="ajax_website"></span>
<br style="clear: both;" />
</div>
</td>
</tr>
</table>
</div>
Und wie immer am Schluß:
Dateien hochladen und deine Styles aktualisieren:
"Administrations-Bereich" (ACP) > "Styles" > "Templates" > jedes > "Aktualisieren"
"Administrations-Bereich" (ACP) > "Styles" > "Themes" > jedes > "Aktualisieren"
"Administrations-Bereich" (ACP) > "Styles" > "Grafiksammlungen" > jedes > "Aktualisieren"
Leere den Cache im "Administrations-Bereich" (ACP) > "Allgemein" > "Den Cache leeren"