Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#337 2015-12-17 22:15:59

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

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

Just curious… I’ve not had the pleasure of using bot_wtc, but I’ve always been under the impression that its immense value was due to old Txp admin-side template code sucking so bad. But now with the new ultra-flexible separation of content and presentation coming in admin-side templates (i.e., total css control), how will bot_wtc still offer redesign benefit in 4.6 onward versus just creating an admin-theme via admin-theme creation conventions?

I think it’s a good sales question to try and answer. ;)

Offline

#338 2015-12-17 22:52:16

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

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

GugUser wrote #297114:

I hope this update will be for the upcoming Textpattern version 4.6.

Did you have any luck with my intermediate version on v.4.6?

Destry wrote #297120:

But now with the new ultra-flexible separation of content and presentation coming in admin-side templates (i.e., total css control), how will bot_wtc still offer redesign benefit in 4.6 onward versus just creating an admin-theme via admin-theme creation conventions?

Phil’s extra css rules allow you to hide items you don’t want, and plugins can replace pluggable parts of the admin panel with their own code, so that certainly covers some of bot_wt’s hiding options.

Over and above that bot_wtc still offers several major benefits:

  1. You can move chunks of the admin panel around – most usefully individual custom fields – between different parts of the page, e.g. make something in the side column appear in the main column. For example, you might want a short-title for a menu beneath the title and above the body field, or a teaser text before the excerpt field.
  2. You can make custom fields appear and disappear depending on the section chosen. If you’ve ever used a site with a truckload of custom_fields, it’s a godsend. Example: Switch to the events section and see just the custom fields for events, switch to the projects section and see only the custom fields pertaining to projects
  3. You can inject your own javascript to the admin page.

TXP Builders – finely-crafted code, design and txp

Offline

#339 2015-12-18 19:35:25

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

jakob wrote #297122:

Did you have any luck with my intermediate version on v.4.6?

Do you know if I can upgrade a copy of an existing site in the usual manner from 4.5.7 to the current 4.6 version?

So I could try it.

Offline

#340 2015-12-22 17:30:51

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

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

Thanks, Jakob. Helpful info.

Offline

#341 2015-12-22 21:18:46

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

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

GugUser wrote #297135:

Do you know if I can upgrade a copy of an existing site in the usual manner from 4.5.7 to the current 4.6 version? So I could try it.

Sorry, I overlooked this. The short answer is it should work, but work on a copy to be on the safe side. I upgraded an old site and apart from some upgrade problems relating to glz_custom_fields and bot_wtc, it was fine. The latter were, I think, due to the fact that I am running those plugins from the plugin_tmp directory rather than installing them normally.


TXP Builders – finely-crafted code, design and txp

Offline

#342 2016-02-17 09:59:51

MatthijsR
New Member
Registered: 2016-01-18
Posts: 5

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

Hi guys,

I’ve found out about this plugin a couple of months ago and I’ve used it for a couple of sites now, in combination with glz custom fields. This is an immense improvement for people to get around in the write tab. Great stuff!

Atm I’m experiencing an issue and I just can’t find what the problem is. It worked fine for a while. But for some reason now, when I try adding any sort of new rule or alter an existing one, saving doesn’t work and I don’t get any form of notification.

Sometimes it just jumps to the top of the page and the url changes from http://website/index.php?event=bot_wtc_tab to http://website/index.php. But most of the time it jumps back to the articles root (my starting page after login).

I can alter the rows in the database and then it works. But this clearly isn’t how it’s supposed to work.

Can someone help me with this?

A big thanks in advance!

Offline

#343 2016-02-17 15:55:37

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

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

Hi MatthijsR,
I fear you have the suoshin module installed on your server.
This was already discussed here.

Offline

#344 2016-03-01 13:15:05

MatthijsR
New Member
Registered: 2016-01-18
Posts: 5

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

redbot wrote #297889:

Hi MatthijsR,
I fear you have the suoshin module installed on your server.
This was already discussed here.

Thanks redbot! It’s quite difficult to find specific problems in such long threads… Tried searching but probably used the wrong words. I’ll try and alter that config file. Hope this won’t clear out my preferences. Backing up just in case.

Offline

#345 2016-05-19 19:14:49

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

On a new Textpattern 4.6 dev version, with an only plugin, a working glz_custom_fields 1.4.0-beta1, I tried to install this bot_write_tab_customize beta. But it was not possible.

When I activated the plugin, first appeared a few times this error message:

User_Error “Table ‘textpattern.bot_wtc’ doesn’t exist”.

When I tried to run the installation, then appeared this error message:

Fatal error: Uncaught Error: Call to undefined function mysql_get_server_info() in /Applications/MAMP/htdocs/textpattern/textpattern/lib/txplib_misc.php(1783) : eval()’d code:271 Stack trace: #0 /Applications/MAMP/htdocs/textpattern/textpattern/lib/txplib_misc.php(1783) : eval()’d code(536): bot_wtc_install() #1 /Applications/MAMP/htdocs/textpattern/textpattern/lib/txplib_misc.php(1896): bot_wtc_tab(‘bot_wtc_tab’, ‘install’) #2 /Applications/MAMP/htdocs/textpattern/textpattern/index.php(214): callback_event(‘bot_wtc_tab’, ‘install’, 0) #3 {main} thrown in /Applications/MAMP/htdocs/textpattern/textpattern/lib/txplib_misc.php(1783) : eval()’d code on line 271

Is there an explanation for this?

Offline

#346 2016-05-19 20:26:11

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

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

Are you perhaps on PHP 7? The error occurs in the very first line of the function bot_wtc_install. A comment in that function reads // figure out what MySQL version we are using (from _update.php). If you look at _update.php from version 4.5.x, it uses that method to use switch notation depending on whether on MySQL 4 or 5. The newest version of _update.php does away with that method completely (I think that happened in this commit).

What if you edit that function in the plugin and delete the bit between figure out which MySQL version… up to (but not including) set_pref and replace it with a reduced version:

$tabletype = " CHARACTER SET = ". $txpcfg['dbcharset'] ." ";

	// Create the bot_wtc table
	$bot_wtc = safe_query("CREATE TABLE `".PFX."bot_wtc` (
		`id` INT NOT NULL AUTO_INCREMENT,
		`item` VARCHAR(255) NOT NULL,
		`position` VARCHAR(255)  NOT NULL,
		`destination` VARCHAR(255)  NOT NULL,
		`sections` TEXT  NOT NULL,
		`class` VARCHAR(255)  NOT NULL,
		PRIMARY KEY (`id`)
		) ENGINE=MyISAM $tabletype");

i.e. If you’re on PHP7, you’ll also be on a more recent version of MySQL, so you can do away with the old test and just bring in the charset.


TXP Builders – finely-crafted code, design and txp

Offline

#347 2016-05-19 20:46:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,413
Website GitHub

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

Jakob’s right. undefined function mysql_*() is a symptom of a plugin that uses MySQL calls that have been removed from PHP in version 7. Another “solution” (albeit short term) is to check what Ruud has done in core: he’s replaced mysql_*() calls with mysqli_*() calls to buy us some time. The usual solution is to convert:

mysql_some_function();

into:

global $DB;
...
mysqli_some_function($DB->link);

The problem then usually goes away. Though in this particular function’s case, we’ve already computed the value so you should be able to do away with the function call entirely and just use the value directly wherever it needs the MySQL version number:

global $DB;
...
$DB->version;

The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#348 2016-05-20 02:20:20

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

Thank you jakob and Bloke for your answers.

jakob wrote #299157:

Are you perhaps on PHP 7?

Yes.

I tried to implement your suggestions, but with each new installation comes the same error message:

User_Error “Table ‘textpattern.bot_wtc’ doesn’t exist”.

Later I changed to PHP 5.6.1, but I could not install the original bot_write_tab_customize v0.7.4beta plugin. The same error message.

The subject of the experiment was to find out, whether both plugins, glz_custom_fields 1.4.0-beta1 and bot_write_tab_customize v0.7.4beta might work together. That’s crucial for me to decide if I will be able in the near (near?) future to update to Textpattern 4.6.

Offline

Board footer

Powered by FluxBB