Addon für NickChange von Bräke |
Glare
Mitglied
Dabei seit: 16.01.04
Beiträge: 396
Forenversion: 2.3
|
|
Titel: Addon für NickChange von Bräke
Version: 1.0
Beschreibung: So, mit diesem kleinen Addon werden User, die in den letzten 30 Tagen ihren Nick geändert haben, makiert.
Ich übernehme keine Verantwortung für Schäden oder sonst irgendwas.
Macht unbedingt vorher ein Backup, besonders von der Profile.php, der Datenbank und dem profile.tpl!!!
Viel Spaß, Glare
Edit: Es fehlte leider noch ein Schritt!
Wer es vorher runtergeladen hat, muß noch in der Usercp.php eine Änderung durchführen:
suche:
php: |
1:
|
$db->unbuffered_query("UPDATE bb".$n."_threads SET lastposter='".addslashes($r_username)."' WHERE lastposterid='$wbbuserdata[userid]'",1); |
|
dadrunter:
php: |
1:
|
$db->unbuffered_query("UPDATE bb".$n."_users SET nickchange='".time()."' WHERE userid='$wbbuserdata[userid]'",1); |
|
----
Demo: http://www.NieWiederAlleine.de/profile.php?userid=1
weiter zum Download
__________________
|
|
21.06.04 15:12 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Jaggl
Mitglied
Dabei seit: 10.06.04
Beiträge: 10
|
|
kan den eintrag $user_info[username] in meiner profile.tpl nicht finden wieso???
Hier mein profile.tpl der eintrag wird wohl einen anderen namen haben nur welchen scheiße ich bin ein noob
<?xml version="1.0" encoding="{$lang->items['LANG_GLOBAL_ENCODING']}"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{$lang->items['LANG_GLOBAL_DIRECTION']}" lang="{$lang->items['LANG_GLOBAL_LANGCODE']}" xml:lang="{$lang->items['LANG_GLOBAL_LANGCODE']}">
<head>
<title>$master_board_name | {$lang->items['LANG_MEMBERS_PROFILE_TITLE']}</title>
$headinclude
<script type="text/javascript">
<!--
function rating(userid) {
window.open("misc.php?action=userrating&userid="+userid+"&sid=$session[hash
]", "moo", "toolbar=no,scrollbars=yes,resizable=yes,width=350,height=205");
}
function wen_geworben(userid) {
window.open("guthaben.php?action=wen_geworben&userid="+userid+"&sid=$sessio
n[hash]", "moo", "toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300");
}
//-->
</script>
</head>
<body>
$header
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tablea"><table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr class="tablea_fc">
<td align="left"><span class="smallfont"><b><a href="index.php?sid=$session[hash]">$master_board_name</a> » {$lang->items['LANG_MEMBERS_PROFILE_TITLE']}</b></span></td>
<td align="right"><span class="smallfont"><b>$usercbar</b></span></td>
</tr>
</table></td>
</tr>
</table><br />
<table cellpadding="{$style['tableincellpadding']}" cellspacing="{$style['tableincellspacing']}" border="{$style['tableinborder']}" style="width:{$style['tableinwidth']}" class="tableinborder">
<tr>
<td class="tabletitle" align="left" colspan="2"><table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr class="tabletitle_fc">
<td style="width:100%" align="left"><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_TITLE']}</b></spa
n></td>
<td style="width:200px" align="center" nowrap="nowrap"><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_CAPTION']}</b></s
pan></td>
</tr>
</table></td>
</tr>
<tr>
<td class="tablea" style="width:100%"><table style="width:100%" class="tablea_fc">
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_REGDATE']}</b></s
pan></td>
<td><span class="normalfont">$regdate</span></td>
</tr>
<tr align="left">
<td valign="top"><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_RANK']}</b></span
></td>
<td><span class="normalfont">$user_info[ranktitle] $rankimages</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_POSTS']}</b></spa
n></td>
<td><span class="normalfont">$user_info[userposts] ({$lang->items['LANG_MEMBERS_PROFILE_POSTSPERDAY']})</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_GUTHABEN']}</b></
span></td>
<td><span class="normalfont">$user_guthaben $waehrung</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_KONTONUMMER']}</b
></span></td>
<td><span class="normalfont">$user_info[userid]</span></td>
</tr>
<if($wbbuserdata['a_can_guthaben_change'] == 1)>
<then>
<form name="gutedit" method="post" action="profile.php?userid=$user_info[userid]&sid=$session[hash]">
<input name="action" type="hidden" value="gutedit" />
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_GUTEDIT']}</b></s
pan></td>
<td><span class="normalfont"><input name="gutedit" type="radio" value="1" /> {$lang->items['LANG_MEMBERS_PROFILE_LASTSCHRIFT']} <input type="radio" name="gutedit" value="2" /> {$lang->items['LANG_MEMBERS_PROFILE_GUTSCHRIFT']}</span> <input name="send" type="submit"></td>
</tr>
<tr align="left">
<td> </td>
<td><input name="betrag" type="text" size="5" maxlength="10" /> <span class="normalfont">$waehrung</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><font color="#FF0000"><b>$gfehler</b></font></span></td>
<td><input name="grund" type="text" size="20" maxlength="50" /></td>
</tr>
</form>
</then></if>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_LASTACTIVITY']}</
b></span></td>
<td><span class="normalfont">$la_date <span class="{time}">$la_time</span></span></td>
</tr>
<if($userlocation!="")>
<then>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_LOCATION']}</b></
span></td>
<td><span class="normalfont">$userlocation</span></td>
</tr>
</then>
</if>
<if($showlastpost==1)>
<then>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_LASTPOST']}</b></
span></td>
<td><span class="normalfont"><b>» <a href="thread.php?postid=$lastpost[postid]&sid=$session[hash]#post$lastp
ost[postid]">$lastpost[topic]</a></b></span><br />
<span class="smallfont">{$lang->items['LANG_MEMBERS_PROFILE_POSTED_ON']} $lastpostdate <span class="time">$lastposttime</span><br />
Forum: <b><a href="board.php?boardid=$lastpost[boardid]&sid=$session[hash]">$lastpos
t[title]</a></b></span></td>
</tr>
</then>
</if>
<tr>
<td align="left" colspan="2"><hr size="{$style['tableincellspacing']}" class="threadline" /></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_ICQ']}</b></span>
</td>
<td><span class="normalfont">$user_info[icq]</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_AIM']}</b></span>
</td>
<td><span class="normalfont">$user_info[aim]</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_YIM']}</b></span>
</td>
<td><span class="normalfont">$user_info[yim]</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_MSN']}</b></span>
</td>
<td><span class="normalfont">$user_info[msn]</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_EMAIL']}</b></spa
n></td>
<td><span class="normalfont">$useremail</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_HOMEPAGE']}</b></
span></td>
<td><span class="normalfont">$userhomepage</span></td>
</tr>
<tr>
<td align="left" colspan="2"><hr size="{$style['tableincellspacing']}" class="threadline" /></td>
<tr>
<td align="left" colspan="2"><hr size="{$style['tableincellspacing']}" class="threadline" /></td>
</tr>
<tr>
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_GEWORBEN']}</b></
span></td>
<if($gwuser_g > 0)>
<then>
<td><span class="normalfont"><a href="java script:wen_geworben($user_info[userid])">$gwuser_g</a></span></td
>
</then>
<else>
<td><span class="normalfont">$gwuser_g</span></td>
</else>
</if>
</tr>
<tr>
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_GEWORBEN_VON']}</
b></span></td>
<td><span class="normalfont">$gwuser_v</span></td>
</tr>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_GENDER']}</b></sp
an></td>
<td><span class="normalfont">$gender</span></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_BIRTHDAY']}</b></
span></td>
<td><span class="normalfont">$birthday</span></td>
</tr>
<tr>
<td align="left" colspan="2"><hr size="{$style['tableincellspacing']}" class="threadline" /></td>
</tr>
<tr align="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_XQUIZ_GESAMTE']}:
</b></span></td>
<td><span class="normalfont">$xquiz_gesamt</span></td>
</tr>
<tr align ="left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_XQUIZ_RICHTIGE']}
:</b></span></td>
<td><span class="normalfont">$xquiz_richtig</span></td>
</tr>
<tr align = "left">
<td><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_XQUIZ_FALSCHE']}:
</b></span></td>
<td><span class="normalfont">$xquiz_falsch</span></td>
</tr>
<if($profilefields)>
<then>
<tr>
<td align="left" colspan="2"><hr size="{$style['tableincellspacing']}" class="threadline" /></td>
</tr>
</then>
</if>
$profilefields
</table></td>
<td class="tableb" style="width:200px" align="center">$useravatar<br /><span class="normalfont">$galpic$user_text</span>$userrating<br />$userlevel<p><if($user_online==1)>
<then><img src="{$style['imagefolder']}/user_online.gif" border="0" alt="{$lang->items['LANG_MEMBERS_USERONLINE']}" title="{$lang->items['LANG_MEMBERS_USERONLINE']}" /></then>
<else><img src="{$style['imagefolder']}/user_offline.gif" border="0" alt="{$lang->items['LANG_MEMBERS_USEROFFLINE']}" title="{$lang->items['LANG_MEMBERS_USEROFFLINE']}" /></else>
</if></p><img src="{$style['imagefolder']}/spacer.gif" width="159" height="1" border="0" alt="" title="" /></td>
</tr>
<tr>
<td class="tabletitle" colspan="2"><table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr class="tabletitle_fc">
<td align="left"><span class="normalfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_CONTACT']}</b></s
pan></td>
<td align="right">
<if($user_info['showemail']==0 && $user_info['usercanemail']==1)>
<then><a href="formmail.php?userid=$user_info[userid]&sid=$session[hash]"><img src="{$style['imagefolder']}/email.gif" border="0" alt="{$lang->items['LANG_MEMBERS_SENDEMAIL']}" title="{$lang->items['LANG_MEMBERS_SENDEMAIL']}" /></a></then>
</if>
<if($user_info['receivepm']==1 && $wbbuserdata['can_use_pms']==1)><then><a href="pms.php?action=newpm&userid=$user_info[userid]&sid=$session[h
ash]"><img src="{$style['imagefolder']}/pm.gif" border="0" alt="{$lang->items['LANG_MEMBERS_PM']}" title="{$lang->items['LANG_MEMBERS_PM']}" /></a></then></if>
<a href="search.php?action=user&userid=$user_info[userid]&sid=$session
[hash]"><img src="{$style['imagefolder']}/search.gif" border="0" alt="{$lang->items['LANG_MEMBERS_SEARCH']}" title="{$lang->items['LANG_MEMBERS_SEARCH']}" /></a>
<a href="usercp.php?action=buddy&add=$user_info[userid]&sid=$session[h
ash]"><img src="{$style['imagefolder']}/homie.gif" border="0" alt="{$lang->items['LANG_MEMBERS_BUDDY']}" title="{$lang->items['LANG_MEMBERS_BUDDY']}" /></a></td>
</tr>
</table></td>
</tr>
</table>
<if(checkAdminPermissions("a_can_users_edit") || checkAdminPermissions("a_can_users_delete"))>
<then>
<p align="center"><span class="smallfont"><b>{$lang->items['LANG_MEMBERS_PROFILE_ADMINOPTIONS']}</b
>
<if(checkAdminPermissions("a_can_users_edit"))><then><a href="acp/index.php?url=users.php%3Faction%3Dedit%26userid%3D$user_info[use
rid]" target="_blank">{$lang->items['LANG_MEMBERS_PROFILE_USEREDIT']}</a></then><
/if>
<if(checkAdminPermissions("a_can_users_edit") && checkAdminPermissions("a_can_users_delete"))><then> | </then></if>
<if(checkAdminPermissions("a_can_users_delete"))><then><a href="acp/index.php?url=users.php%3Faction%3Ddelete%26userid%5B%5D%3D$user_
info[userid]" target="_blank">{$lang->items['LANG_MEMBERS_PROFILE_USERDEL']}</a></then></
if></span></p>
</then>
</if>
$footer
</body>
</html>
|
|
12.07.04 21:44 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Chrissie
Mitglied
Dabei seit: 16.01.04
Beiträge: 26
Herkunft: Bottrop/NRW Forenversion: 2.3
|
|
Kann man, anstatt den .gif Bild auch einen kleinen Text anzeigen lassen ?
|
|
08.09.04 02:06 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Guillmaster
Mitglied
Dabei seit: 16.01.04
Beiträge: 149
Herkunft: Guillmaster's Heaven Forenversion: wbb2.1.3 with many Hacks *G*
|
|
wenn ich den usernamen ändern will und speicher, dann bekomme ich diese emeldung.
Zitat: |
SQL-DATABASE ERROR
Database error in WoltLab Burning Board (2.1.5): Invalid SQL: UPDATE bb2_users SET nickchange='1108862152' WHERE userid='4'
mysql error: Unknown column 'nickchange' in 'field list'
mysql error number: 1054
mysql version: 3.23.37-log
php version: 4.3.0
Date: 20.02.2005 @ 02:15
Script: /board/usercp.php
Referer: http://www.raymann.org/board/usercp.php?...ofile_edit&sid=
|
|
|
20.02.05 02:16 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Glare
Mitglied
Dabei seit: 16.01.04
Beiträge: 396
Forenversion: 2.3
Themenstarter
|
|
Dann hast du die SQL Abfrage nicht ausgeführt
__________________
|
|
20.02.05 07:32 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Guillmaster
Mitglied
Dabei seit: 16.01.04
Beiträge: 149
Herkunft: Guillmaster's Heaven Forenversion: wbb2.1.3 with many Hacks *G*
|
|
wie mache ich es das es auch im thread bei seinem namen (neben dem nick --> neben männlich/weblich anzeige) angezeigt wird.
Wäre doch bestimmt auch interesant, oder??
Gruß
Guillmaster
|
|
21.02.05 22:07 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
|
also bei mir funzt es super
und die Sache mit dem fehlenden Profil eintrag kann ich mir so erklären, das es daran liegt das ich nen WBB 2.2.1 habe (ihr andren beiden vielleicht auch????)
lob auf jedenfall an dich, glare
|
|
22.02.05 14:30 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Guillmaster
Mitglied
Dabei seit: 16.01.04
Beiträge: 149
Herkunft: Guillmaster's Heaven Forenversion: wbb2.1.3 with many Hacks *G*
|
|
gibt es schon ne idee wie ich es machen kann??
Zitat: |
Original von Guillmaster
wie mache ich es das es auch im thread bei seinem namen (neben dem nick --> neben männlich/weblich anzeige) angezeigt wird.
|
Gruß
Guillmaster
|
|
03.03.05 19:21 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
Glare
Mitglied
Dabei seit: 16.01.04
Beiträge: 396
Forenversion: 2.3
Themenstarter
|
|
Achtung, nicht getestet!!!
Schnapp dir den Code, der in die Profile.php kommt
php: |
1:
2:
3:
4:
5:
6:
7:
|
/* nickchanged */
$akttime = time();
$nicked = $user_info[nickchange] ;
$thirtydays = $nicked + 2592000;
if ($akttime < $thirtydays && $user_info[nickchange] != "0") {
$nickchanged = "<img src='./images/newnick.gif' alt='$user_info[username] hat seinen Usernamen in den letzten 30 Tagen geändert.' title='$user_info[username] hat seinen Usernamen in den letzten 30 Tagen geändert.'>";
} |
|
und pack ihn in die thread.php irgendwo über
php: |
1:
2:
|
eval("\$tpl->output(\"".$tpl->get("thread")."\");");
?> |
|
Dann gehe in die thread_postbit.tpl und füge hinter
code: |
1:
|
$posts[username]</a></b></span> |
|
folgendes ein:
__________________
|
|
04.03.05 10:32 |
E-Mail
Finden
Als Freund hinzufügen
|
|
Guillmaster
Mitglied
Dabei seit: 16.01.04
Beiträge: 149
Herkunft: Guillmaster's Heaven Forenversion: wbb2.1.3 with many Hacks *G*
|
|
schade funktioniert leider nicht.....
bei mir zumindest
|
|
04.03.05 21:56 |
E-Mail
WWW
Finden
Als Freund hinzufügen
|
|
|