Page 1 of 1

Custom css storage

Posted: 29 Sep 2013, 04:14
by roshambo
I made a mistake with .dijit {display: none !important} and it hid the custom css button in preferences along with a shitload of other things.

Grepping the ttrss directory for text resulted in nothing. Deleting cookies didn't work.

Where is the custom css stored? Or is there some other way to recover from such disaster?

Re: Custom css storage

Posted: 29 Sep 2013, 04:39
by sleeper_service
you never fail to deliver.

Re: Custom css storage

Posted: 29 Sep 2013, 04:56
by AngryChris
Look for files with recent modification times.

Code: Select all

$ ls -lrRt *

Re: Custom css storage

Posted: 29 Sep 2013, 06:06
by LifeWOutMilk
Every desktop browser lets you modify CSS on a page dynamically, did you try that?

Re: Custom css storage

Posted: 29 Sep 2013, 08:22
by vilain
The custom CSS entries that you saw on the preferences page are an entry in the ttrss_user_prefs table.
pref_name="USER_STYLESHEET"
value=NULL or whatever you entered

You'll need a database tool that can retrieve and edit records either in PostgreSQL or MySQL. Both phpPgAdmin and phpMyAdmin can do this if you have them setup on your server. Otherwise, you're kinda out of luck.

Re: Custom css storage

Posted: 29 Sep 2013, 08:38
by AngryChris
Ah, cool, so that's where they're at.

Code: Select all

ttrssdb=> select * from ttrss_user_prefs where pref_name='USER_STYLESHEET' and owner_uid='2';
 owner_uid |    pref_name    | profile |                               value                               
-----------+-----------------+---------+--------------------------------------------------------------------
         2 | USER_STYLESHEET |         | #floatingTitle:not(:empty) {<br/>  display: none !important;<br/>}
(1 row)

ttrssdb=>

Tip for the OP: Use the SQL command line that came with your DB. Find your uid in the ttrss_users table and then do the following:

Code: Select all

ttrssdb=> update ttrss_user_prefs set value='' where owner_uid='2';

Change the 2 to the uid you found for yourself in the ttrss_users table.

Re: Custom css storage

Posted: 29 Sep 2013, 10:10
by roshambo
Thanks for the suggestions. I was able to resolve it with chrome dev tools. If it happens again, I'll try phppgadmin.