Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-02-16 01:35:25

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

bot_hide_per_section - per section hide

[NOTE: This plugin is now incorporated in bot_write_tab_customize which has a graphical interface and a lot more features]

Until yesterday I feared I could never try txp 4.0.8 due to sed_section_field incompatibility. Luckily wet has now solved this problem.
Anyway, after Steve/net-carver farewell I redid the plugin from scratch for my private use.
Probably is now useless, so why I post it here?
It’s raw, lacks an interface and – though very easily – you must configure it directly in the plugin code, but unlike sed_section_fields:

  • Allows to hide elements other than custom fields such as excerpt, body, keywords and so on. Virtually any html form with a name attribute located in the “write” tab.
  • Works ok with rah_write_each_section.
  • Features an optional jquery ‘slide’ effect for hiding and showing things on section change (disabled by default)

Elements that can be hidden on section change:
All custom fields (should work beyond 10), keywords, category1, category2, article image, body, excerpt, url title, override form, article markup, excerpt markup, status, category1, category2 plus others.

Like sed_section_fields can also hide some sections in the sections list.

To configure just press ‘edit’ in the “plugins” tab and modify the commented lines following the (very easy) instructions.
I don’t think I’ll ever make an interface for this plugin – sed_section_fields has already an axcellent one. Just thought maybe the extra hiding could be useful for someone.

If someone wants to try it remember to disable temporanely sed_section_fields.
This plugin can’t do any damage as it doesn’t even touch the db, is compatible with glz_custom_fields, ied_hide_in_admin and rah_write_each_section.

download

Last edited by redbot (2010-06-09 10:09:05)

Offline

#2 2009-02-16 14:40:41

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

Re: bot_hide_per_section - per section hide

redbot,

Nice. I’ve been having some issues with ied_hide_in_admin in 4.0.8. (I know others say they have it working, but I can’t get it working properly).

THis might be just what I need. I’ll check it out and get back to you.


Tom

Offline

#3 2009-02-16 16:36:00

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

Re: bot_hide_per_section - per section hide

renobird wrote:

Nice. I’ve been having some issues with ied_hide_in_admin in 4.0.8. (I know others say they have it working, but I can’t get it working properly).

renobird,
consider this is more a sed_section_fields substitute than ied_hide_in_admin, though some functionalities are seemingly overlapping.
Keep in mind that sed_section_fields operates on a per section basis while ied_hide_in_admin in a per user level basis.
Just to repeat myself I found that to make ied_hide_in_admin work you have to proceed this way:
choose option > save > choose another option > save and so on.
Thank you anyway for testing this plugin, let me know if it works.

Offline

#4 2009-10-27 21:31:41

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: bot_hide_per_section - per section hide

Found your plugin and think it is great. I found though, that if you have more than 10 custom fields and hide custom_1 from a section it hides all custom fields that start with “custom_1”, which covers custom_10-19.

Offline

#5 2009-10-27 23:19:05

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

Re: bot_hide_per_section - per section hide

smd_ksu wrote:

… I found though, that if you have more than 10 custom fields and hide custom_1 from a section it hides all custom fields that start with “custom_1”, which covers custom_10-19.

Yes you are right and I’m aware of this oversight on my part.
You know, this plugin was just a rushed experiment to replace sed_section_fields and I never updated it (at least publicly).
Since you are not the first person asking for an update I think I’ll post here an updated version soon – just need some time to find the modified file I keep scattered in my filesystem(s).
If you can’t wait edit the plugin’s code by yourself. Around line 35 replace this line:

echo '		$("*[name*='.$value.']").parent().'.$effect.';'.n;

with this:

echo '		$("*[name='.$value.']").parent().'.$effect.';'.n;

(remove the asterisk before the equal sign)

Last edited by redbot (2009-10-27 23:20:04)

Offline

#6 2009-10-28 18:43:11

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

Re: bot_hide_per_section - per section hide

Thanks redbot, much appreciated !

Offline

#7 2009-11-30 22:39:25

smd_ksu
Member
Registered: 2008-12-23
Posts: 25

Re: bot_hide_per_section - per section hide

Just wanted to say thanks for the code update. Great plugin.

Offline

#8 2009-11-30 23:44:19

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

Re: bot_hide_per_section - per section hide

smd_ksu wrote:

Just wanted to say thanks for the code update. Great plugin.

Thank you smd_ksu,
FYI I have just finished incorporating this plugin within the bot_write_tab_customize interface.
If all goes well I’ll release it soon.

Offline

#9 2009-12-01 16:18:25

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

Re: bot_hide_per_section - per section hide

This plugin was finally incorporated in bot_write_tab_customize which as a graphical interface and a lot more features. I’ll leave here for special cases but it won’t be updated anymore.

Offline

Board footer

Powered by FluxBB