Plugin to put TinyBrowser in S9Y admin

Creating and modifying plugins.
Post Reply
akremedy
Regular
Posts: 56
Joined: Sat Jul 26, 2008 9:06 am
Location: Bay Area, U.S.A.
Contact:

Plugin to put TinyBrowser in S9Y admin

Post by akremedy »

This is part of a bigger project to integrate the latest TinyMCE rev into S9Y 1.5b1 - which I've got working well by the way. With TinyMCE now, I'm using TinyBrowser for all of my media and file management. I figured since I was going to use TinyBrowser in TinyMCE, I might as well make it accessible from the S9Y Media admin panel as well, which is what my new serendipity_event_tinybrowser plugin does.

Is this something worth checking into spartacus?

The other notable thing that I did with TinyBrowser as part of my integration was to leverage TB's session auth with S9Y's authentication so that TinyBrowser can be secured, but still seamlessly accessible within S9Y admin.

I did this by interrogating S9Y's serendipity cookie for author_token. I stuff author_token into a new session spawned from TB, then fetch author_token into TB's session/security-check. Is this safe and sound logic? I did some testing, and in fact, it does secure TB from launching it via crawling the directory tree - further, I get seamless authentication from within S9Y admin.

I've posted my work here, along with a link to the plugin: http://www.pigslipstick.com/index.php?/ ... -Menu.html

Opinions/feedback welcome!
Adam
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Plugin to put TinyBrowser in S9Y admin

Post by garvinhicking »

Hi!

That sounds awesome, and very worthwile to put into spartacus! Do you have CVS access and could upload it? Also, if people could test it, that would be great. Using the author_token should be fine, I agree. I'd need to look into the code - I'm not 100% sure if author_token is always set, or only when the "remember me" feature is used of the s9y login.

For the latest tinymce, did you requite any changes to the tinymce-s9y event plugin? Maybe it would be great to combine your plugin into the existing tinymce plugin?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
akremedy
Regular
Posts: 56
Joined: Sat Jul 26, 2008 9:06 am
Location: Bay Area, U.S.A.
Contact:

Re: Plugin to put TinyBrowser in S9Y admin

Post by akremedy »

Hi Garvin,
I just sent a request for CVS access through sourceforge. This should be interesting - I've never contributed anything to any projects, just worked with folks directly :)

I think it would be good if people could test the TinyBrowser plugin. Also, I would want to know if people would only find it useful if it supported the standard S9Y thumbnail schema. I've poked around a bit in TB, and I think I could get it to the point where a TB config parameter could let it generate either TB thumbs, or S9Y thumbs.

On the TinyMCE update - mine was all hacked up to begin with, I remember having to do some stuff to get blockquoting working and I had a terrible time getting it to give me respectable line spacing. But! I found updating to the latest rev very simple and solved a number of the quirky behaviors. The only major difference is that I wasn't able to get the compressor version working, but I didn't try very hard, and the s9ymdb plugin was written for the old version and needed to be rewritten for the current TinyMCE API, but this wasn't difficult.

For my implementation, I decided to go with TinyMCE and TinyBrowser on the backend for all media uploading, media db management, thumbnail generation, and authoring. Then on the frontend, I use the lightbox plugin for image popups.

This is significant because of the way I had to hack into the TinyMCE Advanced Image plugin (and a little bit into the TB plugin) to make TB pass both the thumb path and full sized image path into Advanced Image, then tell Advanced Image to use the thumbnail in the post and construct an href around it with the path to the big image. The S9Y lightbox plugin very nicely handles the hard part on the frontend.

With not much more work, I could get Advanced Image to construct the pop-up stuff that the s9ymdb plugin used to give me natively, but this other method was all I was going for, so I did it the easy way :D

So there is really a couple of threads here - the TinyBrowser stuff as-is, maybe pending some options that would allow it to support traditional S9Y thumbnails. The basic TinyMCE update with updates to the s9ymdb MCE plugin. TinyMCE + TinyBrowser, using TinyBrowser thumbnailing, but the option to allow traditional S9Y full image pop-ups on the frontend. And finally, TinyMCE + TinyBrowser + Lightbox.

What do you think Garvin, is there a most-logical-approach that would be the most beneficial to most of the S9Y community?

Thanks!
Adam
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Plugin to put TinyBrowser in S9Y admin

Post by garvinhicking »

HI!

Great, I just added you for CVS access! I'm really looking forward to your contribution; even though I don'T use TinyMCE myself, I think it's a nice code example on how to integrate external applications to serendipity.

I think the best way to proceed is to merge the tinymce fixes + tinymcebrowser, in a first step the extra thumbnail options might not be that important. Then merge those changes with the serendipity_event_Tinymce plugin and make the tinymcebrowser an option of that plugin?

Once the plugin's updated, I'll review the code, and we can ask s9y user's to testdrive it :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
akremedy
Regular
Posts: 56
Joined: Sat Jul 26, 2008 9:06 am
Location: Bay Area, U.S.A.
Contact:

Re: Plugin to put TinyBrowser in S9Y admin

Post by akremedy »

Ok, I've been thinking about this and will spend some time on getting the updated TinyMCE incorporated into the existing plugin with TinyBrowser as an option. In reality, it shouldn't be too hard to do, especially since most of the hard work is already done in the existing plugin.

Thanks for the CVS access! I had a hell of a time getting TortoiseCVS 1.10 to work - I downgraded to 1.8 and seems that things are working much better. I "tested" it by putting up a plugin that applies Prettify to PRE and CODE blocks. I also managed to create a bogus directory off of /php-blog as I was fighting Tortoise...not too sure how that happened :oops:
Post Reply