| Author |
Message |
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Fri Nov 02, 2007 12:18 am Post subject: g2image |
|
|
Got all the insert options working this morning, except for the lightbox option and after seeing the demo of lightbox on the their website I knew I had to have it for the phpbb3 integration. Took about 6 hours tonight, but I finally sorted through the phpbb bbcode code enough to get it working. It's so awesome! You all are going to love it! Makes the new g2image worth the effort, plus the fact that phpbb3 can do nested bbcode tags. Makes all the insert options available in phpbb3, unlike phpbb2.
I have a bunch of stuff hard coded at the moment. Later tomorrow I'll figure out how to get the config stuff passed to g2image automatically through the integration so it will be seamless in the integration.
Still doesn't have image size checking, but the other insert options will alleviate this problem. ie, you can have thumbnails in the message post that link to the full size image in gallery or thumbnails that link to the full size image through lightbox, which pops up via javascript over the page.
I'm really excited about this new feature. Kudos to Kirk for implementing this in the new g2image.
Check it out here [huddletogether.com], if you haven't seen it before... |
|
| Back to top |
|
|
AdBot
|
|
| Back to top |
|
 |
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6241 Location: Washington Township, NJ, USA
|
Posted: Fri Nov 02, 2007 8:29 am Post subject: Re: g2image |
|
|
out of curiosity, would it be possible to use the new g2image w/ phpBB2 as well? _________________
 |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Fri Nov 02, 2007 9:32 am Post subject: Re: g2image |
|
|
I haven't worked with phpbb2 in quite a while, but I don't think you can nest url and img bbcode tags, which is what needs to happen for all of the g2image insert options to work, except for insert full size image. I think that's why that is the only choice for phpbb2 in that integration package. Perhaps the phpbb2 bbcode interpreter could be modified, I don't know right off hand. If I remember right, I think the phpbb2 code is more restrictive in what you can do with the bbcode tags. (Or maybe I just didn't figure it out well enough last time.)
This is the kind of bbcode nesting that needs to be allowed:Code: ›
[url=http://somehost.com/images/fullsize.jpg]
[img]http://somehost.com/images/thumbnail.jpg[/img]
[/url]
|
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6241 Location: Washington Township, NJ, USA
|
Posted: Fri Nov 02, 2007 9:37 am Post subject: Re: g2image |
|
|
lemme test it here
[nukedgallery.net] _________________
 |
|
| Back to top |
|
|
dari
Site Admin


Joined: Mar 03, 2003 Posts: 6241 Location: Washington Township, NJ, USA
|
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Fri Nov 02, 2007 10:03 am Post subject: Re: g2image |
|
|
My bad! Obviously it does work. I'll take a look at this when I go through the phpbb2 integration next time. Must have gave up on it too soon last time.
Getting the lightbox part to work is another layer of trouble because it needs rel="lightbox[g2image]" in the url and the quotes and square brackets were fouling up the phpbb3 bbcode interpreter. I got around this one by creating a new bbcode tag and appending the rel="lightbox[g2image]" to the url in the bbcode template after everything gets parsed.
BTW, I think I have an idea now for enforcing the phpbb3 image size limits on the g2image insertions.. |
|
| Back to top |
|
|
IngerK
User


Joined: Jan 19, 2006 Posts: 34
|
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Mon Nov 05, 2007 5:15 pm Post subject: Re: g2image |
|
|
Thanks IngerK, that's probably how the original g2image code was before I started hacking on it. I think back at the time I was just happy to get anything working at all.
I have the new g2image seamlessly built in to the integration now. I've only had to modify two g2image files (init.php and functions.js) and eliminated the need for config.php, so upgrading it should be a snap from now on as all other files are untouched. I have all the insert options from g2image working, including lightbox, and I have g2image via the integration respecting the phpbb3 image size settings now.
Only thing that isn't working is the lightbox caption because I can't figure out how to pass the title attribute through the bbcode and message_parser files. That code is quite complex and full of regex stuff that is kicking my butt. It's a minor detail so I think I will drop it for now and work on the readme so we can get a release out there.
ps. Anyone wants to work on the lightbox caption issue, let me know and I'll be glad to pass along what I know about it... |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Sun Nov 18, 2007 1:31 am Post subject: Re: g2image |
|
|
IngerK wrote: › I have used nested tags in phpBB2, and in my phpBB2/G2 installation i use G2-image with thumbnail linked to the page with picture
Just a small modification of functions.js:
Code: ›
function makeHtmlForInsertion(obj){
htmlCode = '[url=' + obj.image_url.value +'][img]' + obj.thumbnail_src.value + '[/img][/url]';
return htmlCode;
}
IngerK- did you have to modify phpbb2/includes/bbcode.php to make this work? Doesn't seem to work so easily for me  |
|
| Back to top |
|
|
IngerK
User


Joined: Jan 19, 2006 Posts: 34
|
Posted: Sun Nov 18, 2007 5:55 am Post subject: Re: g2image |
|
|
jettyrat wrote: ›
IngerK- did you have to modify phpbb2/includes/bbcode.php to make this work? Doesn't seem to work so easily for me 
No other changes to includes/bbcode.php than what was mentioned in the integration package.
This was done some months ago, but I think that functions.js was the only file I edited. I can do a fresh install phpBB2/G2 later today and find out of this. |
|
| Back to top |
|
|
IngerK
User


Joined: Jan 19, 2006 Posts: 34
|
Posted: Sun Nov 18, 2007 8:58 am Post subject: Re: g2image |
|
|
I think I have found the problem. I use rewrite module. It doesn't look like I get it work without rewrite enabled...
I suppose it is possible to get it work without rewrite enabled if you make some more changes to includes/bbcode.php (as you already have suggested...)
The problem is the small image, with url like this:
http://area51.xxxxx.org/gallery2/main.p ... alNumber=2 |
|
| Back to top |
|
|
IngerK
User


Joined: Jan 19, 2006 Posts: 34
|
Posted: Sun Nov 18, 2007 9:49 am Post subject: Re: g2image |
|
|
Or:
If the image is g2_itemId=10, it seems like the thumb can be found at g2_itemId=11 (10+1). If this is always true, it would be easy to do "something" with this in g2image.php? (and functions.js of course). |
|
| Back to top |
|
|
jettyrat
Moderator


Joined: Nov 28, 2005 Posts: 922
|
Posted: Sun Nov 18, 2007 5:40 pm Post subject: Re: g2image |
|
|
Ya, that is the problem...the regex replace I added to bbcode.php is expecting the url to be gallery2.php instead of main.php. Also, the path generation probably doesn't work with aliased directories; and it generates a path to phpbb2 instead of gallery2 anyway. I'll have to come up with a better way to handle it. Thanks for responding! |
|
| Back to top |
|
|
|
|
|
|
|