Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#169 2011-01-20 01:26:54

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

Bot_wtc 7.0 is out.

This version works only with txp v.4.3 – for previus versions use v. 0.6.3.

Changes and issues

Textpattern 4.3 brought a lot of cool enhancements to the “write” tab but also a few drawbacks.

On the ‘enhancement’ side almost every item has now an id or a class. This means a snappier jquery execution and, above all, the possibility to hide these elements with simple css. For these reason I highly reccommend – if you want to hide an item in each section – to set a rule directly in your textpattern css file.
For example:

.override-form {display:none;}

is a lot more efficient than hiding the item in each section using this plugin.

Unluckily there are some little drawbacks in the way the page is designed (IMHO). I’m referring to the several collapsible groups which crowd the ‘write’ tab.
The issue here is while you can easily hide a group label (well, actually it isn’t an html label but an h3) with css, this may lead to trouble if the group is already collapsed. In this case a user will not be able to expand it anymore being there nothing to be clicked.

Of course this is nothing dramatic and can be fixed inserting a tiny jquery rule in the js box. Something like:

<script type="text/javascript">
    $(document).ready(function() {
        $(".toggle").show();
    });
</script>

will keep everything expanded so you can safely hide any label with css (in your textpattern.css file).

Naturally you can also choose to apply this rule only to certain groups like:

<script type="text/javascript">
    $(document).ready(function() {
        $("#image.toggle, #custom_field.toggle").show();
    });
</script>

Let me know if you find any issues (download from first post)

Last edited by redbot (2011-01-20 10:14:30)

Offline

#170 2011-01-20 09:41:42

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: bot_write_tab_customize: rearrange and style items in the write tab

Great, thanks redbot. Is there a handy list anywhere of all the IDs used in the write page? Otherwise I’ll just sift through the page source myself.

Offline

#171 2011-01-20 09:51:17

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

philwareham wrote:

Great, thanks redbot. Is there a handy list anywhere of all the IDs used in the write page? Otherwise I’ll just sift through the page source myself.

Hi,
actually I thought to include it in the plugin help but I had no time.
I’ll see if I manage to do it. Meanwhile you can easily do it yourself installing some firefox add-on such as the “Web Developer Toolbar” or “Firebug” or “Css viewer” or another of the thousands available.

Offline

#172 2011-01-20 10:18:14

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: bot_write_tab_customize: rearrange and style items in the write tab

OK, I’ve compiled a list of IDs and classes of common elements on the write page, let me know if there are any errors or I’ve missed any important ones (I’ve not included individual custom fields since they are user defined anyway)…

COLUMN 1:

#textile_group

#textile_help

#advanced_group

.markup-body

.markup-excerpt

#custom_field_group

#custom_field

#image_group

.article-image

#meta_group

.keywords

.url-title

#recent_group

#recent

COLUMN 2:

.title

.body

.excerpt

COLUMN 3 (tabs):

#article-tabs

COLUMN 4:

#write-sort

.category-1

.category-2

.section

#more_group

#write-comments

#write-timestamp

#write-expires

Last edited by philwareham (2011-01-20 10:19:03)

Offline

#173 2011-01-20 11:18:58

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

philwareham wrote:

OK, I’ve compiled a list of IDs and classes of common elements on the write page, let me know if there are any errors or I’ve missed any important ones (I’ve not included individual custom fields since they are user defined anyway)…

Thank you Phil,
BTW, regarding custom fields, I forgot to mention that there is a difference if you are using glz_custom_fields or not.
With txp 4.3 each paragraph surrounding a cf has his own class (i.e .custom-1, .custom-2 etc.).
This is very handy but sadly, if you are using glz_custom (like me), you can’t benefit from the feature since all generated cfs have only a generic “.glz_custom_field” class. For this reason the plugin still targets cfs the old way, using jquery.

Offline

#174 2011-02-01 12:28:37

sare
New Member
From: Helsinki
Registered: 2010-09-26
Posts: 7

Re: bot_write_tab_customize: rearrange and style items in the write tab

“Ossum” is spot on. Thank you so much, works miracles with glz_cf

Offline

#175 2011-02-01 14:25:29

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

sare wrote:

“Ossum” is spot on. Thank you so much, works miracles with glz_cf

Thanx sare ;-)

Offline

#176 2011-02-18 13:33:12

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: bot_write_tab_customize: rearrange and style items in the write tab

Is there a way I could get bot_wtc to work with hiding/showing arc_twitter for certain sections?

Offline

#177 2011-02-18 15:09:13

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

philwareham wrote:

Is there a way I could get bot_wtc to work with hiding/showing arc_twitter for certain sections?

Probably yes.
The issue is I can’t istall this plugin as it needs a twitter account to work and I don’t have one.
You can help me pasting here the html output in the write tab and possibly a screenshot.

Offline

#178 2011-02-18 15:28:24

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: bot_write_tab_customize: rearrange and style items in the write tab

OK thanks redbot, here’s the code as it appears in the write page…

<fieldset id=“arc_twitter”>
<legend>Update Twitter</legend>
<input type=“radio” id=“arc_tweet_this-arc_tweet_this-0” name=“arc_tweet_this” value=“0” class=“radio active” checked=“checked”>
<label for=“arc_tweet_this-arc_tweet_this-0”>No</label>
<input type=“radio” id=“arc_tweet_this-arc_tweet_this-1” name=“arc_tweet_this” value=“1” class=“radio”>
<label for=“arc_tweet_this-arc_tweet_this-1”>Yes</label>
<p class=“plain lever” style=“margin-top:5px;”><a href=”#arc_twitter_options”>Options</a></p>
<div id=“arc_twitter_options” class=“toggle” style=“display:none”>
<label for=“arc_twitter_prefix”>Tweet prefix</label>
<input type=“text” value=“Just posted:” name=“arc_twitter_prefix” size=“22” class=“edit” id=“arc_twitter_prefix”>
<label for=“arc_twitter_suffix”>Tweet suffix (eg #hashtags)</label>
<input type=“text” value=”“ name=“arc_twitter_suffix” size=“22” class=“edit” id=“arc_twitter_suffix”>
</div>
</fieldset>

Offline

#179 2011-02-18 15:37:01

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: bot_write_tab_customize: rearrange and style items in the write tab

philwareham wrote:

OK thanks redbot, here’s the code as it appears in the write page…

Try this:

Add this line

'arc_twitter' => '$("#arc_twitter")',

in any point between line 19 and 54.

Let me know if it works

Offline

#180 2011-02-18 16:01:27

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: bot_write_tab_customize: rearrange and style items in the write tab

Works perfect, many thanks! I can now show/hide/move arc_twitter on the write page.

Offline

Board footer

Powered by FluxBB