Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2010-01-26 10:29:49

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

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

dl33 wrote:

…you cannot hide the Comment on/off switch, the Comment Invite or the category box from rss_unlimited_categories.

You are right. I’ll add the first two in the next release. I won’t add the category box from rss_unlimited_categories though because is a plugin-specific item. The good news is if you tell me the id of this item (or paste here the relevant html code) I’ll show you how to modify bot_wtc to make it work. (only a one-line mod is required)

mrdale wrote:

…How about adding an area with the following: two multiple selects side by side; items and sections add show and hide radio buttons and an update button….

That would be useful indeed but believe me it’s not so easy. Anyways I’m thinking about it and if I’ll have the time i’ll try to implement something similar even if I fear it won’t happen too soon.

speeke wrote:

…if I try to hide the category tags (where no categories exist), the Category 1 and 2 titles remain visible

I’ll look into it ASAP. I’m at work and haven’t a test site to experiment now

..Am I correct in assuming that the Hide sections in sections dropdown should hide the section name in the section list dropdowns for each item?

Frankly I can’t understand well what you mean… this feature hides sections in the sections dropdown in the “write” tab. Could you explain me better what you mean?

Offline

#50 2010-01-26 10:57:15

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

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

redbot wrote:

… I won’t add the category box from rss_unlimited_categories though because is a plugin-specific item. The good news is if you tell me the id of this item (or paste here the relevant html code) I’ll show you how to modify bot_wtc to make it work. (only a one-line mod is required)

Great, thanks for the help. The actual select has an id of rss_uc_multiselect_id, although there are items in div above its level. This is the same for most other items though…

Offline

#51 2010-01-26 11:03:27

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

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

redbot wrote:

… this feature hides sections in the sections dropdown in the “write” tab.

I misunderstood what this feature did. Thanks for the clarification.

However, now that I’ve viewed the “write” tab, all of my sections hide when selected in your plugin except one (the “about” section). For some strange reason it is still visible, even though I’ve selected it to hide.

Also, since selecting some of the sections, unselecting them seems a bit buggy. Sometimes I have to unselect them, hit “Update” and then repeat the unselection process once or twice for the changes to take affect (ie the sections still appear selected after updating). I’ve found that the only way to unselect them is to do a few at a time.

There is also another problem in that I cannot clear the last one at all (ie one section always appears selected). The only way I can clear it is to edit bot_wtc_static_sections in txp_prefs in the DB.

Can you suggest any tests I can do to help you debunk it?

Last edited by speeke (2010-01-26 11:19:47)


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#52 2010-01-26 11:11:00

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

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

dl33 wrote:

… . The actual select has an id of rss_uc_multiselect_id, although there are items in div above its level. This is the same for most other items though…

Could you please post here the html code of the select item and the surrounding elements?
I’m asking because I never used this plugin and it’s important to target the correct jquery selector in order to avoid to leave orphaned elements around

Last edited by redbot (2010-01-29 19:59:36)

Offline

#53 2010-01-26 11:32:30

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

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

speeke wrote:

…There is also another problem in that I cannot clear the last one at all (ie one section always appears selected). The only way I can clear it is to edit bot_wtc_static_sections in txp_prefs in the DB.

Sorry Sarah I missed your post above. Anyways yes, this is a bug which is already fixed in my development copy and will be corrected in the upcoming version which will be released in a few days.
Regarding the other issues you mention I’ll have a look in the next days.

all of my sections hide when selected in your plugin except one (the “about” section). For some strange reason it is still visible, even though I’ve selected it to hide

Are you sure it is not set to be the “default” sections in your “sections” tab?

Offline

#54 2010-01-26 11:38:08

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

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

redbot wrote:

Are you sure it is not set to be the “default” sections in your “sections” tab?

Well it is the first section in the dropdown, if that’s what you mean? Not sure how to define a default for the sections tab. I couldn’t see any reference to it in the preferences.


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#55 2010-01-26 11:56:17

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

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

speeke wrote:

Well it is the first section in the dropdown, if that’s what you mean? Not sure how to define a default for the sections tab. I couldn’t see any reference to it in the preferences.

In the “sections” tab, under presentation, there are some options for each section.
One of these is “selected by defaut”.
If your “about” section is ‘selected by default’ it cannot be hidden (by purpose).
I hope it’s more clear now.

Last edited by redbot (2010-01-27 23:24:13)

Offline

#56 2010-01-26 12:13:22

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

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

redbot wrote:

Could you please post here the html code of the select item and the surrounding elements?
I’m asking because I never used this plugin and it’s important to target the correct jquery selector in order to avoid to leave orphaned elements around

<div>
	<p>Kategorisieren [<a href="?event=category">Bearbeiten</a>]<br>
		<select id="rss_uc_multiselect_id" name="Cats[]" class="list" size="10" multiple>
			<option value="22">10% Empfehlungsnetz</option>
			<option value="20">Allgemeines</option>
			<option value="24">Faszination Physik</option>
			<option value="19">Immobilien Filme</option>
		</select>
	</p>
	<p>[<a href="javascript:document.getElementById('rss_uc_multiselect_id').selectedIndex=-1;noop();">Deselect all</a>]</p>
</div>

Offline

#57 2010-01-26 12:31:26

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

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

dl33

Ok, thank you.
Now let’s try to add this item in the plugins code.
Go to plugins>bot_write_tab_customize and click modify.
Around line 55 (at the end of the list) add this line:

bot_wtc_insert_in_main_array ('rss_unlimited_categories', '$("div:has(select[id=rss_uc_multiselect_id])")');

Save and see if it works. If it doesn’t, report here and I’ll check if I made some errors.

Offline

#58 2010-01-26 12:37:21

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

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

redbot wrote:

bot_wtc_insert_in_main_array ('rss_unlimited_categories', '$("div:has(select[id=rss_uc_multiselect_id])")');

Great, works perfectly…

Offline

#59 2010-01-26 21:02:10

speeke
Member
From: Bruny Island, Australia
Registered: 2009-03-29
Posts: 161
Website

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

redbot wrote:

In the “sections” tab, under presentation, there are some options for each sections … I hope it’s more clear now.

I checked to see if the “about” section was “selected by default”, but it wasn’t. None of my sections are.

When I made a section other than “about” “selected by default” the “about” section would hide in bot_wtc as expected. However, when no sections are “selected by default”, the “about” section does not hide, even thought I ask the plugin to do so. So, there still seems to be a problem with the first section in my list. Bizarre!

Also, I was wondering if it would be possible to output the section list in bot_wtc so that the sections appear in name order? It would just make it a little easier to search the list.

Last edited by speeke (2010-01-26 21:17:58)


“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower

Offline

#60 2010-01-27 00:03:06

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

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

speeke wrote:

When I made a section other than “about” “selected by default” the “about” section would hide in bot_wtc as expected. However, when no sections are “selected by default”, the “about” section does not hide, even thought I ask the plugin to do so. So, there still seems to be a problem with the first section in my list. Bizarre!

There is a reason for this.
Let me explain: suppose you have a section “about” which contains only one article (and often it is the case). You’ll want to hide it from the sections dropdown because you know your client shouldn’t be allowed to put another article in it.
BUT
suppose your client wants to edit the only existing article in section “about”: he’ll have to go to the “articles” tab and select it.
In this case – and only in this case – it makes sense that the section “about” shows in the dropdown for at least two reasons:

  1. one concerns usability – it makes sense for me that he can see the section to which the article he is editing belongs.
  2. the other is a “technical” one. When saving an article a section is required by txp – if there is no selected section the article won’t be saved and txp will throw an error.

To make it short I decided on purpose that a section should be removed from the dropdown always except when it is selected on page load (in other words when you are editing an already existing article).

In your case, given that you haven’t chosen a section to be “selected by default”, the first one in alphabetical order (about) is selected and this triggers the behaviour I explained earlier.
At the end I don’t think it is a problem at all as you should always choose a section to be “selected by default” to ease your workflow (every site has a section which is used more often than others and it helps to have it already selected)
I hope I have shed some light on the matter even if my english sucks.

Also, I was wondering if it would be possible to output the section list in bot_wtc so that the sections appear in name order? It would just make it a little easier to search the list.

Yes of course, I’ll add it to the next release.

Last edited by redbot (2010-01-27 00:11:06)

Offline

Board footer

Powered by FluxBB