News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

Boby_

One more problem - for some reason there is an error when function unloadChat() is called - "request is null or not an object" or something like this.  Because of this the chat cannot be uploaded and this causes problems with forum's connection to the database.

Thanatos0042

#5801
Just an FYI

I have downloaded and installed SMF 2.0 RC2 and the advanced shoutbox 1.22

I have -NO- mods installed and installed this first and I am getting the same issue as lorddusk.

I have manually/visually verified every install edit is correct and where it should be.

I am a complete novice with SMF, but I was pretty decent at installing/troubleshooting mods for my vBulletin and did that for 8 years, so I am not lost at editing files.

(edit add:) It's worth noting, after installing Simple Portal, on the main/default index:  if I refresh the page a whole bunch of times I very briefly see a tiny error message pop up on the line below the word shoutbox.

Error: No Settings

Don't know if that will help or not.

psynx

hi,

i have this mod installed, and i put my shoutbox on my simple portal left block.

problem is...when there are sentences or messages that are very long, a horizontal scroll bar will appear and to read it i have to use the scroll bar.

what i want is when there are long messages it would just break to the next line rather than the a long message appearing horizontally.

anyone?

im using smf ver. 1.1.11
shoutbox ver   - SB_1.22

[unplugged]

Try this:

Open yshout.css (or check the top of your index.template.php for some versions) and find #yshout #shouts {

Just beneath this line add a new line containing word-wrap:break-word; That should then break the sentences (or words if needed) and drop them down to the next line.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Chen Zhen

#5804
Quote from: psynx on January 22, 2010, 09:17:03 AM
hi,

i have this mod installed, and i put my shoutbox on my simple portal left block.

problem is...when there are sentences or messages that are very long, a horizontal scroll bar will appear and to read it i have to use the scroll bar.

what i want is when there are long messages it would just break to the next line rather than the a long message appearing horizontally.

anyone?

im using smf ver. 1.1.11
shoutbox ver   - SB_1.22

I'm not exactly sure how you have it set up...

You may have to delete the yshout style code from your themes index.template.php before using this...

Side block for nneonneo shoutbox - SMF v1.1.1x (without smileys)


// YSHOUT - nneonneo shoutbox side-block for SMF
global $txt,$context,$boarddir, $boardurl, shoutFile;
// YSHOUT START -  style code   
   $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: 13px;
         overflow: hidden;
      }
      #yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
      }
      #yshout #shouts {
                         overflow: visible;
                         width: 100%;     
                         height: 300px;                     
      }
      #yshout .shout { /* one shout */
         margin: 0 0 0; /* Top Bottom Linespacing */
         line-height: 1;
      }
      #yshout .shout-timestamp {
                        font-size: 0pt;
         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: #cccccc;
         width: 90px;
         margin-right: 2px;
      }
      #yshout #shout-text {
         width: 130px;
         margin-right: 2px;
      }
      #yshout #shout-button {
         width: 55px;
      }
      #yshout .shout-invalid { /* invalid shout (shout textbox) */
         background: #FFFDD1;
      }
   </style>';       
   // YSHOUT END -  style code

   // YSHOUT HERE - shoutbox initialize code
 
   if(allowedTo('yshout_view'))
   {     
      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


... you can also set up the permissions on your block not to allow certain user groups to view it such disallowing guests.
I adjusted it so that the timestamp is not visible for the side block (imao - not enough room to show it properly) but it is still visible in the history file.

UD

\\Edit -Ignore the above code... I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Thanatos0042

Quote from: SunKing on January 22, 2010, 10:47:19 AM
Try this:

Open yshout.css (or check the top of your index.template.php for some versions) and find #yshout #shouts {

Just beneath this line add a new line containing word-wrap:break-word; That should then break the sentences (or words if needed) and drop them down to the next line.

That DOES fix the problem...

But it creates a new one.

Now when I submit a shout..the shout box keeps growing and growing with every post.

psynx

hello,

thanks for the reply.
i am confuse on where to put those codes you guys have mentioned?

i have added the codes which Sunking says.
and also i adjusted the width and height of my shoutbox.
experimenting on this code below#yshout #shouts {
word-wrap:break-word;
         overflow: auto;
         width: 235px;       /* the width you want to display */
         height: 200px;     /* the height you want to display */


overall i have this yshout codes in 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

// 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 #shouts {
word-wrap:break-word;
         overflow: auto;
         width: 235px;       /* the width you want to display */
         height: 200px;     /* the height you want to display */
}
#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: 215px;
margin-right: 5px;
}
#yshout #shout-button {
width: 55px;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
// YSHOUT END - <head> code

[unplugged]

Not sure why it would start doing that..but the fix for that would be to add 2 lines of code to the #yshout #shout class:

height:180px;
overflow:auto;


You can set the 180px obviously to whatever height you want.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



[unplugged]

@psynx

The location of the css for this shoutbox varies depending on the version. You obviously have the css in the top of your index.template.php (looks like it's in there twice in fact). If you attach your index.template.php, I will make the edits for you and remove the second instance of the yshout. ;)
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



psynx

alright...

please take a loot at the attached files.

my index.template.php

Chen Zhen

#5810
IMAO - I find it better to remove the style script from the index.template.php file altogether and just put it in the block itself.
This way, no matter where you locate a block to view the shoutbox, the style can be edited to have it display properly (top/bottom or sides).

UD


\\Edit -I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Chen Zhen

Quote from: psynx on January 22, 2010, 01:35:27 PM
hello,

thanks for the reply.
i am confuse on where to put those codes you guys have mentioned?

i have added the codes which Sunking says.
and also i adjusted the width and height of my shoutbox.
experimenting on this code below#yshout #shouts {
word-wrap:break-word;
         overflow: auto;
         width: 235px;       /* the width you want to display */
         height: 200px;     /* the height you want to display */





Try using a percentage for your width instead of px

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Thanatos0042

Quote from: SunKing on January 22, 2010, 01:36:08 PM
Not sure why it would start doing that..but the fix for that would be to add 2 lines of code to the #yshout #shout class:

height:180px;
overflow:auto;


You can set the 180px obviously to whatever height you want.

I'm not finding a 'class' paired with shout when I text search in the yshout.css or the index.template.

Also...I was switching between themes..and it is still broken with the default rounted theme...but it looks right on the core-theme (save the whole ever growing box)

Tell you what, would you like an admin account to come look for yourself?

psynx

@01_Underdog

i did try the code you say but i got a template parse error.



[unplugged]

@Thanatos0042
Certainly. I can get you squared away in no time.

@psynx
File attached, although everything looked in place already aside from the doubled code, which I removed.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Chen Zhen

#5815
Quote from: psynx on January 22, 2010, 02:20:32 PM
@01_Underdog

i did try the code you say but i got a template parse error.

The code I gave yo above was to be put into a php block.. it would not crash your board.. if there were any errors it would just show in the block .. and there aren't any as far as I can see.

If you are just talking about editing the width of shouts for the style in your themes index.template.php then you must not have entered the code properly.

I have a side block with smileys that I use myself... I also have one for SMF v1.1.1x which I have tested and works just fine.

Try this php code in your side block:


// YSHOUT - nneonneo shoutbox with smiley bar - portal block code for smf 1.1.x

// Put smiley.php and animatedcollapse.js in a folder named mymod and put this folder in your main directory
// The images for the expand/collapse of the smiley bar can be edited below (default are images from smiley folder)

global $context, $txt, $settings, $boardurl,$shoutFile, $boarddir;
$smiley_bar1 = $boardurl . '/Smileys/default/smiley.gif';
$smiley_bar2 = $boardurl . '/Smileys/default/undecided.gif';

// YSHOUT START -  style code   
   $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: 13px;
         overflow: hidden;
      }
      #yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
      }
      #yshout #shouts {
                         overflow: visible;
                         width: 100%;     
                         height: 300px;                     
      }
      #yshout .shout { /* one shout */
         margin: 0 0 0; /* Top Bottom Linespacing */
         line-height: 1;
      }
      #yshout .shout-timestamp {
                        font-size: 0pt;
         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: #cccccc;
         width: 90px;
         margin-right: 2px;
      }
      #yshout #shout-text {
         width: 130px;
         margin-right: 2px;
      }
      #yshout #shout-button {
         width: 55px;
      }
      #yshout .shout-invalid { /* invalid shout (shout textbox) */
         background: #FFFDD1;
      }
   </style>';     
   // YSHOUT END -  style code


      // YSHOUT - Shoutbox initialize code (using animated collapse for the smiley bar) - START         
   if(allowedTo('yshout_view'))
   {
echo '
<script src="',$boardurl,'/mymod/animatedcollapse.js" type="text/javascript"></script>
     <div align="left">
<a href="javascript:collapse1.slideup()"><img src="', $smiley_bar2 , '" alt="Close Smiley" title="Close Smiley" style="margin-right: 2ex;" align="right" /></img></a>
<a href="javascript:collapse1.slidedown()"><img src="', $smiley_bar1 , '" alt="Open Smiley" title="Open Smiley" style="margin-right: 2ex;" align="right" /></img></a>';

                     require('mymod/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>';
      echo '<div id="yshout">';
      include_once($boarddir.'/yshout/yshout.php');
      echo '</div>';
   }
   if ($context['user']['is_guest'])
{
      echo $txt['yshout_no_guests'];
}
   // YSHOUT - shoutbox initialize code - END   


UD

\\Edit -Ignore the above code... I was in error... Although it works, it is not proper and will give errors if style codes are not put in the head code (in index.template.php).
I have come up with another way of having multiple style edits within the head code... posted on my site for those that want to know how.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

psynx

Database error in block code. Please check the code.

Thanatos0042

PM sent with details.

I have go leave for awhile, so I'll check back later when I am home.

thanks again for all your assistance.

[unplugged]

Well, that explains why you're not replying in the shoutbox.... ;D

I can move it around some more if you need. Just let me know if that is what you wanted.
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Chen Zhen

Quote from: psynx on January 22, 2010, 02:36:13 PM
Database error in block code. Please check the code.

I am testing it now and it seems to be working ok.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Advertisement: