News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

blondeamon

Hi neeo any luck with testing the lag issues with ligttptd?
Always looking for the best

www.kamenos.gr  Greek Gaming Community

nneonneo

I forgot about it in the hectic schedule of finals :(

Sorry, I will get to it today.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

nneonneo

OK, I got Lighttpd installed and running. I was unable to make FastCGI work, so this isn't totally representative.

Under mod_cgi, I pushed it to about 20 open tabs (each with a shoutbox), before the lag exceeded ~2 seconds and I stopped the test.

I should note that my "server" is my development laptop, and therefore has rather poor specs for a real server. I can observe periodic spikes in CPU usage as the shoutbox refreshes on every single one (the period of each shoutbox refresh is 20 seconds, and the spikes follow this exact pattern) -- this might be a good point for using a randomized timeout. I am using localhost, which negates any network/bandwidth issues, so it is a pure server resources test. Both Apache and Lighttpd (both on mod_cgi) got to around the same point concurrency-wise.

So, maybe the problem is with fastcgi (which apparently dislikes my WLMP installation, despite my best efforts). I will see if I can get it working with fastcgi. Meanwhile, I hope these notes are at least a little bit informative.

P.S. server specs: 2GB RAM + Core 2 Duo @ 2GHz.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

L'AltroWeb

Quote from: Savvra on December 02, 2008, 04:26:37 PM
If I try to delete anything from the shoutbox using the admin links I get the error

"Session verification failed. Please try logging out and back in again, and then try again"

No matter how many times I relog I stil get the same error.  I'm the admin of the forums and I'm using 1.22 and my smf stuff is all up to date.  Any suggestions?
I've the same problem here: http://darkwolf.altervista.org/smf2/chat/
How you have fix?
-
PS: is possible to delete all shout with one click?

Ordogg

Can you tell me how to add a scroll bar to SMF 2.0 Beta 4 for this shoutbox?  I saw some instructions, but they are for an older version.. Will they still work?

Or if I can limit it by time or something? its just getting really big.

[unplugged]

Open yshout.css and find #yshout #shouts {

add these two lines to it

height: 200px;
overflow: auto;


where 200px is your desired shoutbox height.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



ScarMix

Hello nneonneo

Well after some problems with the host the shoutbox has got some errors. I would like to fix them but the warning isn't exactly the best guides  ;) Would really appreciate help.

Here are the warnings I'm getting at the top:
Quote

Warning: session_write_close() [function.session-write-close]: write failed: No space left on device (28) in /home/scarmix/public_html/yshout/yshout.php on line 763

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in /home/scarmix/public_html/yshout/yshout.php on line 763

And at the bottom:
Quote
Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

I have searched the topic for results and I found one. But the search only gave me the questions and not the answer that I could read. I would gladly read the posts if you don't want to answer them again which has to be a bit frustrating, I know from experience  ;)

Thanks in advance,
Scarmix

ScarMix

Sorry for double post but

The problem seems to been a server problem and not a shoutbox problem. Sorry for not knowing this...

Regards,
Scarmix

Ordogg


[unplugged]

« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



mickeyb107

is there a way i can eliminate my members from posting porn pictures or any pictures except the smileys in shoutbox... i didnt see any options to allow or disallow img tags.. i tried a search but came up empty...thank you
<a href="http://ftasatfile.com">FTASATFILE FREE TV YOUR
SOURCE FOR ALL YOUR SATELLITE NEEDS

fext

Quote from: nneonneo on December 15, 2008, 01:35:21 PM
The name attribute is in yshout.php. It is likely that you accidentally duplicated it while adding smileys (a common, if mostly harmless mistake). If you want smiley.php to validate, just remove the DOCTYPE and html tags from it. That should fix the duplicate errors.

Where should I remove it from? What file - yshout.php - I cannot see it in the portal code I used and could not find it in the yshout.php - not sure where to remove it as I do not want to break it.

Nequil

Quote from: nneonneo
@Nequil: You can't really block /me because it is built-in to SMF, for example:
Quote/me tests /me
yields
* nneonneo tests /me
You could try replacing /me in the shout, e.g. add
$text=preg_replace('/^\/me /i','',$text) before
preparsecode($text);
and see if that blocks /me.

yeye thanks :) /me disabled

in yshout.php

Code (before) Select
preparsecode($text);

Code (add) Select
$text = preg_replace('/^\/me /i','',$text);

EMOrtal

I installed this on 2.0 Beta 4..and I can see it, other admins can see it, but my regular members can't..What can I do to fix this?

nneonneo

@DarkWolf: Find the three lines
session_start();
session_write_close();
@session_start();
and comment all three out (put // before the line, e.g. //session_start();).

To delete all the shouts with one click, try /clear.

@mickeyb107: One possibility is to add some rules for the shoutbox and temporarily ban users who don't abide by them. The other is to use $bannedCode (yshout/settings.php) to explicitly disable the [ img ] tag.

@Youngiiie: You probably have a line like this in yshout.php:
name="shout_form" name="shout_form" ...
Just remove all but one of them (for each line that contains multiple)

@EMOrtal: Membergroups -> Permissions in your admin panel; give the regular members the "View Shoutbox" option.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

kabu

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?

Casal

#4756
Hello I am using your mod of southbox but I am not capable of doing that my this chat inside a box in my forum. I use another topic that is not the default but me podrias to help to say to me since(as,like) I have to do it.

My version forum is 1.1.1 and how can i insrte the sb in the theme box please thanks.


Help Please
♫♪♫♪

fext

Quote from: nneonneo on December 18, 2008, 03:38:18 PM
@Youngiiie: You probably have a line like this in yshout.php:
name="shout_form" name="shout_form" ...
Just remove all but one of them (for each line that contains multiple)

Cheers bro.

Unfortunately it still does not pass validation (1 error) but I can live with that. ;)

Casal

Please since I can increase the size of the letters of the southbox.

Thanks for where help.
♫♪♫♪

al_ltoticmat

#4759
QuoteI made sort of guide for dummies, or something like that, to place this shoutbox in News field, and make it look cool on forum.
Personally, I believe this is the best position for shoutbox, and if you don't need News on your forum you could place shoutbox instead.


NOTE: I wrote tutorial and it works for 1.17 !!!

NOTE 2: With nneonneo's help - this works like a charm with version 1.21 also :)
            For 1.21 installation see step instead of step, and then 
            follow all other steps normally.



First steps you already know, but I'll repeat it just in case;

First download yShout and install it.
If you're using different theme than default one after

[/s][/s]
Code: [Select]
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';


you must add this code into your index.template.php :

[/s][/s]
Code: [Select]
// YSHOUT HERE
global $boardurl;
echo '
<script src="',$boardurl,'/yshout/js/prototype.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/behaviour.js" type="text/javascript"></script>
<script src="',$boardurl,'/yshout/js/domFunction.js" type="text/javascript"></script>
<script type="text/javascript">

var myfunc = new domFunction(function()
{
loadChat();
}, { "yshout":"id"});
var board_url = "'; $boardurlparsed = parse_url($boardurl); echo (isset($boardurlparsed['path'])?$boardurlparsed['path']:""), '";

</script>
<script src="',$boardurl,'/yshout/js/yshout.js?Mar072008" type="text/javascript"></script>
<script type="text/javascript">var shoutFile = "home.txt";</script>
<style type="text/css">
#yshout {
font-size: 10px;
}
#yshout p {
margin: 0 0 0; /* Top Bottom Linespacing */
}
.shout-invalid {
background: #FFFDD1;
}
#yshout fieldset {
border: none;
}
#yshout em {
font-style: normal;
}
#yshout p {
line-height: 1;
margin-top: 0;
}
#yshout {
overflow: hidden;
}
#yshout .shout-timestamp {
font-weight: normal;
color: #000;
}
#yshout .adminlink {
font-size: 6pt;
color: #141414;
}
#forum-name, #shout-text, #shout-button {
font-size: 9px;
margin: 0;
padding: 0;
}
#yshout #forum-name {
color: #666666;
width: 70px;
margin-right: 5px;
}
#yshout #shout-text {
color: #000000;
width: 310px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
</style>';
// YSHOUT END


Then do this:


Of course you need news box to be displayed in order to see shoutbox in your index page.
To do that go to Theme options and click to:

1. DISABLE eNews  [it is very dangerous to leave it enabled, so if it is checked,
    you must uncheck it]

&[/i][/size][/size]

2. Show news fader on board index [check it]

3. fading delay - set to 0

Click save, then in News box put this code

a) for 1.15-1.17     
Code: [Select]
<div id="yshout">',$txt['yshout_loading'],'


b) for 1.21              [/s][/s]
Code: [Select]
<div id="yshout">Loading shoutbox...</div>

instead of putting second code somewhere else:

And save it.


If you wish to change News to Shout box or Shoutbox you'll need to find file index.english-utf8.php / index.english.php or of  any other language file you're using.  They are stored under Forum/Themes/default/languages/  In there you'll need to edit string     $txt[102] = 'News';   
to   $txt[102] = 'Shoutbox';  and re-upload that file to it's place. You'll need to replace old file with that new-one if you didn't delete old one first. 



// GUIDE FOR DUMMIES IS FINISHED // I guess that's it. I hope it shall be helpful to at least someone.
Step 4 is actually step 1 FOR 1.21 installation

In index.template.php, after
Code: [Select]
  // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';add
Code: [Select]
  // YSHOUT HERE - <head> code
   global $boardurl,$shoutFile;
   $shoutFile='home';
   $scripturlparsed = parse_url($scripturl);
   $scriptpath=isset($scripturlparsed['path'])?$scripturlparsed['path']:'/';
   $args='';
   foreach($_GET as $key => $value) // passthrough $_GET
      $args.='&'.urlencode($key).'='.urlencode($value);
   echo '
   <script src="',$boardurl,'/yshout/js/moo.ajax.js" type="text/javascript"></script>
   <script src="',$boardurl,'/yshout/settings.js" type="text/javascript"></script>
   <script type="text/javascript"><!-- // --><![CDATA[
   window.onload=function(){loadChat();};
   var shoutFile="',$shoutFile,'";
   var yshout_php="',$scriptpath,'?yshout',$args,'";
   // ]]></script>
   <script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
   <style type="text/css">
      #yshout {
         font-size: 10px;
         overflow: hidden;
      }
      #yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
      }
      #yshout #shouts { /* main shouts area */
      }
      #yshout .shout { /* one shout */
         margin: 0 0 0; /* Top Bottom Linespacing */
         line-height: 1;
      }
      #yshout .shout-timestamp {
         font-style: normal;
         font-weight: normal;
      }
      #yshout .shout-adminlinks { /* del and ban buttons */
         font-size: 6pt;
         color: #141414;
      }
      #yshout #shout-form {
         margin: 0;
         padding: 0;
      }
      #yshout #shout-form fieldset {
         border: none;
      }
      #yshout #forum-name {
         width: 70px;
         margin-right: 5px;
      }
      #yshout #shout-text {
         width: 310px;
         margin-right: 5px;
      }
      #yshout #shout-button {
         width: 55px;
      }
      #yshout .shout-invalid { /* invalid shout (shout textbox) */
         background: #FFFDD1;
      }
   </style>';
   // YSHOUT END - <head> code


Best of luck 2 everyone[/hr]

I do this but this happens.
[img=http://img111.imageshack.us/img111/2124/16497422se4.th.jpg] [nofollow]

Advertisement: