Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-10-25 22:30:16

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

bot_write_tab_customize: rearrange and style items in the write tab

bot_write_tab_customize v8 for Textpattern v4.7: please see this new thread.

bot_write_tab_customize v7.5 for Textpattern v4.6.2: please see this post.

This plugin aims to be an all-in-one solution for the “write” tab customization. It allows to rearrange items, hide them on a per-section basis, remove some sections from the sections dropdown and much more. By combining its features you can get a totally different write tab arrangement depending on which section you choose in the sections dropdown. Used alone or togheter with other plugins (glz_custom_fields and bot_admin_body_class to name a few) it will help you customize the site backend for your clients quickly and easily.

Features

  • Single items (custom fields, body, excerpt etc.) or whole columns can be moved around relative to other single items or columns
  • Items can be hidden on a per-section basis
  • Sections can be removed from the “write” tab sections dropdown (for static sections like “about us” or “search”)
  • A custom css class can be set for each item. This let’s you define classes for items that normally couldn’t be targeted with simple css (i.e. a<p>surrounding a specific custom field and his label – if you are using glz_custom_fields). This feature has now a reduced importance with txp 3.0 since a lot more page elements can be directly targeted by css. Nonetheless it can still prove useful in some cases
  • Javascript code can be set directly throught the plugin interface. Particularly useful for use with an external jquery plugin and in conjunction with the ability to add a css class to any item on the page. The script will be executed only in the write tab
  • Advanced preferences allows for multiple items hiding and class attribution, speeding up the customization process if a lot of custom fields are set.
  • Compatible with glz_custom_fields, rah_section_titles and rah_write_each_section

Note that the rearrange capability is mainly intended to be an intermediate step in the customization process. To to fine-tune your customization you may need to modify the “textpattern.css” file.

A simple example

Suppose you want a custom field called “Files” to be the first item at the top left corner of the write tab.
Quite easy: set the rule “Files” before “advanced Options “.

Ok, now you want it to show only in section “Media”.
Easy too: in the “hide in” column check all sections but the “Media” section.

But wait. You now want it to have a different look compared to other custom fields and you are using glz_custom_fields (which applies to all cfs a generic “glz_custom_field” class removing the default more-specific default class). In this case set an arbitrary class for the item and, in the textpattern.css, set a corresponding css rule, or – if you are in a rush – define the rule directly in the js box.

That’s not enough? Maybe you want the field to perform an animation using a jquery plugin when you hover on it?
Then again, set a class for the item, reference the plugin and write the appropriate code in the js box like this:

<script type="text/javascript" src= "../js/your_jquery_animations_plugin.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function() { $(".animate").your_jquery_animations_plugin(); }); </script>

Special Note

This plugin may not function properly if you have the Suhosing module (a security-related module for PHP) installed. In this case follow these instructions (thanks maniqui!)

Download

Last edited by redbot (2012-02-20 17:43:24)

Offline

#2 2009-10-25 23:04:51

FireFusion
Member
Registered: 2005-05-10
Posts: 698

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

Perfect!

Is there anyway of getting text input boxes moved under the body field to be equal in length to it?

Offline

#3 2009-10-25 23:28:29

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

Wow! I’ve dreamed of this for ages! Thanks!

Offline

#4 2009-10-25 23:29:34

PascalL
Member
From: Switzerland
Registered: 2009-03-09
Posts: 132
Website

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

Impressive!
Never seen that degree of customization before ! Thanks Redbot !

Offline

#5 2009-10-25 23:40:46

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

Just a quick note: in my 4.2.0 install, when wet_quickopen is active, AND I move the whole column1 (after col2, or after TD preview, for example), then two input boxes for quick searching articles appear. The first of them is not working, though. It’s probably another js oddity. Anyway, is just a minor bug you may want to check (maybe is just me and my monster set of plugins and custom theme active…). Wonderful work, anyway.

Offline

#6 2009-10-26 00:14:52

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

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

Thank you all

FireFusion wrote:

…Is there anyway of getting text input boxes moved under the body field to be equal in length to it?

You can achieve this with a slight customization of your textpattern css.

Zanza wrote:

… when wet_quickopen is active, AND I move the whole column1 (after col2, or after TD preview, for example), then two input boxes for quick searching articles appear…

Ok, thanks for reporting. In the next days I will install wet_quickopen (I have never used it yet) and perform some tests.

Offline

#7 2009-10-26 00:20:03

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

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

Zanza wrote:

Wonderful work

Absolutely! Thank you, redbot!
Great that you also thought of shifting whole columns. Unbelievable how much better it feels having custom fields on the right hand side and section/categories on the left.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2009-10-26 00:36:42

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

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

Thank you redbot!
This is wonderful.

claps

:)

Offline

#9 2009-10-26 07:07:02

pieman
Member
From: Bristol, UK
Registered: 2005-09-22
Posts: 491
Website

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

Ossum. Absolutely ossum.

Offline

#10 2009-10-26 09:30:02

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

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

Got some errors after installing plugin – clicking “install” button in extensoin page:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/u78707/victorus.net/www/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 216

Warning: natcasesort() [function.natcasesort]: The argument should be an array in /home/u78707/victorus.net/www/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 218

Warning: Invalid argument supplied for foreach() in /home/u78707/victorus.net/www/textpattern/lib/txplib_forms.php on line 56

Warning: Invalid argument supplied for foreach() in /home/u78707/victorus.net/www/textpattern/lib/txplib_forms.php on line 56

After install i get new table but it is empty:

Here is the link to screenshot how admin page looks after i pressed “install” plugin’s button

Last edited by the_ghost (2009-10-26 09:39:30)


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

#11 2009-10-26 10:23:23

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

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

Zanza wrote:

… when wet_quickopen is active, AND I move the whole column1 (after col2, or after TD preview, for example), then two input boxes for quick searching articles appear…

Yes you are right. I hope its some jquery bug because I can’t find any valid reason for this, given that if you look at the write tab source you’ll notice the wet_quickopen input is called (correctly) only once.
The good news it that this problem shows only if you move column_1. If you proceed the other way around (moving all other columns before column_1) everything is fine.

the_ghost wrote:

… Got some errors after installing plugin…

Hmm… I should investigate this furtherly. The plugin assumes you have at least two custom fields set but your error message means there is none. Is this the case?

Offline

#12 2009-10-26 10:24:24

jelle
Member
Registered: 2006-06-07
Posts: 165

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

Redbot…..you are a genius!

Offline

Board footer

Powered by FluxBB