Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
mem_templates & css encoding
The version of mem_templates I have is base64 encoding the css on import.
Since txp no longer encodes css . . . .
Being a php dummy, I tried deleting the base64 code, but that only broke the plugin.
Any suggestions on how to bring it up to speed?
Thanks
Mike
Offline
Re: mem_templates & css encoding
Should just need to change line 295
$data = base64_decode($row['css']);
to
$data = $row['css'];
and line 394
$data = base64_encode(implode('', $data));
to
$data = doSlash(implode('', $data));
Last edited by ruud (2010-08-23 20:40:58)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: mem_templates & css encoding
Matt, Ruud – thank you.
My first attempts were too agrressive – I removed too much code.
Your surgical advice was just right.
Matt caught a dumb mistake on my part (below). I’ve removed it so no one accidently reads it and does what I did! :)
Thanks again guys!
Mike
Last edited by maverick (2010-08-23 20:27:19)
Offline
Re: mem_templates & css encoding
Line 298 is for plugins which I believe should still be bas64 encoded. Line 396 is for plugins as well.
Last edited by MattD (2010-08-23 19:49:07)
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#5 2010-08-23 20:06:39
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: mem_templates & css encoding
Seems to work. Thanks, Matt!
Is there a way to prevent the altered code from removing backslash box model hacks from CSS?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: mem_templates & css encoding
Doh!
Thanks for stopping me Matt!
I was hurrying, the base64 caught my eye, and I missed that it was for the plugins (though how I did – totally obvious).
Thanks again for helping with the fix, and the patience.
Mike
Offline
Re: mem_templates & css encoding
uli wrote:
Is there a way to prevent the altered code from removing backslash box model hacks from CSS?
I’ve edited Matt’s post to fix the backslash issue. Even people who are not using backslash hacks should apply this fix, because it’s important to do proper escaping on MySQL queries (which is what was lacking).
Offline
#8 2010-08-23 21:34:38
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: mem_templates & css encoding
BBEdit said:
No differences.
These files are identical.
Thanks!
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: mem_templates & css encoding
Thanks ruud
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: mem_templates & css encoding
MattD wrote:
Thanks ruud
Ditto
Offline
Pages: 1