Integrating image gallery: how to do previewing?

Discuss phpBB 3.0.x in general.
Forum rules
Please post any phpBB 3.1.x related topics in the forum.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
typ2
New member
New member
Posts: 1
Joined: 24 Sep 2008, 08:52
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Integrating image gallery: how to do previewing?

Postby typ2 » 24 Sep 2008, 09:04

Hi, I'd need advice how to get started in integrating phpbb3 with extenal image gallery. Adding pics to phpbb posts should be as easy as possible.

Let's assume that the pics are in folders and thubnails exists, like
gallery/folder1/image1_thm.jpg
gallery/folder1/image1.jpg
gallery/folder1/image2_thm.jpg
gallery/folder1/image2.jpg
and so on.

The goal is to have kind of preview pop-up or something. User should see folders, and thumbnails of selected folder. By clicking the thubnail the pic would be added to a post. My initial idea is that corresponding bbcode to pic thumbnail and full-size link is inserted to cursor location. But how this can be done? Is there any ready made mod or something that'd help implementation?

User avatar
House
Member
Member
Posts: 70
Joined: 23 Feb 2008, 12:49
Real name: Sean
Location: Hiding in Tree.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Integrating image gallery: how to do previewing?

Postby House » 25 Sep 2008, 04:26

This sounds cool. But warning: I have a vague idea of how you might do this, but I'm not really smart. So take it with a lump of salt, eh? - And it's more of the idea, than code. :)


But you could have a tab on the posting page like the "Upload attachment" tab. If you had the directory(s) you have those images in scanned and listed, then you would output/display the results in the tab as sized-down thumbnails of the original images (using imagemagik, I'd hope), and they could be clickable using javascript to auto-insert an image bbcode with the link already in it.

As for directory browsing to find images, and because you don't want a ton displayed at once in the box, you could work out a simple navigation system with AJAX. I'm thinking if each image were assigned a number when listed by the script, it could simply know to pull a certain increment every time you click -next- or -back-; though it may be a bit funny if people are uploading images while browsing. -.-
Women should be obscene and not heard. X)

Splinter
New member
New member
Posts: 9
Joined: 16 Aug 2008, 18:30
Real name: Bill
Location: Nottingham, UK
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Integrating image gallery: how to do previewing?

Postby Splinter » 25 Sep 2008, 05:49

You could also take a look at the avatar gallery function. That works almost the same way as House is describing, I think.


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “phpBB 3.0.x "Olympus" discussion”

Who is online

Users browsing this forum: Google [Bot] and 6 guests