Author |
Message |
mercman
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/Animaniacs/Animaniacs_-_Brain.gif)
Joined: Nov 29, 2006
Posts: 64
Location: TN, USA
|
Posted:
Wed Dec 20, 2006 8:18 pm |
|
Hi all!
I'm not sure if I can describe this correctly, but here goes...
I have been on various other HTML based sites that have a selection "device" of some kind that allows the user to increase the size of the text/font on the site (you know, three letter 'A's that are each bigger than the prior); does anyone know of something similar that can be used with a PHP-Nuke based site?
Thank you,
-Merc |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jjh221
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/41181f73457f97b65f3be.jpg)
Joined: Dec 05, 2006
Posts: 180
|
Posted:
Wed Dec 20, 2006 8:27 pm |
|
is this for input fields of text or for viewing? Like say you are using firefox and you want to be able to ctrl+.
I dont know php just trying to help. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Dec 20, 2006 8:33 pm |
|
Strictly for viewing.
To enable those users with vision difficulties to better read the text (menus, messages, articles, everything basically).
I don't use FF, so I can't comment on it's functionality. ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Thu Dec 21, 2006 9:09 am |
|
It really has nothing to do with PHP per se. It has to do with writing a compliant and "accessible" web site. If one has this, then each browser has the ability to increase the size of the text. Again, if the site is compliant, this resizing will work properly and the site will maintain its physical design.
The problem is, very sites are truelly compliant and written with accessibility in mind. Unfortunately, PHP-Nuke and its themes are very bad in this regards.
Now, are there special browsers out there that can still change the text size? Probably. I am just not aware of them. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Dec 21, 2006 10:42 am |
|
I suppose its possible to do it with PHP by having some way to use a different css style sheet but as Montego pointed out, with all the numerous none compliant themes out there the results would be unreadable especially on fixed width themes and as there are very few, if any themes that are purely driven from CSS the formatting will be all over the place ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jjh221
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 3:48 am |
|
I dont understand what you said guardian and dont really know how nuke works. So my thinking is he would have to have 3 different site with one default theme poiting to say styleA.css, styleA.css and styleA.css? or is there a way to define wich css to use and storing in cache? or have a user setting stored in database?
sorry slowly learning, or im confusing myself really fast.
edit: users can set their own theme choice. Could he just create 3 same themes with different css sizes?
so instead of having theme point to different css he could just create themeA themeA themeA? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
Sells PC To Pay For Divorce
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined:
Posts: 5661
|
Posted:
Fri Dec 22, 2006 4:58 am |
|
well my site uses that...
and isnt to difficult to make i guess..
it uses a styleloader with a set of 3 different sizes. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 6:39 am |
|
jjh221 thats what I was trying to allude to.
The only way I know of doing what you want is to have three seperate style sheets (but I'm no expert when it come to CSS styles and classes).
The underlying problem is that the way many nuke themes are coded, they sometime over ride the CSS with hard coded styles or force text to be displayed with a specific size attribute. You should also be aware that the forums use a seperate style sheet as well....
The theme Hitwalker is using on his Joomla site is driven purely by CSS so it is a relatively simple matter to 'swop' styles - you can change not just the font size but the color of the whole theme but until we have some freely available nuke themes that are fully compliant and driven purely by CSS it's going to take a lot of work.
I know there was one user here working on such a theme but the username escapes me at the moment. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 7:17 am |
|
Why not, then, just make three different themes available, with the only difference being the sizing as defined in the various CSS and other files. You could copy your main theme twice, giving them different names.
Then, your users can pick which theme they want to use.
However, my comments (and Guardians) were geared around "wouldn't it be great if we didn't have to do that because it really isn't necessary given that the browsers already handle this" its just that PHP-Nuke is not designed and coded with accessibility in mind... however, believe me, the RN Team is definitely interested in continuing to evolve it into that. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
Former Moderator in Good Standing
![](modules/Forums/images/avatars/0cd76dcf45da5de2cf864.jpg)
Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA
|
Posted:
Fri Dec 22, 2006 12:40 pm |
|
Is it possible that the selector you are seeing is just using Javascript to instruct the client browser to change the font size? If that is the case, it would have nothing to do with PHP or CSS. |
_________________ Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 5:29 pm |
|
Wow!
Thank you all for all of this input!
hitwalker, your site is just about exactly what I was thinking of. Although, is it because your site actually has to load in entirety upon making a font size change that it's a little slower loading each time than a similarly configured HTML site?
Guardian, I believe (but may be wrong) that my site's theme is css based, and so should respond to a change in font size in the style.css. I can only play with it on my beta site and try. Since I have limited my users to the use of only my default theme, this may be do-able. Maybe hitwalker would let me "borrow" his loader...
montego, I absolutely agree. The browsers do already handle this and it would be wonderful if someday PHP-Nuke could take advantage of this. I wish I knew more about PHP-Nuke to be able to help you and the Raven's Nuke team.
Gremmie, anything is possible but I'm fairly certain that most of the sites I was looking at were using both javascript and cascading style sheets. I even pulled a few down into FP to look more closely at the underlaying HTML code.
Thank you all
-Merc |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 6:09 pm |
|
Thats the best thing to do if you have a test site, have a play with your css file and see what happens then come back and read this again and more pieces of the puzzle will fall into place ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 6:38 pm |
|
Yup, did that.
I changed all the font sizes in my theme's style.css file (added 2... 10 became 12, etc.) and it looks very nice indeed.
Went from this:
To this:
It doesn't seem to have affected at least one of the third-party modules, namely the PHP-Nuke HOW-TO, but as you can see, it did affect the third-party blocks I have installed.
This is a start.
Now I just need to figure out how to get this to apply when a user clicks a link or something.
-Merc |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 7:02 pm |
|
I think you'll find the Nuke How To module might have its own style sheet ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 7:07 pm |
|
Yup, it does.
Hmm... this make things more complicated.
I really don't want to have two (or three) complete sites just for this... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Dec 22, 2006 8:25 pm |
|
You might not need to.
All you need to do is add any unique styles from the modules CSS file to your theme CSS file and then remove the 'call' to the style sheet in the module so its uses the one in the theme ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Dec 23, 2006 6:57 am |
|
d***, everything I try works great in HTML, but does nothing in PHP-Nuke. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 24, 2006 9:19 am |
|
Quote: |
but does nothing in PHP-Nuke.
|
Yup... you are seeing what a non-compliant mess will do to you... To be honest, much of PHP-Nuke would have to be re-written to make this a "snap" to change. In fact, if it had been designed right up-front, you could simply let folks adjust the sizing in their browser (the RIGHT approach) to their liking and your site would still function perfectly... Unfortunately, we'll have what we have for a long time to come... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mercman
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 24, 2006 9:38 am |
|
Ok, next installment.
After attempting all sorts of things (that didn't work), I decided to try jjh221's suggestion and create two additional themes.
Basically, I copied my theme folder changed the style.css file and uploaded it to the betasite as Med_MyTheme; I did the same for Lg_MyTheme.
Each of these has a style sheet with the fonts stepped up by increments of two. This works nicely...
but only for Registered users.
So I decided to attempt to make a block that would make this theme change without the registered user having to go into /my account/themes to do so.
I figured, if I could get this to work for a Registered user, it shouldn't be a big deal to get it to work for ANY user... yeah, right!
Great idea, but I have no idea of how to make it work.
I'm fairly certain that this is a "function" but where might the code be for this function and how do I get it "under" the hyperlinks in the above block?
I was wondering if perhaps one of the master coders here could help?
Thank you, |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jjh221
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Dec 24, 2006 4:29 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 25, 2006 12:21 am |
|
Anonymous users can only view the site thats set in admin-> preferences as the 'default' theme HOWEVER, some good news - you might be able to use or adapt one the third party 'theme preview' blocks as I believe these use the browser session to switch between themes rather than the users access permission.
In fact depending on exactly how they are coded, you might even be able to adapt them to switch between the style sheets instead of the whole theme - I'm just thinking out loud and have not actually looked at what these blocks code does.
As Montego stated though, the whole 'theme' thing is riddled with potential pitfalls like having hard coded styles instead of relying on the style sheet etc. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
CodyG
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/186c8977515afcc3ed82a.jpg)
Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island
|
Posted:
Mon Dec 25, 2006 7:48 am |
|
I use a block like this (from Nukebling).
It allows users to set a percentage... it works if you have lots of text. It makes images impossible.
Code:<?php
############################################################################
# PHP-Nuke Block: ZOOOM (block-zoom.php) #
# Copyright(c) 2005 Dave Nelson - http://www.NukeBling.com #
# A button version can be viewed at the top left of www.safetymatters.org #
# This script is free. You can redistribute it and/or modify #
# under the terms of GNU/GLP #
############################################################################
if (eregi("block-Zoom.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "
<font class=\"content\">
<p align=\"center\">
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=1.0;this.blur();\" style=\"font-weight: 700\"><b>100%<br>
</b>
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=1.25;this.blur();\" style=\"font-weight: 700\"><b>125%<br>
</b>
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=1.5;this.blur();\" style=\"font-weight: 700\"><b>150%<br>
</b>
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=2.0;this.blur();\" style=\"font-weight: 700\"><b>200%<br>
</b>
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=2.5;this.blur();\" style=\"font-weight: 700\"><b>250%<br>
</b>
<input type=\"radio\" name=\"z\" onclick=\"document.body.style.zoom=3.0;this.blur();\" style=\"font-weight: 700\"><b>300%</b></p></font>";
$content .= '<center><a target="_blank" href="http://www.nukebling.com">NukeBling</a></center>';
?>
|
|
_________________ "We want to see if life is ubiquitous." D.Goldin |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Gremmie
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 25, 2006 3:36 pm |
|
Yeah, CodyG's solution was what I was eluding to. It's all Javascript monkeying with the client's browser. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|