| Author |
Message |
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Wed Jun 07, 2006 12:57 pm Post subject: Including gallery images in olympus posts |
|
|
OK i've been wrestling with this issue for a couple days because the url rewrite doesn't work for a lot of installations and I don't consider it an option for me, but I want to be able to include gallery images in posts.
After banging my head against several options that turned out to be dead ends, I finally realized something. Olympus accepts script links in the image bbcode tag now! Problem solved! Should be a piece of cake to do this now without any addon image chooser thingy. I already have a function that pulls all the thumbnails and links for the items of a given user. Should be easy to include it in the posting section of olympus. (phpbb still has a problem)
Will see if I can come up with something cool. That will just about be the icing on the cake for me with this integration! |
|
| Back to top |
|
|
AdBot
|
| Post subject: Including gallery images in olympus posts |
|
|
|
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Wed Jun 07, 2006 1:38 pm Post subject: Re: Including gallery images in olympus posts |
|
|
 |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Wed Jun 07, 2006 10:17 pm Post subject: Re: Including gallery images in olympus posts |
|
|
| Actually now that I've been thinking about this more, I have to wonder if the image chooser isn't the perfect choice for this since olympus can take the script link in the image tag. It already has a nice gui, so we don't have to add anything but a button to the posting page and it returns the gallery link to a textarea, just needs to be encapsulated in the bbcode img tags. Will have to take look at the code since I haven't studied it much, but it may be the easiest thing to implement given this situation... |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Sun Jun 11, 2006 6:48 pm Post subject: Re: Including gallery images in olympus posts |
|
|
Ok, spent a couple hours with the g2image chooser and got it working in olympus without much effort. Couple changes to the posting.php file and a couple hacks to the image chooser and viola! Still needs some tweaking and some changes to the javascript output. Would be nice to cut out all the WPG2 and tinyMCE stuff, but in general it works. Probably be nice if it defaulted to the users root album instead of the gallery root album also. Will play with it more, but looks promising. Below is a sceenshot of the posting window with a preview of the post showing the script image link works. Notice the g2Img bbcode button next to the regular bbcode Img button. That's what pops up the image chooser window in the background.
 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6287 Location: Washington Township, NJ, USA
|
Posted: Mon Jun 12, 2006 8:54 am Post subject: Re: Including gallery images in olympus posts |
|
|
this r0x
now if only beta 1 would appear  |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Fri Jun 23, 2006 5:07 pm Post subject: Re: Including gallery images in olympus posts |
|
|
grr...After testing the image chooser with the phpbb3b1, it seems the beta does not allow scripts in the img bbcode tag, though the cvs version did!
If there is a setting that controls this behaviour, I haven't found it.
When I have more time, I'll take a closer look at viewtopic.php and see if there is a way to have it accept img tag scripts that point to the local gallery and have the proper gallery credentials. |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Fri Jun 23, 2006 5:51 pm Post subject: Re: Including gallery images in olympus posts |
|
|
OK, actually it does still work on my windows tester, but not on my production linux tester. hmm....  |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Mon Jun 26, 2006 2:43 pm Post subject: Re: Including gallery images in olympus posts |
|
|
Maybe this is a phpbb bug, I don't know.
Seems that scripts are allowed in the bbcode img tag if the script references localhost or the url is on a local network and the url looks like http://machinename/phpbb3 where a dns lookup is not required.
If the url looks like http://website.com/phpbb3 and a dns lookup is required, then the tag doesn't work.
Guess I'll have to keep looking for way to make the image chooser work  |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 1144
|
Posted: Mon Jun 26, 2006 10:44 pm Post subject: Re: Including gallery images in olympus posts |
|
|
Problem solved (again!)
I found the code that was causing the hangup. Apparently the img bbcode tag doesn't allow scripts if they point to the host server itself. Probably a good idea in general if scripts can't be executed thru the img tag on the host server. Not sure why it works as I posted before, but irrelevant since those addresses can't be accessed via the internet anyways.
I added code to the test condition so that a script link is allowed on the host server if it follows the conventions of a gallery call and since gallery itself doesn't allow script execution from an image link, there shouldn't be any problems with malicious code from this approach.
Testing looks good...integration code is fully functional again!  |
|
| Back to top |
|
|
|
|
|
|
|