dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse

This website has run out of funding so feel free to contribute if you can afford it (see footer)

Author Topic: Adding an additional font size option (11pt) to the editor drop down menu  (Read 3073 times)

Offline Chip (OP)

  • Server Admin
  • Hero Member
  • *****
  • Administrator
  • *****
  • Join Date: Dec 2014
  • Location: Australia
  • Posts: 6648
  • Reputation Power: 0
  • Chip has hidden their reputation power
  • Gender: Male
  • Last Login:Today at 05:53:23 PM
  • Deeply Confused Learner
  • Profession: IT Engineer
see https://www.simplemachines.org/community/index.php?topic=568610

In ./Themes/default/GenericControls.template.php, find this:

Code: [Select]
                \'\': ', JavaScriptEscape($txt['font_size']), ',
                           \'1\': \'8pt\',
                           \'2\': \'10pt\',
                           \'3\': \'12pt\',
                           \'4\': \'14pt\',
                           \'5\': \'18pt\',
                           \'6\': \'24pt\',
                           \'7\': \'36pt\'

Replace with this:

Code: [Select]
                \'\': ', JavaScriptEscape($txt['font_size']), ',
                           \'1\': \'8pt\',
                           \'2\': \'10pt\',
                           \'3\': \'11pt\',
                           \'4\': \'12pt\',
                           \'5\': \'14pt\',
                           \'6\': \'18pt\',
                           \'7\': \'24pt\',
                           \'8\': \'36pt\'

In ./Themes/default/scripts/editor.js, find this:

Code: [Select]
// Font maps (HTML => CSS size)
   this.aFontSizes = [
      0,
      8,
      10,
      12,
      14,
      18,
      24,
      36

Then just add 11, after the 10 like this:

Code: [Select]
this.aFontSizes = [
      0,
      8,
      10,
      11,
      12,
      14,
      18,
      24,
      36


Post Merged: July 07, 2019, 09:26:46 AM

Note: you need to refresh the browser's code cache for javascript before it works properly !

Post Merged: July 07, 2019, 09:42:23 AM

to refresh the Javscript cache only, I went into Opera's Settings > Clear browsing data > (tick) Cached Images and Files (only).

Works perfectly like it rolled off the production line at Simple Machines !

(in 11 pt  :))
« Last Edit: July 07, 2019, 09:44:11 AM by Chip »
friendly
0
funny
0
informative
0
agree
0
disagree
0
like
0
dislike
0
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
No reactions
Our Discord Server invitation link is https://discord.gg/jB2qmRrxyD

Tags:
 


dopetalk does not endorse any advertised product nor does it accept any liability for it's use or misuse





TERMS AND CONDITIONS

In no event will d&u or any person involved in creating, producing, or distributing site information be liable for any direct, indirect, incidental, punitive, special or consequential damages arising out of the use of or inability to use d&u. You agree to indemnify and hold harmless d&u, its domain founders, sponsors, maintainers, server administrators, volunteers and contributors from and against all liability, claims, damages, costs and expenses, including legal fees, that arise directly or indirectly from the use of any part of the d&u site.


TO USE THIS WEBSITE YOU MUST AGREE TO THE TERMS AND CONDITIONS ABOVE


Founded December 2014
SimplePortal 2.3.6 © 2008-2014, SimplePortal