Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#265 2012-02-21 17:10:37

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

That works… I’m still having an issue with one multi select but I think I know what the issue is… The multi select that won’t be hidden is dynamically generated by a glz custom script…

the markup is like this

<p class="glz_custom_field_script">
<label for="custom-17">my Dynamic multi Select</label><br />
<select id="custom-17" name="custom_17[]" class="list" multiple="multiple" size="5">
<option value="item-1">Item 1</option>
<option value="item-2">Item 2</option>
<option value="item-3">Item 3</option>
</select>

but the call that bot_wtc generates is like this


$("p:has(*[name='custom_17'])");

instead of

$("p:has(*[name='custom_17[]'])");

Last edited by mrdale (2012-02-21 17:11:20)

Offline

#266 2012-02-21 21:41:07

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

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

Ok Dale, thanks for the help.
asap I’ll release a new version which fixes the save bug as well as the installation bug (the first error message you reported – which actually isn’t a serious bug, just an annoyance).
Regarding the issue with the script-generated multiselect it can’t be fixed at plugin-code level (since the select is created after the plugin execution) but probably it can be solved by adding a specific jquery rule in the js box… more on this when I’ll have a moment.
BTW, tough not necessary, would you mind showing what the script does?

Offline

#267 2012-02-22 15:36:02

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

Here’s the glz _cf script. The following will output a multi-select of non sticky articles from “mySection” showing titles, where the selection becomes a url_title. I use it to associate multiple articles from “mySection” with the current article for display purposes.

function my_section_articles($custom_field, $custom_id, $custom_value) {
$titles = array();
$query = safe_rows('url_title, title', 'textpattern', "section like 'mySection' AND status !=5");
$titles[] = '&nbsp;';
foreach ($query as $title)
$titles[$title['url_title']] = $title['title'];
return glz_selectInput($custom_field, $custom_id, $titles, $custom_value, "1", true); }

Offline

#268 2012-07-31 00:08:15

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

It seems that this very useful plugin will no longer works in the next version 4.5 of Textpattern (look the following rah_section_titles forum posts).

Do you plan to adapt it to the next version of Textpattern?

Thank you very much for your plugins.

Offline

#269 2012-08-29 14:53:31

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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

Sharing a tip:

This is a replacement/alternative for jmd_save (use Ctrl+S to save articles on Write tab) which I’m not sure it’s currently working in some modern browsers (I’ve had some issues with Chromium).

Using bot_write_tab_customize, you can add additional Javascript code to the Write panel.

Visit the “Extensions -> Write tab customize” tab, click on the “Additional JS code”, paste this code into the textarea and click on “Update”.

<script type="text/javascript">
var jmd_save = {};
jmd_save.main = function()
{

  $(window).keydown(function(event) {
      //19 for Mac Command+S
      if (!( String.fromCharCode(event.which).toLowerCase() == 's' && event.ctrlKey) && !(event.which == 19)) return true;
      event.preventDefault();
      jmd_save.submit();
      return false;
  });

}();

/**
 * Submits the main-editing form.
 */
jmd_save.submit = function()
{
    var btn = $('.publish');
    if (btn.length > 0)
        return btn[0].click();
};
</script>

And that’s all. Just hit Ctrl+S when writing an article, and it should get saved.
An ideal companion to rah_expanding and the new AJAX article save functionality in Textpattern 4.5.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#270 2012-08-30 17:41:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

maniqui wrote:

And that’s all. Just hit Ctrl+S when writing an article, and it should get saved.

Damn knots. Thought to give the code a spin and run it through a blender.

Offline

#271 2012-08-30 19:52:28

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

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

GugUser wrote:

It seems that this very useful plugin will no longer works in the next version 4.5 of Textpattern (look the following rah_section_titles forum posts).

Do you plan to adapt it to the next version of Textpattern?

Thank you very much for your plugins.

I’m experiencing the same troubles as GugUser, it seems. Given the juicy changes to the Write tab, it’s no surprise that this plugin would be affected, but are we the only ones?

Offline

#272 2012-08-30 20:34:10

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

johnstephens wrote:

I’m experiencing the same troubles as GugUser, it seems. Given the juicy changes to the Write tab, it’s no surprise that this plugin would be affected, but are we the only ones?

Everyone would be experiencing the same troubles caused by layout changes, yes. It’s not just random or configuration based. Not that many have even (yet?) updated to Textpattern 4.5 and using bot_wtc on it. Give it some time, the base that is affected will grow, but not everyone will be posting about it. Some will silently fork their private code w/o sharing it (I would say that is very common) and others just move on or don’t feel like reporting (live with the errors).

But when you do wonder why there aren’t reports of this or that, we small. Take a look at the total page view count (not unique or users) of this thread for instance. Under 50,000. Now, what do you think is the user base that is up to date or cares.

Offline

#273 2012-08-30 21:01:28

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

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

Thanks, Gocom! I don’t have the wherewithal to fork the plugin and fix it, but I can hold out for the real thing. I’m very grateful for your confirmation that the problem isn’t just my configuration.

Offline

#274 2012-08-31 12:13:17

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 apologize for being away for so long. I was just a little burnt out with anything web related. I didn’t even know of txp 4.5!
Just give me some time to update myself about the new txp version …and some other time to re-understand my own plugin code.
I’ll try to fix these issues asap ok?
Cheers

Offline

#275 2012-08-31 12:16:33

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

More than happy to test things for you :)

Offline

#276 2012-08-31 12:30:44

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

Hello redbot,

The admin-side flat HTML mockups in my github repo might help if you are considering an update to bot_write_tab_customise – a lot of IDs, classnames and structure was changed (for the better) in Textpattern 4.5, and those mocks are a quick way of referencing that.

Last edited by philwareham (2012-08-31 12:31:17)

Offline

Board footer

Powered by FluxBB