Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1181 2016-05-26 18:30:30

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 237

Re: hak_tinymce WYSIWYG article editor

Hi uli, thank you for support :-)

I tried the last one works fine but, My each image has two three lines caption, because of that i need to display the image name (world.jpg, cofee.jpg, love.jpg).

Note: i’ve a plugin (fh-article-image-selector) that list all the image names for article_image field, i need such image name with each image to hak_tinymce

Offline

#1182 2016-05-26 18:53:54

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

Re: hak_tinymce WYSIWYG article editor

raminrahimi wrote #299306:

because of that i need to display the image name (world.jpg, cofee.jpg, love.jpg).

Doesn’t this code here do exactly that for you? Here its does so :)


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

Offline

#1183 2016-05-26 18:55:38

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

Re: hak_tinymce WYSIWYG article editor

raminrahimi wrote #299306:

Note: i’ve a plugin (fh-article-image-selector) that list all the image names for article_image field, i need such image name with each image to hak_tinymce

Not entirely clear what you mean. Can you post a screen shot please?


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

Offline

#1184 2016-05-26 19:03:26

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 237

Re: hak_tinymce WYSIWYG article editor

Yes ! that’s great now my problem solved :-)
Thank you !

uli wrote #299308:

Not entirely clear what you mean. Can you post a screen shot please?

Ahu don’t worry about that ;-) that was a reference, that’s a plugin which list the image names easily we can select for each article.

Offline

#1185 2016-05-26 19:32:55

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

Re: hak_tinymce WYSIWYG article editor

raminrahimi wrote #299309:

Yes ! that’s great now my problem solved :-)
Thank you !

You’re welcome.

I’ll transfer these posts to the hak_tinyMCE topic, some time soon, BTW.


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

Offline

#1186 2016-08-30 00:58:47

RinceWND
New Member
From: Russia, Vladivostok
Registered: 2016-08-30
Posts: 2

Re: hak_tinymce WYSIWYG article editor

Hi everyone!

I’m sorry if the answer to my question is somewhere on the forums already, but I never had enough diligence to search through every possible query combination.

The question is `Is this plugin compatible with beta2, because I can’t seem to install it` since it throws an error when I’m pressing `Install` button at the plugin’s prefs page:

Warning "mysql_get_server_info(): Access denied for user 'username'@'localhost' (using password: NO)".

where <username> is not the correct username that is defined in config.php, and then

Warning "mysql_get_server_info(): A link to the server could not be established".

and

User_Error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5".

I guess the plugin doesn’t receive a valid connection so it tries to establish new one with default server arguments that are no good for this particular textpattern installation. Is it compatibility issue or just my configuration?

In case this info matters:
PHP: 5.6.23;
MySQL: 5.5.49-cll-lve.

Offline

#1187 2016-09-09 11:47:23

etc
Developer
Registered: 2010-11-11
Posts: 3,069
Website

Re: hak_tinymce WYSIWYG article editor

RinceWND wrote #300865:

Is it compatibility issue or just my configuration?

Hello, welcome to the forum. We have switched to mysqli functions in 4.6, so this could be a compatibility issue. Try to replace $mysqlversion = mysql_get_server_info(); in the plugins code with

global $DB;
$mysqlversion = mysqli_get_server_info($DB->link);

etc_[ query | search | pagination | date | tree | cache ]

Offline

#1188 2016-09-10 06:54:13

RinceWND
New Member
From: Russia, Vladivostok
Registered: 2016-08-30
Posts: 2

Re: hak_tinymce WYSIWYG article editor

Thank you for your suggestion!

It worked and the plugin connected to my database. However it now throws this in my face:

User_Error "Specified key was too long; max key length is 1000 bytes".

Another mysql -> mysqli issue, maybe? But I don’t see any more `mysql_` function calls in the code. Or is something wrong with my db charset? (I have just tried switching db collation and dbcharset value in config.php form ‘utf8mb4’ to ‘utf8’ to no avail.)

If I get this right, the execution is now stuck on this line:

$hak_tinymce_prefs_table = safe_query("CREATE TABLE `".PFX."txp_hak_tinymce` (
	`pref_name` VARCHAR(255) NOT NULL,
	`pref_value` TEXT NOT NULL,
	PRIMARY KEY (`pref_name`)
) $tabletype");

since it doesn’t create `txp_hak_tinymce` table.
Can the `VARCHAR (255)` be a culprit here? I’m not sure, but if a single character allocates 4 bytes, this can potentially exceed the limit, as 4*255 = 1020.

I reckon that I should better set up a local server to try to debug all the errors this plugin has to show me, though I’m not good in php or sql.

———- UPD:

Yup, that’s it. Changing 255 to 250 let me finally see the preferences page. The only concern that’s left is if this change has any downsides apart from having to have shorter `pref_name`s (which are pretty much shorter, I assume).

Thank you, again!

P.S. Trying to understand how use `modern` theme of the latest version of timymce with this bundled one. Looks like tinymce changed a lot…

Last edited by RinceWND (2016-09-10 12:58:58)

Offline

#1189 2016-09-13 14:18:28

etc
Developer
Registered: 2010-11-11
Posts: 3,069
Website

Re: hak_tinymce WYSIWYG article editor

Thanks for the report, that’s a drawback of switching to utf8mb4, indeed.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#1190 2016-09-30 03:10:38

msome
Member
Registered: 2015-09-16
Posts: 22

Re: hak_tinymce WYSIWYG article editor

Does not working in v.4.6.0
(

Offline

Board footer

Powered by FluxBB