Advertisement:

Author Topic: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window  (Read 7845 times)

Offline Han

  • Full Member
  • ***
  • Posts: 511
  • Gender: Female
    • PC-Navigator Forum
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?
« Last Edit: March 20, 2008, 12:13:19 PM by Han »

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,868
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
« Reply #1 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.
Michael Eshom
Cincy Space - now open!

Offline Han

  • Full Member
  • ***
  • Posts: 511
  • Gender: Female
    • PC-Navigator Forum
Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
« Reply #2 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.

Offline Han

  • Full Member
  • ***
  • Posts: 511
  • Gender: Female
    • PC-Navigator Forum
Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
« Reply #3 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"


Code: [Select]
// 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" />';
« Last Edit: March 20, 2008, 08:11:25 AM by Han »

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,868
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
« Reply #4 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:

Code: [Select]
this.oSmileyPopupWindow = window.open('', 'add_smileys', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=480,height=220,resizable=yes');
Michael Eshom
Cincy Space - now open!

Offline Han

  • Full Member
  • ***
  • Posts: 511
  • Gender: Female
    • PC-Navigator Forum
Re: [SMF 2.0 Beta 3 Public] Ajust width and hight smilie-popup-window
« Reply #5 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?