Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#196 2011-05-30 20:09:17

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

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

funtoosh wrote:

ups! i just noticed that i get a couple of these in the extension tab since i upgraded to TXP 4.4.0 and BWTC 0.7….

Hey funtoosh thank you for reporting.
Unfortunately these are frantic days for me but I’ll try to have a look asap, ok?

Offline

#197 2011-05-31 11:11:56

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

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

yeah, fine.
looks like it’s got sth. to do with renamed IDs in 4.4.0 after the upgrade, or in the german lang file?
[id*=markup-excerpt] etc.

(does not make sense, really, but that’s what it loks like.)

Offline

#198 2011-06-01 03:37:56

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 597
Website

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

I get the same error here in 4.4.0.

Edit: Didn’t have time to troubleshoot, so I removed the plugin, dropped the table, and am starting anew with a reinstall. No notices so far.

Last edited by maruchan (2011-06-01 04:44:35)

Offline

#199 2011-06-01 08:49:27

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

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

funtosh and maruchan

As I said I’ve not much time now. Just a quick question for you: Does this happen if you are upgrading from txp 4.3 to 4.4 or if you are upgrading from a pre-4.3 version to 4.4?
In this second case this is normal given the massive changes in the ‘write’ tab markup introduced with txp 4.3.
I must have already said it somewhere: in this case you have to delete and rewrite all the rules you set before to fix everything.

If the issue arises when you upgrade from txp 4.3 to 4.4 the there is actually a problem and I ‘ll have to investigate further.

Offline

#200 2011-06-02 14:22:18

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

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

redbot, i’m pretty sure the error occurred after upgrading from 4.2, so i guess it’s like you said.

cheers!
-f

Offline

#201 2011-07-06 17:23:18

M_i
Member
Registered: 2006-03-05
Posts: 122

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

I’m idiot-proofing a site, and looking for a way to hide certain categories per section. So for example, for section A, I only want to show categories 1 and 2, while for section B, I want to show categories 3 and 4, and for section C I want to hide categories altogether.
The last can be easily achieved with this plugin; would it be possible to hide a selection of categories via a javascript?

Any help would be appreciated — and of course many thanks for this brilliant plugin!

-iris

Offline

#202 2011-07-06 19:04:41

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

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

M_i wrote:

I’m idiot-proofing a site, and looking for a way to hide certain categories per section.

bot_cat_per_section_hide v0.1

We love redbot :D

BTW: redbot, you should add this one to your site /+ textpattern.org

Offline

#203 2011-07-06 19:27:42

M_i
Member
Registered: 2006-03-05
Posts: 122

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

THE BLUE DRAGON wrote:

bot_cat_per_section_hide v0.1

We love redbot :D

That’s perfect! That is exactly what I was looking for! Thanks a lot! And indeed, we love redbot! (and textpattern, too!)

Last edited by M_i (2011-07-06 19:27:57)

Offline

#204 2011-07-19 19:50:09

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

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

I was hoping to hide some custom fields depending on which category is selected from the category1 select dropdown.

Something like:

psuedo code

if *pizza* selected from *category1 dropdown menu* show custom fields *small-price*, *medium-price*, *large-price*

This way I can show/hide all the many varied prices per each menu category (pizza, pasta, etc…).

Am I write in assuming I can add some js to the Additional js code box and write some show and hide classes in textattern.css? If so, I’m not quite sure how to figure out how to write that javascript as my brain is running on one cylinder this week.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#205 2011-07-19 20:41:47

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

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

Josh, not exactly tailor made but it could help you, hopefully. The below is taken from the Write tab and should cover the relevant parts (I tried on a local text file). Just replace if (value=="badlands"){ (etc.) with your category list items and replace my custom fields and stuff with yours.

<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		$("#advanced").show();
		$("select#category-1.list").change(function(){
			$(".category-2").show();
			$("p:has(*[name=custom_3])").show();
			$("p:has(*[name=custom_2])").show();
			$("p:has(*[name=custom_1])").show();
			$("#custom_field_group").show();
			$("p:has(*[name=custom_4])").show();
			$(".category-1").show();
			$("p:has(*[name=custom_11])").show();
			$(".body").show();
			$(".excerpt").show();
			$("#article-tabs").show();
			var value = $("select#category-1.list").val();
			if (value=="badlands"){
				$(".category-2").hide();
				$("p:has(*[name=custom_3])").hide();
				$("p:has(*[name=custom_2])").hide();
				$("p:has(*[name=custom_1])").hide();
				$("#custom_field_group").hide();
				$("p:has(*[name=custom_4])").hide();
				$(".category-1").hide();
				$("p:has(*[name=custom_11])").hide();
			}

			if (value=="bonpland"){
				$(".category-2").hide();
				$(".body").hide();
				$(".excerpt").hide();
				$("#article-tabs").hide();
			}

			if (value=="playground"){
				$(".category-2").hide();
				$("p:has(*[name=custom_3])").hide();
				$("p:has(*[name=custom_2])").hide();
				$("p:has(*[name=custom_1])").hide();
				$("#custom_field_group").hide();
				$("p:has(*[name=custom_4])").hide();
				$(".category-1").hide();
				$("p:has(*[name=custom_11])").hide();
			}

			if (value=="institute of science"){
				$(".category-2").hide();
				$("p:has(*[name=custom_3])").hide();
				$("p:has(*[name=custom_2])").hide();
				$("p:has(*[name=custom_1])").hide();
				$("#custom_field_group").hide();
				$("p:has(*[name=custom_4])").hide();
				$(".category-1").hide();
				$("p:has(*[name=custom_11])").hide();
			}
		}).change();
	});
</script>

<script language="javascript" type="text/javascript">
	$(document).ready(function() {
           $("select#category-1.list option:not(:selected)[value=default]").remove();
           $("select#category-1.list option:not(:selected)[value=search]").remove();
	});
</script>

No idea what the last script is needed for. Obviously concerns the section list dropdown.

Good luck!


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

Offline

#206 2011-07-19 20:52:26

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

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

Thanks Uli!

That is the magic I needed. I really appreciate you taking the time to share that.


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#207 2011-09-08 00:13:21

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

I’m experiencing a problem with this plugin. It throws a js error and refuses to hide any of the fields.

uncaught exception: Syntax error, unrecognized expression: [name=custom_31[]]

when I look at the source I see this peculiarity…

$("p:has(*[name=custom_31[]])").hide();

I’m using glz and I have about 32 cfs. Using 4.4.0 and 4.4.1 on some sites. I tend to rely on this plugin so I’m hoping to resolve the issue.

Offline

#208 2011-09-08 07:49:15

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

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

mrdale wrote:

I’m experiencing a problem with this plugin….

Hi,
see here to fix it

Offline

#209 2011-09-08 16:03:36

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

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

redbot wrote: see here to fix it

I actually did that, but no wit refuses to hide checkbox and multiselect CFs

It did solve a longstanding problem though.

Offline

#210 2011-09-08 17:58:11

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

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

mrdale wrote:

I actually did that, but no wit refuses to hide checkbox and multiselect CFs

just to be sure did you read two posts later?

Edit: maybe it has to do with the latest version of glz_custom. I’ll have a look when I can

Last edited by redbot (2011-09-08 17:59:44)

Offline

Board footer

Powered by FluxBB