News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

xum

alright i managed to paste it in another place the code and i finally dont get any errors anymore the thing now is that .. i can view the shoutbox ONLY as admin accessuser... regular users cant view it at all.

why?

ameo

You must enable it in Permissions for all membergroups. That's been answered dozens of times already. Please use search for future reference.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

underdog_01

I'm not sure if this has been mentioned before..
(I didn't find it in the search function)

I noticed the /clear command only clears up the history that shows on the current screen.
It does not erase the the entire history file therefore manually clearing the file with an editor is necessary.

So I made a slight modification to the Shout Box that adds a proper erase procedure.

-------------------------------------------

Adding the /erase history command:

Navigate to ...Your site/public_html/yshout.php

Find:

case "/clear":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($chatPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;



Add this after above code:

case "/erase":
global $chatPath, $historyPath;
$fileContents='';
if(file_exists($chatPath))
$fileContents = file_get_contents($chatPath);
$handle=fopen($historyPath, 'w');
fputs($handle,'');
fclose($handle);
if($historyPath !== '')
{
$handle=fopen($historyPath, 'a');
fputs($handle,$fileContents);
fclose($handle);
}
return true;


---------------------------------

Navigate to:
Your site/public_html/Themes/default/languages/Modifications.english.php

or if you use utf-8 settings go to:

Your site/public_html/Themes/default/languages/Modifications.english-utf8.php

Find:

$txt['yshout_cmdlist'] = array(
'/help' => ' [command]: Help on a command, or all if no command is specified.',
'/return' => ': Go back to the Shout Box.',
'/pi' => ' [digits]: What is the value of pi to the nth digit?',
'/me' => ' &lt;message&gt;: Emotes the message (e.g. <span class="meaction"> * Nathaniel likes dogs</span>)');
$txt['yshout_cmdlistadmin'] = array(
'/clear' => ': Completely empty the Shout Box.',


Add this after above code:

'/erase' => ': Erase entire Shout Box history.',


Done.

---------------------------------

Now you can use the /erase command to erase the entire history of the Shout Box.

Note: If you only use the /erase command it will erase the extended history and put what is showing on your screen in there (recent history). If you want to erase absolutely everything... use the /clear command followed by the /erase command.


UD




ClOuD_Za

Need Help ...

After I edit my custome template code.

Shoutbox got the whole page triple times sequently.

I'm using SUNSET theme with 2.0 RC2

autarh

hi
i just updated SMF 1.1.9 to SMF 1.1.10 but Shoutbox do not works ? when i try to install again i got message that the file is maybe corupted and not for that version, could u please helkp on thios , is teher working copy for smf 1.1.10

THANKS

emonk

Hi nneonneo,

how i can put the shoutbox only in the index page of the forum (not in all bords/pages of the forum)??

thanks!

fiorello

#5546
Hello, if anybody can check. www.raitq.kim3.pl/smf [nofollow] - shoutbox doesnt work - only refreshes page and no submitting - works good on standard layout
edit: works, osrry

evolution25

how do i put shoutbox as a portamx block

justin0305

Nneonneo:

I love this mod and it is working great for me!  I do have one question though that I was hoping you could help me with.  They would not help me in the general help area for this so hopefully you can.  Please see the link below to my other thread.  Thanks!

http://www.simplemachines.org/community/index.php?topic=326404.0

Cory94bailly

I'm not sure if anybody can help but here:





Notice, there's two boxes to post a shout (One surrounded by white, another above it..)

The top one works, the bottom doesn't.


We haven't tested it in every browser but in firefox, it is like that.. In opera, it is not.

royhunters

I downloaded the mod via a firefox browser, I can not find the mod in my admin screen in SMF.  so it is sitting in a folder on my desktop.

I have no problem with FTP to my server, I just do not know what to do with the files in the mod folder on my desktop.

The only think I am able to update in SMF is the SMF version the only "packeges I can see are some jeep avitars and I can not browse for anything else, when I try to connect to the SMF server it tell me to go to the SMF url

Sorry to sound like such a retard here but I have only had the form for about a week

vast

hey nneonneo, maybe you can give me some advice for this tiny shoutbox problem:

Everytime the History file (history.home.txt f.i.) is getting bigger than approx. 5mb, noone can read the history anymore by clicking the history link of the shoutbox, or specifing an "how far to go back" value. If we click on the history link, just a white page appears with nothing in it.
So everytime the history file is bigger than approx. 5mb I have to manually delete it and then the history works again until it's 5mb in size again...

and it's getting uncomfortable as the history is getting 5mb in size every week instead of every month or so...

I was wondering if it is only a matter of some variables in your code, or if it is a technical issue with php or my webspace server..

if there is a simple solution for this problem, let me know :)

thx so far and keep up your good work!

ameo

vast, how in the world underdog's post on this page wouldn't help you? it explains everything you need to do to fix your issue.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

vast

Quote from: ameo on July 27, 2009, 08:00:56 AM
vast, how in the world underdog's post on this page wouldn't help you? it explains everything you need to do to fix your issue.

because it does not solve my problem.
it is just another way to delete the extended history.. it does not solve the ~5mb max-history-file problem.

I was looking for a solution which does one of the following:
- extend the maximum file size limit of the extended history file (larger than ~5mb, up to no limit - well, maybe I should mention: the file is getting bigger than ~5mb+ everything is in this file, but when clicking on the history link it cannot open and show files larger than ~5mb+)
- history volumes. automatically create new extended history files when they reach approx 5mb.
- max size of history file is approx. 5mb, BUT all new lines kick the oldest lines out of the file. would work too.

voythas

Here are my changes to ASB 1.22 and SB 1.22

1. Clicking on username puts "To <username>:" into msg form



Open /yshout/yshout.php and search for:
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
}

2. Podmieniamy tym kodem:
if(loadMemberData(Array($user['id']),false,'profile')!==false)
{
$profile=$user_profile[$user['id']];
$a_style = ' class="userclass" style="color: '.(empty($profile['member_group_color']) ? $profile['post_group_color'] : $profile['member_group_color']).'"';
if(empty($profile['member_group_color']))
$userColor = '#cd4a2c';
else
$userColor = $profile['member_group_color'];
}

We need to change on #cd4a2c to color of our user without special color group$userColor = '#cd4a2c';

Search for:
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a$a_style href=\"index.php?action=profile;u=$userID\">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}

Replace with:
$shoutName=$user['name'];
$userID=$user['id'];
if(isGuest($user))
$writeText=$shoutName;
else
$writeText="<a href=\"index.php?action=profile;u=$userID\"><img src=\"http://burning-brushes.pl/Themes/BB/images/profil.gif\" /></a> <a$a_style href=\"javascript:void(0);\" onclick=\"replaceText('To [color=$userColor][i][b]$shoutName"."[/b][/i][/color]: ', document.forms.shout_form.shout_text); return false; \">$shoutName</a>";
$writeText.=": $text";
makeRawShout($writeText,$user);
}

And we replace http://burning-brushes.pl/Themes/BB/images/profil.gif with
http://domain.com/Themes/ourtheme/images/profil.gif
It will give us small icon near username (it links to user's profile)


2. Hidding form with nickname




#yshout #forum-name {
Right after this, we add:
display: none;


3. Moving toolbar at bottom (only Advanced Shoutbox!)



Open /yshout/yshout.php and find:
/ Tool links (History, Commands, etc.)
echo '<div id="yshout-toollinks" style="text-align: left; margin-top: 5px;">';
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="NewWindow(getURL(\'help\'),\'help\',\'620\',\'440\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a>&nbsp;';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="NewWindow(getURL(\'history\'),\'history\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a>&nbsp;';
// Shout Sound Control
if(!isset($_COOKIE['shoutSound']))
echo '<a href="javascript:delete_cookie(\'shoutSound\');set_cookie(\'shoutSound\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/unmute.png" alt="UseSound" /></a>&nbsp;';
else
echo '<a href="javascript:delete_cookie(\'shoutSound\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/mute.png" alt="NoSound" /></a>&nbsp;';
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&amp;n=+100000\')" onclick="NewWindow(getURL(\'history&amp;n=+100000\'),\'exthistory\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a>&nbsp;';
// Admin Links
if(!isset($_COOKIE['yShout_hideadmlinks']))
echo '&nbsp;<a href="javascript:set_cookie(\'yShout_hideadmlinks\',\'true\',3600*24*365);delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_delete.png" alt="',$txt['yshout_hide'],$txt['yshout_admlinks'],'" /></a>';
else
echo '&nbsp;<a href="javascript:delete_cookie(\'yShout_hideadmlinks\');delete_cookie(\'yShout_open\');loadChat();"><img src="'.$settings['images_url'].'/cog_add.png" alt="',$txt['yshout_show'],$txt['yshout_admlinks'],'" /></a>';
// Return to Chat
// echo '&nbsp;<a href="javascript:autoShout(\'/return\');">',$txt['yshout_return'],'</a>';
}
echo '</div>'; // yshout-toollinks

Cut it and paste right after this:
// Shout form
echo '
<form id="shout-form" name="shout_form" action="#" onsubmit="doSend();return false;">
<fieldset>';



4. Fix opening in new window



Advanced Shoutbox 1.22
Open /yshout/yshout.php and replace this:
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="NewWindow(getURL(\'help\'),\'help\',\'620\',\'440\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a>&nbsp;';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="NewWindow(getURL(\'history\'),\'history\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a>&nbsp;';

with this:
// Commands
echo '<a href="javascript:goTo(\'help\')" onclick="window.open(getURL(\'help\'),\'help\',\'width=620,height=440\',\'resizable=no\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/info.png" alt="',$txt['yshout_commands'],'" /></a>&nbsp;';
// History
echo '<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/date.png" alt="',$txt['yshout_history'],'" /></a>&nbsp;';

and this:
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&amp;n=+100000\')" onclick="NewWindow(getURL(\'history&amp;n=+100000\'),\'exthistory\',\'620\',\'440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a>&nbsp;';

with this::
// Extended History
if(isMod())
{
echo '<a href="javascript:goTo(\'history&amp;n=+100000\')" onclick="window.open(getURL(\'history&amp;n=+100000\'),\'exthistory\',\'width=620,height=440\',\'yes\',\'center\');return false" onfocus="this.blur()"><img src="'.$settings['images_url'].'/calendar.png" alt="',$txt['yshout_exthistory'],'" /></a>&nbsp;';
[/code]


Shoutbox 1.22

Open /yshout/yshout.php and replace this:
echo '[<a href="javascript:goTo(\'history\')">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>]';

with this:
echo '[<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()">',$txt['yshout_history'],'</a>] ';
echo '[<a href="javascript:goTo(\'history\')" onclick="window.open(getURL(\'history\'),\'history\',\'width=620,height=440\',\'resizable=yes\',\'center\');return false" onfocus="this.blur()">',$txt['yshout_commands'],'</a>]';


Here you can download profile icon:

http://burning-brushes.pl/Themes/BB/images/profil.gif
http://burning-brushes.pl/Themes/BB/images/profil.gif

This is how my ASB looks like:

http://burning-brushes.pl/imghost/uploads/34c69aa5ef.png
http://burning-brushes.pl/imghost/uploads/34c69aa5ef.png

All those changes are written by me.

Regards - voythas.
Burning-Brushes.pl | voythas deviantArt

zach21uk

#5555
Is the mod compatible with the newest RC?   SMF 2.0 rc1-2?  The reason I ask is that I have just upgraded my forum from 2.0 rc1 to rc1-2 and the shoutbox has stopped working.   

I also tried installing the shoutbox on a fresh smf 2 rc1-2 install and its not working there either.   The shoutbox displays, but you cannot post anything or use any of the links.

I'm trying determine if the mod just isnt compatible, or if there is a server issue.

Akyhne

Quote from: wrbex on January 20, 2009, 05:51:48 PM
Quote from: kabu on December 18, 2008, 04:12:02 PM
Hi I used the search in this topic but I couldn't find the answer.
My problem is I have auto embeded video clips mod installed and whenever someone types a link of say a youtube video the video is embeded onto the shoutbox. When you click the play button the video plays for a while and then stop playing. I'm guessing because the shoutbox is auto refreshed?
Is there anyway to stop the auto embed without removing the auto embed mod?

I have same problem..i have instaled AEVA mod...
Any "fix" for this?
If this hasn't been answered:

find:
$text = parse_bbc($text);

replace with:
$context['aeva_disable'] = 1;
$text = parse_bbc($text);
$context['aeva_disable'] = 0;


This disables Aeva in the Shoutbox.

evolution25

#5557
does anyone know how change color of shoutbox and put it in a portamx block

evolution25

add scroll shows already installed but is not scroll bar

zach21uk

Quote from: zach21uk on July 28, 2009, 10:09:38 AM
Is the mod compatible with the newest RC?   SMF 2.0 rc1-2?  The reason I ask is that I have just upgraded my forum from 2.0 rc1 to rc1-2 and the shoutbox has stopped working.   

I also tried installing the shoutbox on a fresh smf 2 rc1-2 install and its not working there either.   The shoutbox displays, but you cannot post anything or use any of the links.

I'm trying determine if the mod just isnt compatible, or if there is a server issue.

Does anyone know this?

Advertisement: