Guest User

Untitled

a guest
Dec 16th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.96 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  
  5. @author David
  6. @copyright 2016 Multivitamin <multivitamin.wtf>
  7. @license GPLv3 http://www.gnu.org/licenses/gpl.html
  8. @version 1.2beta
  9.  
  10. Textfields Available Placeholders
  11. TEAMSPEAK:
  12. %status% - Displays online or offline
  13. %sid% - Displays Server ID currently used
  14. %sport% - Displays Server Port
  15. %platform% - Displays on wich Platform the Server runs
  16. %servername% - Displays the Server Name (top channel name)
  17. %serverversion% - Displays the Server Version
  18. %maxclients% - Displays Slots Available
  19. %realclients% - Displays Clients only
  20. %clientsonline% - Displays amount of Clients online (Couns Queries aswell!)
  21. %channelcount% - Displays amount of channels
  22. %packetloss% - Displays average Packetloss (Like: 4.2134)
  23. %packetloss_00% - Displays average Packetloss (Like: 4.21)
  24. %packetloss_floored% - Displays average Packetloss (Like: 4)
  25. %ping% - Diplays Average Ping (Like: 64.2414)
  26. %ping_floored% - Diplays Average Ping floored (Like: 64)
  27. %nickname% - Displays the Nickname of the Client which is requesting the Banner
  28. %groupcount[<servergroupids>]% - Counts the Groups in the Square Brackets write it like '2,6' where 2 and 6 is a Server Group ID
  29. GENERAL
  30. %timeHi% - Displays Time in Hour:Minute Format
  31. %timeHis% - Displays Time in Hour:Minute:Second Format
  32. %date% - Displays Date in day.month.Year Format
  33. SOURCEQUERY
  34. %sqinfo[<server>][<key>]% - Displays the specified Info Key for the specified Server you have entered
  35.  
  36.  
  37. INFO for %nickname%:
  38. If you have a Textfield where you want to use the placeholder %nickname% then you are not able to use
  39. other Placeholders since this gets rendered individually for every client!
  40.  
  41. What is SourceQuery?
  42. The SourceQuery PHP Library was written by xPAW (https://github.com/xPaw/PHP-Source-Query)
  43. It can access Informations of a Server which uses the Source Protocol
  44. You can find a List of Supported Games in the Link above!
  45.  
  46. Usage of %sqinfo[<server>][<key>]%
  47. The First Parameter <server> defines the server you want to use, this will be explained later how to login to a Server
  48. The Second Parameter <key> defines the Server Information you want to access, instructions on how to get all available Keys for a Server
  49. is also explained later in this config file
  50.  
  51. IMPORTANT!
  52. CURRENTLY SUPPORTED FORMAT FOR BACKGROUND IMAGE IS .PNG ONLY!
  53. You need to give the folger cache/ write Permissions!
  54. On Standard Debian Configuration you can do this while inside Banner Folder with the Command:
  55. chown -R www-data cache
  56.  
  57. TEAMSPEAK:
  58. Add in Teamspeak "Banner Gfx Url" the Web Path to your banner.php
  59. Change the "Gfx Interval" to 60 so the Client requests a new Banner every 60 Seconds!
  60. PERMISSIONS:
  61. b_virtualserver_servergroup_list
  62. b_serverinstance_version_view
  63. b_serverinstance_info_view
  64. b_virtualserver_connectioninfo_view
  65. b_virtualserver_client_list
  66. b_client_remoteaddress_view - For Nickname display
  67. and probably some more.... I will edit this List later lol....
  68.  
  69.  
  70.  
  71. */
  72. date_default_timezone_set('Europe/Warsaw');
  73. $config = array('textfield' => [], 'sourcequery' => []);
  74.  
  75. /*
  76. ** Teamspeak Configurations
  77. */
  78.  
  79. //TeamSpeak IP
  80. $config['teamspeak']['ip'] = '';
  81. //Teamspeak Query Port
  82. $config['teamspeak']['queryport'] = '10011';
  83. //Teamspeak Connection/Voice Port
  84. $config['teamspeak']['serverport'] = '9987';
  85. //Teamspeak Query Login
  86. $config['teamspeak']['loginname'] = 'serveradmin';
  87. //Teamspeak Query Password
  88. $config['teamspeak']['loginpass'] = '';
  89.  
  90. //Tło
  91. $config['backgroundimage'] = 'banner.png';
  92.  
  93. //Refresh bannera
  94. $config['syncintervall'] = 1;
  95.  
  96.  
  97. //SourceQuery config START
  98.  
  99. //Initially enables SourceQuery
  100. $config['sqenable'] = false;
  101. //Font File Path for Listing all available Parameters for the given Source Query Server
  102. $config['sqlistfont'] = 'font/bebas.otf';
  103.  
  104.  
  105. /*
  106. Source Query Integration
  107. Uses Library from https://github.com/xPaw/PHP-Source-Query
  108. A List of Supported Games in the link above
  109.  
  110. Example for SourceQuery*/
  111.  
  112. /*
  113. $config['sourcequery']['server1'] = [
  114. //IP from Server
  115. 'ip' => '5.104.104.99',
  116. //Port for Source Query
  117. 'port' => '2303',
  118. //Timeout
  119. 'timeout' => 1,
  120. //with this on true it will List all Available fields you can use directly on the banner
  121. 'debug' => false,
  122. ];
  123.  
  124. */
  125.  
  126. //SourceQuery config END
  127.  
  128.  
  129.  
  130. /*
  131. ** Textfields
  132. ** text = Sam text który się wyświetli
  133. ** xpos = X to szerokość (w Pixelach)
  134. ** ypos = Y to wysokość (w Pixel)
  135. ** fontsize = Fontsize to wielkość czcionki
  136. ** fontfile = Fontfile to plik z czcionkÄ…
  137. ** color = color to jest kolor (Przykład: #34495e)
  138.  
  139. ** Czysty Config
  140.  
  141. $config['textfield'][] = [
  142. 'text' => '',
  143. 'xpos' => '',
  144. 'ypos' => '',
  145. 'fontsize' => '',
  146. 'fontfile' => 'font/bank.ttf',
  147. 'color' => '',
  148. ];
  149.  
  150. */
  151.  
  152. $config['textfield'][] = [
  153. 'text' => '%timeHi%', /* Godzina tego nie edytuj */
  154. 'xpos' => '600', /* (SZEROKOŚĆ) Jeżeli coś nie pasuje trzeba tutaj się pobawić */
  155. 'ypos' => '265', /* (WYSOKOŚĆ) Jeżeli coś nie pasuje trzeba tutaj się pobawić! */
  156. 'fontsize' => '30',
  157. 'fontfile' => 'font/bebas.otf',
  158. 'color' => '#ffffff',
  159. ];
  160.  
  161. $config['textfield'][] = [
  162. 'text' => '%realclients%/%maxclients%', /* LICZBA ONLINE UZYTKOWNIKOW */
  163. 'xpos' => '40',
  164. 'ypos' => '265',
  165. 'fontsize' => '30',
  166. 'fontfile' => 'font/bebas.otf',
  167. 'color' => '#ffffff',
  168. ];
  169. $config['textfield'][] = [
  170. 'text' => '%groupcount[2,60,61]%', /* LISTA ADMINISTRACJI ID GRUP PO PRZECINKU*/
  171. 'xpos' => '40',
  172. 'ypos' => '140',
  173. 'fontsize' => '30',
  174. 'fontfile' => 'font/bebas.otf',
  175. 'color' => '#ffffff',
  176. ];
  177. $config['textfield'][] = [
  178. 'text' => 'Nazwa.pl', /* IP/NAZWA TWOJEGO TEAMSPEAKA */
  179. 'xpos' => '600',
  180. 'ypos' => '90',
  181. 'fontsize' => '30',
  182. 'fontfile' => 'font/bebas.otf',
  183. 'color' => '#ffffff',
  184. ];
Advertisement
Add Comment
Please, Sign In to add comment