Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#106 2009-05-28 05:02:59

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

Re: Admin Side Theming! (r3149)

Bloke wrote:

… or those that, for example, use a 3rd party plugin to extend and create their own themes ;-)

On second thought, said third-party plugin should encourage its users to limit theme names to adhere to the PHP variable naming restrictions, as the theme name will also be used for the class name of the theme object, therefore any “creative” naming won’t work anyway.

Oh, one minor thing missing from classic.php is the screenshot entry in the manifest. The theme has a screenshot.png pic but no reference to it. Is it not used on purpose?

Thanks for the heads-up, this was an oversight from an earlier attempt to define the manifest’s contnet. Using the “convention over configuration” mantra, we expect theme screenshots to sit in the theme directory as ‘screenshot.png’ , a 260×150 pixels sized image.

Offline

#107 2009-05-28 12:21:26

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

Re: Admin Side Theming! (r3149)

wet wrote:

the theme name will also be used for the class name of the theme object, therefore any “creative” naming won’t work anyway.

Good call. Had forgotten about the class name being identical to the theme name, thanks for the reminder. I’ll enforce the rule.

expect theme screenshots to sit in the theme directory as ‘screenshot.png’ , a 260×150 pixels sized image.

Righty-o. Consider it expected :-)


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

Online

#108 2009-06-02 23:10:28

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

Re: Admin Side Theming! (r3149)

Another minor point. The admin theme guide states all user themes should begin with a 3-letter prefix. In that case, should the dropdown in the Advanced Prefs tab refrain from upper-casing the first letter of the theme name? Or should the theme manifest expose an optional friendly ‘title’ property which may be slightly different to the actual theme name; perhaps without the prefix, e.g. stu_abitblue could be titled A Bit Blue.


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

Online

#109 2009-06-03 19:33:17

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

Re: Admin Side Theming! (r3149)

Also, the system requirements for 4.0.9 might need updating to include supported browsers, as IE6 is clearly not happy about remora :-|

Of course, the jury’s out on whether IE6 actually constitutes a browser in the first place, in which case disregard this post…

Last edited by Bloke (2009-06-03 19:35:33)


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

Online

#110 2009-06-03 23:39:27

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

Re: Admin Side Theming! (r3149)

Bloke wrote:

Also, the system requirements for 4.0.9 might need updating to include supported browsers, as IE6 is clearly not happy about remora :-|

Adding display: inline-block; to the #masthead a selector makes it much more tolerable, but not entirely perfect yet. I’m trying to figure out what selector to target for positioning of the secondary uls.

I love the ability to declare theme::based_on('xxx'), and make subtle adjustments to existing themes without overwriting any core files!

Of course, the jury’s out on whether IE6 actually constitutes a browser in the first place, in which case disregard this post…

I’m with you.

Last edited by johnstephens (2009-06-03 23:40:35)

Offline

#111 2009-06-04 04:28:38

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

Re: Admin Side Theming! (r3149)

Could this be part of Remora’s quirky behavior in IE6? None of the list item elements are closed properly in the subnavigation menus. I added indentation to show nesting:

<div id="masthead">
	<ul id="nav"> 
		<li class='primary tabup active'><a href='?event=article'>Content</a> 
			<ul> 
				<li class='secondary tabdown2 inactive'><a href='?event=category'>Categories</a> 
					<li class='secondary tabup active'><a href='?event=article'>Write</a> 
						<li class='secondary tabdown2 inactive'><a href='?event=list'>Articles</a> 
							<li class='secondary tabdown2 inactive'><a href='?event=image'>Images</a> 
								<li class='secondary tabdown2 inactive'><a href='?event=file'>Files</a> 
									<li class='secondary tabdown2 inactive'><a href='?event=link'>Links</a> 
										<li class='secondary tabdown2 inactive'><a href='?event=discuss'>Comments</a> 
										</ul> 
									</li> 
									<li class='primary tabdown inactive'><a href='?event=page'>Presentation</a>

[...]
																								<li id="view-site" class="primary tabdown inactive"><a href="http://freeliberal.dev/" target="_blank">View Site</a></li> 
																								<li id="logout" class="primary tabdown inactive"><a href="index.php?logout=1" onclick="return verify('Are you sure?')">Logout</a></li> 
																							</ul>
																						</div>

Adding a </li> on line 38 of the remora.php seems to fix this issue:

$out[] = "<li class='secondary {$class}'><a href='?event={$item['event']}'>{$item['label']}</a></li>";

Then it’s just a matter of modifying the CSS to position the menus properly. Would there be an easy way to add a conditional comment for an IE-specific stylesheet to the <head> in the there manifest file?

Last edited by johnstephens (2009-06-04 04:41:49)

Offline

#112 2009-06-04 06:14:41

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

Re: Admin Side Theming! (r3149)

Here’s the additional CSS that got Remora to render appropriately (but not identically) in IE6, without mucking up the standards-aware browsers I tested in:

#masthead a {
	display: inline-block;
}
* html #masthead .sfhover a {
	display: block;
	width: 10em;
}

Offline

#113 2009-06-04 08:00:26

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

Re: Admin Side Theming! (r3149)

Nice work, John. Saves updating the FAQ!


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

Online

#114 2009-06-04 12:27:38

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

Re: Admin Side Theming! (r3149)

Thanks. It’s been tested in Firefox, Safari, Opera, Camino, Chromium, and IE6; but I haven’t looked at it in IE7 or 8. Using <!--[if lte IE x]> conditional comments <![endif]--> would be a better solution than this— while we can’t count on IE6 getting any better, it’s possible that other browsers might evolve and begin recognizing the convoluted selector I used to target IE.

Offline

#115 2009-06-04 12:31:36

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: Admin Side Theming! (r3149)

johnstephens wrote:

it’s possible that other browsers might evolve and begin recognizing the convoluted selector I used to target IE.

That surely won’t happen. * html selects nothing at all in a standard compliant browser. html is the root of the document. It is only IE 6 that is dump enough to think there is something around html.

Last edited by phiw13 (2009-06-04 12:31:56)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#116 2009-06-04 12:47:53

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

Re: Admin Side Theming! (r3149)

@phiw13 You’re probably right.

If there’s a more elegant solution, let me know.

What’s the official way to submit this and the manifest correction as a patch to Remora? The theme::based_on declaration makes it super easy to extend existing themes with custom CSS, and that’s a dandy solution for me if Remora remains the same.

Offline

#117 2009-06-04 12:55:55

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: Admin Side Theming! (r3149)

johnstephens wrote:

@phiw13 You’re probably right.

If a standard compliant browsers supports that selector, it is a bug (cough, cough Opera 9 and 9.1 with real xhtml docs).

What’s the official way to submit this and the manifest correction as a patch to Remora? The theme::based_on declaration makes it super easy to extend existing themes with custom CSS, and that’s a dandy solution for me if Remora remains the same.

svn diff > mypatch.patch is your friend. Send the patch to the developers mailing list.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#118 2009-06-04 13:22:56

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

Re: Admin Side Theming! (r3149)

phiw13 wrote:

svn diff > mypatch.patch is your friend. Send the patch to the developers mailing list.

Thanks. Done and done.

Offline

#119 2009-06-04 16:37:30

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

Re: Admin Side Theming! (r3149)

Bloke wrote:

Also, the system requirements for 4.0.9 might need updating to include supported browsers, as IE6 is clearly not happy about remora :-|

Done. I don’t think we need to put vast efforts into IE6 complicatability any longer.

Offline

#120 2009-06-04 16:43:37

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Admin Side Theming! (r3149)

clapping

Last edited by renobird (2009-06-04 16:44:05)

Offline

Board footer

Powered by FluxBB