News:

Wondering if this will always be free?  See why free is better.

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

Rep99099

Im using ADVSB1.22 with the latest SMF 2.0 and Simple Portal and ahve a few questions...

1.) can i put the timestamp on the same line before the users name or leave ti where it is and make the font size pretty small?

I have both //yshout here codes that are suppose to be in my themes index.template.php in a simple portal block, and not in my index.template.php file...

2.)i want to add smiley icon and bar with the other history icons etc, up top...the tut i found was no help...

3.)the big bold letters SHOUTBOX up top how do i change or remove them?
Cant seem to find out where...

TY!

Chen Zhen

#5761
Quote from: Rep99099 on January 09, 2010, 07:16:00 PM
Im using ADVSB1.22 with the latest SMF 2.0 and Simple Portal and ahve a few questions...

1.) can i put the timestamp on the same line before the users name or leave ti where it is and make the font size pretty small?

I have both //yshout here codes that are suppose to be in my themes index.template.php in a simple portal block, and not in my index.template.php file...

2.)i want to add smiley icon and bar with the other history icons etc, up top...the tut i found was no help...

3.)the big bold letters SHOUTBOX up top how do i change or remove them?
Cant seem to find out where...

TY!

1 - Yes you can change the font size and color of the timestamp.

Find:

#yshout .shout-timestamp {
         font-style: normal;
         font-weight: normal;
      }


Make your adjustment here.

For an example - Replace above code with this:


#yshout .shout-timestamp {
         font-size: 8px;
         font-style: normal;
         font-weight: normal;
         color: #330099
      }


Change font size and color to your liking.

<<<<>>>>

2 - I made tuts for a smiley bar and changing the commands to icons that work perfectly.
CLICK HERE and scroll down to the various functions you wish to adjust.

Note:
I recently changed this edit due to the rc2 language files setup. Language $txt files are not used.. variable for url is set directly in the yshout.php file after the $boardurl is called in the global.
This is due to the fact that most $txt language edits done to modify an existing mod for rc2 must be adjusted in both the default/language files and also the cache folder.
Less edits are necessary by not doing the $txt language edits and setting the variable in the yshout.php file itself.

<<<<>>>>

3 - In the initialize code you will see this variable: $txt['yshout_shoutbox']
     This is the title for the shoutbox that is set in the language php file.
     You can change it in the language file or just put the edit right in the initialize code.

UD

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

Rep99099

#5762
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:

$txt['myshoutboxname'] ?

any way to put the timestamp on the same line as username?

Chen Zhen

Quote from: Rep99099 on January 10, 2010, 12:26:40 AM
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:

$txt['myshoutboxname'] ?

any way to put the timestamp on the same line as username?

I will have to get back to you on this one.
I just got a new PC with Windows 7 and I can't seem to get the mysql to install properly with EasyPHP so therefore I am currently unable to install and test things locally such as adjusting the layout of the shoutbox for you. (I won't do it on my own site - I prefer to test these things on my pc)

However, if you wish to experiment:

In the yshout.php file...

find:

// utility functions for reading shouts


Directly under this code is where the variable is set that contains the timestamp and the shout text.
You can try experimenting with it a bit to try and change the look of what is displayed.

My apologies, as I have already stated - currently I am not able to do the adjustments and testing myself until I install EasyPHP properly on my Windows 7 later this week. 

UD

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

#5764
Quote from: Rep99099 on January 10, 2010, 12:26:40 AM
so i would change the $txt['yshout_shoutbox'] in the yshout.php file to:

$txt['myshoutboxname'] ?


No.. this variable is set in the language files.
You stated that you are using a portal block to display the shoutbox, therefore...
It is echoed (displayed) in the initialize code that you placed in your php portal block.

Just set it in your block just before the second bit of code you added (initialize code)
ie.


$txt['yshout_shoutbox'] = 'My Shoutbox';



UD

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

Rep99099

// 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[
   if (window.addEventListener){
      window.addEventListener("load", function(){loadChat();}, false);
   } else if (window.attachEvent){
      window.attachEvent("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 #shouts {
         
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
        font-size:.7em;
        color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
   // YSHOUT END - <head> code   
// 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

Chen Zhen

#5766
Quote from: Rep99099 on January 10, 2010, 01:00:23 AM
// 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[
   if (window.addEventListener){
      window.addEventListener("load", function(){loadChat();}, false);
   } else if (window.attachEvent){
      window.attachEvent("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 #shouts {
         
}
#yshout {
font-size: 14px;
font-style: normal;
font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
border: 0px solid #777777;
padding: 0px;
}
#yshout .shout { /* one shout */
margin: 0 0 0; /* Top Bottom Linespacing */
line-height: 1;
margin-top: 0;
}
#yshout hr { /* shout divider */
color: #fa0000;
height: 1px;
border: 0;
background-color:#cccccc;
}
#yshout .shout-timestamp {
font-weight: normal;
font-style: normal;
        font-size:.7em;
        color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
font-size: 8pt;
color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
border: none;
}
#forum-name, #shout-text, #shout-button {
font-size: 16px;
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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
background: #FFFDD1;
}
</style>';
   // YSHOUT END - <head> code   
// 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


<<<<<>>>>>

Find:

// 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


Replace with:

// YSHOUT HERE - shoutbox code
   global $txt,$context,$boarddir;
   $shouts_title = 'My Title For The Shoutbox';
   if(allowedTo('yshout_view'))
   {
      echo '<br /><b>', $shouts_title ,'</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



Edit this line to what you want displayed as your title:
$shouts_title = 'My Title For The Shoutbox';


UD

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

Rep99099

TY!, works PERFECT!

But is there anyway I can remove the title completely? there is a title in my portal block :)

I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?

or if just the open and close options would work if i could put those above the shoutbox next to the other icons

[unplugged]

@Rep99099

Just remove this whole line to remove the title completely:

echo '<br /><b>', $shouts_title ,'</b><br /><br />';

Did you ever get the timestamp on the same line as username sorted?
« Next Edit: Tomorrow at 08:34:45 PM by SunKing »   <---- « someone stole my sig... :o »



Rep99099

no i can cahnge teh size now but nto able to put on same line,

weeman007

#5770
  Type  Action  Description
* 1. Execute Modification ./index.php Test successful
1. Add Before ./index.php Test successful
* 2. Execute Modification ./Themes/default/index.template.php Test failed
1. Add Before ./Themes/default/index.template.php Test successful
2. Add After ./Themes/default/index.template.php Test successful
3. Add Before ./Themes/default/index.template.php Test successful
4. Replace ./Themes/default/index.template.php Test failed
5. Add After ./Themes/default/index.template.php Test failed
* 3. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
1. Add Before ./Themes/default/languages/Modifications.english.php Test successful
4. Execute Modification ./Themes/default/languages/Modifications.english-utf8.php Skipping file
5. Execute Modification ./Themes/default/languages/Modifications.english_british.php Skipping file
6. Execute Modification ./Themes/default/languages/Modifications.english_british-utf8.php Skipping file
* 7. Execute Modification ./Sources/ManagePermissions.php Test successful
1. Add After ./Sources/ManagePermissions.php Test successful
8. Extract Tree ./yshout
9. Extract File ./Themes/default/css/yshout.css
10. Extract File ./Themes/default/images/calendar.png
11. Extract File ./Themes/default/images/info.png
12. Extract File ./Themes/default/images/cog_delete.png
13. Extract File ./Themes/default/images/cog_add.png
14. Extract File ./Themes/default/images/smile.png
15. Extract File ./Themes/default/images/date.png
16. Extract File ./Themes/default/images/mute.png
17. Extract File ./Themes/default/images/unmute.png



I get this errors when installing the shoutbox in the default theme. By installing it in a custom theme i get the same errors . I tried too install it and i added the following code as mentioned in the topic

   $shown_linktree = true;


   // YSHOUT HERE - shoutbox code
      echo '
                     <br /><b>',$txt['yshout_shoutbox'],'</b><br /><br />
                     <div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
      // YSHOUT END - shoutbox code
}



It did work i saw a sort of shoutbox but when i typ much things in the shoutbox it gets big. I need too scroll down for my forum lol

Rep99099

thanks SK title removed!

now for timestamp to be on same line as username???

Wiejeben

#5772
Hey, I read alot...
But why not upload a new Shoutbox ? For example nneonneo's Shoutbox SMF 2.0 RC2 FIX!

rivan


Rep99099

also using the scrollbar and the auto scroll effect in the tutorial.

my shout bar and new shouts are on the bottom, when i scroll up to read old shouts, in 5 seconds or it will auto take me to the bottom, or when a new shout is entered, this is a very active chatbox, and id like to be able to scroll up and read old posts without being took down to the bottom where new shouts are again, and also be able to (when scrollbar is at bottom viewing new shouts) haveit auto scroll with the new shouts...

make sense? lol

still cant figure out the timestamp on same line as suername

Chen Zhen

Quote from: Rep99099 on January 10, 2010, 01:36:50 AM
TY!, works PERFECT!

But is there anyway I can remove the title completely? there is a title in my portal block :)

I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?

or if just the open and close options would work if i could put those above the shoutbox next to the other icons

I can re-write your block for you to show the smiley bar the way you want but I need to know what version of smf you are using first.

btw - to read old shouts why not use history command instead of scrolling?

UD

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

#5776
Quote from: Rep99099 on January 10, 2010, 01:36:50 AM

I was successful adding the smiley bar, but is there any javascript file that or a way i can put a smiley icon next to the admin functions/icons on top of the shoutbox and have it open and close by clicking only 1 icon instead of 2...?

or if just the open and close options would work if i could put those above the shoutbox next to the other icons

Ok... I read on another post you made that you are using smf2 rc2, so I made the block code for you:

Portal PHP block code For Nneonneo Shoutbox with smiley bar for SMF2 Rc2.x:
(smf 2.0 mymod files must be present and yshout.php file must be edited as per smiley add-on)

//  --nneonneo shoutbox with smiley bar--  php block code for SMF 2.0 Rc2.x
// Visit http://askusaquestion.net/ for other block requests

// Shoutbox smiley files and edits must be present
// Smiley toggle icon must be put in /Themes/YOUR_THEME(S)/images/sb_smiley.gif for all themes your users have access to

// Smiley border style can be changed on the line below
$smiley_border = 'windowbg2';

// Do not change the file directory in variable below
// Unless you edit the collapse object aswell
$smiley_bar = "sb_smiley.gif";
$smiley_text = 'Toggle Smiley Bar';

// 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[
   if (window.addEventListener){
      window.addEventListener("load", function(){loadChat();}, false);
   } else if (window.attachEvent){
      window.attachEvent("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 #shouts {
         overflow: visible;
                         width: 100%;     
                         height: 100%; 
}
#yshout {
   font-size: 14px;
   font-style: normal;
   font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
   border: 0px solid #777777;
   padding: 0px;
}
#yshout .shout { /* one shout */
   margin: 0 0 0; /* Top Bottom Linespacing */
   line-height: 1;
   margin-top: 0;
}
#yshout hr { /* shout divider */
   color: #fa0000;
   height: 1px;
   border: 0;
   background-color:#cccccc;
}
#yshout .shout-timestamp {
   font-weight: normal;
   font-style: normal;
        font-size:.7em;
        color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
   font-size: 8pt;
   color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
   border: none;
}
#forum-name, #shout-text, #shout-button {
   font-size: 16px;
   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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
   background: #FFFDD1;
}
</style>';
   // YSHOUT END - <head> code   

// YSHOUT START - Shoutbox initialize code with smiley bar
global $txt, $context, $settings, $options;
$options['collapse_header_sm'] = isset($options['collapse_header_sm']) ? $options['collapse_header_sm'] : true ;         

echo '
         <h4>
<img class="icon" id="upshrink_sm" src="', $settings['images_url'], '/'.$smiley_bar.'" alt="*" title="', $smiley_text, '" style="margin-left;" align="right" />
         </h4>
      <div id="upshrinkHeaderSM"', empty($options['collapse_header_sm']) ? '' : ' style="display: none;"', '>
   <div class="'.$smiley_border.'">';
                     require('mymod/smiley.php');
                     loadSmileys();
               echo '
                   <div id="smiley_pic">';
                   printSmileys('shout_form','shout_text');
                    echo '
                     <script type="text/javascript">
                     </script> </div></div>
                 
                  </div>';                   
        echo '
          <div id="yshout">',$txt['yshout_loading'],'</div>';

      // YSHOUT END - shoutbox initialize code with smiley bar   
           
// YSHOUT - Smiley bar collapse object for SMF 2.0 Rc2.x - START
$smiley_text = 'Toggle Smiley Bar';
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oSmileyToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_sm']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderSM\'
],
aSwapImages: [
{
sId: \'upshrink_sm\',
srcExpanded: smf_images_url + \'/sb_smiley.gif\',
altExpanded: ', JavaScriptEscape($smiley_text), ',
srcCollapsed: smf_images_url + \'/sb_smiley.gif\',
altCollapsed: ', JavaScriptEscape($smiley_text), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_sm\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkSM\'
}
});
// ]]></script>';

// YSHOUT - Smiley bar collapse object - END



NOTE: Please read the remarks from the beginning of the block code for proper instructions.

... This already includes the edits to style that you did. I didn't really double check these settings you made, however I added some height, width and overflow to the visible shouts so that it displays correctly in a top or bottom block.

If you (or anyone) would like the changes to the style for a side block I can provide it... I have a nice one in my arcade.

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

Rep99099

#5777
thanks!

sometimes my shoutbox will go blank once in a while till i type, any ideas?

Chen Zhen

Quote from: Rep99099 on January 12, 2010, 02:16:35 PM
thanks!

sometimes my shoutbox will go blank once in a while till i type, any ideas?


The only time I have seen it do that is after deleting a shout in which case I use refresh afterwards.
I will test it for a bit and see if it does this for me after typing shouts.

UD

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

#5779
Quote from: Rep99099 on January 12, 2010, 02:16:35 PM
thanks!

sometimes my shoutbox will go blank once in a while till i type, any ideas?

I didn't have this problem at all after testing it for a while.

However, I see that the issue may have been a small bit of code I left in there from the old unnecessary collapse object (for the sb itself).
I made another block with the other initialize code and also edited the other post which now has the correction.

Try this:

//  --nneonneo shoutbox with smiley bar--  php block code for SMF 2.0 Rc2.x
// Visit http://askusaquestion.net/ for more block requests

// Shoutbox smiley files and edits must be present
// Smiley toggle icon must be put in /Themes/YOUR_THEME(S)/images/sb_smiley.gif for all themes your users have access to

// Smiley border style can be changed on the line below
$smiley_border = 'windowbg2';

// Do not change the file directory in variable below
// Unless you edit the collapse object aswell
$smiley_bar = "sb_smiley.gif";
$smiley_text = 'Toggle Smiley Bar';

// 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[
   if (window.addEventListener){
      window.addEventListener("load", function(){loadChat();}, false);
   } else if (window.attachEvent){
      window.attachEvent("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 #shouts {
                   overflow: visible;
                         width: 100%;     
                         height: 100%;           
}
#yshout {
   font-size: 14px;
   font-style: normal;
   font-family: arial, helvetica, verdana, san-serif;
}
#yshout #yshout-toollinks { /* tool links (History, Commands, etc.) */
}
#yshout #shouts {
   border: 0px solid #777777;
   padding: 0px;
}
#yshout .shout { /* one shout */
   margin: 0 0 0; /* Top Bottom Linespacing */
   line-height: 1;
   margin-top: 0;
}
#yshout hr { /* shout divider */
   color: #fa0000;
   height: 1px;
   border: 0;
   background-color:#cccccc;
}
#yshout .shout-timestamp {
   font-weight: normal;
   font-style: normal;
        font-size:.7em;
        color: #000000;
}
#yshout .shout-adminlinks { /* del and ban buttons */
   font-size: 8pt;
   color: #000000;
}
#yshout #shout-form {
}
#yshout #shout-form fieldset {
   border: none;
}
#forum-name, #shout-text, #shout-button {
   font-size: 16px;
   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;
}
#yshout .shout-invalid { /* invalid shout (shout textbox) */
   background: #FFFDD1;
}
</style>';
   // YSHOUT END - <head> code   

// YSHOUT START - Shoutbox initialize code with smiley bar
global $txt, $context, $settings, $options, $boarddir;
$options['collapse_header_sm'] = isset($options['collapse_header_sm']) ? $options['collapse_header_sm'] : true ;         

echo '
         <h4>
<img class="icon" id="upshrink_sm" src="', $settings['images_url'], '/'.$smiley_bar.'" alt="*" title="', $smiley_text, '" style="margin-left;" align="right" />
         </h4>
      <div id="upshrinkHeaderSM"', empty($options['collapse_header_sm']) ? '' : ' style="display: none;"', '>
   <div class="'.$smiley_border.'">';
                     require('mymod/smiley.php');
                     loadSmileys();
               echo '
                   <div id="smiley_pic">';
                   printSmileys('shout_form','shout_text');
                    echo '
                     <script type="text/javascript">
                     </script> </div></div>
                 
                  </div>';                   
       if(allowedTo('yshout_view'))
   {     
echo '
          <div id="yshout"';
include_once($boarddir.'/yshout/yshout.php');
      echo '</div>';     
   }
   if ($context['user']['is_guest'])
{
      echo $txt['yshout_no_guests']; 
}

      // YSHOUT END - shoutbox initialize code with smiley bar   
           
// YSHOUT - Smiley bar collapse object for SMF 2.0 Rc2.x - START
$smiley_text = 'Toggle Smiley Bar';
echo '
   <script type="text/javascript"><!-- // --><![CDATA[
var oSmileyToggle = new smc_Toggle({
         bToggleEnabled: true,
         bCurrentlyCollapsed: ', empty($options['collapse_header_sm']) ? 'false' : 'true', ',
         aSwappableContainers: [
            \'upshrinkHeaderSM\'
         ],
         aSwapImages: [
            {
               sId: \'upshrink_sm\',
               srcExpanded: smf_images_url + \'/sb_smiley.gif\',
               altExpanded: ', JavaScriptEscape($smiley_text), ',
               srcCollapsed: smf_images_url + \'/sb_smiley.gif\',
               altCollapsed: ', JavaScriptEscape($smiley_text), '               
            }
         ],
         oThemeOptions: {
            bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
            sOptionName: \'collapse_header_sm\',
            sSessionVar: ', JavaScriptEscape($context['session_var']), ',
            sSessionId: ', JavaScriptEscape($context['session_id']), '
         },
         oCookieOptions: {
            bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
            sCookieName: \'upshrinkSM\'
         }
      });
// ]]></script>';

// YSHOUT - Smiley bar collapse object - END


UD

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: