Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-29 22:19:10

gooberboy
Member
From: Seattle
Registered: 2008-02-15
Posts: 25
Website

How to read SQL file for CSS markup

Hello, I accidentally deleted one of my style sheets. I did, however, recently backup my txp database. I can find the txp_css section in the .sql backup file, but the information is encrypted or in some binary language I don’t understand. Is there some way to see this text normally so I can recover the style sheet?

Thanks.

Offline

#2 2008-05-29 22:24:32

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: How to read SQL file for CSS markup

Why don’t you just import the SQL (using shell or phpMyAdmin)?

Offline

#3 2008-05-29 22:26:51

gooberboy
Member
From: Seattle
Registered: 2008-02-15
Posts: 25
Website

Re: How to read SQL file for CSS markup

Didn’t think of that! So I can just import the section of SQL code for the style sheet I lost?

Offline

#4 2008-05-29 22:30:41

gooberboy
Member
From: Seattle
Registered: 2008-02-15
Posts: 25
Website

Re: How to read SQL file for CSS markup

Nevermind! I figured it out. A million thanks.

Offline

#5 2008-05-29 22:33:46

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: How to read SQL file for CSS markup

Just for the record: I think the CSS on the database is on base64, that’s why it doesn’t appear on a search for a CSS rule you know it’s there.
At least, it used to be encoded on base64.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2008-05-30 09:05:49

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: How to read SQL file for CSS markup

It’s still base64 encoded, yes (and I have no idea why)

Offline

#7 2008-05-30 15:40:49

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: How to read SQL file for CSS markup

could we er… have it encoded in plain text? or are there performance benefits.

Offline

#8 2008-05-30 22:35:15

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How to read SQL file for CSS markup

It’s not for performance. This was “a Dean thing”. Kind of like “a good thing” but not necessarily “good”. LOL ;p

Offline

#9 2008-05-31 06:20:17

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: How to read SQL file for CSS markup

gooberboy wrote:

(…) I can recover the style sheet?

I don’t know if you can recover it in plain text. But you can use it in base64 encoded text. Just copy your coded style sheet, then call it like this :

<link rel="stylesheet" type="text/css" href="data:text/css;base64,XXXXXXXX" />

Where XXXXXXXX is your coded style sheet. This method works well. Now ask Ruud or Wet how to decode base64 text into plain text.

Cheers,

_____________________________________

Edit : Ok. I found a website where you can decode your base64 coded style sheets into plain text : HERE

Best Regards,

Last edited by Pat64 (2008-05-31 06:37:26)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB