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

jay.jarri

Quote from: nneonneo on March 19, 2007, 04:36:21 PM
@jay: In your case, this should not be too difficult.
1) In index.template.php, remove both the short Javascript fragment (the second block, *not* the first) and the actual div (the third block). Leave the first intact.
2) Under the lines // YSHOUT HERE
global $boardurl;

add
if(empty($context['current_board']))
3) In BoardIndex.template.php, add the line
echo '<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
at the point in the code where you want the shoutbox to appear. In your case, this will probably be after "global $context, $settings ..." at the 6th line of BoardIndex.template.php.


Thanks nneonneo, now i can see the shoutbox under the menu bar... BUT... as a guest, once i log in.. it shows a ...... loading shoutbox... for a split second and then disappears.

jay.jarri

Quote from: jay.jarri on March 25, 2007, 06:14:49 AM
Quote from: nneonneo on March 19, 2007, 04:36:21 PM
@jay: In your case, this should not be too difficult.
1) In index.template.php, remove both the short Javascript fragment (the second block, *not* the first) and the actual div (the third block). Leave the first intact.
2) Under the lines // YSHOUT HERE
global $boardurl;

add
if(empty($context['current_board']))
3) In BoardIndex.template.php, add the line
echo '<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
at the point in the code where you want the shoutbox to appear. In your case, this will probably be after "global $context, $settings ..." at the 6th line of BoardIndex.template.php.


Thanks nneonneo, now i can see the shoutbox under the menu bar... BUT... as a guest, once i log in.. it shows a ...... loading shoutbox... for a split second and then disappears.


Sorry buds... it was an issue with my Theme Directory address being wrong... sorted it out and working perfectly fine..... THANK YOU VERY MUCH

nneonneo

@brianjw: I probably could do it without needing admin: just send the index.template.php and where you want it (PM?)

@barinov: If all you get upon entering the yshout/yshout.php URL is an empty page, then I strongly suggest checking your webserver (not forum) error log. Chances are it's a permissions thing on the script which is preventing execution (some servers will reject 755 chmod'ed scripts, while some require it)
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!

neolein2k

i also got the error "write line : abourted" .

If I excluded these lines it worked

/* while( !flock($handle, LOCK_EX) ) // just IN CASE two ppl write to it at once
{
usleep(50000);
$failcount++;
if($failcount > 20) die('Write error (writeLine); aborted'); // one second
}*/


could this be security risk?

jay.jarri

Hey nneonneo

Thanks a lot brother for all your quick help... I am however seeing these strange warnings in the shoutbox and am unable to understand what should i do. Please help

QuoteWarning: session_start() [function.session-start]: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 40
History Commands ExtendedHistory HideAdminLinks ReturnToShoutbox

Warning: session_start() [function.session-start]: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php:34) in /mounted-storage/home45a/sub003/sc33120-JNPB/www/yshout/yshout.php on line 40

[Yesterday at 11:30:41 PM] del  ban playerofdeath11: then you can watch anything you want

[Yesterday at 11:39:19 PM] del  ban sumita_tripathy: this really helped me in, i m thankful

[Today at 12:40:45 AM] del  ban chachaji: hello 2 everyone yaar i wanna c NAMASTEY LONDON can u pls add it thnx

[Today at 01:57:15 AM] del  ban rockerkapil: www.0288.com [nofollow]

[Today at 01:57:23 AM] del  ban rockerkapil: for online wnglish movies

[Today at 03:27:52 AM] del  ban uzair: helloooo

[Today at 03:28:05 AM] del  ban uzair: star lus working or not??

[Today at 12:03:12 PM] del  ban sumita_tripathy: why no updates on saat phere n banoongi mei teri dulhan?

[Today at 12:19:14 PM] del  ban Udhav: hey is BLIC 2007 available?

[Today at 12:39:08 PM] del  ban jay.jarri: what is BLIC ? Udhav

[Today at 12:42:28 PM] del  ban jay.jarri: NAMASTAY LONDON posted in the ONLINE section


Warning: Unknown: open(/sessions/sess_e546439a618c38f91b7c13131d3e3e21, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save [nofollow]_path is correct (/sessions) in Unknown on line 0


brianjw

@nneonneo:
* brianjw has pmd you.

nneonneo

@neolein2k: It's designed to prevent PHP from attempting to access the file twice, which causes some severe errors on my server. If you are getting this problem, perhaps the file locking is broken or something, but I can't speculate. If it works without those two lines, then so be it.

@jay.jarri: if this is your own server, then I suggest fixing the session data path ("/sessions" is usually off-limits on a Linux/UNIX box). If not, then contact your host.
Also, are there errors like those in the forum error log?
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!

bobbbb

Hello nneonneo sir,

I would like to customize the timestamp output. The current output is:

[Today at 02:13:52 AM]

I would like to instead have [3/27 2:13 AM]

If I remove theselines, will I be able to customize the timestamp value?:

       function preg_timeformat($matches)
       {
          // format: <timeval=(value)>
          return timeformat(intval($matches[1]));
       }




   $chatText=preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$chatText);




        echo preg_replace_callback("/<timeval=(\d+)>/","preg_timeformat",$text);


The yshout.php file is so confusing for me  :(

Thank you again for your help and hard work!

rayco

Hello nneonneo's :)

I've asked this before but if you dont mind, would you put the code in colatesi v3.0? If so i'll send you the index.themplate.php. Sorry for the trouble and thank you kindly.


rayco
smf  1.1.2


Trixter

Heres the error i get in Firefox and Seamonkey
Quote
Shoutbox loaded in another window. Retrying...

But i get this message in EI

Quote...loading shoutbox...

iv checked the GZ and the Yshout.php says nothing to do. i dont own the web server so i dont know how to check the error logs on it.

If you could please help me with this id be extreemly greatful.

PS iv checked all the pages on this thread but cant find any solution that works for the problem

nneonneo

@bobbbb: It's using the forum timestamp output. So, it outputs times in exactly the same format as the forum does. It would probably be better to change this in your profile options, unless you want to keep the forum timestamps the same.
If that's the case, then you would need to use http://ca3.php.net/strftime [strftime php function]

@rayco: I'm rather busy this week, so if I don't get to it immediately, don't be too surprised.

@Trixter: Clear your cookies. If that doesn't help, post a forum URL.
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!

Calaad

Thank for the update Nneonneo, it's work perfectly now :)


brianjw

So...whens the next version? ??? lol
* Brianjw thanks nneonneo for all his hard work and a personal thanks to him for getting my shoutbox setup.

Brianjw
;)

Adolfo

Since instructions given in this message seems to be broken (404 error), could please someone tell me how can I put the shoutbox in a side block or in a different page (i cannot leave it in frontpage for bandwidth problems)?

nneonneo

@brianjw: the next version is whenever I say it will be. Currently, I've only got one major fix (correct me if I should have more): the loadTheme fix for smilies. It's not a big enough fix for me to run off and perform the rather rigorous testing and reloading procedure that I usually employ, so until I find something to fix, it's staying at 1.06.

@Adolfo: Are you wanting it to be in TinyPortal? I was working (intermittently) on a solution, but none has manifested itself so far.
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!

brianjw

Quote from: nneonneo on March 28, 2007, 07:12:11 PM
@brianjw: the next version is whenever I say it will be. Currently, I've only got one major fix (correct me if I should have more): the loadTheme fix for smilies. It's not a big enough fix for me to run off and perform the rather rigorous testing and reloading procedure that I usually employ, so until I find something to fix, it's staying at 1.06.
These aren't bugs but there good feature ideas...
  • Shoutbox Admin section - To allow certain features or disable certain features.
  • History Removal Date - You set how many days for the history to stay and then it will automatically remove, or placed in some kindof shoutbox archive section that admins can only view and they can choose to allow members to see archive as well.
  • Disable - Allow the shoutbox to be disabled if activated (in file or admin section) and display a custom message that works just like maintenance mode. ;)
  • Built In Whos Online - Where the history and commands links are you can put a link that says, "Online". It could display who was online and what they were doing.
    ----Also in the existing whos online and maybe the built in one [if there is one], if someone is typing in the shoutbox...On that user it would say "Typing in shoutbox" ;)

    Let me know if these are good ideas because:
    * brianjw wants to know if they're good or not and if there is one of these that will be used in a future version. :)

    Brianjw

nneonneo

1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.
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!

brianjw

Quote from: nneonneo on March 28, 2007, 07:31:51 PM
1) that integration is difficult. It's a long-long term goal...
2) I will probably add that (log rotations)
3) Perhaps. Probably in the file.
4) Typing notification was disabled after I discovered how incredible the strain on my server was. I have the files, if you want them; it's activated through Javascript.
nah, i dont want my shoutbox to be different from the version that you have given us :)

Brianjw

Poisonhearts

I installed it but it doesn't show up anywhere...

Ryuoh

Quote from: akulion on December 28, 2006, 04:44:32 PM
Thanks :D

Here is the Tiny Portal Version of this mod for those who want to use the shout box in a side block.

Demo of TP side block shoutbox can be seen here
you MUST be logged in to see it
user: test
pass: test

Instead of the normal yshout.php file please use this modified one to compensate for the side block --> download yshout.php (modified)

Second thing you will need to do is carry out the modifications for index.template.php mentioned here BUT DO NOT include this last part in your index.template.php:

// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END


INSTEAD put the code below in a PHP block (left ot right block) and activate it only for members (not for guests because they wont be able to see the shoutbox either ways!


// YSHOUT HERE
echo '<div id="yshout"', empty($options['collapse_header']) ? '>' : ' style="display: none;">','...loading shoutbox...</div>';
// YSHOUT END


Does This still work?

Advertisement: