Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Han on March 19, 2008, 05:17:30 PM

Title: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Han on March 19, 2008, 05:17:30 PM
In former versions of SMF I always ajusted the width and hight of the popupwindow for the smilies in post.template.php
I can't find the code to ajust the window in ..default\post.template.php in SMF 2.0 Beta 3 anymore. 

All I can find is this code in profile.template.php of the classic theme:
smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=200,resizable=no");

Does anyone know where I can ajust the width and hight of the smilie-popup-window for the default theme?
Title: Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Oldiesmann on March 20, 2008, 12:59:43 AM
At the end of that string of code - see where it says "width=480,height=200"? Just change those to your liking. You can also change "resizable=no" to "resizable=yes" if you want users to be able to change the size of the window.
Title: Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Han on March 20, 2008, 07:12:13 AM
I know because that is what I always did, but the code is not present in post.template.php of the default theme anymore. It's only present in post.template.php of the classic theme.

I'd really like to change this in the default theme and I don't know where to change it now.
Title: Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Han on March 20, 2008, 08:09:34 AM
I searched in textpad for showMoreSmileys it came up with the file ...themes\default\GenericControls.template.php.
In that file I find this code. Is this the code of the smiley box I'm looking for?
I don't know how to ajust if this is the right place to do so. I'd like to have widht=550 and hight=700 for the "more smiley box"


// Finally the most important bit - the actual text box to write in!
if ($display_controls == 'all' || in_array('message', $display_controls))
{
echo '
<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols="', $editor_context['columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="width: ', $editor_context['width'], '; height: ', $editor_context['height'], ';', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '">', $editor_context['value'], '</textarea>
<input type="hidden" name="', $editor_id, '_mode" id="', $editor_id, '_mode" value="0" />';
Title: Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Oldiesmann on March 20, 2008, 10:47:09 AM
The only code I can find in SMF that's similar to what you posted is on line 1172 of Themes/default/scripts/editor.js:

this.oSmileyPopupWindow = window.open('', 'add_smileys', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes');
Title: Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
Post by: Han on March 20, 2008, 12:07:40 PM
I changed the values for width and height in "editor.js" using notepad and uploaded the changed file.
That did the trick. You've made my day. Thanks!!  :D

One more question though...,
I never changed a js file before. Is it okay to use notepad to do so, as i did?