Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#136 2009-08-03 05:44:44
Re: Admin Side Theming! (r3149)
I can see no way to address this: The whole purpose of admin themes is to provide custom markup, so in theory you cannot rely on any constant markup if a theme author chooses to throw all conventions overboard. So all we (i.e. the community of TXP coders) can do is establish a set of conventions and stick to them. Period.
Offline
#137 2009-08-03 06:12:46
Re: Admin Side Theming! (r3149)
Is there going to be any sort of standardized HTML in the admin, or are theme writers going to go willy nilly and use whatever HTML they feel like? From what it looks like there isn’t going to be any sort of standard and THAT is going to create a problem when trying to place items throughout the page. Let’s use an example from EBL Image Edit :
$("#list td:first img").attr('id','mainImg'); // Give our image an ID
$("#list td:first").attr('id','mainImgTD'); // name the table to make it easier to find.
The above jQuery looks for the first instance of a TD tag following #list and assigns the image found an ID so that further on, the script can manipulate it. It does the same with the TD cell in which it resides.
The above works because the code is standard between all TXP installations. If this code changes based upon theme, am I going to have to create varying fixes for those themes, or will I just have to tell users to figure it out themselves?
I think a standardized HTML markup is an absolute necessity for theme writers to base their themes on. Well thought out HTML can be changed to infinite variations through CSS.
Offline
#138 2009-08-03 07:48:12
Re: Admin Side Theming! (r3149)
The above works because the code is standard between all TXP installations. If this code changes based upon theme, am I going to have to create varying fixes for those themes, or will I just have to tell users to figure it out themselves?
Not really a solution but two things might minimise the ocurrence of problems:
- Sufficient admin theme documentation with a pattern to follow for admin theme authors together with a notice urging admin theme authors to follow this pattern or risk incompatabilities with plugins.
- Plugin authors could comment their code to say something like
// if using a non-standard theme, change this jquery directive to match your themeso that one can edit the plugin as necessary to fit a theme (I do this for example with glz_custom_fields. very simple.). Maybe this could be stored in a string and placed at the top of the plugin code as an explicitly user-editable block…
TXP Builders – finely-crafted code, design and txp
Offline
#139 2009-08-03 07:53:34
Re: Admin Side Theming! (r3149)
Frankly, I cannot find the method how a theme author would be able to modify the markup you mentioned with the way admin themes are implemented. What am I missing?
Offline
#140 2009-08-03 14:12:26
Re: Admin Side Theming! (r3149)
Standard Markup that doesn’t change is a necessity. To change the look, you do NOT need to change the HTML. Just style it differently via CSS. It’s NOT complicated, eh?
Offline
#141 2009-08-03 15:48:49
Re: Admin Side Theming! (r3149)
Let me rephrase: Admin-side themes do not and can not change the markup you mentioned because there simply is no way to do. Read the source.
Offline
#142 2009-08-03 16:00:08
Offline
#143 2009-08-03 19:24:23
Re: Admin Side Theming! (r3149)
With the Classic theme, the image detail tab has this markup around the full-size image:
<table cellpadding="0" cellspacing="0" border="0" id="list" align="center" class="edit-pane">
<tr> <td><img src="http://example.com/images/8.jpg?1238418503" height="375" width="500" alt="" title="8.jpg (500 × 375)" id="image-fullsize" /><br />
<form method="post" enctype="multipart/form-data" action="index.php">
[...]
Switching to Remora renders it this way:
<table cellpadding="0" cellspacing="0" border="0" id="list" align="center" class="edit-pane">
<tr> <td><img src="http://example.com/images/8.jpg?1238418503" height="375" width="500" alt="" title="8.jpg (500 × 375)" id="image-fullsize" /><br />
<form method="post" enctype="multipart/form-data" action="index.php">
[...]
Every other theme using the theme engine would render it this way:
<table cellpadding="0" cellspacing="0" border="0" id="list" align="center" class="edit-pane">
<tr> <td><img src="http://example.com/images/8.jpg?1238418503" height="375" width="500" alt="" title="8.jpg (500 × 375)" id="image-fullsize" /><br />
<form method="post" enctype="multipart/form-data" action="index.php">
[...]
All three exhibits work as intended with the sample plugin code given here (although I think it’s superfluous as Textpattern 4.2.0 identifies the full-size image with its own id to help plugin authors find a proper DOM hook):
$("#list td:first img").attr('id','mainImg'); // Give our image an ID
$("#list td:first").attr('id','mainImgTD'); // name the table to make it easier to find.
Offline
#144 2009-08-03 20:57:31
Re: Admin Side Theming! (r3149)
- I’m glad it’s only the header and footer that can have theme dependent willy-nilly code (though I still think it’s stupid and that the switching code-class is a lot of wasted effort) I will still only support one theme.
- I don’t currently have any plugins that currently make use of the header/footer, though ebl_quicknote was going to have a new message notification in the header. I’ll reexamine that and place it somewhere else as hopefully obvious.
All three exhibits work as intended with the sample plugin code given here (although I think it’s superfluous as Textpattern 4.2.0 identifies the full-size image with its own id to help plugin authors find a proper DOM hook):
Yah well, I asked multiple times before the release of 4.0.8 for an ID in those fields, and yet the simple act of adding the id was deemed superfluous and not added.
Offline
#145 2009-11-10 14:48:40
Re: Admin Side Theming! (r3149)
OK there is a problem with the Remora and IE6/7 (Compatibility view)
when you onmouse over on the main menu links (li)
the second menus are open to the right side and not to the bottom
so I made a change and wrap the UL of each menu with DIV element to solve it:
open the remora.php file
replace:
$out[] = '<ul>';
with:
$out[] = '<div><ul>';
replace:
$out[] = '</ul>';
with:
$out[] = '</ul></div>';
that’s all save and upload the file
and you are ready and have a working dropdown Remora menus in IE6.
I aslo added the meta tag <meta http-equiv="X-UA-Compatible" content="IE=7" /> into the HEAD in the txplib_head.php file.
so my client will not need to click on the Compatibility View, and it will always be in compatibility view mode.
Last edited by THE BLUE DRAGON (2009-11-12 23:55:08)
Offline
#146 2009-11-11 13:59:55
Re: Admin Side Theming! (r3149)
THE BLUE DRAGON,
fwiw, the code your show above is invalid, an ul cannot be nested inside a span.
And I think it should be a rather simple css fix, but I haven’t looked at the remora stylesheet.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#147 2009-11-11 14:14:12
Re: Admin Side Theming! (r3149)
phiw13 wrote:
THE BLUE DRAGON,
fwiw, the code your show above is invalid, anulcannot be nested inside aspan.
Yea I don’t know how to add the tabs names to the <ul> as id.
I have no programming knowledge.
but it does works.
Offline
#148 2009-11-12 07:50:20
Re: Admin Side Theming! (r3149)
you could replace the span with a div.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#149 2009-11-12 23:52:50
Re: Admin Side Theming! (r3149)
phiw13 wrote:
you could replace the
spanwith adiv.
cool by just wrap the UL with DIV it solve the problem without any scripts thanks ;)
(I edited my post above with the new changes)
Offline
#150 2009-12-06 21:05:58
Re: Admin Side Theming! (r3149)
Late to the discussion,
Yesterday, I spent a number of hours tweaking one of my sites. Most of the time I spent it in the presentation/forms page, moving stuff around.
My laptop’s resolution is 1280×800, with tabs open in Firefox, the save button is always below the fold, requiring a scroll down to click save on every change. This prompted me to enable Remora to get more screen real estate, but still no save button in site.
Today, I read this whole thread, read Textbook’s admin side theme page and have come away with the knowledge that in order to make element changes in the backend admin, I may have to modify core code. Am I making the right assumption?
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline