nneonneo's Shoutbox

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

Previous topic - Next topic

[unplugged]

I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.

If that makes no sense, do not hesitate to ask for help. ;)
« 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
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>

Just for clarification... where exactly I should put this JavaScript code? So that I could get the pop-up link right next to Shout box title?

nwobhm

Quote from: SunKing on December 13, 2008, 01:51:36 AM
I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.

If that makes no sense, do not hesitate to ask for help. ;)
Does this apply to all four themes that I have?
But anyway I just can't find the <style> portion from my index.template.php .... or I just have gone blind :)

[unplugged]

If your index.template.php does not have that code in it, then you might already have the yshout.css in your theme's main folder or in your theme's css folder. Also, check the default theme for the code in the index or the file in the default theme's main folder or css folder.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nwobhm

About the smilies.
Would it be possible to add "Moresmilies" link to shout box tool bar, where you can access the history, commands and so on?
Maybe that would work the same way as it works on postform, where you can get extra smilies into separate pop-up?

jinxnme

SunKing,
The last file didn't work either. Perhaps it just will not work with that theme.
I have made you an administrator on my forum. Have a look when you have the time.
I really appreciate all of your help!

[unplugged]

I have the shoutbox working with the impulse theme (shoutbox at the bottom) on my test site.
You can see it at http://www.empireofthesun.net/testsite1/index.php. Is this what you wanted?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



jinxnme

SunKing,
Ar you sick of me yet?
I've got the shoutbox header with the expand button, but there are no shouts to follow.

jmanfitter

Quote from: SunKing on December 13, 2008, 12:21:55 AM
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>. ;)

Thank you SunKing, you are a lifesafer and my wife thanks you, lol.
She was getting tired of hearing me.

[unplugged]

Glad I could help! (Tell her she's welcome. ;))
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nneonneo

@SunKing: Thank you so much for helping out. I haven't been too active because of finals, so I'm very, very glad that you are helping to field questions :)

@Nequil: For BBCode, add them to $bannedCode in yshout/settings.php, for commands, add to $bannedCommands.

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!

[unplugged]

Well....I figured I had been away for a while (updating my site to Beta 4) so was giving you a break).  :P
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nwobhm

Quote from: SunKing on December 13, 2008, 01:51:36 AM
I think you're problem with the shoutbox style is the fact that your css code for it resides in your index.template.php and not in a separate yshout.css file. You could either open index.template.php and copy everything from <style> to </style> (including the style tags themselves) and then paste that into the <head> section of your shoutbox.php or paste that code (without the <style> tags into a separate file named yshout.css, which would then be uploaded to your theme's css folder. If you do the latter, make sure the URL pointing to the new css file is correct in shoutbox.php.

If that makes no sense, do not hesitate to ask for help. ;)
I got it! There where few extra css folder refrences in the shoutbox.php code. I just deleted those and now pop-up will use the default theme.
Tricker part will be to get pop-up theme use the same theme as user uses, since I have 4 themes installed.

nwobhm

Yet another question about the pop-up :)

Where do i define the lineheight... shout width.. font size and so on?
Should those things put into shoutbox.php or does it use yshout.php settings?

[unplugged]

If your paths are set up right it will use all of the styles from yshout.php's styles. As far as the height and width of the popup window, that needs to be controlled using javascript as described here:

Quote from: nneonneo on December 10, 2008, 09:26:19 AM
<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>
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nwobhm

Quote from: SunKing on December 13, 2008, 03:30:12 PM
If your paths are set up right it will use all of the styles from yshout.php's styles. As far as the height and width of the popup window, that needs to be controlled using javascript as described here:

Quote from: nneonneo on December 10, 2008, 09:26:19 AM
<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 thought something like that, now I just need to find a good place for that pop-up link.

[unplugged]

Maybe something like this?



I thought it looked good there. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



nwobhm

#4717
Quote from: SunKing on December 13, 2008, 03:51:18 PM
Maybe something like this?



I thought it looked good there. ;)
YES!! That's where I want it!
I just can't find a place to put that java in place ::)

[unplugged]

This is my entire shoutbox function (adjust it to fit your needs - just thought i would give you an template to go by).

function shoutbox()
{
global $txt, $options, $settings, $context, $boardurl;

echo '<div class="catbg" style="padding: 5px 5px 5px 10px;border-top:1px solid #ffffff;"><a href="#" onclick="sbToggle(); return false;"><img id="upshrinkSB" src="', $settings['images_url'], '/', empty($options['collapse_shoutbox']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="Shrink or Expand the ShoutBox" align="bottom" /></a>&nbsp;';
// Block Title
echo '<span style="width:49%"></span><span>ShoutBox&nbsp;&nbsp;</span>
<span class="micro"><a href="javascript:window.open(\''.$boardurl.'/yshout/index.php\',\'Shoutbox\',\'width=600,height=400\');void(0);">View in Popup</a></span>';

echo '</div><div id="upshrinkSBHeader"', empty($options['collapse_shoutbox']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="1" class="bordercolor" style="margin-top: 1px;">
<tr>
<td class="windowbg" width="6%" align="left" valign="top">';
// SHOUTBOX HERE
global $txt,$context,$boarddir;
if(allowedTo('yshout_view'))
{
echo '<div id="yshout">';
include_once($boarddir.'/yshout/yshout.php');
echo '</div>';

echo'  <div>';
    require($boarddir.'/yshout/smiley.php');
      loadSmileys();
        echo '
          <div id="smiley_pic">';
          printSmileys('shout_form','shout_text');
        echo '
          </div>
            <script type="text/javascript">
                     //Syntax: var uniquevar=new animatedcollapse("DIV_id", animatetime_milisec, enablepersist(true/false), [initialstate] )
                     var collapse1=new animatedcollapse("smiley_pic", 1000, false)
            </script>
          </div>';
}
elseif($context['user']['is_guest'])
echo $txt['yshout_no_guests'];
// SHOUTBOX END
echo '
</td>
</tr>
</table></div>';
}
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Nequil

#4719
Quote from: nneonneo
@Nequil: For BBCode, add them to $bannedCode in yshout/settings.php, for commands, add to $bannedCommands.

thanks all works, but /me cant be blocked?

Quote// Note that since SMF recognizes /me by default, it can't be blocked.

Advertisement: