1
haythoom
shout box block resizing
  • 2009/2/24 9:13

  • haythoom

  • Just popping in

  • Posts: 21

  • Since: 2007/9/23


im trying to use shoutbox on main page , right block , but it refuse to re-size to fit there

i ve tried with the block code , and i could only resize the chat pan area , but couldnt re-size the text insertion area , so any ideas please ?

thats the code of the block


<center>
    <
iframe name="shoutFrame" width="<{$block.iframe_width}>" src="<{$xoops_url}>/modules/shoutbox/shoutframe.php"  height="<{$block.iframe_height}>" frameborder="<{$block.iframe_border}>" scrolling="auto"></iframe>
</
center>
<{if 
$block.may_guests_post==1}>
<
font color="#990000">*</font><{$block.shoutbox_anonymous}>
<{/if}>

<{if 
$block.shoutbox_access != "no"}>
<
form name="shoutform" action="<{$xoops_url}>/modules/shoutbox/shoutframe.php" method="post" style="this.style.margin=0px'" target="shoutFrame">

<{if 
$block.show_smileybar==1}>
    <{
$block.shoutbox_smibar}>
<{/if}>

<{if !
$xoops_isuser && $block.guests_may_chname=='1'}>
    <
br /><b><{$smarty.const._MB_SHOUTBOX_NICK}>:</b><br /><input id="shoutnick" onFocus="shoutform.shoutnick.select();" type="text" name="username" size="18" maxlength="20" class="shttxt" value="<{$block.shoutbox_blockuser}>" />
<{else if !
$xoops_isuser && $block.guests_may_chname=='0'}>
    <
input type="hidden" name="username" value="<{$block.shoutbox_blockuser}>" />
<{/if}>

<
br /><b><{$smarty.const._MB_SHOUTBOX_SHOUT_TITLE}>:</b><br />
    <{if 
$block.input_type=='1'}>
      <
script type="text/javascript">
        function 
limitText(limitField) {
          
fldValue limitField.value;
          var 
limitNum = <{$block.text_maxchars}>;
          var 
chars limitNum fldValue.length;
          
//alert (chars); // delete after testing
          
<{if $block.input_alerts=='1'}>
            if (
chars <= 0) {
              
alert ("You are trying to enter more than the limit of " limitNum " characters! ");
              
fldValue fldValue.substring(0,limitNum-1)
              
window.document.shoutform.shoutfield.value fldValue;
            }
            if (
chars == 20) {
              
alert ("You are approaching the limit of " limitNum " characters and have only 20 characters left! ")
            }
          <{else}>
            if (
chars <= 0) {
              
fldValue fldValue.substring(0,limitNum-1)
              
window.document.shoutform.shoutfield.value fldValue;
            }
          <{/if}>
        }
      </
script>
      <
textarea id="shoutfield" name="shouttext" rows="<{$block.textarea_rows}>" cols="<{$block.textarea_cols}>" maxlength="<{$block.text_maxchars}>" onKeyDown="limitText(shoutfield)";
onKeyUp="limitText(shoutfield)"></textarea>
    <{else}>
      <
input type="text" id="shoutfield" name="shouttext" size="<{$block.text_linelength}>" maxlength="<{$block.text_maxchars}>" />
    <{/if}>
    <{if 
$block.captcha_caption}>
      <
br />
      <
b><{$block.captcha_caption}></b>
      <
br />
      <{
$block.captcha_render}>
     <{/if}>
     <
br />
    <
input type="hidden" name="myid" value="<{$block.shoutbox_myid}>" />    
    <
input type="submit" value="<{$smarty.const._MB_SHOUTBOX_SHOUT}>" />
<{if 
$xoops_isadmin}>
    &
nbsp;<input type="submit" name="clear" value="<{$smarty.const._MB_SHOUTBOX_CLEAR}>" onClick="return(confirm('<{$smarty.const._MB_SHOUTBOX_CONFIRMDEL}>'))"/>
<{/if}>
<
br /><br />
<
table width="100%" height="10px" cellpadding="0" cellspacing="0" style="border-top:  1px solid #8B898B; border-left: 1px solid #8B898B; border-right: 1px solid #000000; border-bottom: 1px solid #000000; padding-left: 2px; padding-right: 2px; font-size: xx-small;">
    <
tr>
        <
td valign="top" align="left" width="10%">
            <
form><input type="button" value="<{$smarty.const._MB_SHOUTBOX_REFRESH}>" onClick="parent.shoutFrame.location='<{$xoops_url}>/modules/shoutbox/shoutframe.php'"/></form>
        </
td>
            <{if 
$block.popup==1}>
        <
td valign="top" align="left">
            <
form><input type="button" value="<{$smarty.const._MB_SHOUTBOX_POPUP}>" onClick="javascript:openWithSelfMain('<{$xoops_url}>/modules/shoutbox/popup.php','<{$smarty.const._MB_SHOUTBOX_TITLE}>',<{$block.popup_width}>,<{$block.popup_height}>);"/></form>
            <{/if}>
        </
td>
        <{if 
$block.block_autorefresh==1}>
        <
td valign="top" align="right">
                <
b><{$smarty.const._MB_SHOUTBOX_AUTOREFRESH}></b>&nbsp;
                <
input id="shoutrefresh" type="checkbox" name="shoutrefresh" value="checkbox" onchange="parent.shoutFrame.location.reload();" /> 
                <
select id="refreshtime" name="refreshtime">
                    <
option value="10000">10 s</option>
                    <
option value="20000" selected="selected">20 s</option>
                    <
option value="40000">40 s</option>
                    <
option value="60000">60 s</option>
                    <
option value="120000">2 m</option>
                    <
option value="240000">4 m</option>
                    <
option value="480000">8 m</option>
                </
select>
        </
td>
        <{/if}>
    </
tr>
</
table>
<
table><tr><td align="right" colspan="3" id="blockfooter" style="font-size : xx-small;">Powered by <a href="http://www.customvirtualdesigns.com" target="_blank">CVD</a></td></tr></table>


</
form>
<{/if}>

2
Anonymous
Re: shout box block resizing
  • 2009/2/24 10:48

  • Anonymous

  • Posts: 0

  • Since:


I don't have the answer but I am also curious howto resize the shoutbox. I want to use it on a crowded frontpage and would also like to remove the input box from the block. So you only see the scrollbox with shouts and have to open another box for shouting. The current shoutbox I find too big and dominant.

3
haythoom
Re: shout box block resizing
  • 2009/2/24 14:36

  • haythoom

  • Just popping in

  • Posts: 21

  • Since: 2007/9/23


Quote:

flipse wrote:
I don't have the answer but I am also curious howto resize the shoutbox. I want to use it on a crowded frontpage and would also like to remove the input box from the block. So you only see the scrollbox with shouts and have to open another box for shouting. The current shoutbox I find too big and dominant.


that would be a nice solution aswell ..
i will try to apply it , and i hope someone will tell us both about a solution :)

4
Burning
Re: shout box block resizing
  • 2009/2/24 17:07

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi

I may be wrong but look at Preferences : there are options about sizes (width, height, and max characters for each line).
Still learning CSS and... english

5
tank1955
Re: shout box block resizing
  • 2009/2/24 23:04

  • tank1955

  • Module Developer

  • Posts: 276

  • Since: 2007/9/7 1


You can make the shoutbox whatever size you want by using the IFrame Width and IFrame Height preference settings.

There are some factors that may override these settings such as the size of the text entry area. If the Shout Text Input Type is set to Multi-line text area then be sure to set the Text Columns to match the width you want. Also be sure to check your site's theme. The theme's CSS sheet may define 'textarea' and could override the module's settings.

Enabling Smilies and how many smilies you have set to display as the default may also affect the width of the IFrame.

6
Anonymous
Re: shout box block resizing
  • 2009/2/25 21:39

  • Anonymous

  • Posts: 0

  • Since:


About my question Tank. Would it be difficult to have a second shoutbox block type? Ás I said before, I like to have one with only the latest shouts and a button which brings you to a page or popup you can give in new shouts.

7
wcrwcr
Re: shout box block resizing
  • 2009/2/25 23:16

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi all

regarding the clone block, maybe this old & good FAQ can be useful

I´d loe to see a "core cloning block" feature

8
tank1955
Re: shout box block resizing
  • 2009/2/26 0:36

  • tank1955

  • Module Developer

  • Posts: 276

  • Since: 2007/9/7 1


Yes I think I can add this functionality flipse. Since shoutbox is already a block I should be able to add a second block without too much trouble. My suggestion would be to remove the smilies, text entry, and auto-refresh from this new block and replace the pop-up button with a button labeled "Shout". Selecting Shout would generate a new pop-up window that would contain the text entry area. It will take some experimenting to see if I will be able to automatically refresh the message display block while the shout entry pop-up is present.

9
trabis
Re: shout box block resizing
  • 2009/2/26 1:21

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

wcrwcr wrote:
Hi all

regarding the clone block, maybe this old & good FAQ can be useful

I´d loe to see a "core cloning block" feature


Why don´t you upgrade your XOOPS 2.18.2 to 2.3? It has "core cloning block" feature

10
Burning
Re: shout box block resizing
  • 2009/2/26 16:29

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi

I have added icons to replace standards buttons :
Resized Image


You can try it by using those files :
20090226_shoutbox-405_bt_img.zip

Rename original block template before !!
Still learning CSS and... english

Login

Who's Online

181 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits