Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Gazelle
Reply
  #1  
Old 26th February 2015, 09:03
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default 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("  ", " &nbsp;", $s);

    return $s;
}
2) Edit /sections/index/private.php

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>";
3) Then download the attached shoutbox and put the folder in /sections/

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');
5)

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;
}
Attached Files
File Type: tgz shoutbox.tgz (4.0 KB, 96 views)
__________________




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.
Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
rfadown (26th February 2015)
  #2  
Old 27th February 2015, 14:53
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
just messing around with this on comp, done nothing to it apart from add your topten and this. but shClick the image to open in full size.out not work bud.
Attached Thumbnails
Capture.PNG  
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #3  
Old 27th February 2015, 21:39
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
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

Reply With Quote
  #4  
Old 27th February 2015, 22:12
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details

Last edited by daffy; 28th February 2015 at 01:31.
Reply With Quote
  #5  
Old 28th February 2015, 00:43
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Hmm That is part of the original shoutbox code hey, but I'm not getting that Im using a Ubuntu box

Bump:
Quote:
Originally Posted by daffy View Post
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

Reply With Quote
Reply

Tags
gazelle , shoutbox

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 07:06. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.