Search found 15 matches

by baptiste
Fri Jan 16, 2009 2:21 pm
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

change:

Code: Select all

if(is_array($_COOKIE['sitestyle']) {
to:

Code: Select all

if(is_array($_COOKIE['sitestyle'])){
by baptiste
Wed Jan 14, 2009 4:20 pm
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

// Check if the requested stylesheet is "acceptable" if(($style !== false) && (in_array($style, $accept))){     if ($style == 'default') {//loop through style cookies and delete them     if(is_array($_COOKIE['sitestyle']) {     foreach($_COOKIE['sitestyle'] as $style) {         se...
by baptiste
Wed Jan 14, 2009 2:56 pm
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

hmmm, you describe a different response to the one I get when visiting your site: I only get this error if I select the default template if I am viewing the page with the default template already set. I can swap between with no problem. It seems to be a problem with deleting the cookie, what browser...
by baptiste
Wed Jan 14, 2009 2:02 pm
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

Hi all, I don't currently have access to a CMSMS installation, so this fix hasn't been tested at all. The problem seems to be that if the default style is selected when the page is already using the default style, you get the error described by louisk and others. So change this bit of code in switch...
by baptiste
Tue Mar 06, 2007 4:11 pm
Forum: CMSMS Core
Topic: Escape characters getting added to sub-template after save
Replies: 1
Views: 1332

Escape characters getting added to sub-template after save

CMSMS 1.0.2 I revisted a site that I've developed to fix a few minor problems, but I started getting errors when viewing the site: 'Warning: Unexpected character in input: '\' (ASCII=92) state=1 in C:\xampp\htdocs\barrington-giftware.com\tmp\templates_c\Cataloger^%%04^04B^04BA0690%%module_db_tpl%3AC...
by baptiste
Wed Feb 21, 2007 11:38 am
Forum: CMSMS Core
Topic: Incorrect image path for CAPTCHA
Replies: 7
Views: 3750

Re: Incorrect image path for CAPTCHA

hi,

I've installed Captcha-0.2.1.xml on a CMS Made Simple version 1.0.4 site and it seems to work fine.

I think that the cache had to be cleared for it to work.

Excellent work!
by baptiste
Thu Feb 15, 2007 2:02 pm
Forum: CMSMS Core
Topic: Guestbook module & Captcha
Replies: 13
Views: 7966

Re: Guestbook module & Captcha

Hi Tina,

the hack will work on any server, it involves hard coding the path to the captcha images on those 2 lines in the captcha class.
by baptiste
Thu Feb 15, 2007 11:42 am
Forum: CMSMS Core
Topic: Guestbook module & Captcha
Replies: 13
Views: 7966

Re: Guestbook module & Captcha

there is a hack to fix this problem (http://forum.cmsmadesimple.org/index.php/topic,9726.msg49609.html#msg49609). But I think this is down to an incorrect 'root_path', our site was working fine apart from the capcha image, changed the path, and the site still works fine and now captcha is also worki...
by baptiste
Tue Feb 06, 2007 9:21 am
Forum: CMSMS Core
Topic: Incorrect image path for CAPTCHA
Replies: 7
Views: 3750

Re: Incorrect image path for CAPTCHA

hi,

I don't think that the slashes are anything to worry about, I think PHP treats them all internally as '/' and will convert them silently.
by baptiste
Mon Feb 05, 2007 5:10 pm
Forum: CMSMS Core
Topic: Incorrect image path for CAPTCHA
Replies: 7
Views: 3750

Re: Incorrect image path for CAPTCHA

That hack will work but you should also change the similar code on line 597 of the same file. These 2 lines of code are designed to remove the beginning part of the variable $this->tempfolder (replace 'C:\xampplite\htdocs\' with '') then prepend what's left over (which should be the path to the web ...
by baptiste
Tue Jan 30, 2007 10:34 am
Forum: CMSMS Core
Topic: Guestbook module & Captcha
Replies: 13
Views: 7966

Re: Guestbook module & Captcha

The problem in our case is due to our hosting provider not reporting the correct document root: according to our host the document root for our site is '/homepages/20/2020202/', however it is actually '/kunden/homepages/20/2020202/' ('kunden' is German for customers). Changing our 'root_path', 'prev...
by baptiste
Fri Jan 19, 2007 9:35 am
Forum: CMSMS Core
Topic: admin login to one site allows admin access to different site -fixed in 1.0.3!
Replies: 2
Views: 1154

admin login to one site allows admin access to different site -fixed in 1.0.3!

xampp CMSMS 1.0.2 Running 2 sites on same xampp server (using localhost domain). If I log in to one site as admin I get access to the other site as admin, even though the second site has a different admin username/password setup. I cannot login directly to second site using the first sites admin use...
by baptiste
Thu Dec 21, 2006 9:16 am
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

Hi, Please detail the exact problem with safari. I haven't got a mac to test it on, but as it's largely server-side code the only thing that I can think of is the cookie or the way the css tags are written. If it's cookies maybe the cookie array isn't working on the mac? You'd have to store the sele...
by baptiste
Wed Dec 20, 2006 10:50 am
Forum: Tips and Tricks
Topic: PHP Style Sheet Switcher
Replies: 40
Views: 32732

Re: PHP Style Sheet Switcher

Hi, I've made a few adjustments to the above code so that: You can apply more than one selected stylesheet (I use larger text plus an alternative background). You can use the CMSMS admin panel to administrate the stylesheets (the 'custom' directory is no longer needed, avoids path probs etc). There ...

Go to advanced search