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 resizer

View previous topic View next topic Go down

In progress Font resizer

Post by meemo on July 20th 2014, 12:57 am

Is there a way to add a font resizer to the forum, much like the one on the admin page, which lets users resize the page font to their liking.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by APE on July 20th 2014, 1:09 am

Yes this can be done
Please add this to the following settings
JavaScript
Name it Font post resizer
All pages.


Code:
//Quick Post font size toggle for forumotion boards
var pfsize = new Array('12px', '14px', '16px', '24px');
var plheight = new Array('14px', '16px', '18px', '24px');
var pfon = my_getcookie('fontsize');
if (pfon == null) {
    pfon = '1';
    my_setcookie('fontsize',pfon,true);
}
pfon = parseInt(pfon);

function setfontsize(startup) {
    if (!startup) {
        pfon++;
        my_setcookie('fontsize',pfon.toString(),true);
    }
    if (pfon == pfsize.length) {pfon = 0;}
    var fsize = pfsize[pfon];
    var lheight = plheight[pfon];
    $('.content.clearfix').css({fontSize:fsize,lineHeight:lheight});
}


$(function() {
    if ($('.addthis_button')[0]) {
        $('.addthis_button').eq(0).before('<button class="button2" title="Toggle font size in posts" onclick="setfontsize()"><img src="http://illiweb.com/fa/wysiwyg/style.png" /></button>&nbsp;•&nbsp;');
        setfontsize('x');
    }
}); 

to change the font size just change the parts that say
Code:
var plheight = new Array('14px', '16px', '18px', '24px');

any problems give me a shout. the tool will come up on the top right hand side of the first post.

Ape


Last edited by APE on July 20th 2014, 1:30 am; edited 2 times in total

APE
Manager
Manager

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

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

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 20th 2014, 1:10 am

Ok thanks, that would be greatly appreciated.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by APE on July 20th 2014, 1:21 am

@meemo wrote:Ok thanks, that would be greatly appreciated.
Updated my old post please read the topic Wink

APE
Manager
Manager

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

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

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 20th 2014, 1:50 am

It worked for the first couple of clicks then stopped.  I deleted then reinstalled it and cleared my cache.  Is there anyway to use it on all pages if I can get it to work again.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by SLGray on July 20th 2014, 8:19 am

Did you check the in all pages box?


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


SLGray
Administrator
Administrator

Male Posts : 35636
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 20th 2014, 9:06 pm

Yes, all pages

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by SLGray on July 20th 2014, 9:13 pm

So there is not a image next to the topic action and share links?


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


SLGray
Administrator
Administrator

Male Posts : 35636
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 20th 2014, 9:25 pm

Yes, the grow/shrink font is there.  It worked at first, then after a couple of clicks it stopped altogether.


Last edited by meemo on July 21st 2014, 1:40 am; edited 1 time in total

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by SLGray on July 20th 2014, 9:29 pm

I believe I know where that code comes from.  There should also be a code to keep cookies.

http://www.dion-designs.com/area51/viewtopic.php?p=10986


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


SLGray
Administrator
Administrator

Male Posts : 35636
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 20th 2014, 11:03 pm

I opened up a different browser and it worked there, but it will only show up on forum pages.  Is there anyway to get the default resizer that is in phpbb header.  It's in the html code I believe.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by SLGray on July 21st 2014, 8:09 am

Well, a font resizer will only be for posts.  So you want one for everything on your forum?


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


SLGray
Administrator
Administrator

Male Posts : 35636
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 21st 2014, 4:24 pm

Yes, I've seen it function on other phpbb sites. It lives in the static header. Much like the one in the admin header.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by Derri on July 21st 2014, 9:23 pm



Forum Rules : : Forumotion Staff : : Appeal A Warning : : FAQ : : Tips & Tricks : : Forgotten Password/Login Issues
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


Derri
Administrator
Administrator

Male Posts : 8355
Reputation : 571
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 21st 2014, 9:54 pm

This probably exactly what I need but I don't know how to edit the themes' html to put it where I want on the page according to this part.  

And then this HTML where you would like the font increaser to go:

       <div id="LGfontsize">
           Font Size:
           <span onclick="change_font_size(true)"> <img src="IMAGE FOR DECREASING FONT SIZE"> </span>
           <span onclick="change_font_size()"> <img src="IMAGE FOR INCREASING FONT SIZE"> </span>
       </div>

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by Derri on July 21st 2014, 10:25 pm

Hi,

Go to Admin Control Panel --> Modules --> HTML and Javascript Codes Management --> HTML Pages Management --> Create New, then I think you simply paste the code --> Save


Forum Rules : : Forumotion Staff : : Appeal A Warning : : FAQ : : Tips & Tricks : : Forgotten Password/Login Issues
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


Derri
Administrator
Administrator

Male Posts : 8355
Reputation : 571
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 21st 2014, 10:39 pm

But where would it go. Putting that code in doesn't tell the button where to go. I need to place it in the html code where I want it to show up, right? So I need to know where the theme html is.

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by Derri on July 21st 2014, 10:59 pm

@meemo wrote:But where would it go.  Putting that code in doesn't tell the button where to go.  I need to place it in the html code where I want it to show up, right?  So I need to know where the theme html is.

It'll appear on the forum, I believe it appears in the header. This is how FM works. I believe you also need two images, one to control zoom and one to increase it.


Forum Rules : : Forumotion Staff : : Appeal A Warning : : FAQ : : Tips & Tricks : : Forgotten Password/Login Issues
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


Derri
Administrator
Administrator

Male Posts : 8355
Reputation : 571
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo on July 21st 2014, 11:06 pm

Putting it the html pages just adds an additional html page to the website, it does nothing in the theme/skin part like the instructions call for. Can forumotion not put on in the header just like in the admin page header?

meemo
Forumember

Posts : 46
Reputation : 2
Language : English

http://thewalkingrebels.canadian-forum.com/

Back to top Go down

In progress Re: Font resizer

Post by APE on July 22nd 2014, 6:17 pm

Can you not add this code to the Site description ?

Code:
<div id=LGfontsize>            Font Size:            <span onclick=change_font_size(true)> <img src=IMAGE FOR DECREASING FONT SIZE> </span>            <span onclick=change_font_size()> <img src=IMAGE FOR INCREASING FONT SIZE> </span> 

 





APE
Manager
Manager

Male Posts : 8319
Reputation : 716
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