Mal ein kleines Beispiel dafür, wie man einen Befehl hinzufügt, anhand einer Gedankenblase.
Zuerst öffnen wir unsere /styles/default/css/ext09.css
Oder eben euer verwendetes Style
Und fügt am Ende der Datei an:
Code:
.think{
border: 1px solid #999;
margin: 1px 2px 1px 0px;
}
.think._a {
border-radius: 3px;
display:inline-block;
width: 5px;
height: 5px;
}
.think._b {
border-radius: 4px;
display:inline-block;
width: 7px;
height: 7px;
}
.think._c {
border-radius: 6px;
display:inline-block;
width: 9px;
height: 9px;
}
.think._d {
border-radius: 8px;
display:inline-block;
padding-right: 7px;
padding-left: 5px;
}
Speichern. Als nächstes öffnen wir die /js/chatRoom.php.js
Ändern
Code:
if(rType != 2) {
showText += '<b>'+rAuthor+'</span>: </b>';
} else {
showText += '<b>'+rAuthor+'</span> </b>';
}
in
Code:
if(rType != 2 && rType != 6) {
showText += rAuthor+'</span>: ';
} else {
if(rType == 2) {
showText += rAuthor+'</span> ';
} else {
showText += rAuthor+'</span> <span class="system_view" style="color: #'+syscolor+';">denkt sich</span> ';
}
}
Und
Code:
showText += rContent+'</span><br>';
in
Code:
if(rType != 6) {
showText += rContent+'</span><br>';
} else {
showText += '<span class="think _a"></span><span class="think _b"></span><span class="think _c"></span><span class="think _d">'+rContent+'</span></span><br>';
}
Speichern.
Im ACP legen wir nun unter "Rechte" einen neuen Eintrag an mit Namen "com_th" und den Einstellungen eurer Wahl (Prüfe Level, Höher als, Benutzer zB)
Im Anschluss (nicht vorher) öffnen wir noch die /inc/ajax/messages/global.pms.php und setzen unter
PHP-Code:
case '/pm':
if($ZE_PERM->cp('com_pm', $ZE_user_level) == 'allow') {
require_once './inc/ajax/messages/pm.pms.php';
$nosmilie = 1;
} else {
require_once './inc/ajax/messages/lserror.pms.php';
$nosmilie = 1;
}
break;
ein
PHP-Code:
case '/th':
if($ZE_PERM->cp('com_th', $ZE_user_level) == 'allow') {
$message = substr($message, 4);
$mess_type = '6';
} else {
require_once './inc/ajax/messages/lserror.pms.php';
$nosmilie = 1;
}
break;
Speichern, Chat reloaden und mit
Zitat:/th TEXT
viel Spaß haben.
Es gibt keine dummen Antworten - nur dumme Fragen.