Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
mercman
Regular
Regular


Joined: Nov 29, 2006
Posts: 64
Location: TN, USA

PostPosted: Wed Dec 20, 2006 8:18 pm Reply with quote

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
 
View user's profile Send private message Visit poster's website
jjh221
Worker
Worker


Joined: Dec 05, 2006
Posts: 178

PostPosted: Wed Dec 20, 2006 8:27 pm Reply with quote

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.
 
View user's profile Send private message
mercman
PostPosted: Wed Dec 20, 2006 8:33 pm Reply with quote

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
 
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Thu Dec 21, 2006 9:09 am Reply with quote

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! 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Thu Dec 21, 2006 10:42 am Reply with quote

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
 
View user's profile Send private message Send e-mail
jjh221
PostPosted: Fri Dec 22, 2006 3:48 am Reply with quote

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: Idea 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?
 
hitwalker
Sells PC To Pay For Divorce


Joined:
Posts: 5661

PostPosted: Fri Dec 22, 2006 4:58 am Reply with quote

well my site uses that...
and isnt to difficult to make i guess..
it uses a styleloader with a set of 3 different sizes.
 
View user's profile Send private message
Guardian2003
PostPosted: Fri Dec 22, 2006 6:39 am Reply with quote

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.
 
montego
PostPosted: Fri Dec 22, 2006 7:17 am Reply with quote

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.
 
Gremmie
Former Moderator in Good Standing


Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Fri Dec 22, 2006 12:40 pm Reply with quote

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 
View user's profile Send private message
mercman
PostPosted: Fri Dec 22, 2006 5:29 pm Reply with quote

Wow!
Thank you all for all of this input! Very Happy

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... Very Happy

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
 
Guardian2003
PostPosted: Fri Dec 22, 2006 6:09 pm Reply with quote

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
 
mercman
PostPosted: Fri Dec 22, 2006 6:38 pm Reply with quote

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:

Image

To this:

Image

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. Very Happy

-Merc
 
Guardian2003
PostPosted: Fri Dec 22, 2006 7:02 pm Reply with quote

I think you'll find the Nuke How To module might have its own style sheet Wink
 
mercman
PostPosted: Fri Dec 22, 2006 7:07 pm Reply with quote

Yup, it does.
Hmm... this make things more complicated.
I really don't want to have two (or three) complete sites just for this...
 
Guardian2003
PostPosted: Fri Dec 22, 2006 8:25 pm Reply with quote

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
 
mercman
PostPosted: Sat Dec 23, 2006 6:57 am Reply with quote

d***, everything I try works great in HTML, but does nothing in PHP-Nuke.
 
montego
PostPosted: Sun Dec 24, 2006 9:19 am Reply with quote

Quote:

but does nothing in PHP-Nuke.


Yup... you are seeing what a non-compliant mess will do to you... Sad 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...
 
mercman
PostPosted: Sun Dec 24, 2006 9:38 am Reply with quote

Ok, next installment. Confused
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... Groovy

but only for Registered users. Bang Head

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. speedtype
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!

Image

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,
 
jjh221
PostPosted: Sun Dec 24, 2006 4:29 pm Reply with quote

users themes i think is stored in nuke_users table. So allowing unregistered
users to set themes might be a bit tough.
Would need some place to store and call apon. I really dont know im just rambling, but i did find this! Only registered users can see links on this board! Get registered or login!

for registered users only though.
or
you could also create a page like this 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!
hope this helps
 
Guardian2003
PostPosted: Mon Dec 25, 2006 12:21 am Reply with quote

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.
 
CodyG
Life Cycles Becoming CPU Cycles


Joined: Jan 02, 2003
Posts: 712
Location: Vancouver Island

PostPosted: Mon Dec 25, 2006 7:48 am Reply with quote

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 Only registered users can see links on this board! Get registered or login! #
# 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 
View user's profile Send private message
Gremmie
PostPosted: Mon Dec 25, 2006 3:36 pm Reply with quote

Yeah, CodyG's solution was what I was eluding to. It's all Javascript monkeying with the client's browser.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©