Insert Image into Drupal editor - IMCE or similar

gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Thu, 2007-10-18 11:38

Hi All,

I'm sure I've seen a piece of code that allows you to browse gallery2 and insert images into the Drupal editor.

Does such software exist or am I hallucinating (again!)

Thanks,
Gareth

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Thu, 2007-10-18 11:50

Yes, it DOES exist! ;) The tool is called G2Image (http://g2image.steffensenfamily.com/) and is supported by the Drupal gallery module. If you want to use it standalone (without TinyMCE or stg) you simply unpack G2Image into the gallery module folder and configure the options. This automatically generates config.php configuration required by G2Image.

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Thu, 2007-10-18 11:53

Wow - that's got to be the fastest comment ever.

Many thanks, I'll go away and look at that and give it a good test.

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Thu, 2007-10-18 13:48

OK, looks good so far, but I had not planned on using TinyMCE.

While I can follow the non-embedded installation instructions for a new page; I've no idea how to plug these into the Drupal editor.

Can anyone give me an example of this working in the drupal editor, or better yet for either BUEdtior, WIDGeditor, or WYSIWYM????

Many thanks,
Gareth

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Thu, 2007-10-18 14:01

Is 'Drupal editor' a module? Or are you referring to the 'body' textarea on node forms? I mean there is a link to G2Image inserted below the textarea if G2Image is configured for standalone operation ...

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Thu, 2007-10-18 14:55

Yes, I mean the default Drupal editor - not a module at all.

It's just the installation instructions just seem to mention pushing this into the tree and not affecting any Drupal code - so I was not expecting anything to be done. I just wanted to check before I go away and do the installation for real.

I can't get to my server at the moment (I'm at work) but I will upload and play tonight.

Thanks for all your help, I'll let you know how it goes.

Gareth

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Thu, 2007-10-18 16:27

I have added a small js helper to the module, so that you can now integrate G2Image with BUEditor easily. All you need to do is add a button through the BUEditor admin interface that calls g2bueditor_open(). See attached screenshot.

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Fri, 2007-10-19 13:06

Thanks again for this very quick response.

I had forgotten that this was configured directly through the Drupal Gallery module itself (need to update the wiki!) and now I have all the settings in place to play with it.

However, by some bizarre occurence my G2 install has been trashed - most probably by me doing something stupid as I am still learning with it. I have now reinstalled and am in a better place to start playing with this tonight.

I will look into the BUEditor code then!

Many thanks again for such quick responses, I will report success when I am able!

Gareth

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Sat, 2007-10-20 16:34

If you could spend 10min to update the wiki, you are very welcome ;)

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Mon, 2007-10-22 20:16

I'd be happy to update the wiki in the next few days - I can get the plug-in working to insert

Quote:
[G2:30]

into my code from the image, but Drupal does not render this yet.

I think this is something to do with filters?? Can anyone give me any other pointers that I might need to get this off and running??

Thanks,
Gareth

 
profix898

Joined: 2005-11-08
Posts: 135
Posted: Mon, 2007-10-22 20:46

You have to enable the Gallery2 filter in Drupal. Go to 'Input formats' (admin/settings/filters), click the 'configure' link for your input format (usually 'Filtered HTML') and check the 'Gallery2 filter' in the list of available filters. Please also note that there was a bug in beta4 for [G2:x] syntax.

 
gareth_w

Joined: 2007-10-05
Posts: 11
Posted: Tue, 2007-10-23 07:13

Yay!

Dumpkof here had created a new format G2 for this and wondered why it wasn't working - everything seems fine now.

Many thanks for all of your help,
Gareth

 
dennys
dennys's picture

Joined: 2003-08-24
Posts: 32
Posted: Sat, 2007-12-22 12:33

I add a button and click it but Drupal shows "g2bueditor_open is not defined". I'm using Drupal 5.5 + Gallery module 2.0, I found g2bueditor_open in the file g2image.js.

The g2 image is ready in my TinyMCE now. But I also want to use it in BUEditor.

 
dennys
dennys's picture

Joined: 2003-08-24
Posts: 32
Posted: Sat, 2007-12-22 12:55

It works now, I found it need to use standalone mode.

 
davejohnson

Joined: 2009-11-18
Posts: 1
Posted: Wed, 2009-11-18 08:03

You have no idea how much you've just helped me out!!!  

 
Marrick

Joined: 2010-08-07
Posts: 1
Posted: Sat, 2010-08-07 19:02

Can you check my plugin on Fotograf Dresden (second page)? I am trying to get it work but there is always a php exception error or something like that...