Hello there. I've been using gallery for several years on my own little website and I want to say that it's a great piece of software.
I'm interested in displaying x3d content in my gallery. I want to write the code that will render it.
Do I need to develop a module to do so or would this code go elsewhere.
I'm a C++ developer but a newbie to php. I've downloaded the tutorial on creating a new module.
Apparently I only need to write some php code that will embed the x3d content in the appropriate spot and the Browser's x3d plugin will take care of the rest.
Thanks.
Posts: 32509
> I'm interested in displaying x3d content in my gallery. I want to write the code that will render it.
do you mean as image or do you want to add some 3d-viewer?
@image:
you'll need to find a program that renders the x3d program and can output it in some 2d image format.
if the output image format isn't web-viewable, use g2's imagemagick, gd or netpbm toolkit to create a web-viewable image (jpg,png,bmp,gif) from the output image.
@3d viewer:
you'll need to find some browser plugin / applet / solution to render your x3d in the browser.
once you have that, you could create a gallery item class for x3d items and add a render method that outputs the HTML needed to render it.
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 6
Thank you very much for your quick reply.
The 3d viewer option is what I want.
Is there a tutorial for creating an item class?
Or should I just browse the source code?
Posts: 6
Well I found GalleryPhotoItem.class and it looks like I can use that as a template.
Posts: 32509
i guess you'll depend on one of these: http://www.web3d.org/tools/viewers_and_browsers/
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage
Posts: 6
I think I'll just assume that FLUX is the viewer installed (simplify my task).
I'm just searching through the code for any module that has a class that extends GalleryDataItem, so I can use that as a template.
All I can find right now is GalleryPhotoItem in the core and that gives me a good starting point.
Posts: 6
I think I've got enough to get started. Thanks for answering my questions.
Posts: 32509
i'd take a look at GalleryAnimationItem.class and GalleryMovieItem.class in modules/core/classes/ .
--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage