Textpattern Forum

You are not logged in. Register | Login | Help

#671 2009-12-04 03:58:24

tRM
New Member
Registered: 2009-12-03
Posts: 3

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote:

@tRm: what version of php are you using? I’ll try to investigate not sure what could be causing that.

Using php 4.3.11 with no option to upgrade (clients are using Yahoo webhosting). I updated to 0.9.7, but the issue remained.

Thank you for the quick reply and willingness to help.

Offline

#672 2009-12-04 08:36:32

webspy
Member
From: Czech Republic
Registered: 2008-06-01
Posts: 10
Website

Re: hak_tinymce WYSIWYG article editor

Originally you could create another plugin that would add to the lang table. When I moved everything into a class last time I broke this (no one was using it as far as I know). Creating an admin panel is probably the best in the long run. It’s also the most amount of work :)

Well, I don’t care much what way will it be done. For me (and hopefully for others) is important that I don’t have to edit the plugin and rewrite the sentences every time you release new version :-) You are right, for long run it would be better new plugin.

Regarding inserting the thumb with a link to the original, my preference would be to do that trough a general TXP linking plugin which I want to write. That way the image plugin is not performing two things. This would alo allow you to link the image to articles, sections etc if you wanted to. What do you think of that? I’m open so opposing views.

I get your point. Well this feature is not for me, but for my customers (BFU). I want to make it as easier as possible — so they could insert image thumbnail with link to original (and using lightbox without explaing them they have to put there rel/class). I think this would be the easiest way — in one click <a href=”“ rel=“anybox”><img /></a>. If they want to make a normal link to page/article/image/anywhere, they may use classic link button.

Offline

#673 2009-12-04 10:19:48

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

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote:

…0.9.7 should allow you to turn the editor on for all textareas…

Hi,
the good news is it works ok. The bad news is it targets each textarea including the “keywords” textarea.
Not a big problem for me given that I always hide it, but someone might find it useful to target all textareas excluding keywords.
Anyway thanks, this did help!

Edit
I think an easier way is to target each textarea having a class of “glz_text_area_field”. I’ll see if there is a way. Of course any hint on how to do it is welcome.

Last edited by redbot (2009-12-04 10:31:40)

Offline

#674 2009-12-04 13:44:33

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,631
Website

Re: hak_tinymce WYSIWYG article editor

@redbot: There are a couple of ways of targeting the textareas (I don’t know what glz sits out for them). Check out the editor_selector docs in how to target a class.

There is an object called settings that holds the init objects. settings.body is for the body, settings.excerpt is for the excerpt. but if you are using other selectors you only need one. So to do what you want do try:

settings.body.mode = "specific_textareas";
settings.body.editor_selector = "glz_text_area_field";

Otherwise if you know the ids for the textareas we want you can do:

settings.body.mode = "exact";
settings.body.elements = "id1,id2,id3";

one of these should get you close at least.

Last edited by hakjoon (2009-12-04 13:45:50)


Shoving is the answer – pusher robot

Offline

#675 2009-12-04 13:57:17

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,631
Website

Re: hak_tinymce WYSIWYG article editor

@tRM: I’ll need to setup a php4 environment to test this out on. According to the docs what I’m doing should work. I might revert to having explicit global functions for the callbacks and have those call the class methods.

I’ll see if I have time to build that out in the next couple days.


Shoving is the answer – pusher robot

Offline

#676 2009-12-04 15:25:26

faltik
New Member
From: Czech Rep.
Registered: 2009-12-03
Posts: 7

Re: hak_tinymce WYSIWYG article editor

@faltik: Try 0.9.6.1 see if it helps.

Nevermind found a bug that kept the editors form displaying when the toggle was hidden, so going straight to 0.9.7

Everything works like a charm now, thanks!

Offline

#677 2009-12-04 16:07:11

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

Re: hak_tinymce WYSIWYG article editor

hakjoon wrote:

…Otherwise if you know the ids for the textareas we want you can do:

settings.body.mode = "exact";
settings.body.elements = "id1,id2,id3";

Thank you Patrick it works perfectly!
To summarize I wrote something like this in the “Callback functions” box:

settings.excerpt.mode = "exact";
settings.excerpt.elements = "custom-3, custom-7";
settings.body.mode = "exact";
settings.body.elements = "custom-4,custom-6";

This way textareas with an id of custom-3 and custom-7 will have the same settings (in particular height) of excerpts and textareas with an id of custom-4 and custom-6 the same of body. This was exactly what I was looking for (without even hacking the plugin).

I have another problem though (not related to the above): when I try to insert an image the new window opens but thumbnails are not shown and the loader gif goes on forever.
Seems like it doesen’t find any image though I’m testing in a pretty standard install (images are in the “images” dir). Mhm… must be a problem of mine since no one reported it untill now.
Any ideas?

Thank you again for the help.

Offline

#678 2009-12-04 18:08:39

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,631
Website

Re: hak_tinymce WYSIWYG article editor

Check for any JS errors. There is some potential for alt and title to maybe break the js which i think I need to improve.


Shoving is the answer – pusher robot

Offline

#679 2009-12-05 17:48:19

MustangMatt
New Member
Registered: 2009-12-05
Posts: 4

Re: hak_tinymce WYSIWYG article editor

I just installed 0.9.7 and the image picker is not working correctly for me. When I click to add an image, the pop up box displays my website homepage under the General tab (therefore I am unable to choose an image, I just see my complete homepage in the small pop up box). If I click the Appearance and Advanced tabs, they display correctly. But without being able to access the General tab, I can’t add an image.

Don’t know if I’m the only one experiencing this?…. any help you can provide is appreciated.
BTW I’m using Firefox 3.5.5 on a Mac, php 5.2.9 running on XAMPP test server.
Thanks!

Offline

#680 2009-12-05 18:10:07

hakjoon
Moderator
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,631
Website

Re: hak_tinymce WYSIWYG article editor

it looks like it’s not picking up the events properly. I’m not being able to replicate it. Is your site in a folder?

In firebug can you check where the Ajax calls are going to? I seems like they are going to the wrong path somehow.

Last edited by hakjoon (2009-12-05 18:12:36)


Shoving is the answer – pusher robot

Offline

Board footer

Powered by FluxBB