The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Font Size (more options)

View previous topic View next topic Go down

Solved Font Size (more options)

Post by Luffy on November 1st 2014, 8:09 pm

Hello,

Can i add numbers of font-size: 19.20.21.22.23 to the editor font-size button?
Is there a way to do that?

MrMind


Last edited by MrMind on November 6th 2014, 10:55 am; edited 1 time in total

Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 1st 2014, 8:14 pm

Hello MrMind,

Go to Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In all the pages
Code:
$(function(){$(function() {
 $('.sceditor-button-size').click(function() {
  addSize(8, 'before');
  addSize(6, 'before');
 
  addSize(26, 'after');
  addSize(28, 'after');
  addSize(30, 'after');
 
  $('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
 });
 function addSize(size, position){
  var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
  if (position == 'after' || position == null) $('.sceditor-fontsize-picker div').append(data);
  if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
 }
})});

To add sizes write : addSize(number, position);

number : the size of the font e.g. 1, 2, 3..
position : where the option will be placed e.g. before, after..
- before places the option before all current fonts
- after places the option after all current fonts

There are already example sizes added.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 1st 2014, 8:17 pm

I want between numbers 18 and 24 to add the 19.20.21.22.23. How will i do that because i didn't understand the after and before thing.. scratch






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 1st 2014, 8:59 pm

Replace your script with this instead :
Code:
$(function(){$(function() {
 $('.sceditor-button-size').click(function() {
  addSize(23, 'after', 18);
  addSize(22, 'after', 18);
  addSize(21, 'after', 18);
  addSize(20, 'after', 18);
  addSize(19, 'after', 18);
 
  $('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
 });
 function addSize(size, position, dataSize){
  var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
  if (typeof dataSize === 'undefined') {
  if (position == 'after') $('.sceditor-fontsize-picker div').append(data);
  if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
  }
  if (typeof dataSize != 'undefined') {
  if (position == 'after') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').after(data);
  if (position == 'before') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').before(data);
  }
 }
})});

I added dataSize to the args, so you have to write : addSize(size, position, dataSize);

Example : addSize(19, 'after', 18);
Literally : The size option '19' is added in after the size option '18'

dataSize is optional, if for example you want to add an option to the end of the list you'll write : addSize(100, 'after');
Literally : Add the size option '100' after all size options


If you have a lot of font-sizes you can add a scroll bar to the drop down by adding this to your CSS :
Code:
.sceditor-fontsize-picker {
 overflow-y:auto;
 overflow-x:hidden;
 height:200px;
}

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 1st 2014, 11:34 pm

This makes the perfixes and the bbcodes not working. Why is that? As soon as i set it in the posts it is all ok but it is only working on the fast editor.

Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 1st 2014, 11:50 pm

What do you mean by prefixes ? Have you made sure to tick "In all the pages" for the script ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 2nd 2014, 1:26 am

If i tick all pages, the perfixes (http://i.imgur.com/UIONjBx.png) and the bbcodes don't work. If i click in the topics, then its all ok.






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 2nd 2014, 1:37 am

Okay, replace the script by this :
Code:
$(function(){$(function() {
 if (!document.getElementById('text_editor_textarea')) return;
 $('.sceditor-button-size').click(function() {
  addSize(23, 'after', 18);
  addSize(22, 'after', 18);
  addSize(21, 'after', 18);
  addSize(20, 'after', 18);
  addSize(19, 'after', 18);
 
  $('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
 });
 function addSize(size, position, dataSize){
  var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
  if (typeof dataSize === 'undefined') {
  if (position == 'after') $('.sceditor-fontsize-picker div').append(data);
  if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
  }
  if (typeof dataSize != 'undefined') {
  if (position == 'after') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').after(data);
  if (position == 'before') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').before(data);
  }
 }
})});

It'll only run if the editor is on the page. I have no idea why it's stopping those scripts from working as it's only triggered on click of the size button.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 2nd 2014, 3:02 am

Sorry man,

Still stops those the javascripts. Now stops, bbcodes, perfixes and the navbar scroll. I cannot help anyways. Sorry.

p.s. i had to put it to All the pages right? Because after i see that it is not working i set it to the topics only so the others don't have any affect.






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 3rd 2014, 7:17 am

Currently I am running it on my test forum without any problems. Could you provide the two scripts that are having problems, so I may see what the cause is ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 3rd 2014, 9:52 am

OFC

Perfixes (all the pages):
Code:
jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/announcement/g,"<span id='announcement'>ΑΝΑΚΟΙΝΩΣΗ:</span> "))})});
 
jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/problem/g,"<span id='problem'>ΠΡΟΒΛΗΜΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/imagss/g,"<span id='imagss'>ΕΙΚΟΝΕΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/help/g,"<span id='help'>ΒΟΗΘΕΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/idea/g,"<span id='idea'>ΙΔΕΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .module .main-head, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/staff/g,"<span id='staff'>STAFF:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .module .main-head, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/happybday/g,"<span id='happybday'>ΧΡΟΝΙΑ ΠΟΛΛΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .module .main-head,.module .main-head1, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/greece/g,"<span id='greece'>ΕΛΛΑΔΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .module .main-head, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/world/g,"<span id='world'>ΚΟΣΜΟΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/sport/g,"<span id='sport'>ΑΘΛΗΤΙΚΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/weird/g,"<span id='weird'>ΠΑΡΑΞΕΝΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/tech/g,"<span id='tech'>ΤΕΧΝΟΛΟΓΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/smartphoones/g,"<span id='smartphoones'>SMARTPHONES:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/laptab/g,"<span id='laptab'>LAPTOP - TABLETS:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/portablee/g,"<span id='portablee'>PORTABLE:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/tutorial/g,"<span id='tutorial'>ΟΔΗΓΟΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/downlooad/g,"<span id='downlooad'>DOWNLOAD:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/games/g,"<span id='games'>ΠΑΙΧΝΙΔΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/phhs/g,"<span id='phhs'>PHOTOSHOP:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/tipss/g,"<span id='tipss'>ΤIPS - ΣΥΜΒΟΥΛΕΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/soscall/g,"<span id='soscall'>ΚΛΗΣΕΙΣ SOS:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/health/g,"<span id='health'>ΥΓΕΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/cooking/g,"<span id='cooking'>ΜΑΓΕΙΡΙΚΗ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/weather/g,"<span id='weather'>ΚΑΙΡΟΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/movies/g,"<span id='movies'>ΤΑΙΝΙΕΣ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/music/g,"<span id='music'>ΜΟΥΣΙΚΗ:</span> "))})});


jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/spam/g,"<span id='spam'>ΣΥΖΗΤΗΣΗ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/votes/g,"<span id='votes'>ΨΗΦΟΦΟΡΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/school/g,"<span id='school'>ΣΧΟΛΕΙΟ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/advert/g,"<span id='advert'>ΔΙΑΦΗΜΙΣΗ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/support/g,"<span id='support'>ΥΠΟΣΤΗΡΙΞΗ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/request/g,"<span id='request'>ΑΙΤΗΜΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/reeview/g,"<span id='reeview'>ΑΞΙΟΛΟΓΗΣΗ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/vips/g,"<span id='vips'>V.I.P.:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/solved/g,"<span id='solved'>ΛΥΘΗΚΕ:</span> "))})});
 
jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/inprogress/g,"<span id='inprogress'>ΣΕ ΕΠΕΞΕΡΓΑΣΙΑ:</span> "))})});

jQuery(document).ready(function(){jQuery(".tcl.tdtopics, .module a, .tcr a, .posthead a, .pun-crumbs p, .pun h2, .pun h3, .pun input, .pun select, .pun th").each(function(){jQuery(this).html(jQuery(this).html().replace(/archieved/g,"<span id='archieved'>ΑΡΧΕΙΟ:</span> "))})});

function tagprefixo(){jQuery("input[name=subject]").val(jQuery("select[name=tags4]").val()+jQuery("input[name=subject]").val())}jQuery(document).ready(function(){jQuery('input[name="subject"]').after('<dd/><select name=tags4 onchange=tagprefixo()><option value="">Χωρίς θέμα</option><option value="announcement ">ΑΝΑΚΟΙΝΩΣΗ: </option><option value="problem ">ΠΡΟΒΛΗΜΑ: </option><option value="help ">ΒΟΗΘΕΙΑ: </option><option value="idea ">ΙΔΕΑ: </option><option value="staff ">STAFF: </option><option value="happybday ">XΡΟΝΙΑ ΠΟΛΛΑ: </option><option value="greece ">ΕΛΛΑΔΑ: </option><option value="world ">ΚΟΣΜΟΣ: </option><option value="sport ">ΑΘΛΗΤΙΚΑ: </option><option value="weird ">ΠΑΡΑΞΕΝΑ: </option><option value="tech ">ΤΕΧΝΟΛΟΓΙΑ: </option><option value="smartphoones ">SMARTPHONES: </option><option value="laptab ">LAPTOP - TABLETS: </option><option value="tutorial ">ΟΔΗΓΟΣ: </option><option value="portablee ">PORTABLE: </option><option value="downlooad ">DOWNLOAD: </option><option value="games ">ΠΑΙΧΝΙΔΙΑ: </option><option value="phhs ">PHOTOSHOP: </option><option value="tipss ">ΣΥΜΒΟΥΛΕΣ: </option><option value="soscall ">ΚΛΗΣΕΙΣ SOS: </option><option value="health">ΥΓΕΙΑ: </option><option value="cooking ">ΜΑΓΕΙΡΙΚΗ: </option><option value="weather ">ΚΑΙΡΟΣ: </option><option value="movies ">ΤΑΙΝΙΕΣ: </option><option value="imagss ">EIKONEΣ: </option><option value="music ">ΜΟΥΣΙΚΗ: </option><option value="spam ">ΣΥΖΗΤΗΣΗ: </option><option value="votes ">ΨΗΦΟΦΟΡΙΑ: </option><option value="school ">ΣΧΟΛΕΙΟ: </option><option value="advert ">ΔΙΑΦΗΜΙΣΗ: </option><option value="support ">ΥΠΟΣΤΗΡΙΞΗ: </option><option value="request ">ΑΙΤΗΜΑ: </option><option value="reeview ">ΑΞΙΟΛΟΓΗΣΗ: </option><option value="vips ">V.I.P.: </option><option value="solved ">ΛΥΘΗΚΕ: </option><option value="inprogress ">ΣΕ ΕΠΕΞΕΡΓΑΣΙΑ: </option><option value="archieved ">ΑΡΧΕΙΟ: </option></select> ')});
 
jQuery(document).ready(function(){var b=jQuery("input[value=reply]").val();"reply"==b?jQuery("select[name=tags4]").css("display","none"):"quote"==b&&jQuery("select[name=tags4]").css("display","none")});

BBcodes (all the pages):
Code:
$(function() {
  if (!document.getElementById('text_editor_textarea')) return;
 
 
  userTag(1,'sls', 'http://i39.servimg.com/u/f39/18/45/97/69/bbcode12.png', '<div class="sls">', '</div>');
  userTag(4,'atozak', 'http://i39.servimg.com/u/f39/18/45/97/69/bbcode12.png', '<div class="atozak">', '</div>');
 
 
  function userTag(id, tagname, image, htmlStart, htmlEnd) {
    var breg = new RegExp('\\['+tagname+'\\](.+?)\\[\\/'+tagname+'\\]','gi');
    if (_userdata.user_id === id) {
      $("#text_editor_textarea").before("<img src='"+image+"'id='"+tagname+"-b'/>");
      $('#'+tagname+'-b').click(function(){$('#text_editor_textarea').sceditor('instance').insertText('['+tagname+']','[/'+tagname+']')});
    }
    $('div.postbody div').each(function () {if ($(this).text().indexOf('['+tagname+']') != -1) $(this).html($(this).html().replace(breg, htmlStart + '$1' + htmlEnd))});
  }
});

nav bar scroll (all the pages):
Code:
$(function() {
    var scrollNav = function() {
        var scroll = $(window).scrollTop();
        if (scroll >= 90) $('#primary_nav').attr('style','position:fixed;top:0px;left:0;right:0;z-index:20000;background:#001e41;border-bottom:2px solid #000;');
        if (scroll < 90) $('#primary_nav').removeAttr('style');
    };
   
    scrollNav();
    $(window).scroll(function() { scrollNav() });
});






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 4th 2014, 10:29 am

Βump!






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Michael_vx on November 4th 2014, 10:57 am

i got a problem here after i did my thoughts its showed wrong list
10 - 12 -11 - 13 - 15 -14 -16 - 18 - 19 - 20 - 21 - 22 - 23 -24 - 35 - 34 - 33 - 32 - 31 - 30 - 29 - 28 - 27 - 26 - 25
here the script after changes i made

Code:
    $(function(){$(function() {
      $('.sceditor-button-size').click(function() {
        addSize(23, 'after', 18);
        addSize(22, 'after', 18);
        addSize(21, 'after', 18);
        addSize(20, 'after', 18);
        addSize(19, 'after', 18);
        addSize(11, 'after', 10);
        addSize(12, 'after', 10);
        addSize(14, 'after', 13);
        addSize(15, 'after', 13);
        addSize(25, 'after', 24);
        addSize(26, 'after', 24);
        addSize(27, 'after', 24);
        addSize(28, 'after', 24);
        addSize(29, 'after', 24);
        addSize(30, 'after', 24);
        addSize(31, 'after', 24);
        addSize(32, 'after', 24);
        addSize(33, 'after', 24);
        addSize(34, 'after', 24);
        addSize(35, 'after', 24);
   
        $('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
      });
      function addSize(size, position, dataSize){
        var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
        if (typeof dataSize === 'undefined') {
          if (position == 'after') $('.sceditor-fontsize-picker div').append(data);
          if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
        }
        if (typeof dataSize != 'undefined') {
          if (position == 'after') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').after(data);
          if (position == 'before') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').before(data);
        }
      }
    })});

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 4th 2014, 10:30 pm

@MrMind I installed all scripts, but have not encountered any errors. I'm not sure what the problem could be. Have you made any modifications to the size script ?

@Michael The option that you want to be first must be the last. For example instead of adding 50, 51, 52, we would add 52, 51, 50.

Try now :
Code:
    $(function(){$(function() {
      $('.sceditor-button-size').click(function() {
        addSize(23, 'after', 18);
        addSize(22, 'after', 18);
        addSize(21, 'after', 18);
        addSize(20, 'after', 18);
        addSize(19, 'after', 18);
        addSize(12, 'after', 10);
        addSize(11, 'after', 10);
        addSize(15, 'after', 13);
        addSize(14, 'after', 13);
        addSize(35, 'after', 24);
        addSize(34, 'after', 24);
        addSize(33, 'after', 24);
        addSize(32, 'after', 24);
        addSize(31, 'after', 24);
        addSize(30, 'after', 24);
        addSize(29, 'after', 24);
        addSize(28, 'after', 24);
        addSize(27, 'after', 24);
        addSize(26, 'after', 24);
        addSize(25, 'after', 24);
 
        $('.sceditor-fontsize-option.new-size').click(function(e){$('#text_editor_textarea').sceditor('instance').insertText('[size='+$(this).attr('data-size')+']','[/size]');$('.sceditor-fontsize-picker').remove();e.preventDefault()})
      });
      function addSize(size, position, dataSize){
        var data = '<a unselectable="on" class="sceditor-fontsize-option new-size" href="#" data-size="'+size+'"><span unselectable="on" style="font-size:'+size+'px;">'+size+'</span></a>';
        if (typeof dataSize === 'undefined') {
          if (position == 'after') $('.sceditor-fontsize-picker div').append(data);
          if (position == 'before') $('.sceditor-fontsize-picker div').prepend(data);
        }
        if (typeof dataSize != 'undefined') {
          if (position == 'after') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').after(data);
          if (position == 'before') $('.sceditor-fontsize-picker div a[data-size="'+dataSize+'"]').before(data);
        }
      }
    })});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by SLGray on November 4th 2014, 11:20 pm

Oops! Posted in the wrong topic.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36639
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Font Size (more options)

Post by APE on November 4th 2014, 11:36 pm

I used the first code without a problem to any of my systems i had this some time a go thanks to Ange Tuteur Very good




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Font Size (more options)

Post by Michael_vx on November 5th 2014, 6:57 am

Ange
thanks a lot i think im getting dumber these days Very Happy
may be its the cold
i also added the number 17 you have missed Very Happy
worked like a charm for me now

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 5th 2014, 11:19 am

@Ange, i didn't make any modifications to anything! If you want i can send you via pm a test account information to check it out in the admin panel.






Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Michael_vx on November 5th 2014, 1:52 pm

Ange i think there something in my forum not right
while posting posts i find this
starting from font 30 to 35 not working
can that be fixed or ill just have to make it 29 max ?
sorry for too much asking
Sad

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: Font Size (more options)

Post by APE on November 5th 2014, 6:44 pm

Hi ya @Michael_vx

Just to confirm anything after 29 will not work as FM systems Do not have font sizes bigger then 29 on there servers I had the same problem.

APE




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 5th 2014, 7:19 pm

MrMind wrote:@Ange, i didn't make any modifications to anything! If you want i can send you via pm a test account information to check it out in the admin panel.
I am sending you the information of a Test Account as an Admin so you can access the Admin Panel and check out the problem. If you set the font sizes to all the pages it deactivates the three javascripts and keeps that. Check it and please inform me with your suggestions if possible.

Thanks in advance.

Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Ange Tuteur on November 5th 2014, 11:06 pm

Thanks for the info. I inspected your forum and found a syntax error. This script was missing a semi-colon( ; ) at the end.
Code:
$(document).ready(function() {
    $.getScript('https://raw.github.com/lokesh/lightbox2/master/js/lightbox.js');
});
$(function () {
        $('input[name="description"]').change(function () {
            var ValidFileExtension = ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG', 'gif', 'GIF', 'bmp','BMP'];
        if ($.inArray($(this).val().split('.').pop().toLowerCase(), ValidFileExtension) == -1) {
            alert("Το πεδίο υποστηρίζει μόνο αρχεία μορφής: '.jpeg','.jpg', '.png', '.gif', '.bmp'");
        }
    })
})

I corrected it, and everything should be okay. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Font Size (more options)

Post by Michael_vx on November 6th 2014, 8:14 am

@APE wrote:Hi ya @Michael_vx

Just to confirm anything after 29 will not work as FM systems Do not have font sizes bigger then 29 on there servers I had the same problem.

APE
so that wont be changed Very Happy i mean there is no way to fix it am i right ?
@Ange Tuteur wrote:Thanks for the info. I inspected your forum and found a syntax error. This script was missing a semi-colon( ; ) at the end.
Code:
$(document).ready(function() {
  $.getScript('https://raw.github.com/lokesh/lightbox2/master/js/lightbox.js');
});
$(function () {
  $('input[name="description"]').change(function () {
  var ValidFileExtension = ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG', 'gif', 'GIF', 'bmp','BMP'];
  if ($.inArray($(this).val().split('.').pop().toLowerCase(), ValidFileExtension) == -1) {
  alert("Το πεδίο υποστηρίζει μόνο αρχεία μορφής: '.jpeg','.jpg', '.png', '.gif', '.bmp'");
  }
  })
})

I corrected it, and everything should be okay. Smile
should i change the old with the new one ? or its no problem Smile
im just asking only Razz

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: Font Size (more options)

Post by Luffy on November 6th 2014, 9:12 am

@Michael_vx, the new js is not for you. And it is not for this topic. It is just a mistake that a js had in my forum.

Edit: My question-problem is now solved. Moderators may close this and if wanted you can close it after the others questions are solved.

Luffy
Manager
Manager

Male Posts : 4236
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Font Size (more options)

Post by Michael_vx on November 6th 2014, 12:19 pm

Shocked
if its not for me then i see no problem
ill just wait for Ange will say Smile

Michael_vx
Forumember

Male Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt

Back to top Go down

Solved Re: Font Size (more options)

Post by APE on November 6th 2014, 2:29 pm

There is no plan on upping the text size on the servers as far as i know so there is no other way to add them as it has to be done server side.

as this is now marked as solved i will lock it Wink
Topic solved and archived

APE




APE
Manager
Manager

Male Posts : 8608
Reputation : 748
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum