I've been using g2IC as a tinyMCE plugin in my e107 CMS successfully for a while now. However, it's recently come to my attention that thumbnails aren't showing on images inserted into forum posts. The thumbnails work great for news posts, but in the forums, a link to the Gallery item is created, but a text link is created instead of a linked thumbnail image.
I've reproduced this with v3.01 of g2IC, using Gallery 2.2.2, and e107 v0.7.8.
I suspect it may have something to do with how the e107 forums are in a different directory....
the locations of the various programs are:
gallery: /home/user/public_html/g2/
gallery embedded app: /home/user/public_html/e107_plugins/gallery2/gallery2.php
TinyMCE: /home/user/public_html/e107_handlers/tinyMCE/
g2IC: /home/user/public_html/e107_handlers/tinyMCE/plugins/g2ic/
e107 forums: /home/user/public_html/e107_plugins/forum/
any ideas?
Thanks!
Rashan
Posts: 492
Rashan,
I haven't used or tested with e107, yet. Please tell me some more about how you have the embedded settings in g2image/config.php.
Also, if you don't mind, please either post or PM links to your main e107 site and the associated forums (or is it really all one thing?)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 54
Sure thing!
http://www.hagan-net.net/
forums: http://www.hagan-net.net/e107_plugins/forum
heh. and actually, to make this more interesting, I mispoke above on my g2IC version. I was actually using v2.3 (I think) with the old style of navigation. So, I just updated the site to use g2IC 3.01 (to see if that fixed the forum issue) and now it wont insert images at all... well, golly. I can place a checkmark in hte box on a photo in the g2ic window, but the "insert" button doesn't become active. Additionally, the 'check all' and 'uncheck all' options do not check or uncheck any of the photos either.
well... glad I could make things worse. ;)
anyways, here's the content of config.php. Is there anything else I can provide? If you need access to look at things, I can arrange that as well. Thanks!
Rashan
Posts: 492
Hmmm. Looks like it should work.
When you open g2image, is it giving you the directory tree and thumbnails? If so, it's talking to Gallery2 correctly.
I made an account, but I can't figure out how to get to a window with g2image on it. Could you upgrade me (capt_kirk) to a posting member. I won't post, but would like to see what it's doing first hand.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 54
I've set your account as an admin. right now, I've got it set so that only admin accounts can use TinyMCE. So, you should be all set with that now.
To answer your question: Yes, when I open g2IC it displays the directory and thumbnails.
Feel free to create a new thread in the forums there and post away.
Rashan
Posts: 492
The good news is that I accidentally got g2image to insert images. I wish I could take credit for it, but all I did was look at the admin page for the e107 G2 plugin, and it started working.
It looked like the g2image window didn't know that it was being called by TinyMCE, but then it started working. I hate bugs like that...
The bad news is that the e107 is stripping out the http://www.hagan-net.net/ part of the thumbnail's URL, so it's just showing the alt attribute of the img tag as a text link. When I use Firebug to edit the img tag's src attribute to add a leading slash, it shows the image.
So, the a+img tag as inserted by g2image is
e107 is changing it to
This would work if it had a leading slash in src=, like this
Without that slash, it's trying to get the image relative to the page it's on, instead of relative to the server root. The slash is definitely being removed in the TinyMCE editor window. If you click on the Image Properties button or on the HTML view after inserting an image but before saving the thread, you can see it's already been removed there. I don't know if this is an e107 core bug or a TinyMCE bug.
I haven't played with TinyMCE's settings in a long time (over a year - before we went to Africa and came back...) But I think I remember that there is a setting for allowing full URLs instead of forcing server relative URLs. I'd try to find that and set it in your TinyMCE configuration.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 54
Thanks Kirk! I'm heading out of town tonight, but I'll check out the TinyMCE issue on Monday and let you know what I can find out
Rashan
Posts: 54
That was it Kirk. for e107, these config parameters are stored in the /e107_handlers/tinymce/wysiwyg.php file. Simply change the relative_urls option to FALSE and it's all fixed.
Thanks for your help, and the fantastic program!
Posts: 492
Thanks. Glad to hear it worked. I'll create an e107 section on the G2Image wiki and ask you to check if I got it right. (Maybe tonight, probably Wednesday...)
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 54
sounds good. some other information on setting up G2ic for e107 can be found here: http://hagan-net.net/e107_plugins/forum/forum_viewtopic.php?42 <-- that was written for v2.3 of g2ic, but it should still be good for the 3.x series as well.
Posts: 492
Thanks. I saw that while I was browsing around your site, and was planning to plagiarize heavily.
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 492
Here is the new e107 entry in the G2Image wiki. Please double check me.
Thanks,
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website
Posts: 54
looks great. I think it's all there.
Posts: 492
Thanks!
Kirk
____________________________________
G2Image Documentation, G2Image Demo Page, My Family Website