• Welcome to Simple Machines Community Forum. Please login or sign up.

nneonneo's Shoutbox

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

Previous topic - Next topic

Wiejeben

It isn't available for SMF 2.0 RC2 ?

Zwerko

I have placed code exactly as mentioned in Installation Instructions for 2.0 RC2, I checked out, all files, all code is on place where it should be. I've attached index.template.php
Quote from: SunKing on February 28, 2010, 11:25:30 AM
Two things come to mind straight away for that. One, either the css for the shoutbox is missing, or the link to it is pointing to the wrong location, or 2) where you have added the code that calls the shoutbox needs to be moved (it's been placed inside an area that is causing the odd layout).

To fix, check that the css is indeed where it should be and linked to correctly, and/or adjust the position of the include block to a new location. This last part may take a few tries on a custom theme to get it just right.

Help me on this one, where do I look for css from yshout? I can't find him

[unplugged]

The file you attached has no code for the shoutbox whatsoever. The css for the shoutbox will be located in one of two places. It will either have its own css file at /yourtheme/css/yshout.css (would be installed into the default theme's folder initially), or the css will be added to the <head></head> section of your theme's index.template.php (again, added to the default theme initially).
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Torch068

I apologize if this has been answered before. This thread is fairly long and I am not sure what exactly to search for (though I did try google).

I have 1.22 SB installed. It worked the first day I installed it, but now I can't send "shouts" even as an Administrator. My name (Exodus) is greyed out, I can type things into the box, but hitting enter/shout doesn't send anything.

The shoutbox should be open to guests. Again, it worked on the first day, but I am not sure what's up now or how to fix it. There is no history because in an attempt to fix this I uninstalled the mod and attempted to reinstall it, but that did not solve the problem.

exodusdb.com/smf/index.php

[unplugged]

Welcome to SMF!

It seems to be something with the shoutbox when called from the index.template.php. If I access the shoutbox via /yshout/index.php, I am able to shout just fine. This tells me that the mod itself is installed fine and chmod permissions seem to be OK. Have you installed any other mods since it was working, such as Pretty URLs or maybe something utilizing some javascript (it may be an onload conflict)?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Zwerko

Quote from: SunKing on March 01, 2010, 07:23:48 AM
The file you attached has no code for the shoutbox whatsoever. The css for the shoutbox will be located in one of two places. It will either have its own css file at /yourtheme/css/yshout.css (would be installed into the default theme's folder initially), or the css will be added to the <head></head> section of your theme's index.template.php (again, added to the default theme initially).
Sorry my bad, wrong template, I attached now the right one. I found that css is in first block of code that start with #yshout. But I can't figure out whats wrong. As I said forum is latest 2.0 RC2 and only 3 mod installed so far(Ad mod, & arcade)

Torch068

Quote from: SunKing on March 02, 2010, 02:29:07 AM
Welcome to SMF!

It seems to be something with the shoutbox when called from the index.template.php. If I access the shoutbox via /yshout/index.php, I am able to shout just fine. This tells me that the mod itself is installed fine and chmod permissions seem to be OK. Have you installed any other mods since it was working, such as Pretty URLs or maybe something utilizing some javascript (it may be an onload conflict)?

Hmm, I see it works directly. I installed SMF Arcade and SMF Gallery mods afterwords. The only thing I remember doing, I went to change the permissions to allow guests and such to use the shoutbox, thats around when it seem to stop working. I thought maybe I set the permissions wrong, but I am an Administrator so...

If it helps here is the index.template.php

[unplugged]

@Zwerko
The css for it is indeed at the top of the index.template.php, but I believe the problem with your layout was caused simply by the position of the shoutbox. I moved it so that it now extends the width of the header and attached the file below.

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



[unplugged]

@Torch068

I think you problem may lie in the way the URLs are being treated. When viewing the sourcecode for the yshout/yshout.php, the paths to the shoutbox files are relative (../yshout/yshout.php), but when viewing the sourcecode for your main site, the paths are full paths (www.yoursite.com/smf/yshout/index.php). The relative paths work, as you can see, but the full paths do not want to cooperate. I have attached your index.template.php with the yshout paths edited to be relative. Make a backup of the existing index.template.php and then upload this attached one so that it overwrites what is there.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Zwerko

Quote from: SunKing on March 02, 2010, 02:50:00 PM
@Zwerko
The css for it is indeed at the top of the index.template.php, but I believe the problem with your layout was caused simply by the position of the shoutbox. I moved it so that it now extends the width of the header and attached the file below.

Enjoy.

Yessss that's do the trick :) Now box is moved to the right and I reduced lines to 5 so everything looks match nicer.   Thanks a lot SunKing :)

[unplugged]

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



Torch068

Using the template file you submitted does not work. But I think we're on the right path with the suggestion. Because it definitely works if you go directly to hxxp:www.exodusdb.com/smf/yshout/index.php [nonactive]

JamesWC

I've just noticed the mod's throwing JavaScript errors. (I mainly use Firefox which doesn't flag them like IE does.)

Quote'Class' is undefined
moo.ajax.js
Code: 0
Line: 4
Char: 1
URI: http://www.mysite.com/forums/yshout/js/moo.ajax.js

'board_url' is undefined
yshout.js
Code: 0
Line: 16
Char: 1
URI: http://www.mysite.com/forums/yshout/js/yshout.js?July062008

How can I fix this?

JamesWC

Sorry to bump this myself, but it's actually holding up an entire relaunch for my site. Is there any more information I can provide that would help someone identify a solution for these JavaScript errors?

In addition to the two above, I also get this one when browsing the forum on any page that doesn't contain the shoutbox itself (as detailed on the previous page of this topic, I only display the shoutbox on a Custom Action Page).

QuoteMessage: Object expected
Line: 78
Char: 2
Code: 0
URI: http://www.mysite.com/forums/yshout/js/yshout.js?July062008

It seems it's all quite a mess...

Here's what's in the <head> section of my index.template.php:

// 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 {
color: #666666;
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


And here's what's on my Custom Action Page:

// begin yshout
echo '<div style="margin:0;width:100%;height:200px;overflow:auto;overflow-x:hidden;line-height: 150%; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 11px;">';
    $boardurl = 'http://www.mysite.com/forums';
    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 = "', $boardurl, '";

    </script>
    <script src="',$boardurl,'/yshout/js/yshout.js?Aug92007" type="text/javascript"></script>
    <script type="text/javascript">var shoutFile = "home.txt";</script>
    <div id="yshout">Shoutbox loading...<br /><br />If it doesn\'t load, consider updating your browser.<br /><br /><br /><br /><br /><br /><br /><br /><br /></div>
</div>';
// end yshout


The shoutbox displays and works perfectly well, so these errors don't seem to be harming the functionality. But it doesn't look good when visitors have that yellow exclamation mark in the bottom-left corner of their Internet Explorer signifying JavaScript errors. Is there some way I can at least suppress these errors, that are doing no harm beyond merely existing?

Any help appreciated, thanks.

tonnybarros

How to remove the chat from the top and bring up the end of the page?

tonnybarros


[unplugged]

Quote from: tonnybarros on March 07, 2010, 09:11:37 PM
How to remove the chat from the top and bring up the end of the page?

Hmmmm. Maybe a slight bit more detail is in order here. Maybe it's just me and it is late here. But that request has sort of a broad scope of what you could mean.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



weekend camper

Straight up (re)install on 2.0RC3?

aka, is it working with the latest release?

qubbah

Quote from: nneonneo on November 26, 2008, 06:28:53 PM


To open links in the same window, use
"[iurl=http://" instead of "[url=http://".

what is this mean?

qubbah

Quote from: nneonneo on August 19, 2007, 03:39:56 PM
Adding sound:
Get SoundManager2 (http://www.schillmania.com/projects/soundmanager2/)
Place soundmanager2.js in yshout/js
Place soundmanager2.swf in yshout/
Place the desired sound in yshout/ and change the URL below to match (MUST BE MP3!)

Place the following code after
<script src="',$boardurl,'/yshout/js/yshout.js?July062008" type="text/javascript"></script>
in index.template.php:
<script src="',$boardurl,'/yshout/js/soundmanager2.js" type="text/javascript"></script>
<script type="text/javascript">soundManager.url="',$boardurl,'/yshout/";
soundManager.debugMode = false;
soundManager.consoleOnly = false;
soundManager.onload = function() {
soundManager.createSound({id:"sound", url:"', $boardurl, '/yshout/sound.mp3", autoPlay:false});
}</script>


(if it does not work, you may have an older soundmanager2, try adding "soundmanager2.swf" after soundManager.url="',$boardurl,'/yshout/)

In yshout/js/yshout.js, after
function shoutDone() {
add
$('shouts').innerHTML = this.transport.responseText;
oldShouts = $('shouts').innerHTML;

(that step is optional, but it stops the sound when you shout, and only sounds when others shout)
Replace
var request;
// This gets called each refresh; it reloads the shoutboxes content.

by

function ltrim(text) {
return text.replace(/^\s*/g,'');
}
var request;
// This gets called each refresh; it reloads the shoutboxes content.
var oldShouts = null;
function doRefresh() {
if (oldShouts != null && ltrim(oldShouts) != ltrim($("shouts").innerHTML))
soundManager.play('sound');
oldShouts = $("shouts").innerHTML;


EDIT: Update for newer Soundmanager version (dated Mar 31 2008)
EDIT2: Complete instructions.
EDIT3: Update for new shoutbox versions (1.20+)

The sound only play when refresh the whole webpage.. not when enter new post in shoutbox..

Advertisement: