Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#217 2011-10-06 09:41:59

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

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

Hi Uli,
given the shortage of time I can’t help you with a script which does all automatically, nonetheless I’ve written a text file which lists old selectors and corresponging new ones.
This way – with a very un-elegant solution – you can maybe save some time by editing directly the mysql table for bot_wtc.

How to:
Open phpmyadmin and replace every occurrence of older selectors with corresponding new ones in the “bot_wtc” table (only columns ‘item’ and ‘destination’).

As for the custom field issue I need more info.
First of all are you trying to hide simple text inputs or multi-selects? In this second case here’s the fix. If it’s not the case I can’t help you now, you’ll have to wait a couple days.

Offline

#218 2011-10-06 11:54:05

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

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

redbot wrote:

given the shortage of time I can’t help you with a script which does all automatically, nonetheless I’ve written a text file which lists old selectors and corresponging new ones.

Luca, thanks so much! That’s exactly the information I was hoping for. Most selectors are in use only in one section, but some remainders are hard to reconstruct and can otherwise only be unscrambled by looking at the front side HTML source. Not too enjoyable ;) Thanks for taking the time to set up that text file, I really appreciate that!

As for the custom field issue I need more info. […] In this second case here’s the fix

Already tried that fix, rather blindly ;) The actual cause, however, was glz_custom_fields that I simply forgot to update. It boiled down to a custom field plugin, I just didn’t realize that, buried with some more inconsistencies.

Now I’m pretty confident all will be up and running again soon! Phew!
How indispensable your plugin is, one can realize best when you see the Write tab without its magic.

Thanks, once more, Luca.


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

Offline

#219 2011-10-06 17:58:33

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

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

uli wrote:

…The actual cause, however, was glz_custom_fields that I simply forgot to update…

Happy to hear this, I couldn’t imagine where the issue was coming from.

…Now I’m pretty confident all will be up and running again soon! Phew!

Cool! Glad it all seems to be ok now :)

Offline

#220 2011-10-31 12:17:23

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 563

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

When I try to hide items in all my sections I keep getting the following error

Warning: Data too long for column 'sections' at row 1 update bot_wtc set position = '', destination = '', item = '$("#textile_group")', sections = 'section-names', class = '' where id = '4' in C:\wamp\www\my-site\textpattern\lib\txplib_db.php on line 89

Offline

#221 2011-10-31 12:54:14

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

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

Algaris wrote:

When I try to hide items in all my sections I keep getting the following error

Warning: Data too long for column 'sections' at row 1 update bot_wtc set position = '', destination = '', item = '$("#textile_group")', sections = 'section-names', class = '' where id = '4' in C:\wamp\www\my-site\textpattern\lib\txplib_db.php on line 89

Hi,
first of all I assume yuo have replaced your real sections list with “section-names” in the query you posted. Is it the case?
Anyway my first advice is to try to change the type for the column “sections” in the table “bot_wtc” throught phpmyadmin.
It is set to “varchar(255)” by default (maybe I should change this in the next relese) so you may want to change it to “text” and see if it changes something.

Offline

#222 2011-10-31 13:41:29

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 563

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

Hi redbot. Yes I did change the sections list, I should have made that more clear. I changed the column to text as you said and everything works fine now. Thank you.

Offline

#223 2011-11-02 12:09:03

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

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

Algaris wrote:

Hi redbot. Yes I did change the sections list, I should have made that more clear. I changed the column to text as you said and everything works fine now. Thank you.

Hi Ross, glad it fixed the problem.
Now I got a little question for you: can you check if the total number of charachters of the real sections list used in the query is actually higher than 255 (I’m asking this for the next release)?
Thank you in advance.

Offline

#224 2011-11-02 12:26:04

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 563

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

Hi redbot. Looking at my sections I’d say so.

Last edited by Algaris (2011-11-02 14:55:00)

Offline

#225 2011-11-02 14:36:56

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

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

Algaris wrote:

Hi redbot. Looking at me sections I’d say so.

Thanks!
I’ll keep it into account for the next version.

Last edited by redbot (2011-11-02 14:37:35)

Offline

#226 2011-11-08 23:28:28

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

Just a quick question here…. I have one Custom Field which only relates to one article (ID=3). What I am trying to do is hide the custom field via bwtc or css, then show it when this article is being edited – I’ve looked in the code and don’t think that this can be done because I can’t see any reference to the article in the code… but thought I’d throw it out to the jquery master :)

Offline

#227 2011-11-09 00:13:49

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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

You should be able to write custom jQuery to do that.

Something like this (untested):

var xxx_article_id = $('input[name="ID"]').val();
if (xxx_article_id==3){
$('#custom-1').show();
}else{
$('#custom-1').hide();
}

Last edited by MattD (2011-11-09 00:19:31)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#228 2011-11-09 00:31:15

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

Thats great Matt :) Thank, works a treat – I just added this to remove the label as well (it wasn’t me, I googled it)

$('#custom-3').parent().hide();

So are you using this to get the ID from the url?

var xxx_article_id = $('input[name="ID"]').val();

Thanks again – txp, and its great community amazes me again

Offline

Board footer

Powered by FluxBB