News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMFPacks.com Shoutbox

Started by Nibogo, October 19, 2008, 11:41:06 AM

Previous topic - Next topic

KalEl025

Quote from: ♦PulsiveForums♦ on September 13, 2013, 07:37:41 PM
How would i go about adding custom Actions / Commands.


Ex:


* ♦PulsiveForums♦


/action {another user's username or name} then it auto-puts a brutal attake like {Gets obliterated} so it will come out as "*Test1 gets Obliterated by Test2*"


/ Announcement It automatically puts first {Attention Faithful Users} then an announcement that the admin/moderator has typed... and it comes out as "Attention FaithFul Users, We Have Restored Security. -Staff

/Ban {User} so it bans the user who's name has been typed after the "/Ban" and in the shoutbox it announces "Test1 has been banned from the shoutbox"


then Private Messaging within the shoutbox.


SO if you put:


/Whisper {Users Username} {Message after the Username}
-It shows in the shoutbox as:
"<Whisper>{User who you PM'd name}: {Message Here"


If you receive a Private Message, only you will be notified in the shoutbox and it will say:


You have Received a New PM, [Click Here] to view it.

Last command i need...


If someone makes a New Post it will say something like:


"{User who posted it} New Thread: {Thread Title} <-- make the link clickable.


and if someone made a new reply it would be


"{User who posted the reply} New Post: {Thread Title} <-- make the link clickable.


If someone can help me with any of these it would be much appreciated.... Just tell me what codes to use and where to put them and i wont need any other help....

I am actually looking to do something very similar here. A shout for when a new member registers, a new topic is created, and one for when a new event is created.

Anyone have any ideas?
Thanks in advance,
Kal


N i g h t m a r e

Quote from: Nibogo on September 29, 2013, 11:04:12 AM
This is the closest thing out there:

http://www.smfpacks.com/stream


All i need to know is, where and how do i input these commands? What File, Before, or After or Do i Completely replace something?



// command /me $cmd_me = false; if (substr($msg, 0, 4) == '/me ') { $cmd_me = true; $msg = substr_replace($msg, '', 0, 4); } // "search" command if (substr($msg, 0, 8) == '/google ') { $msg = substr_replace($msg, '', 0, 8); $msg = '<b>'.$txt['tb_to_search'].' &quot;'.$msg.'&quot; '.$txt['tb_using_google'].', <a href="http://lmgtfy.com/?q='.$msg.'" target="_blank">'.$txt['tb_click_here'].'</a>.</b>'; }// command /action if (substr($msg, 0, 8) == '/action ') { $tb_action = array( "gets smacked by", "is 0wnd by", "is slapped around by", "gets beat down by", "is stomped on by", "is destroyed by", "gets annihilated by", "is given a black eye by", "is given a fat lip by", "loves being choked by", "gets pummeled by", "gets ******-slapped by", "gets smoked by", "gets body slammed by", "is kicked to the curb by", "is punked by", "gets pwned by", "gets humiliated by", "gets clobbered by", "is thrown to the mat by", "gets a piledriver from", "is beaten to a pulp by", "gets knocked out by", "gets crushed", "is repeatedly punched by", "is visciously mauled by", "is shanked by", ); $rand_keys = array_rand($tb_action, 2); $tb_action = $tb_action[$rand_keys[0]]; $msg = substr_replace($msg, '', 0, 8); $recip = "--><span class=\"tb_action\">* $msg"; $msg = "$recip $tb_action $name *</span></span>"; $name = "<!--$name"; } // command /whisper if(strlen(strstr($name.' '.$msg,$name.' /whisper'))>1) { $whis = 2; // command /news if ($user_info['is_admin'] && substr($msg, 0, 6) == '/news ') { global $txt; $name = $sbot; $msg = substr_replace($msg, '', 0, 6); $msg = '<span class="tb_news1">'.$txt['tb_announce'].': <span class="tb_news2">'.$msg.'</span></span>'; } // command /welcome if (!$user_info['is_guest'] && $msg == '/welcome') { $name = $sbot; $msg = str_replace('/welcome','','<span class=\"tb_welcome\">'.$txt['tb_welcome'].'</span>'); }



[/size]
[/size]Alo, could you take a look at that code and see if it needs fixing?
[/size]
[/size]If i can get this done i really won't have any more questions for this shoutbox thread.


N i g h t m a r e

Quote from: Nibogo on September 29, 2013, 02:23:32 PM
I know that's what you need, but I'm unable to provide those at the moment. In this case you must code them yourself.


Ah, :/ I'm suppose to add the codes to the Shoutbox.php file right?

LoKe

Love the mod!  Couple questions...

How can I change the color of the /me command to be red?

Also, moderators have the ability to see shoutbox history, can I give that command to the members as well?

N i g h t m a r e

How can i change the position of where the Shoutbox appears? I want it to fit in my forum between the Left and Right panels, under the images i have for advertisement.... Can someone help me figure this out?


my forum now:


I want it to look like this:



live627

Create a PHP Portal block and put the following code in it:

//SMFPacks Shoutbox -->
if (function_exists('template_shoutbox')) template_shoutbox('main');
// <-- SMFPacks Shoutbox


Remove the same code from index.template.php

N i g h t m a r e

Quote from: live627 on October 02, 2013, 07:45:15 PM
Create a PHP Portal block and put the following code in it:

   //SMFPacks Shoutbox -->
   if (function_exists('template_shoutbox')) template_shoutbox('main');
   // <-- SMFPacks Shoutbox


Remove the same code from index.template.php


Wow, that worked like a charm :) thanks a lot bud!

N i g h t m a r e

Question, how can i edit my shoutbox so like...

When someone clicks any of the buttons for a smiley or some sort of bbcode it won't slide up, it will go under the bar where you type in your message and expand under there?

N i g h t m a r e

How can i add the text color for the /-me command?

}

   // command /me
   $cmd_me = false;
   if (substr($msg, 0, 4) == '/me ')
   {
      $cmd_me = true;
      $msg = substr_replace($msg, '', 0, 4);
   }

I want it to be

Color: #2779d1

Text Type: Bold

Help me A.S.A.P Please...

~aura~

Hi

my forum is SMF 2.0.5

i have a shoutbox which is working on Crips theme "Back n Black"

i have installed a new theme, and used the code "//SMFPacks Shoutbox -etc " in the index.template but the shoutbox is only half the width now, i am at a bit of a loss as to what to try next, any ideas would be most welcomed *S*

aura

ps that verification thing hates me LOL
"seek not a life of riches, earthly gold or pearls, seek only a heart that is happy, a heart that is honest, a heart that is pure"

Do you need a good host, my host is Charlottezweb, they are NOT an overseller, always answer questions, friendly to newbies. click here to visit Charlottezweb

live627


~aura~

sorry Live, i wasnt sure if putting a link to my forum was considering like advertising for it, hence why i didnt put it in.

thanks anyway for reading my post.

"seek not a life of riches, earthly gold or pearls, seek only a heart that is happy, a heart that is honest, a heart that is pure"

Do you need a good host, my host is Charlottezweb, they are NOT an overseller, always answer questions, friendly to newbies. click here to visit Charlottezweb

live627

No, adding a link to the forum where you need help is definitely not advertising and is okay here.

Steve

At the risk of duplicating a question, what are the options that can be put in the 'Pages where Shoutbox will be printed' setting?

This is a brilliant mod btw. :D
DO NOT pm me for support!

smitch6

will this work with 2.0.6 pls

as for some reason it vanished and i can't get it back again
Friendly, reliable web hosting at affordable prices
www.normanboatforum.co.uk l www.PatTesterSuffolk.co.uk

Steve

I upgraded to 2.0.6 and mine shows fine. I did install after I upgraded though. I assume you don't have the 'Disable Shoutbox' setting checked?

Maybe uninstall it and reinstall?
DO NOT pm me for support!

el_Coli

Hi there!

I want to delete the nosound button and I don't know wich is the part of the code I have to edit.

Please, can you help me?

Thanks in advanced

Branko.

Themes\default\Shoutbox.template.php
Temporarily remove this part:
// disable sound
echo '
<img id="shoutbox_nosound" onclick="Shoutbox_SetStyle(\'nosound\');" onmouseover="Shoutbox_Hover(this, true)" onmouseout="Shoutbox_Hover(this, false)" src="' . $settings['default_images_url'] . '/bbc/nosound.gif" alt="nosound" style="background-image:url(\'' . $settings['images_url'] . '/bbc/bbc_bg.gif\');cursor:pointer" />';
Strong people don't put others down, they lift them up.
A clever person solves a problem. A wise person avoids it.

Advertisement: