[Solved]: Integrating a slide show into my webpage [Solved]: Integrating a slide show into my webpage
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Integrating a slide show into my webpage

Started by robinwyatt, January 04, 2009, 10:27:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

robinwyatt

Hi,

Am I in the right place? In order to integrate a slide show into a page on my site next to some text that talks about the images being shown, do I need to create a custom theme? If so, how do I do this? I have been trying to follow the instructions given at http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#theme_create and have so far managed to create a theme called 'my_theme', but am lost as to how to proceed from here.

Cheers!

Robin

phill104

Themeing is changing the whole look of your page. If you want to add a slideshow take a look in the mods section or the plugins section.

I'll move this thread to miscellaneous.

Post a link to your site and a better idea of what you want to do and where you want this slideshow to be and look like and we might be able to point you in the right direction.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Ok, here goes:

This is the page of my website that I want to upload the slideshow to: http://www.robinwyatt.org/index.php?pr=Work_Experience. Within this page (on 'Work Experience'), I want to show the countries I've worked in and detail what I did there next to a slideshow of photos from that assignment.

So far, using Coppermine, I've created a gallery for my work in East Timor in 2002. This is the link to it:
http://robinwyatt.org/mygalleryfolder/thumbnails.php?album=1.

Where should I go from here?

phill104

This is called content syndication. Take a look at cpm fetch.

There are also a few ready made slideshows. This is one of mine but you would need to slightly adjust flashthumbs.php to select the album you want the images pulled from.

http://forum.coppermine-gallery.net/index.php/topic,48439.0.html

and another one of mine using a very similar script to pull the images but there is a bit more info in the thread on how to modify flashthumbs.php

http://forum.coppermine-gallery.net/index.php/topic,47566.20.html

I learnt how to buld these scripts by looking at rphMedia's image scrollers (well actually, I nicked some of his code and modified it :-[). So take a look at his work as they are fantastic and might also do what you want.

Just look for him (rphMedia) as the topic starter.


http://forum.coppermine-gallery.net/index.php/board,82.0.html

As for integrating it into your page, there are many ways but an iFrame while not the best is the easiest. Coding that page is up to you.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Thanks a bunch for this.

When you say I will need to adjust flashthumbs.php to select the album I want to pull my images from, do you mean that I need to write some code that will pull the images from my East Timor album in Coppermine?

In fact, how do I do that? Search for rphmedia (or rplmedia?) in these forums and copy and paste the code, altering the bits that refer to his image source so that it comes from my East Timor album? What do I paste the code into? Wordpad, saving the format as .php? And do I save it in my laptop's hard drive or in my cPanel File Manager?

As you can see, I'm just a beginner! But I hope I'll learn quickly... .

Cheers,

Robin

robinwyatt

Hi again.

I've got a bit further. I managed to unzip the files attached to the first link you gave me to my Coppermine root, and have altered the holding image title in mooslide.php (though I don't know how the programme knows to look in my East Timor album as opposed to any other).

I have absolutely no idea how to modify flashthumbs.php, and although I followed your second link, I could make head nor tail of the thread ???. I am copying and pasting the code that I found in the file you'd attached to the posting. What exactly do I need to change?

<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
$xml = '<image_folder></image_folder>';
if ($FORBIDDEN_SET != "") $FORBIDDEN_SET = "AND $FORBIDDEN_SET";
$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 15");
while ($row = mysql_fetch_array($result))
{
   $type = 'normal';
   $xml .= " ".get_pic_url($row, $type) ."";
}
$url = explode(" ", $xml);


?>

phill104

You simply get the script to select the album numer associated with your images.

So, find this line

$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT 15");


and changet to

$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' AND aid = [b]xx[/b] $FORBIDDEN_S
ET ORDER BY RAND() LIMIT 15");


Where xx is the desired album. In the case of your East Timor album the ID is 1 so change xx to 1.

The script will then pull 15 random images from that album only.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Ok, super. So now I have edited both my mooslide.php and flashthumb.php files and uploaded them to my Coppermine root. Umm... where do I do to view my slideshow?! (Sorry if this seems absurdly basic!)

phill104

Browse to wherever mooslide.php is. Unfortunately, you have put the files in a sub folder called mooslide.php. Move the four files out of there an into the mygallery folder.

Then browse to http://robinwyatt.org/mygalleryfolder/mooslide.php

To get it on your homepage, read up on iFrames.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Ok... but it seems I must have done something wrong somewhere along the line. I have attached a screenshot of what happens when I point my browser there.

phill104

For starters, you do not have a file called images/EAST_TIMOR_049.JPG so you need to adjust that line in the mootools.php to point to wherever that image is.

Are all 4 files now in 'mygalleryfolder'?
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

When I hover over the image I want to use in my gallery (the first one on page 4) it says Filename=East_Timor_049.JPG Filesize=197KB Dimensions=1408x900 Date added=04.Jan 2009.

Yes, all four are in 'mygalleryfolder' now.

phill104

Ooops, I also miss typed my code.

where it says alb = 1, change to aid = 1

That should do the trick.

The edit I mentioned for flashthumbs.php it for a holding image while the script loads. Most people use a swirly gif such as you see when waiting for a flash video to load. I just used any old image from my server. It is not meant to be an image from the coppermine gallery. You neet to upload a suitable image or text to display for the first couple of seconds if you do not want a blank space. Make it the same size as the script though (400*300 default).
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Ok, I corrected both those things. I still get the same thing, though. Except that I get a red bullet point on the left of the text, now.

I take it I was meant to upload the image I wanted to use to mygalleryfolder? I did that. But I see neither the holding image nor a slideshow, sadly.

phill104

zip those four files and upload them her and I'll check your code.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt


phill104

#16
You had left the tags in from the forum code (if you know what I mean). I just made the text bold so you could see where to edit

Attached are the editied files. Overwrite the ones you have.

It should now show the slideshow but you still have not put the correct path to your loading/holding image. I checked your images folder and there is no eat timor image in there. So you will still need to edit mooslide.php to point to an image.

print "<img src='EASTTIMOR049.JPG' alt='images/East Timor Presidential Election Observation, 2002' width='400' height='300' />";

I'm guessing it should be

print "<img src='albums/East%20Timor/normal_East_Timor_049.JPG' alt='images/East Timor Presidential Election Observation, 2002' width='400' height='300' />";

It is not a good idea to use spaces in file or folder names. Use an _ instead.
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

Ok, did that. Now I get the following errors:

Warning: include(flashthumba.php) [function.include]: failed to open stream: No such file or directory in /home/robinwya/public_html/mygalleryfolder/mooslide.php on line 3

Warning: include(flashthumba.php) [function.include]: failed to open stream: No such file or directory in /home/robinwya/public_html/mygalleryfolder/mooslide.php on line 3

Warning: include() [function.include]: Failed opening 'flashthumba.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/robinwya/public_html/mygalleryfolder/mooslide.php on line 3
East Timor Presidential Election Observation, 2002

Warning: Invalid argument supplied for foreach() in /home/robinwya/public_html/mygalleryfolder/mooslide.php on line 15

Warning: implode() [function.implode]: Invalid arguments passed in /home/robinwya/public_html/mygalleryfolder/mooslide.php on line 24

phill104

Sorry. Somehow the zip screwed up.

Here is another copy. Tested this time.

It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

I assume that for the first three I simply need to correct the spelling of flashthumbs in mooslide.php? I'm not sure what's wrong in lines 15 and 24, though.