Hello dear Dynamicles! I came across your script and I was amazed by its easiness when it came to display static pictures from a folder. But now, as we all know, things amongst programmers are NEVER simple.

I am trying to display images from an Array, the images in that array have a $photo_category that is = to the $id of a parent Item. I am trying to create slideshows automatically to each of those items by giving 1 string to the image array, the images are stored in a DB with a file location, and as images in a folder as well. Maybe with this bit of code you get a further understanding of the goal I am trying to accomplish :

Many slideshows are displayed on the same page, as it is 1 page with a lot of content. Each slideshow should get the $id from the parent Item, as you can see in the wrapperid.
I hope I was able to explain my Idea well enough, if not, I will try to go in to further detail.

*Edit : Has anyone ever tried to archive something like this, or is it not possible to display a Slideshow from an Image Array that is selected from a DB query?

Thanks in Advance,
Dominik

09-23-2013, 05:26 PM

jscheuer1

I know next to nothing about database coding. I'm OK with PHP, and very good with javascript.

I'm sure it can be done. Unfortunately, given my knowledge of database code, I can't help you a lot with that part.

What you can do is load the page in the browser and use the browser's "View Source". That will show you what the server side code is getting resolved to. It should of course look like what the javascript code requires. If not you will have to figure out why not and fix it. Often there will be error messages from the server, or it might look OK but just have one or more javascript syntax errors in it. If the former, your database/PHP code has server side problems that must be addressed. If the latter, it's just how the PHP is formatting the output. Commas, quotes, braces, etc. must appear in the proper places as expected by the script. If it looks OK to you but is still not working, give me a link to it. I can probably spot the javascript syntax problem(s) and you can work back from there to fix how the output is being formatted.

09-23-2013, 06:29 PM

Deadweight

So let me get this right. Are you trying to display certain images, from your array, on certain pages from your database to be loaded at the bottom of this photo gallery?

09-27-2013, 08:03 AM

Disturbed

Yup Crazy, it is an information Accordion, that has an ID assigned to each accordion, each accordion is a <ul> element at the same time. Sooo : Gathering all the information already works like a charm, meaning the information of the article (ID, Summary, Content, etc...) because its pure PHP/MySQL and HTML, but as it seems, this script accepts only fixed values to display images. I wouldn't see it working to pass the ID of the element over with the wrapperid as I have tried there. It seems so incorrectly written.

10-19-2013, 08:05 PM

Disturbed

Anyone?

11-14-2013, 12:05 PM

Disturbed

Bump!

11-16-2013, 04:22 PM

jscheuer1

The key to any conversion from HTML/javascript to PHP/HTML/javascript is often to look at the served source code of the page. If the page isn't working as desired, while viewing it in the browser, use the browser's "View Source". That will show you how the PHP part is being replaced. If that doesn't fit the requirements of the script, the PHP must be changed so that it does.