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 Sat 19 Jul - 16:57

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 Sat 19 Jul - 17:09

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 Sat 19 Jul - 17:30; edited 2 times in total
Ape
Ape
Administrator
Administrator

Male Posts : 19122
Reputation : 1993
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 Sat 19 Jul - 17:10

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 Sat 19 Jul - 17:21

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

Male Posts : 19122
Reputation : 1993
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 Sat 19 Jul - 17:50

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 Sun 20 Jul - 0:19

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 : 51489
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 Sun 20 Jul - 13:06

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 Sun 20 Jul - 13:13

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 : 51489
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 Sun 20 Jul - 13:25

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 Sun 20 Jul - 17:40; 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 Sun 20 Jul - 13:29

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 : 51489
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 Sun 20 Jul - 15:03

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 Mon 21 Jul - 0:09

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 : 51489
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 Mon 21 Jul - 8:24

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 Mon 21 Jul - 13:23

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 Mon 21 Jul - 13:54

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 Mon 21 Jul - 14:25

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 Mon 21 Jul - 14:39

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 Mon 21 Jul - 14:59

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 Mon 21 Jul - 15:06

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 Tue 22 Jul - 10:17

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 : 19122
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Back to top

- Similar topics

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