Font Size (more options)
5 posters
Page 1 of 1
Font Size (more options)
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
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
Re: Font Size (more options)
Hello MrMind,
Go to Administration Panel > Modules > JavaScript codes management > Create a new script
Title : Your choice
Placement : In all the pages
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.
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.
Re: Font Size (more options)
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..
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
Replace your script with this instead :
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:
$(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;
}
Re: Font Size (more options)
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.
Re: Font Size (more options)
What do you mean by prefixes ? Have you made sure to tick "In all the pages" for the script ?
Re: Font Size (more options)
If i tick all pages, the perfixes (https://i.imgur.com/UIONjBx.png) and the bbcodes don't work. If i click in the topics, then its all ok.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
Okay, replace the script by this :
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.
- 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.
Re: Font Size (more options)
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.
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.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
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 ?
Re: Font Size (more options)
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() });
});
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
Βump!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
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
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
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Font Size (more options)
@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 :
@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);
}
}
})});
Re: Font Size (more options)
Oops! Posted in the wrong topic.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Font Size (more options)
I used the first code without a problem to any of my systems i had this some time a go thanks to Ange Tuteur
Re: Font Size (more options)
Ange
thanks a lot i think im getting dumber these days
may be its the cold
i also added the number 17 you have missed
worked like a charm for me now
thanks a lot i think im getting dumber these days
may be its the cold
i also added the number 17 you have missed
worked like a charm for me now
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Font Size (more options)
@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.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Font Size (more options)
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
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
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Font Size (more options)
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
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
Re: Font Size (more options)
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.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.
Thanks in advance.
Re: Font Size (more options)
Thanks for the info. I inspected your forum and found a syntax error. This script was missing a semi-colon( ; ) at the end.
I corrected it, and everything should be okay.
- 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.
Re: Font Size (more options)
so that wont be changed i mean there is no way to fix it am i right ?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
should i change the old with the new one ? or its no problemAnge 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.
im just asking only
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Font Size (more options)
@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.
Edit: My question-problem is now solved. Moderators may close this and if wanted you can close it after the others questions are solved.
Re: Font Size (more options)
if its not for me then i see no problem
ill just wait for Ange will say
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: Font Size (more options)
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
Topic solved and archived
APE
Similar topics
» Font Size
» Miniprofile Font size
» Like button font size
» rank font size
» Forum font size change help!
» Miniprofile Font size
» Like button font size
» rank font size
» Forum font size change help!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum