Statistik |
Beiträge: 144.531 (Täglich: 19,19 )
Themen: 16.700
Mitglieder: 13.209
Neuestes Mitglied: zitronentee.
Ausl. d. letzten Minute: 246%
Ausl. d. letzten 5 Minuten: 314%
Ausl. d. letzten 15 Minuten: 312%
Aktulle Uhrzeit: 22:24
Freier Webspace: 4.04 TB
PHP-Version: 7.4.33
|
|
|
|
|
Abwesendheitshack by Speedrider im ACP bearbeiten |
Viktor
Administrator
Zeige Viktor auf Karte
Dabei seit: 15.08.2003
Beiträge: 31.570
363 Filebase-Einträge
Alter: 66 Jahre
Herkunft: NRW wBB-Version: wBB2.3 PHP-Version: 7.4.33 MySQL-Version: 10.5.19-MariaDB Wo bist du gehostet?: eigener Server
Bewertung:
Level: 71 [?]
Erfahrungspunkte: 237.759.076
Nächster Level: 266.777.854
|
|
Abwesendheitshack by Speedrider im ACP bearbeiten |
|
Hallo,
hier mal eine Erweiterung zu dem Hack " Abwesendheitshack by Speedrider V2.1.1" das man im ACP die Abwesenheit bearbeiten kann.
1. Editiere das Template "acp/templates/users_edit.htm".
Suche:
code: |
1:
2:
3:
4:
5:
6:
7:
|
<tr class="firstrow">
<td colspan="2" align="center"><input type="submit" value="{$lang->items['LANG_ACP_GLOBAL_SUBMITFORM']}" /> <input type="reset" value="{$lang->items['LANG_ACP_GLOBAL_RESETFORM']}" /></td>
</tr>
</table>
</form>
|
|
Füge darüber ein:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
|
<!-- Away -->
<tr class="tblsection">
<td colspan="2">{$lang->items['LANG_ACP_USERS_AWAY_INFORMATION']}</td>
</tr>
<tr class="firstrow">
<td><b>{$lang->items['LANG_ACP_USERS_AWAY_QUESTION']}</b></td>
<td><select name="away">
<option value=0 $sel_away[0]>{$lang->items['LANG_REGISTER_OPTIONS_NO']}</option>
<option value=1 $sel_away[1]>{$lang->items['LANG_REGISTER_OPTIONS_YES']}</option>
</select></td>
</tr>
<tr class="secondrow">
<td><b>{$lang->items['LANG_AWAY_MESSAGE']}</b></td>
<td><input type="text" name="away_message" size="55" maxlength="100" value="$away_message" /></td>
</tr>
<tr class="firstrow">
<td><b>{$lang->items['LANG_ACP_USERS_AWAY_FROM']}</b></td>
<td><table class="firstrow">
<tr>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_DAY']}</td>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_MONTH']}</td>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_YEAR']}</td>
</tr>
<tr>
<td><select name="dayfrom">
<option value="0"></option>
$day_options_from
</select></td>
<td><select name="monthfrom">
<option value="0"></option>
$month_options_from
</select></td>
<td><input type="text" class="input" name="yearfrom" value="$yearfrom" maxlength="4" size="5" /></td>
</tr>
</table></td>
</tr>
<tr class="secondrow">
<td><b>{$lang->items['LANG_ACP_USERS_AWAY_TO']}</b></td>
<td><table class="secondrow">
<tr>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_DAY']}</td>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_MONTH']}</td>
<td>{$lang->items['LANG_REGISTER_BIRTHDAY_YEAR']}</td>
</tr>
<tr>
<td><select name="dayto">
<option value="0"></option>
$day_options_to
</select></td>
<td><select name="monthto">
<option value="0"></option>
$month_options_to
</select></td>
<td><input type="text" class="input" name="yearto" value="$yearto" maxlength="4" size="5" /></td>
</tr>
</table></td>
</tr>
<!-- Away -->
|
|
2. ACP Templates mit dem Tool "acp_tpl.php" cachen.
3. Editiere die Datei "acp/users.php".
Suche im Abschnitt /* edit user */:
code: |
1:
2:
3:
4:
|
if (isSet($_POST['notificationperpm'])) $notificationperpm = intval($_POST['notificationperpm']);
else $notificationperpm = 0;
|
|
Füge darunter ein:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
// Away
if (isSet($_POST['away'])) $away = intval($_POST['away']);
if (isSet($_POST['dayfrom'])) $dayfrom = intval($_POST['dayfrom']);
if (isSet($_POST['monthfrom'])) $monthfrom = intval($_POST['monthfrom']);
if (isSet($_POST['yearfrom'])) $yearfrom = intval($_POST['yearfrom']);
if (isSet($_POST['dayto'])) $dayto = intval($_POST['dayto']);
if (isSet($_POST['monthto'])) $monthto = intval($_POST['monthto']);
if (isSet($_POST['yearto'])) $yearto = intval($_POST['yearto']);
if (isSet($_POST['away_message'])) $away_message = $_POST['away_message'];
// Away
|
|
Suche:
code: |
1:
2:
3:
4:
|
// update user
$db->unbuffered_query("UPDATE bb".$n."_users SET ....
|
|
Füge am Ende for "WHERE userid='$userid'", 1);" ein:
code: |
1:
2:
3:
|
, away_message='".addslashes($away_message)."', away_from='".intval($yearfrom)."-".intval($monthfrom)."-".intval($dayfrom)."', away_to='".intval($yearto)."-".intval($monthto)."-".intval($dayto)."', away='".intval($away)."'
|
|
Suche:
code: |
1:
2:
3:
4:
|
$disablebbcode = 1 - $user['allowsigbbcode'];
$disableimages = 1 - $user['allowsigimages'];
|
|
Füge darunter ein:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
// Away
$yearfrom = wbb_substr($user['away_from'], 0, 4);
$monthfrom = wbb_substr($user['away_from'], 5, 2);
$dayfrom = wbb_substr($user['away_from'], 8, 2);
$yearto = wbb_substr($user['away_to'], 0, 4);
$monthto = wbb_substr($user['away_to'], 5, 2);
$dayto = wbb_substr($user['away_to'], 8, 2);
$away_message = $user['away_message'];
$away = $user['away'];
// Away
|
|
Suche:
code: |
1:
2:
3:
4:
5:
|
/* convert html characters */
$username = htmlconverter($username);
$password = '';
|
|
Füge darüber ein:
code: |
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
// Away
$day_options_from = '';
for ($i = 1; $i <= 31; $i++) $day_options_from .= makeoption($i, $i, $dayfrom);
$month_options_from = '';
for ($i = 1; $i <= 12; $i++) $month_options_from .= makeoption($i, getmonth($i), $monthfrom);
$day_options_to = '';
for ($i = 1; $i <= 31; $i++) $day_options_to .= makeoption($i, $i, $dayto);
$month_options_to = '';
for ($i = 1; $i <= 12; $i++) $month_options_to .= makeoption($i, getmonth($i), $monthto);
// Away
|
|
Suche:
code: |
1:
2:
3:
4:
|
$sel_gender[$gender] = " selected=\"selected\"";
$sel_invisible[$invisible] = " selected=\"selected\"";
|
|
Füge darüber ein:
code: |
1:
2:
3:
4:
5:
6:
|
// Away
$sel_away[$away] = " selected=\"selected\"";
// Away
|
|
4. Importiere das Sprachpaket "german_away.lng" im Anhang.
Fertig.
Gruß
Viktor
__________________
Ein kluger Mann widerspricht keiner Frau. Er wartet, bis sie es selbst tut.
... beim Käfer (WBB2) konnte man noch selber schrauben,
beim neuen Golf (WBB3) muß man fast schon in die Werkstatt wenn man das "Wischwasser" nachfüllen muss!
Da fast keiner mehr hier Postet gibt es ab sofort keinen Support mehr per PN.
|
|
09.06.2015 20:44 |
|
|
Tappi
wBB2-User
Zeige Tappi auf Karte
Dabei seit: 30.05.2007
Beiträge: 1.702
2 Filebase-Einträge
Alter: 43 Jahre
Herkunft: Ostwestfalen wBB-Version: wBB2.3 PHP-Version: 7.4 und 8.0 MySQL-Version: MariaDB 10.5.19 Wo bist du gehostet?: Rootserver von www.ip-projects.de
Bewertung:
Level: 50 [?]
Erfahrungspunkte: 10.462.583
Nächster Level: 11.777.899
|
|
|
12.06.2015 20:52 |
|
|
Tappi
wBB2-User
Zeige Tappi auf Karte
Dabei seit: 30.05.2007
Beiträge: 1.702
2 Filebase-Einträge
Alter: 43 Jahre
Herkunft: Ostwestfalen wBB-Version: wBB2.3 PHP-Version: 7.4 und 8.0 MySQL-Version: MariaDB 10.5.19 Wo bist du gehostet?: Rootserver von www.ip-projects.de
Bewertung:
Level: 50 [?]
Erfahrungspunkte: 10.462.583
Nächster Level: 11.777.899
|
|
Ach da gab es zwei mal dieses WHERE userid
ups ok habs nun an der richtigen Stelle und es geht
__________________
Ich bin Ostwestfale: STUR . HARTNÄCKIG . KÄMPFERISCH
|
|
12.06.2015 21:08 |
|
|
Viktor
Administrator
Zeige Viktor auf Karte
Dabei seit: 15.08.2003
Beiträge: 31.570
363 Filebase-Einträge
Alter: 66 Jahre
Herkunft: NRW wBB-Version: wBB2.3 PHP-Version: 7.4.33 MySQL-Version: 10.5.19-MariaDB Wo bist du gehostet?: eigener Server
Bewertung:
Level: 71 [?]
Erfahrungspunkte: 237.759.076
Nächster Level: 266.777.854
Themenstarter
|
|
|
12.06.2015 21:12 |
|
|
|
|
|
|