nneonneo's Shoutbox

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

Previous topic - Next topic

denio

I set $updateTimeout currently set at "0" and shoutbox disappear but more rarely

I $updateTimeout set at 60,  20, 100, 200 and sb still disappear. There is best when i set $updateTimeout at 0.




captain_jack

give a man a fish and he eats for a day
teach him to fish and he will never go hungry
this is true but i really was so hungry
thank you and if you dont mind i would like to use your paypal link as well  to thank you for your patience :P

nneonneo

denio, what's your hosts' PHP script timeout? Try 10. The timeout might be 15 seconds. 0 is too short -- it may overload the server!

captain_jack: Thanks. What I did was take an unmodified yshout.php, added your settings and shout reversal, then followed step 5 of the smiley guide. Hope that helps!
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!

denio

#2283
I know but I no exit, 80% users my forum have Firefox and I set timeout more than 0 shoutbox in firefox there will be disappearing.

PS Sorry if my English is not good.

Adish - (F.L.A.M.E.R)

Hello,

I am using the theme phobos from tinyportal for my smf forum...

i need to know what the theme edits are....

in smf package praser there is no option for 1.1.5 hence i dont know what are the theme edits....

please let me know what are they and what changes i have to make....

Thanks...

Alan S

Using 2.0 Beta 3 public , I just installed it and all the tests passed etc... , i also followed the advice on the mod site for the loading shoutbox error but its still there , it doesnt move at all it just says loading shoutbox any ideas on whats wrong?
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

GMCbris

I just installed this in minutes to a custom theme right into the news box

VERY happy thank

GMC

Pratt

Quote from: nneonneo on August 09, 2007, 07:22:07 PM
Right idea, Brian, but not quite the right implementation.

No code is really required; it's just an HTML file with the board URL interpolated in a few places:
<?php
   $boardurl 
'http://forum.com/path/to/forum';
   echo 
'<html><head><title>Shoutbox</title>
   <script src="'
,$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
   <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 = "'
$boardurl'";

   </script>
   <script src="'
,$boardurl,'/yshout/js/yshout.js?Aug92007" 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;
      }
      #shouts .owner a {
         color: #F00;
      }
      #shouts .moderator a {
         color: #00F;
      }
   </style>
   </head>
   <body>
   <br /><b>Shout Box</b><br /><br />
   <div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>'
;
?>



As you can see, this is basically a thin HTML page wrapping the usual code from index.template.php. It causes the client to load all the necessary JS, and the client is then responsible for calling yshout.

All you need to do, odavilar, is change $boardurl up top (for such a simple script, I'm not going to run off to SSI just to check the board URL ;) ). Then, place the script in any web-accessible location and *boom* it's there.

This code is largely copied from glxpa's solution (http://www.simplemachines.org/community/index.php?topic=137508.msg1170765#msg1170765) and cleaned up somewhat to avoid missing variables. It has also been edited to include a small fix mentioned by me later in the thread.

*Note: Using a *relative* link (e.g. /forum/, instead of http://moo.com/forum/) for $boardurl is probably safer so that minor domain mismatches (www.xxx.yyy vs. xxx.yyy) don't prevent the script from working.

Hi There!
Ive been trying to get this working for a while now, buy i still cant :(
My idea es to have the shoutbox load on another window.

I copied the exact same code as above on a php page, The shoutbox loads and I can see the "shouts". My problem is that whenever I try to shout, nothing happens :(! I write some text and then clicked on the "shout!" button, but there is no reaction :(

Any Ideas?
Im using 2.0 beta 3.1

Jelle Mees

Quote from: Alan S on May 14, 2008, 05:56:53 PM
Using 2.0 Beta 3 public , I just installed it and all the tests passed etc... , i also followed the advice on the mod site for the loading shoutbox error but its still there , it doesnt move at all it just says loading shoutbox any ideas on whats wrong?

I had the same problem. Look at the yshout folder via FTP. Look for a "js" and a "chats" folder. If they are not there, the shoutbox will keep on saying "loading" forever. If the folders aren't there, extract them from the .zip file and upload them manually to the yshout folder.

GMCbris

Quote from: ameo on May 07, 2008, 11:46:19 AM
I 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.


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

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 :

// 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:
In News box put this code instead putting second code somewhere else:

<div id="yshout">',$txt['yshout_loading'],'

And save it.

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]
&
2. Show news fader on board index [check it]

3. fading delay - set to 0

Click save and you're ready to go.


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. 


I guess that's it. I hope it shall be helpful to at least someone.


This is great and I love it

Anyone know how to make the News Box collapsible

Thanks

GMC

ameo

OK. I see that some of you people are trying to put shoutbox on different page.
Really proper way to do it is only one, and includes one more mod. This mod is called
custom actions mod and will make your life so much more easier.

When you download it, and upload it, then install it, go to
Configuration » Features and options » Custom Actions


There you'll see - Add an action
Click on it.

Under name write: shoutbox
Under type choose: PHP
Under page title: shoutbox   
Under code you shall use code that is written by creator of this shoutbox itself - one and only - nneonneo:

Please note first line: YOU NEED TO EDIT IT 2 MATCH NAME OF YOUR WEB-PAGE:

    $boardurl = 'http://www.webpage.com/forum/yshout.php';
    echo '<html><head><title>Shoutbox</title>
    <script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
    <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 = "', $boardurl, '";

    </script>
    <script src="',$boardurl,'/yshout/js/yshout.js?Aug92007" 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;
        }
        #shouts .owner a {
            color: #F00;
        }
        #shouts .moderator a {
            color: #00F;
        }
    </style>
    </head>
    <body>
    <br /><b>Shout Box</b><br /><br />
    <div id="yshout">Shoutbox loading...<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div></body></html>';
?>


Now click on SAVE, then click Go to page. Shoutbox should now be displayed.
If it's not, you should read first post of this theme for usual troubleshooting



Now go to Configuration » Current theme » Themes and settings
Choose Modify the index template:

Find something like this:
   
// Show the [home] button.
   echo   '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';

Add THIS:
   //Show the [Shoutbox] button
   echo   '<li><a href="', $scripturl, '?action=shoutbox.php">Shoutbox</a></li>';

If you want it to be displayed before help;
   // Show the [help] button.
   echo   '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

Don't forget to save changes.

And this is it people. I believe it shall do the trick perfectly.
If it doesn't you can kill me or PM me.  :P
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Ashu

hey is there any way to restrict guests from posting in shoutbox???

ameo

In yshout.php find this and do what it says:

// Guest usage. Set to false if you don't want guests to use the shoutbox: they will not be able to read it or post to it.
$allowGuests=true;

change to

$allowGuests=false;
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

Ashu

oh thanx. you rock...is there any way to show it in a board? i mean just like you did into news. but not into news coz i want to show news too. and i have 4 news and they show randomly. so is there any way to sho it like a board?

ameo

yes there is, and that depends on the theme you're using. you should say what theme you're using, or just post link to your forum. you can also have it on separate page, if you wish, [or not if you don't wish to]. usual instructions for displaying shoutbox and troubleshooting are on first post of this thread.
antechinus:
QuoteIf you are dying for a solution it may be wise to seek medical attention.
Get some Awesome Smileys for your forum

|±(ಠ_ಠ
)±|

[unplugged]

#2295
With very little effort, you can put the shoutbox pretty much wherever you want it. There are, of course, going to be exceptions, depending on which theme your are wanting to integrate it into. I have the shoutbox and the news both in the user info area. See here.

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



Ashu

i tried putting this some where else but its showing error..

      // YSHOUT HERE
      echo '
                     <br /><b>Shout Box</b><br /><br />
                     <div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
      // YSHOUT END

and i m using DarkBreak by DzinerStudio theme.

[unplugged]

what error is it showing you?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Ashu

#2298
template pharser error or something like that....i can give you my index.template.php if you want ...
Edit: i attached my file here

[unplugged]

Well, I guess the easiest thing to try to fix it would be to add     ';    on the line before // YHSOUT HERE
and add     echo'     on the line after // YSHOUT END.

If that doesn't do the trick, you may want to attach your file you are trying to edit so someone could take a look at it.  :D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Advertisement: