Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: [Solved]: Integrating a slide show into my webpage  (Read 15694 times)

0 Members and 1 Guest are viewing this topic.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
[Solved]: Integrating a slide show into my webpage
« on: January 04, 2009, 10:27:49 pm »

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
« Last Edit: January 06, 2009, 10:46:50 pm by Phill Luckhurst »
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #1 on: January 04, 2009, 11:45:41 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #2 on: January 05, 2009, 12:35:48 am »

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?
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #3 on: January 05, 2009, 12:53:03 am »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #4 on: January 05, 2009, 01:50:46 pm »

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
Logged

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #5 on: January 06, 2009, 02:05:21 am »

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);


?>
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #6 on: January 06, 2009, 01:42:53 pm »

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

So, find this line

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

and changet to

Code: [Select]
$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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #7 on: January 06, 2009, 02:55:51 pm »

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!)
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #8 on: January 06, 2009, 03:03:50 pm »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #9 on: January 06, 2009, 03:22:36 pm »

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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #10 on: January 06, 2009, 04:22:20 pm »

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'?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #11 on: January 06, 2009, 04:40:17 pm »

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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #12 on: January 06, 2009, 04:49:10 pm »

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).
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #13 on: January 06, 2009, 08:27:16 pm »

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.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #14 on: January 06, 2009, 08:40:38 pm »

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

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #15 on: January 06, 2009, 09:28:04 pm »

Sure, here you are.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #16 on: January 06, 2009, 09:36:56 pm »

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.

Code: [Select]
print "<img src='EASTTIMOR049.JPG' alt='images/East Timor Presidential Election Observation, 2002' width='400' height='300' />";
I'm guessing it should be

Code: [Select]
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.
« Last Edit: January 06, 2009, 09:47:55 pm by Phill Luckhurst »
Logged
It is a mistake to think you can solve any major problems just with potatoes.

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #17 on: January 06, 2009, 09:47:58 pm »

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
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Integrating a slide show into my webpage
« Reply #18 on: January 06, 2009, 09:51:12 pm »

Sorry. Somehow the zip screwed up.

Here is another copy. Tested this time.

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

robinwyatt

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Integrating a slide show into my webpage
« Reply #19 on: January 06, 2009, 09:52:15 pm »

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.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.026 seconds with 20 queries.