Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2008-11-09 00:38:53

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Admin skins

Robert, why don’t you get a login off Stef and go and have at look at it in action? In particular have a look at “A Bit Blue” and see the added functionality in the header. Whether you like the theme or not is neither here nor there but you will see what could be done with this plug-in given the modest changes to the core that Stef is asking for, changes which are backward-compatible and invisible to anyone not using the plug-in.

Whilst this isn’t a total solution to the age-old forum arguments about a complete admin re-design, I think it is a bloody good step in the right direction and would be a boon to those of us who would like a simple method of giving our customers a corporate make-over for their admin.

I’m thinking that a persistence in pursuing a CSS-only route is just a straight-jacket waiting to be ripped off.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#17 2008-11-09 06:49:26

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,416
Website GitHub Mastodon

Re: Admin skins

thebombsite wrote:

Robert, why don’t you get a login off Stef and go and have at look at it in action?

Well, please send it along. Plus, I’d like to see a patch as indicated above.

Offline

#18 2008-12-09 00:06:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

Right, I’ve had some time to refine this thing a bit more and it’s now available on the site as before if you wish to login and play with it. Anyone who has requested an account, I have increased your security level to Publisher because the plugin is now only available to that level of user. I trust you all to play nice :-)

New features:

  • The directory is called ‘skin’ and everything is now referred to as a skin instead of an admin theme
  • Setup button to handle the plugin prefs (that I can’t bloody well move to the right of the screen… grrr, will fix it one day)
  • Skins can be sorted with or without case sensitivity (thanks kemie)
  • Skins can either be set globally (one for all), one per privilege level, or one per user. A cookie tracks the latter two cases
  • Current skin is highlighted better in the list
  • The about.txt file is now referred to as a Skinfo file, for no other reason than my personal amusement ;-)
  • Shortcut back to the Skin List page from the Edit page
  • If you set the skin system to per-user, a new tab appears under Admin for all non-publishers that allows skins to be switched from your defined shortlist
  • Plugin help written — please read for the known caveats and gotchas. Most important stuff is highlighted in red

If you want to test out the per-priv or per-user skins, I’ve created three low-level users that you can log in as (each from a different browser / machine or it’ll read the cookie from the last person that used it!). The passwords are the same as the login names: staffwriter, freelancer, or designer.

Feel free to have a play around, port, import/export/clone themes and generally put it through its paces. If anybody else would like a login, just holler.

The patch against r3039 is coming… then we can see if we can hone my hackish system into something a bit more elegant and TXP-like.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#19 2008-12-09 00:47:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

And here’s the patch which looks big and scary but isn’t.

I have no idea why TortoiseSVN decided to create some stuff long-hand by essentially deleting every row in both textpattern.css and txplib_html.php, then adding them all back in to new versions of the files, instead of simply marking the minor differences or indicating files as moved?! Perhaps that’s the way it works. Or perhaps I screwed up.

Similarly, the entire txp_img directory has been moved, but for some reason when I dbl clicked the .patch file it only showed me file differences excluding moved/deleted files. The .patch file itself (if read in a text editor) lists all such changes, so maybe there’s some way of getting it to show or apply them that I haven’t figured out yet. This version control lark is all new to me.

If you need anything different from me, just yell. But for now, please take it and feel free to suggest far better ways to help make it into something core-worthy that will unleash skins on the masses. Some sort of callback mechanism for overriding some of the functions like tabber() and areatab() would be awesome instead of my fugly hacks. Either way, look at the PHP files in Stuart’s ‘A Bit Blue’ theme for the way it is currently used and the kind of functionality this opens up.

Thanking you in advance.

P.S. I’m not sure if my use of DS is correct. Perhaps it should be '/'? Haven’t got a Windows environment to test it on.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#20 2008-12-09 18:33:46

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Admin skins

Sorry for some offtopic, but how to merge path file with original txplib_head.php, using TortoiseSVN too

Last edited by the_ghost (2008-12-09 18:34:23)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#21 2008-12-09 19:16:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

the_ghost wrote:

how to merge path file with original txplib_head.php, using TortoiseSVN too

Last time I looked if you dump the patch in a recently-downloaded SVN copy of TXP and right-click the .patch file, there’s a context option TortoiseSVN->Apply Patch...

That showed me a diff, file by file, change by change, and I had to accept or reject the various bits and pieces. It didn’t move the txp_img folder or delete the files that had been moved so maybe there’s some option I missed or I messed up when I made the patch *shrug*

Sorry, I’ve no idea on this SVN lark. Bazaar or Mercurial seem much more intuitive, imo.

On a related note, the patch was really only for the devs to mess about with and kick into shape. By all means try it, but things will change drastically before (hopeful) release so don’t get too comfortable with it the way it is now!

Last edited by Bloke (2008-12-09 19:17:19)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#22 2008-12-09 22:01:13

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Admin skins

Bloke wrote:

I have no idea why TortoiseSVN decided to create some stuff long-hand by essentially deleting every row in both textpattern.css and txplib_html.php, then adding them all back in to new versions of the files, instead of simply marking the minor differences or indicating files as moved?! Perhaps that’s the way it works. Or perhaps I screwed up.

Sounds like your editor, diff+merge tool or perhaps tortoise/svn has changed the line endings — presumably from Unix to Windows. You might need to check your prefs to see.

You also need to take care on some diff engines too. I use meld on linux and it took me a long time to figure out it was guilty of adding a line to the end of each file I diff’d and merged changes into using it. Soon sorted in the preferences once noted but not pretty.


Steve

Offline

#23 2008-12-09 22:25:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

net-carver wrote:

Sounds like your editor, diff+merge tool or perhaps tortoise/svn has changed the line endings

Bingo! Thanks Steve.

  • txplib_head.php came down as UNIX, my text editor left it that way
  • txplib_html.php came down as UNIX, my editor changed it to DOS for reasons best known to itself *shrug*
  • textpattern.css came down from code.google.com as DOS (!), my editor changed it to UNIX — as I expected

I’ll convert the ones that changed to the same format as they came down, then the patch size should shrink dramatically… will repost it later.

Many thanks, sir.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#24 2008-12-09 22:50:01

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: Admin skins

Are there some working textpatern skins that can be instaled with this patch?


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#25 2008-12-09 23:12:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

the_ghost wrote:

Are there some working textpatern skins that can be instaled with this patch?

Yes:

And of course you’ll need the plugin (compressed) in order to install them. All props to the original authors of those awesome skins: you rock!

EDIT: thanks for testing this Viktor; I would be interested to hear how you get on if you clone a skin and insert cyrillic characters in the about.txt file (note that the skin filenames themselves are subject to the rules you and ruud talked about recently with regards 4.0.7 file handling).

Last edited by Bloke (2008-12-09 23:18:02)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#26 2008-12-09 23:16:17

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Admin skins

Bloke wrote:

And of course you’ll need the plugin (compressed) in order to install them.

Stef, your url is missing an f in the plugin file.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#27 2008-12-09 23:21:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

MattD wrote:

Stef, your url is missing an f in the plugin file.

lol.. got my own domain wrong! Maybe that explains why Google kicked me off their search engine… :-D

Thanks Matt, will fix it.

EDIT: Fixed!

Last edited by Bloke (2008-12-09 23:23:51)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#28 2008-12-09 23:33:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

I know I sound like stuck vinyl, but just another reiteration that this is proof of concept only.

Please don’t spend ages deliberating over or constructing the perfect skin because the way this thing hangs together WILL CHANGE and may never see the light of day if we can’t find a good compromise between the hacky way the patch does stuff now vs an official mechanism that the dev team are happy with.

By all means play, tweak, suggest improvements to the plugin or underlying patch methodology; I just don’t want anyone to go to the trouble of creating a beautiful skin now and have to go back and redo everything later! Unless you enjoy doing that kind of thing, of course ;-)

Last edited by Bloke (2008-12-09 23:34:37)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#29 2008-12-10 07:27:18

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

Re: Admin skins

Oops :

Fatal error: Call to undefined function skin_dir() in /home/s/domain/html/back-admin/lib/txplib_misc.php(570) : eval()'d code on line 87


Patrick.

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

Offline

#30 2008-12-10 09:12:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: Admin skins

Pat64 wrote:

Fatal error: Call to undefined function skin_dir() in /home/s/domain/html/back-admin/lib/txplib_misc.php(570) : eval()'d code on line 87

Have you installed the patch? That function is defined in the core mod I made.

If you don’t want to install the patch (it’s not a good idea just yet unless you are hardcore!) then consider requesting a login on my test server so you can play with the plugin directly.

Last edited by Bloke (2008-12-10 09:14:20)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB