Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#325 2015-04-25 23:42:05

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

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

For me, this is one of the most useful plugins. In addition that it allows to rearrange all type of form fields in the editable article interface, it also allows to insert little JS or jQuery snippets to change parts of the UI.

An example, which I achieved today a desired solution:

<script>
	$(function() {
		$("textarea#custom-12").attr("placeholder", "Short notice for the input");
		$("textarea#custom-13").attr("placeholder", "Other short notice for the input");
	});
</script>

Maybe that’s nothing new, but I wasn’t aware of this helpful function.

Offline

#326 2015-06-14 23:36:22

lazlo
Member
Registered: 2004-02-24
Posts: 110

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

Here is a bug that has been happening to me with bot_write_tab_customize .7.2. Updating to a new instance of TXP 4.5.7 I came across a bug. The plugin was working perfectly as I organized my 63 custom fields into shape and then for no apparent reason after using the “Advanced/Multiple selection” screen a few time the update button stopped working on either screen (advanced/norma). Hitting update would just kick me out to the write page without saving preferences.

Updated to using mrdale’s mod .7.3 and while it made the UI match hive better the kickout to write tab still continued. If I went back to bot_write_tab_customize tab through the menu, the preferences were not saved BUT if I hit the back button the green flag came up and said “preferences saved” and I thought they were but unfortunately the were just saved in the cache. Reloading the page made the what appeared to be saved preferences disappear.

This happens on Firefox, Safari and Chrome. Is there a log where I can see what is happening after the update button is pushed?

Offline

#327 2015-06-15 14:57:57

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

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

Hi Lazlo,
this seems to be the bug already discussed here.
Is it the case?

Offline

#328 2015-06-15 15:28:12

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

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

redbot wrote #291555:

this seems to be the bug already discussed here.

lazlo, don’t miss maniqui’s solution some posts deeper there:

maniqui wrote #243861:

Fixed!
[…]
It seems that if you have Suhosing module (some security-related module for PHP which I didn’t know it was installed), you have to edit the corresponding config file (on my system, it was located in /etc/php5/conf.d/suhosin.ini) to raise the corresponding values.
I’ve set them to:

php_value suhosin.request.max_vars 2048
php_value suhosin.post.max_vars 2048

And then, all was good: I was able to post large bot_wtc forms :)


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

Offline

#329 2015-12-07 21:04:57

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

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

For people already working with the v4.6 dev version with the new two column admin layout, here’s a tentative first fix for bot_write_tab_customize:

These are the new search and replace bits within the plugin matching phil’s much cleaner admin layout.

$bot_arr_selectors = array(

    'writetab_main_content' => '$("#main_content")',

      'writetab_view_modes' => '$("#view_modes")',
      'title' => '$(".title")',
      'body' => '$(".body")',
      'excerpt' => '$(".excerpt")',

    'writetab_sidebar' => '$("#supporting_content")',

      'save' => '$(".txp-save")',

      'actions' => '$(".txp-actions")',

        'create_new' => '$(".txp-new")',
        'duplicate' => '$(".txp-clone")',      
        'view' => '$(".txp-article-view")', 

      'page_article_nav_hed' => '$(".nav-tertiary")',

      'sort_display' => '$("#txp-write-sort-group")',

        'status' => '$(".status")',
        'section' => '$(".section")',
        'category1' => '$(".category-1")',
        'category2' => '$(".category-2")',

      'date_settings' => '$("#txp-dates-group")',

        'publish' => '$(".posted")',
        'publish_time' => '$(".posted.time")',
        'reset_time' => '$(".posted-now")',
        'expired' => '$(".expires")',
        'expire_time' => '$(".expires.time")',

      'meta' => '$("#txp-meta-group")',

        'url_title' => '$(".url-title")',
        'description' => '$(".description")',
        'keywords' => '$(".keywords")',

      'comment_settings' => '$("#txp-comments-group")',

        'use_comments' => '$(".comments-annotate")',
        'comment_invitation' => '$(".comment-invite")',

      'article_image_group' => '$("#txp-image-group")',

        'article_image' => '$(".article-image")',

      'custom' => '$("#txp-custom-field-group")',

      'advanced_options' => '$("#txp-advanced-group")',

        'article_markup' => '$(".markup-body")',
        'excerpt_markup' => '$(".markup-excerpt")',
        'override_default_form' => '$(".override-form")',

      'textile_help' => '$("#txp-textfilter-group")',

      'recent_articles' => '$("#txp-recent-group")'

);

EDIT: code updated slightly

The indentation is not necessary, just an indication of which bits go where. As before it references each group and most of the items within the groups. If you want to group items within a group of your own, you’ll need to do some custom jQuerying.

And here’s a tentative version that builds on mrdale’s version already made to bot_write_tab_customize – Thanks Dale – which regularised some of the styling to match the rest of txp and added some other saving fixes.

EDIT: code deleted – see later post

Note: this is not backwards compatible with pre v4.6-new-admin-layout versions and may break with future changes to the edit pane. Mr Dale’s version works for earlier versions.

Also note that Phil does offer ways of hiding certain aspects of the write tab with css from the outset by adding lines to config.php. That is more efficient if you want to hide things generally and not just on a per-section basis using bot_wtc.

Redbot, it would be brilliant if you could meld this back into your own version at some point when things are ready. Thanks for all the hard work you put into this invaluable plugin over the years.


TXP Builders – finely-crafted code, design and txp

Offline

#330 2015-12-15 18:40:45

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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

Hey! I’m using this plugin (v0.7.2) on a site that runs Textpattern v4.5.7 with the Hive admin theme. It still works, despite some hiccups in the past!

I need to add a custom field along with some bot_wtc rules for how it’s displayed, but I’m afraid to edit anything in bot_wtc’s admin panel. Sometimes, when I visit the panel, it spawns a bunch of error popups, and even without those errors, many of the “Item” fields for existing fields are blank. It also appears that the entire set of items is duplicated, doubling the list of display rules.

For those who have it working in 4.5.7 with Hive, what version of the plugin are you using? Do you have any recommendations?

Thank you!

Offline

#331 2015-12-15 18:55:08

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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

Update—I upgraded my local installation to Mr Dale’s v0.7.3. It looks more beautiful, but the same “problems” remain:

  • It spawns a bunch of popup error messages like this: Internal error "Undefined index: $("p:has(*[name='custom_8'])")". —unless I click “Prevent this page from spawning additional popups” in my browser.
  • The entire list of custom fields I have display rules for is duplicated.
  • And many of the field titles are blank in the “Item” field.

Last edited by johnstephens (2015-12-15 18:55:22)

Offline

#332 2015-12-15 20:30:58

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

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

Any luck with this one that’s working for me on txp v457 (not the 4.6 one from my previous post)?

I vaguely remember having a problem with an older updated site where the bot_wtc_update function had not run properly and the entries in the bot_wtc table were still “old style”. I edited them manually in the database to match the “new style” and the errors disappeared. You can look at the function in the plugin to see how it should be or compare your table with a working bot_wtc installation.


TXP Builders – finely-crafted code, design and txp

Offline

#333 2015-12-15 21:15:57

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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

Thank you, Jakob! The plugin version doesn’t seem to matter, but you gave me a vital clue anyway. The jQuery selector designated by the Item’s “option” element seems to be out of sync on some fields. I’ll fix those and see if that helps.

Offline

#334 2015-12-15 23:21:44

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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

That seemed to work. I think the fields got doubled when I imported public server data into my dev database.

Thanks again, Jakob!

Last edited by johnstephens (2015-12-15 23:22:06)

Offline

#335 2015-12-16 16:22: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 all,
I’m sorry for all this issues, I hope in the next few weeks I’ll find the time to update the plugin.
BTW thank you for all your help and suggestions :)

Offline

#336 2015-12-16 18:34:35

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

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

I’ve been using the plugin with Textpattern 4.5.7 without any issues. I suspect the problems don’t seem to be generally. But the announcement of a update is a very good message, and I hope this update will be for the upcoming Textpattern version 4.6.

Thank you very much.

Offline

Board footer

Powered by FluxBB