collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 456
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Shoutbox Text Box Size  (Read 21068 times)

0 Members and 10 Guests are viewing this topic.

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Shoutbox Text Box Size
« on: March 27, 2011, 09:42:45 AM »
Is it possible to make the text input box bigger...for example to accommodate two lines without scrolling?
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #1 on: March 29, 2011, 06:56:13 AM »
Yes. Take a look at the HTML on the page (I recommend Firebug for Firefox, or developers tools for IE7, 8, or 9, which lets you point at the element you are interested in).
You can see that this input of type text has its width set in portal.css via input.shoutboxinput, but does no5 have its height set.
You can change that.
---
Edit: fixed typo
« Last Edit: March 29, 2011, 02:55:15 PM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #2 on: March 29, 2011, 12:06:34 PM »
Thank you. I shall go and delve.
SMF 2.0 Gold
SP 2.3.3

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #3 on: April 04, 2011, 11:03:23 AM »
OK. Tried setting the height to 60 px and the height did increase accordingly. However, text would only be accepted in the centre line of the input box rather than start at the top and wouldn't keep returning until the larger box was full. How do I get the input text to be accepted in the text box just as it is accepted by this reply box into which I am typing?
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #4 on: April 04, 2011, 01:47:51 PM »
I would have thought that ought to work.
I had a look at the information at http://www.w3schools.com/tags/att_input_size.asp and had a little look at the information there, then started playing with size, width, height and CSS style attributes. Even with style="height: 5ex; white-space: normal;" I couldn't get it to wrap.
I could not get it to work. I think this form element is only meant for 1 line of text.
If there is a way to do what you want to do, I don't know it.
 
It seems like a textarea would work better for what you would like to do than an input of type=text
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #5 on: April 04, 2011, 02:22:33 PM »
Thanks again for trying.

Could a textarea be set in the file you pointed to?
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #6 on: April 05, 2011, 08:37:53 AM »
I recommend that you set up a test forum and do some experimenting.
You can learn a lot that way.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #7 on: April 05, 2011, 09:22:01 AM »
I recommend that you set up a test forum and do some experimenting.
You can learn a lot that way.

I have a test forum.

Good advice....I'll go try!
SMF 2.0 Gold
SP 2.3.3

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #8 on: April 05, 2011, 02:40:53 PM »
It seems like a textarea would work better for what you would like to do than an input of type=text

Having read more on this, I would tend to agree with you regarding the use of textarea.

However, in the section of CSS that you referred to, there is no obvious entry to edit. Are there additional files elsewhere which contains the basic shoutbox code? 
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #9 on: April 05, 2011, 11:30:08 PM »
You would need to make this change in PortalBlocks.php.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #10 on: July 07, 2011, 11:01:06 AM »
Have revisited this unsolved problem and again looked through PortalBlocks.php, but it's not even clear where the shout box input code resides.

Have also tried viewing the shoutbox using Firebug and, again, no clearer.

Still looking for help on this, please.
SMF 2.0 Gold
SP 2.3.3

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #11 on: July 07, 2011, 11:25:17 AM »
Maybe it's this??

Code: [Select]
<div class="shoutbox_input smalltext">
   <input id="new_shout_1" class="shoutbox_input sp_float_left input_text" type="text" name="new_shout">
   <input class="sp_float_right button_submit" type="submit" onclick="sp_submit_shout(1, 'dda42495e5', '28e6631930ed9110f9b9a8cb883ba6cd'); return false;" value="Shout!" name="submit_shout">

How can I change type="text" to textarea, bearing in mind that I have to include various textarea settings for height, width, overflow, wrap etc..
SMF 2.0 Gold
SP 2.3.3

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #12 on: July 08, 2011, 11:05:29 AM »
If I change the following:-

Code: [Select]
<input id="new_shout_1" class="shoutbox_input sp_float_left input_text" type="text" name="new_shout">
<input class="sp_float_right button_submit" type="submit" onclick="sp_submit_shout(1, 'f12d0e3', 'd61703ae203b27af69443b045edd1f7b'); return false;" value="Shout!" name="submit_shout">

to:-

Code: [Select]
<textarea id="shoutbox" rows="4" cols="15" name="new_shout" style="width: 125px; height: 20px;"></textarea>
<input class="sp_float_right button_submit" type="submit" onclick="sp_submit_shout(1, 'f12d0e3', 'd61703ae203b27af69443b045edd1f7b'); return false;" value="Shout!" name="submit_shout">

This gives the correct appearance when compared side by side at http://htmledit.squarefree.com/ .

Would it work, though?

I'd appreciate a second opinion before I edit any code in PortalBlocks.php.
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #13 on: July 20, 2011, 12:35:14 PM »
MY advice: test this code in a test install of your forum.
If it works, then save the old Portalblocks.php, and try the modified one on your real forum.
 
If you do not like it, immediately put the old Portalblocks.php back.  If you like it -- make very clear notes for yourself about the changes required, so you can make them again when there is a new version of SimplePortal.
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

AussieBill

  • Guest
Re: Shoutbox Text Box Size
« Reply #14 on: July 22, 2011, 05:49:48 PM »
This worked for me:

Open ./Themes/default/PortalShoutbox.template.php
Find:
Code: [Select]
if ($context['can_shout'])
echo '
<div class="shoutbox_input smalltext">
<input type="text" name="new_shout" id="new_shout_', $shoutbox['id'], '" class="shoutbox_input sp_float_left input_text"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'' . $context['session_var'] . '\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' />
<input type="submit" name="submit_shout" value="', $txt['sp_shoutbox_button'], '" class="sp_float_right button_submit" onclick="sp_submit_shout(', $shoutbox['id'], ', \'', $context['session_var'], '\', \'', $context['session_id'], '\'); return false;" />
</div>';
Replace With:
Code: [Select]
if ($context['can_shout'])
echo '
<div class="shoutbox_input sp_center">
<textarea class="smalltext" name="new_shout" id="new_shout_', $shoutbox['id'], '" style="width: 96%; height: 60px;"', $context['browser']['is_ie'] ? ' onkeypress="if (sp_catch_enter(event)) { sp_submit_shout(' . $shoutbox['id'] . ', \'' . $context['session_var'] . '\', \'' . $context['session_id'] . '\'); return false; }"' : '', ' /></textarea>
<br /><input type="submit" name="submit_shout" value="', $txt['sp_shoutbox_button'], '" onclick="sp_submit_shout(', $shoutbox['id'], ', \'', $context['session_var'], '\', \'', $context['session_id'], '\'); return false;" />
</div>';

To change the width/height of the text box, look for style="width: 96%; height: 60px;" and change to suit.

This edit also moves the 'Shout!' button to below the text input box.

Note: You will no longer be able to post a shout by pressing the 'Enter' key. Instead, pressing 'Enter' will start a new line in the text box. You must click on the 'Shout!' button to post the shout.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #15 on: July 25, 2011, 11:18:10 AM »
newtoallthis,
 
Does AussieBill's solution do what you want?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #16 on: July 29, 2011, 04:12:18 PM »
Tried the code edit on my test forum, saved the change, launched the forum and refreshed and there was absolutely no change to the shoutbox whatsoever. Text box was the same size and the shout button remained on the right.

Any ideas what I could be doing wrong?

[edit] Just a thought. Would the change only be visible if the textbox size was changed? Is this tweak used to increase text box size in the code rather than creating a textarea which can be manipulated by forum users?

[edit] Tried it again and adjusted the textbox height in the code. Still makes no difference at all.
« Last Edit: July 30, 2011, 07:51:40 AM by newtoallthis »
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #17 on: August 03, 2011, 12:09:54 PM »
What's your browser? Can you use IE (7 or better) or firefox (with firebug plug-in)?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline newtoallthis

  • Jr. Member
  • **
  • Posts: 94
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Shoutbox Text Box Size
« Reply #18 on: August 03, 2011, 06:14:21 PM »
What's your browser? Can you use IE (7 or better) or firefox (with firebug plug-in)?

I can browse using whatever you like, but my preference is for FF 5.
SMF 2.0 Gold
SP 2.3.3

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Shoutbox Text Box Size
« Reply #19 on: August 04, 2011, 07:26:02 AM »
The firebug plug-in for firefox has a tool that makes it easier for you to see the id or CSS class of any HTML element, and to try out the effects of fiddling with that element's style.
Combine this tool with plenty of CSS information from your favorite CSS tutorial (w3schools.com, for example), and you will very quickly be able to see the effect of changing the height of various elements.
Once you find this out, I encourage you, rather than messing with the php, to add some CSS to the portal.css file (for example), or even the theme's default.css.  In any case, you'll want to keep a copy of the added section for the next time you install a new version of SimplePortal (portal.css is always replaced) or the theme.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?