Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-01 21:38:39

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Updating custom admin interface

Hi!

I’m using the custom admin interface devised by Kevin Potts on a site that I’m upgrading to the latest version of Textpattern.

[Edit: malformed link]

I updated all the files as directed, except for site/textpattern/textpattern.css and site/textpattern/lib/txplib_head.php, which I’m not sure how to upgrade properly.

I ran diff -u to compare the modified files with their 4.0.6 and 4.0.7 counterparts, but it isn’t easy to pinpoint specific lines that should be changed.

For textpattern.css file, I prepended the entire 4.0.7 version to the modified file, so that the modified css overwrites Textpattern vanilla in the header/navigation area.

The txplib_head.php wasn’t as easy to deal with. For the time being, I’m using the modified version from revision 2783. Will this lead to any problems?

  1. How have other people solved this?
  2. Is there a protocol for updating these files?
  3. Is there a better way to get the look of Kevin’s custom admin interface without hacking TXP core files like this?

Recent change sets indicate that Textpattern is shifting away from hard-coded style and graphics, which would suggest that customizing the interface would be easier. I’m curious if anyone has had success with using an alternative UI with Textpattern 4.0.7.

Thank you!
john

Last edited by johnstephens (2008-12-02 03:21:47)

Offline

#2 2008-12-01 21:49:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Updating custom admin interface

johnstephens wrote:

I’m curious if anyone has had success with using an alternative UI with Textpattern 4.0.7.

funny you should mention this :-)

The old version of smd_skin is up and running on my test site (it’s a very recent 4.0.6). If you want a login so you can play with porting that theme, let me know via e-mail.

The new version of the plugin/hack is (*cough* was, until I upgraded TXP to 4.0.7 by accident and didn’t roll in my changes) working on another test site that adds all sorts of extra cool stuff. When I get a chance to do a diff of the two installs I’ll update my patch and post it as an offical mod for the devs to critique. Was supposed to do it a week or so ago but got sidetracked.

It’s almost 100% likely the way things are presently done in smd_skin is not going to be the way it’s done in the final implementation that might (as you’ve noticed) slip into the core sometime before next release. But for testing purposes and feedback I’ve had some very successful theme ports done on my test server and it’s lookin mighty fun.

Last edited by Bloke (2008-12-01 22:02:00)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2008-12-02 10:21:26

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: Updating custom admin interface

bloke, it sounds awesome!


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#4 2008-12-02 19:02:36

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: Updating custom admin interface

Is there a better way to get the look of Kevin’s custom admin interface without hacking TXP core files like this?

The problem is that I did not even hack the files. My mod was based off milkshake’s mod for 4.0.6, which is based on Dan Hoy’s original. I never changed txplib_head.php; all I did was repackage with a new CSS file to make more easily styled for client projects.

But since Milkshake has kindly released a beta of his mod for 4.0.7, I have started working on getting my CSS to play nice.


Kevin
(graphicpush)

Offline

#5 2008-12-02 19:25:04

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Updating custom admin interface

Thank you! Admin skinning will indeed be a very valuable feature. I was able to solve the problem temporarily by following your link to Textgarden, where I found a version of A Bit Blue that has been ported to 4.0.7. A Bit Blue includes a txplib_head.php file nearly identical to the one in your mod, Kevin. I merely commented out the TXP reference links in the header and cut the drop-select menu.

I also used the Bit Blue method of creating a system css file for styles, rather than hacking textpattern.css directly, using your stylesheet, Kevin. The only change I made was to add in the correct style for the Text, HTML, and Preview tabs. I’m not sure right off what else is missing, but everything else seems to be working for now.

Stef, I’ll be very interested in the progress toward smd_skin!

Kevin, here’s the stuff I added to your stylesheet:

	td#article-tabs ul {
	list-style-type: none;
	margin: 0;
	}

	td#article-tabs li {
	width: 19px;
	height: 100px;
	margin: 0;
	padding: 0;
	text-indent: -9999px;
	background: transparent top left no-repeat;
	}

	td#article-tabs a {
	display: block;
	width: 15px;
	height: 100px;
	outline: none;
	}

	td#article-tabs #tab-textup {
	background-image: url(txp_img/textup.gif);
	}

	td#article-tabs #tab-textdown {
	background-image: url(txp_img/textdown.gif);
	}

	td#article-tabs #tab-htmlup {
	background-image: url(txp_img/htmlup.gif);
	}

	td#article-tabs #tab-htmldown {
	background-image: url(txp_img/htmldown.gif);
	}

	td#article-tabs #tab-previewup {
	background-image: url(txp_img/previewup.gif);
	}

	td#article-tabs #tab-previewdown {
	background-image: url(txp_img/previewdown.gif);
	}

I didn’t go through the interface with a fine-toothed comb, and I suspect deficiencies may pop up. Shall I keep an eye on your blog for an updated stylesheet?

Offline

#6 2008-12-02 19:46:52

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: Updating custom admin interface

I have actually been working on this right now. This was the only bit I could find as well, and I actually trimmed it down to make the definitions more efficient. I am going to try to release this tonight. I cannot find any other inconsistencies.


Kevin
(graphicpush)

Offline

#7 2008-12-02 19:57:29

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Updating custom admin interface

That’s awesome. Thanks!

Working from A Bit Blue, this is this is what I changed to bring the txplib_head.php file inline with the client admin mod:

Starting @ line 174:

<?php callback_event('admin_side', 'head_end'); ?>
</head>
<body id="<?php echo $body_id; ?>">
<?php callback_event('admin_side', 'pagetop'); ?>
<!-- <div id="outLinks">
    	 <span><a href="http://forum.textpattern.com/" target="_blank">TXP Forum</a></span>
	<span><a href="http://textpattern.net/wiki/index.php?title=Main_Page" target="_blank">TextBook</a></span>
	<span><a href="http://textpattern.org/" target="_blank">TXP Resources</a></span>
</div> -->
<div id="header"><span id="txp-title"><?php echo htmlspecialchars($sitename) ?></span>
<div id="headLinks"><span id="site-link"><?php echo $site_link; ?></span><span id="user-info"><?php echo $user_info; ?></div></span><?php echo(navPop());?></div>

I kept the style declaration on line 67, and created a new stylesheet in the Presentation pane called “system”:

<link rel="stylesheet" type="text/css" media="screen" href="http://<?php echo ($siteurl) ?>/textpattern/css.php?n=system" />

Offline

#8 2008-12-03 11:55:45

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

Re: Updating custom admin interface

“A Bit Blue” started life with Dan Hoy’s mods to the txplib_head file and then moved on a bit. I keep it up-to-date with any revisions seeing as I use it myself, so it shouldn’t be too difficult to bring it in-line with Kevin’s theme. I only release new versions though as each public release of Textpattern appears but if anyone is using SVN and needs an interim update at some point just let me know.


Stuart

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

Offline

#9 2008-12-16 19:01:19

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

Re: Updating custom admin interface

I’ve found one glitch using A Bit Blue’s txplib_head with Kevin’s stylesheet: All the toggleDisplays default to open. I can close them by clicking on the link as normal, but when the Write tab loads, all of them are open: Textile Help, Advanced Options, Recent Articles, and More.

If there was a problem with the Javascript, I didn’t think the tabs would close— right? Is there a conflict between the txplib_head file and the stylesheet? What controls the default state of the toggleDisplay elements?

The interface is still usable, but I imagine there’s an uncomplicated fix for this— I’m just not sure what. Let me know if you have any insight.

Thanks!

Offline

#10 2008-12-16 19:21:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: Updating custom admin interface

johnstephens wrote:

I’ve found one glitch using A Bit Blue’s txplib_head with Kevin’s stylesheet: All the toggleDisplays default to open.

jstubbs reported something similar with the Admin Skins plugin/hack. He seemed to think it was the plugin but, if it is, I can’t find it (doesn’t mean the plugin’s not at fault!)

I also noticed this behaviour when I ported the (wrong) theme over the other day for jpdupont/JanDW so I think this warrants a bit more investigation; it’ll probably be a simple fix somewhere in the jQuery/css interaction. Stab in the dark: could it be related to this ?

Last edited by Bloke (2008-12-16 19:22:11)


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

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2008-12-16 20:51:27

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

Re: Updating custom admin interface

I’ll check the CSS in case any selectors have been “re-named” or something.


Stuart

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

Offline

#12 2008-12-16 21:15:39

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

Re: Updating custom admin interface

Well it all works OK for me so I’m wondering if it is related to this problem. I’m using FF 3.0.4 on Windows.

You can check if the js is correct by looking in the source of the “Write” page for these lines:-

<div id="textile_help" class="toggle">
<div id="advanced" class="toggle">
<div id="recent" class="toggle">

For the class “toggle” the CSS is set to “display: none;”
For the class “toggle on” the CSS is set to “display: block;”

They should all be set to “toggle” when you open that page. If they aren’t then I would suggest that the js isn’t working properly. I’m just guessing though. ;)

Last edited by thebombsite (2008-12-16 21:22:23)


Stuart

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

Offline

Board footer

Powered by FluxBB