News:

SMF 2.1.4 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

gunn3r

Because I'm running SMF 2.0 b3 (I don't particularly like b4), I'm running 1.20 of the shoutbox. Should I install a more recent version? Would that solve it?
hxxp:www.gunn3rgames.net/informer.html [nonactive]

gunn3r

I actually got it to work. I messed around with some of the code for my custom theme and now it works. But now it takes the footer off of every page except the main one. Any suggestions as to how I should get my footer back? Attached is my index.template.php (it's not clean)
hxxp:www.gunn3rgames.net/informer.html [nonactive]

n01d3a

@sunking
I don't care how "rookie" your coding is, as long as it works. I will try it shortly. thanks for posting what you did so I can fix my problems as well.

n01d3a

@sunking
Thats works great!! Thanks, I hope you don't mind but I just copied you .php file.
Did that also get your theme to show? I am not really sure how the theme would affect the appearance of shoutbox, but my shoutbox does not appear to look anydifferent.

@nneo
Just a question, Is shoutbox supposed to be compatible with IE. It does not bug me, I mainly use firefox, but I am wondering about others who may only use IE.
Oh and Great mod.

jinxnme

Nneo,
I just installed your shoutbox. I then modified my current theme and now t wont work. This is what I'm getting:
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Any suggestions?
Thanks,
Cheryl

[unplugged]

Did it work with the shoutbox before you modified your theme? What files did you modify for your custom theme?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



jinxnme

It works fine with the default theme.

I modified a custom theme by copying that long code and inserting it where it told me. I then took that code back out and the theme won't work.

I am planning on uploading a fresh copy of "index.template.php" so that I can get that theme back. The theme is Impulse. I really like it for my board and would love to use it with this mod.

thanks!

[unplugged]

I am at work now ;)  but if you attach the clean index.template.php from your custom theme, I can edit it for you when I get home. Also, where exactly do you want the shoutbox?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



kr5323

Solved my problem by uninstalling the version 1.15 by 1.22


Greetings.

nwobhm

@Sunking
I went to your site to see how this shoutbox works for you and how that pop-up window works.
That looked very cool. I've been trying to get it work also as pop-up but so far I haven't had any luck with it. I did put the yshout code to seprate html file, but something is still wrong.
Could that yout shoubox.php work for me? I'm using 1.1.7 smf.

jinxnme

SunKing,
Thanks. I think that the shoutbox would go best at the bottom.
I've attached the file.
Thanks Again!!

Nequil

@nneonneo

How I can disable bbcode like "img", "quote" and commands "/pi" and "/me" in shoutbox?

n01d3a

@nwobhm
I used his shoutbox.php, just copied and everything worked. As far as I know, the files are the same for 1.1.7 and 2.0. The only thing, and I am not sure if this matters, but I have advanced shoutbox. I am not sure what version sunking used. Another questions, did you put a seperate link to the new php file. you can use either of these codes supplied by nneonneo.

<a href="http://domain.com/forum/yshout/index.php [nofollow]" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400' [nofollow])">Shoutbox</a>

*I had to change the location to point to the shoutbox.php file i created.

[unplugged]

#4693
@nwobhm

I would think the shoutbox.php would work for either version, and because it's a separate file, it cannot damage anything in the forum.  :P

@n01d3a

I use the AdvSB1.22.  ;D

@ jinxnme

I will get on that right away. And the way it is set up you would only need to move shoutbox(); to put it ANYWHERE you wanted. :D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



[unplugged]

@ jinxnme

I have attached the edited index.template.php. Everything should be in order. Custom themes really vary in how they are set up, so there may be an issue or two. If for some reason the shoutbox "breaks" the forum, simply open index.template.php and search for shoutbox(); and put // in front of it. That will fix the forum (though without the shoutbox) until a solution is reached  -  pretty simple, huh?

Also, if the shoutbox isn't in exactly the right spot, you can change it's location by moving shoutbox(); to another spot in the code.
I will also be happy to help iron out any issues you may have if need be. Just provide a link to the site.
Enjoy!! ;D
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



jinxnme

Sunking,

Thank you for giving me my template back. The shoutbox code is in the inde.template.php file, but the shoutbox does not show up.

The URL of the forum is hxxp:www.lesbianfic.com/SMF [nonactive]

Currently, only myself is set to use the theme in question (Impulse). You will probably need to register and then change your theme to see what I'm looking at.

Thank you so much for all your help with this.

jmanfitter

 :'( :'( can someone help me.
I have a problem in getting the shoutbox to work.
I am kinda new to php, but know a little.
Keep getting a parse error page after installing index.template.
here is the code with the problem, I can't see where it is, any suggestions??
Got me stumped.
topics, respectively.
if (!empty($context['current_topic']))
echo '
<link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
<link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

// If we're in a board, or a topic for that matter, the index will be the board's index.
// 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
if (!empty($context['current_board']))
echo '
<link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

// We'll have to use the cookie to remember the header...
if ($context['user']['is_guest'])
$options['collapse_header'] = !empty($_COOKIE['upshrink']);

// Output any remaining


And here

<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
// YSHOUT HERE - shoutbox code
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// YSHOUT END - shoutbox code
</form>';
}

echo '
</td>
</tr>
</table>
</td>
</tr>
</table>';

echo '
<table id="upshrinkHeader2"', empty($options['collapse_header'])




[unplugged]

Your problem is in this section here:

<input type="hidden" name="hash_passwrd" value="" />
// YSHOUT HERE - shoutbox code
   global $txt,$context,$boarddir;
   if(allowedTo('yshout_view'))
   {
      echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
      echo '<div id="yshout">';
      include_once($boarddir.'/yshout/yshout.php');
      echo '</div>';
   }
   elseif($context['user']['is_guest'])
      echo $txt['yshout_no_guests'];
   // YSHOUT END - shoutbox code
</form>';


It needs to look like this:

<input type="hidden" name="hash_passwrd" value="" />';
// YSHOUT HERE - shoutbox code
   global $txt,$context,$boarddir;
   if(allowedTo('yshout_view'))
   {
      echo '<br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />';
      echo '<div id="yshout">';
      include_once($boarddir.'/yshout/yshout.php');
      echo '</div>';
   }
   elseif($context['user']['is_guest'])
      echo $txt['yshout_no_guests'];
   // YSHOUT END - shoutbox code
echo'</form>';


You were just missing the '; after <input type="hidden" name="hash_passwrd" value="" /> and the echo' before </form>. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



[unplugged]

@ jinxnme

Some how I overlooked your post.  :o Sorry about that. I will have a look right now to see what needs to be done.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nwobhm

Quote from: n01d3a on December 12, 2008, 04:26:03 PM
@nwobhm
I used his shoutbox.php, just copied and everything worked. As far as I know, the files are the same for 1.1.7 and 2.0. The only thing, and I am not sure if this matters, but I have advanced shoutbox. I am not sure what version sunking used. Another questions, did you put a seperate link to the new php file. you can use either of these codes supplied by nneonneo.

<a href="http://domain.com/forum/yshout/index.php" target="_blank">Shoutbox</a>
This should popup a new window with the shoutbox.
To get fancier, you can adjust the link using JavaScript so the popup window is any size you choose, for example
<a href="javascript:window.open('http://domain.com/forum/yshout/index.php','Shoutbox','width=600,height=400')">Shoutbox</a>

*I had to change the location to point to the shoutbox.php file i created.
I copied that file also and put it into root directory. Shoutbox it self does work, but theme isn't working.
And yes, I will use this pop-up feature via separate link, but I haven't put that link visible to other members.
But in the attachment you can see how my shoutbox looks in pop-up.
Never mind the errors since I haven't cleaned the shoubox.php from the smiley code.

Advertisement: