The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Font resizer

4 posters

Go down

In progress Font resizer

Post by meemo 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
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 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://2img.net/i/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
Ape
Administrator
Administrator

Male Posts : 19084
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

In progress Re: Font resizer

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

Ok thanks, that would be greatly appreciated.
meemo
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 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
Ape
Administrator
Administrator

Male Posts : 19084
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 July 20th 2014, 8:19 am

Did you check the in all pages box?


Font resizer Slgray10

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Font resizer

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

Yes, all pages
meemo
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 July 20th 2014, 9:13 pm

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


Font resizer Slgray10

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 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


Font resizer Slgray10

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 July 21st 2014, 8:09 am

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


Font resizer Slgray10

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

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 July 21st 2014, 9:23 pm

Derri
Derri
Helper
Helper

Male Posts : 8755
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 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
Derri
Derri
Helper
Helper

Male Posts : 8755
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 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.
Derri
Derri
Helper
Helper

Male Posts : 8755
Reputation : 638
Language : English & Basic French
Location : Scotland, United Kingdom

Back to top Go down

In progress Re: Font resizer

Post by meemo 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
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 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> 

 Font resizer Mouais


Font resizer Left1212Font resizer Center11Font resizer Right112
Font resizer Ape_b110
Font resizer Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19084
Reputation : 1988
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Back to top


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