login  Naam:   Wachtwoord: 
Registreer je!
 Scripts:

Scripts > PHP > Gastenboeken > ShoutBox [V1]

ShoutBox [V1]

Auteur: Ibrahim - 29 juni 2006 - 19:49 - Gekeurd door: Gerard - Hits: 10834 - Aantal punten: 3.83 (3 stemmen)



Een shoutbox, gemaakt voor een battle

download de zip
uitpakken
zetten op server
ga naar inc/config.inc.php
wijzig je gegevens
wijzig niet de smileys namen
klaar


Ideeën voor V2:

- navigatie
- zoeken
- smiley plaatje kan andere extensies hebben dan alleen gif (makkelijkste )
- meerdere admins
- limiet om te posten/instelbaar in de admin
- instellingen komen in een tabel, en die worden dan in config geladen (alleen opnieuw geladen als er een wijziging is gemaakt

niet zoveel dus 

Wil je smileys toevoegen? Ga naar inc/BB.inc.php
zoek naar de array smileyArray en bekijk hoe de smileys worden gedaan, voeg dan je smiley toe:

vb)
  1. <?php
  2. $smileyArray = array(
  3. 'hier de smiley code' => 'hier de smiley zijn plaatje naam ZONDER .gif'
  4. );
  5. ?>

Code:
  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. *
  5. * @license http://www.gnu.org/licenses/gpl.html
  6. * @author Ibrahim <siliecom14@hotmail.com>
  7. * @version Version 1.0
  8. * @package Shoutbox
  9. */
  10. // full error reporting
  11.  
  12. $cfg = array( );
  13.  
  14. $cfg['mysql'] = array( );
  15. $cfg['admin'] = array( );
  16. $cfg['site'] = array ( );
  17.  
  18.  
  19. //mysql
  20. $cfg['mysql']['host'] = 'localhost'; // host where MySQL runs
  21. $cfg['mysql']['user'] = '*********'; // username of MySQL
  22. $cfg['MySQL']['pass'] = '*********'; // password of MySQL
  23. $cfg['mysql']['data'] = '*********'; // database of MySQL
  24.  
  25. //admin
  26. $cfg['admin']['login'] = 'admin';
  27. $cfg['admin']['pass'] = 'password in md5'; // or md5('password');
  28.  
  29. //site instellingen
  30. $cfg['site']['temp'] = 1;
  31. $cfg['site']['path'] = 'http://yourpath.com'; // without the /
  32.  
  33.  
  34.  
  35. foreach( $cfg['mysql'] as $key => $value )
  36. {
  37. if(empty( $cfg['mysql'][$key] ) )
  38. {
  39. echo 'You haven\'t filled in all the vars.<br />';
  40. echo 'Please fill in all de mysql vars or else mysql can\'t connect!';
  41. }
  42.  
  43. }
  44.  
  45. $connectDB = @mysql_connect( $cfg['mysql']['host'],
  46. $cfg['mysql']['user'],
  47. $cfg['MySQL']['pass']
  48. );
  49.  
  50. $selectDB = mysql_select_db( $cfg['mysql']['data'] );
  51.  
  52. if(! $connectDB )
  53. {
  54. echo 'An error has occurred: <br />';
  55. echo '<font color="red">';
  56. echo '</font>';
  57. }
  58.  
  59. --------------------------------------------
  60.  
  61. DOWNLOAD DE REST
  62.  
  63. --------------------------------------------
  64. ?>
Download code! Download code (.txt)

Download dit script! Bekijk een voorbeeld van dit script!
 Stemmen
Niet ingelogd.

 Reacties
Post een reactie
Lees de reacties (9)
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.032s