|
#1
|
||||
|
||||
Gazelle Shoutbox
Hi,
This shoutbox was not originally created by me but just improved, I will improve on It as time passes. First follow the step for creating firefly_function.php in "http://www.bvlist.com/gazelle/10274-top-ten-index.html" and then add the below to firefly_function.php. Code:
function get_av($av,$w,$h){ if (!empty($av)){ $var = '<img src="'.$av.'" width="'.$w.'" height="'.$h.'">'; }else{ $var = '<img src="http://heintendsvictory.org/wp-content/uploads/default-avatar.png" width="'.$w.'" height="'.$h.'">'; } return $var; } function format_class_colour($class){ switch ($class) { case "2": return '#009900'; break; case "3": return '#006600'; break; case "4": return '#003333'; break; case "5": return '#003300'; break; case "15": return '#FF0000'; break; case "19": return '#00FF00'; break; case "20": return '#333399'; break; default: return '#FFF'; } } function date_time($timestamp = 0) { if ($timestamp) return gmdate("Y-m-d H:i:s", $timestamp + 14000); else return gmdate("Y-m-d H:i:s"); } function gtime() { return strtotime(date_time()); } function format_bbcode($text, $strip_html = true) { $s = $text; //$s = strip_tags($s); if ($strip_html) $s = htmlspecialchars($s); $s = stripslashes($s); // Bold $s = preg_replace("/\[b\]((\s|.)+?)\[\/b\]/", "<b>\\1</b>", $s); // Italic $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "<i>\\1</i>", $s); // Underline $s = preg_replace("/\[u\]((\s|.)+?)\[\/u\]/", "<u>\\1</u>", $s); // Text $s = preg_replace( "/\[color=([a-zA-Z]+)\]((\s|.)+?)\[\/color\]/i", "<font color=\\1>\\2</font>", $s); // Text $s = preg_replace( "/\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\]((\s|.)+?)\[\/color\]/i", "<font color=\\1>\\2</font>", $s); // Text $s = preg_replace( "/\[url=((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i", "<a href=\\1 target=_blank>\\3</a>", $s); // http://www.example.com $s = preg_replace( "/\[url\]((http|ftp|https|ftps|irc):\/\/[^<>\s]+?)\[\/url\]/i", "<a href=\\1 target=_blank>\\1</a>", $s); // www.example.com $s = preg_replace( "/\[url\](www\.[^<>\s]+?)\[\/url\]/i", "<a href='http://\\1' target='_blank'>\\1</a>", $s); // Text $s = preg_replace( "/\[url=(www\.[^<>\s]+?)\]((\s|.)+?)\[\/url\]/i", "<a href='http://\\1' target='_blank'>\\2</a>", $s); // Text $s = preg_replace( "/\[size=([1-7])\]((\s|.)+?)\[\/size\]/i", "<font size=\\1>\\2</font>", $s); // Text $s = preg_replace( "/\[font=([a-zA-Z ,]+)\]((\s|.)+?)\[\/font\]/i", "<font face=\"\\1\">\\2</font>", $s); // Linebreaks $s = nl2br($s); // Maintain spacing $s = str_replace(" ", " ", $s); return $s; } And add this, where you want it!! Code:
print ('<div class="new_box">'); print('<div class="new_head"><strong>Shoutbox</strong></div>'); include(SERVER_ROOT.'/sections/shoutbox/index.php'); print "</div>"; 4) Then execute SQl in phpmyadmin or what ever you use. Code:
CREATE TABLE IF NOT EXISTS `chat` ( `id` int(10) NOT NULL AUTO_INCREMENT, `uid` int(10) NOT NULL, `time` int(10) NOT NULL DEFAULT '0', `name` varchar(50) NOT NULL, `text` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=482 ; -- -- Dumping data for table `chat` -- INSERT INTO `chat` (`id`, `uid`, `time`, `name`, `text`) VALUES (481, 2, 1424932959, 'freespirit', 'This is a test'); Then edit your stylesheet and if you haven't added this. Code:
.new_box{ margin: 0 auto; border-radius: 0px 0px 7px 7px; -moz-border-radius: 0px 0px 7px 7px; -webkit-border-radius: 0px 0px 7px 7px; margin-bottom: 20px; background-color: #101010; line-height: 300%; } .new_head{ background-color: #1a1a1a!important; font-weight: bold; height: 37px; text-indent: 8px; }
__________________
Please Support Majority Report You can contact me on Skype live:phesadent.elect but please let me know first. If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week. Due to free time I'm able to help interested member's with their tracker. Please Note! Depending on your requests I will charge you for my assistance for Tracker installs and mods. All my mods are custom and prices will very depending on the request. I'm able to install any tracker and mods including themes. Please PM me Last edited by firefly007; 27th February 2015 at 00:11. |
The Following User Says Thank You to firefly007 For This Useful Post: | ||
rfadown (26th February 2015)
|
#2
|
||||
|
||||
just messing around with this on comp, done nothing to it apart from add your topten and this. but shout not work bud.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
|
#3
|
||||
|
||||
Hey Daffy could you try and see if any errors are generated, maybe I missed something while putting it together for Bvlist.
__________________
Please Support Majority Report You can contact me on Skype live:phesadent.elect but please let me know first. If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week. Due to free time I'm able to help interested member's with their tracker. Please Note! Depending on your requests I will charge you for my assistance for Tracker installs and mods. All my mods are custom and prices will very depending on the request. I'm able to install any tracker and mods including themes. Please PM me |
#4
|
||||
|
||||
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?" "I Kill You!" simples
Last edited by daffy; 28th February 2015 at 01:31. |
#5
|
||||
|
||||
Hmm That is part of the original shoutbox code hey, but I'm not getting that Im using a Ubuntu box
Bump: Daffy I forgot to add this create a file called shoutbox.php and save to doc root and add this. Code:
<? require('classes/script_start.php');
__________________
Please Support Majority Report You can contact me on Skype live:phesadent.elect but please let me know first. If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week. Due to free time I'm able to help interested member's with their tracker. Please Note! Depending on your requests I will charge you for my assistance for Tracker installs and mods. All my mods are custom and prices will very depending on the request. I'm able to install any tracker and mods including themes. Please PM me |
Tags |
gazelle , shoutbox |
|
|