<!-- BEGIN TEMPLATE: postbit_external -->
<div><font size="6">ShowBans</font><br /><br />*Under Development<br /><br /><b><font size="3">Commands<br /></font></b><font size="3">sm_showbans </font><font size="3"><player> <font size="2">Opens a Sourcebans page in the MOTD that list all the bans for a selected player</font></font><br /><font size="3">sm_ban2 <player> </font>Opens a custom Sourcebans page to ban the selected player<br /><br /><b><font size="3">Dependencies:</font></b><br /> <b> <a href="http://forums.allied...ad.php?t=157953" target="_blank">[ANY] Hidden MOTD URL opener</a><br /></b><br />Install the Sourcebans custom page:<br /><br />Copy/Paste the page page.ban2.php from the ZIP in your Sourceban web folder<br />And add the following code in includes/page-builder.php, in the switch statement:<br /><br /><!-- BEGIN TEMPLATE: bbcode_php_printable -->
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"> </span><span style="color: #007700">case </span><span style="color: #DD0000">"ban2"</span><span style="color: #007700">:<br /> </span><span style="color: #0000BB">RewritePageTitle</span><span style="color: #007700">(</span><span style="color: #DD0000">"Ban2"</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">$page </span><span style="color: #007700">= </span><span style="color: #0000BB">TEMPLATES_PATH </span><span style="color: #007700">. </span><span style="color: #DD0000">"/page.ban2.php"</span><span style="color: #007700">;<br /> break;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable -->The code should look like this:<br /><!-- BEGIN TEMPLATE: bbcode_php_printable -->
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">] = isset(</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">]) ? </span><span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">] : </span><span style="color: #DD0000">'default'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">] = </span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">]);<br />switch (</span><span style="color: #0000BB">$_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'p'</span><span style="color: #007700">])<br />{<br /> case </span><span style="color: #DD0000">"ban2"</span><span style="color: #007700">:<br /> </span><span style="color: #0000BB">RewritePageTitle</span><span style="color: #007700">(</span><span style="color: #DD0000">"Ban2"</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">$page </span><span style="color: #007700">= </span><span style="color: #0000BB">TEMPLATES_PATH </span><span style="color: #007700">. </span><span style="color: #DD0000">"/page.ban2.php"</span><span style="color: #007700">;<br /> break;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div>
<!-- END TEMPLATE: bbcode_php_printable --></div>
<br /> <div style="padding:6px">
<fieldset class="fieldset">
<legend>Attached Thumbnails</legend>
<div style="padding:3px">
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->
<a href="https://forums.allie...38;d=1386362418" rel="Lightbox_2069268" id="attachment128346"><img class="thumbnail" src="https://forums.alliedmods.net/attachment.php?attachmentid=128346&stc=1&thumb=1&d=1386362418" border="0" alt="Click image for larger version
Name: screenshot.jpg
Views: N/A
Size: 89.1 KB
ID: 128346" /></a>
<!-- END TEMPLATE: postbit_attachmentthumbnail -->
</div>
</fieldset>
<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="https://forums.allie...38;d=1386361213">SourceBans.zip</a> (763 Bytes)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie...s/attach/sp.gif" alt="File Type: sp" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>
<a href="http://www.sourcemod...?file_id=128343"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1386361481">Get Source</a> (showbans.sp - 2.7 KB)
</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>
</div>
<!-- END TEMPLATE: postbit_external -->
Wyświetl pełny artykuł
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse

ShowBans
Temat rozp. Adminek AMXX.PL, 06.12.2013 21:21
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 0
0 użytkowników, 0 gości, 0 anonimowych