www.andrewingram.co.za

post released sites here made with phpwcms
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

OK thanks kosse! :lol:



yes ,(sorry to "bug" your topic Trip. And nice site anyway :lol:
vello
Posts: 44
Joined: Wed 24. Mar 2004, 12:21
Location: Estonia
Contact:

Post by vello »

compliments
Vello
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Hi Guys
for some reason I dont get email confirmation any more when the topic has a post.... :-(

So the style changer... all things considered I got the code off another site... however the trick and this is a huge trick is to change your font size in the css to %... :-)

You need to then change all pt values to a % value in your css... its a little work as it will not agree in IE and FF

good luck
TriP
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi

I can’t get this work!!

I inserted in templates in "html head"

Code: Select all

<script type="text/javascript" language="javascript" src="/Include/inc_js/style_changer.js"></script>
"style_changer.js" is uploaded to the folder: Include/inc_js/

I inserted in templates in "main"

Code: Select all

<!-- text - + -->

<div id="fontchanger"><a href="index.php" title="Increase FONT size" onclick="changeFontSize(1);return false;">
	<img src="/picture/css_larger.gif" alt=" font larger" border="0" /></a><a href="index.php" title="Decrease FONT size" onclick="changeFontSize(-1);return false;"><img src="/picture/css_smaller.gif" alt="font smaller" border="0" /></a><a href="index.php" title="Revert styles to default" onclick="revertStyles(); return false;"><img src="/picture/css_reset.gif" alt="reset font" border="0" /></a></div>
In your site everything works nice Trip, but I can’t get this to work!! What is wrong?
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Did you change the font values in your css to a percent value?
whats your link??
TriP
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi my link is localhost right now!

Do i have to sett all font to % in css?

Exemple from

Code: Select all

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 11px
to

Code: Select all

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: %
or is it

Code: Select all

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 11%
only that orange "admin: manager" thing changes :lol:
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 11px

font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 100%

this would be a better option, you need to test, and see what the results are...
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

do you meen in this file right? phpwcms_template/inc_css/frontend.css
there are more css file, but in folder include/inc_css

I tested with

11%
%
100%

Nothing happens, only that orange "admin: manager" change
Paal
Posts: 204
Joined: Wed 6. Oct 2004, 19:54
Location: Budapest, Hungary
Contact:

ThickBox - One box to rule them all.

Post by Paal »

Ben wrote:It might be a lot of work unless someone creates a content part for it, but Lightbox might be worth checking out: http://www.huddletogether.com/projects/lightbox2
...or the other way: ThickBox (20kb)

Paul
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Stim wrote:do you meen in this file right? phpwcms_template/inc_css/frontend.css
there are more css file, but in folder include/inc_css

I tested with

11%
%
100%

Nothing happens, only that orange "admin: manager" change
If you showed your site on a live server then maybe we could look at what you are doing wrong...
TriP
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi
I can’t do that right now because it’s run on loclhost. That strange ting is only that orange “admin manager” changes the font when I click on + and – buttons. I also tryed this script on older version of phpwcms and is same problem there. Maybe you can send me your css for **** with my? I also have test with all css file because I didn’t relay know which css to changes. But I guess it was frontend.css mean to changes.

I tried out this stuff http://www.dyn-web.com/dhtml/sizefont/index.php to, but didn’t working. Maybe I did something wrong because I didn’t really understand that guide on site
trip
Posts: 657
Joined: Tue 17. Feb 2004, 09:56
Location: Cape Town, South Africa
Contact:

Post by trip »

Stim
css and js are all available online from that site, you should be alright in checking it out from there...

TriP
ff123
Posts: 172
Joined: Thu 9. Jun 2005, 20:03
Location: The Netherlands
Contact:

Post by ff123 »

Hi,

Subject: css switcher using php
Implementation time: 20 minutes

Articles:
http://www.alistapart.com/articles/phpswitch/

* Explanation *
Put the switcher.php in the root with this code:
<?php
setcookie ('sitestyle', $_GET['set'], time()+31536000);
header("Location: " . $_SERVER['HTTP_REFERER']);
?>

In the HEAD section put this:
<link href="stichtingflash_template/css/<?php echo (!$_COOKIE[sitestyle])?'css_normalfont':$_COOKIE[sitestyle] ?>.css" rel="stylesheet" type="text/css">

Change font size by calling switcher.php (put this in template):
<a href="switcher.php?set=css_normalfont" class="nav">[normaal font]</a>
<br />
<a href="switcher.php?set=css_largefont" class="nav">[groot font]</a>
<br />

Leave css_normalfont.css empty, because you dont want to overwrite the default font sizes.
In css_largefont.css you define larger font sizes, like this:
#content_middle, #content_right_vervolgpagina {
font-size: 1.2em;
}
#content_right {
font-size: 1.2em;
}

It works for me in phpwcms on localhost.

Regards, groeten,
vuurvos

P.S. Maybe I should post this in another topic too or something, then let me know. :wink:
-- Vuurvos --
Stim
Posts: 587
Joined: Mon 6. Jun 2005, 13:13

Post by Stim »

Hi

Do you know any working demo? I think this cod reloading the site pages everytime?

I get this worked http://www.dyn-web.com/dhtml/sizefont/index.php
but problem is, I discover that it’s only work in HTML, or wysiwyg html content!!

I believe this stuff is great because as I understand, you can choose were to change font. Example only in main. That is exactly what I won’t to do, and not to change for example in header, or nav menu etc.
ff123
Posts: 172
Joined: Thu 9. Jun 2005, 20:03
Location: The Netherlands
Contact:

Post by ff123 »

A working demo of the php based css switchers is here for example:
http://www.historischevereniginghasselt.nl/

But notice that you cannot see the php code of course.
-- Vuurvos --
Post Reply