forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: robinwyatt 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
-
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.
-
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?
-
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.
-
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
-
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);
?>
-
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.
-
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!)
-
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.
-
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.
-
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'?
-
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.
-
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).
-
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.
-
zip those four files and upload them her and I'll check your code.
-
Sure, here you are.
-
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.
-
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
-
Sorry. Somehow the zip screwed up.
Here is another copy. Tested this time.
-
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.
-
The correcting of the spelling will fix it all. Something went screwy there.
-
In your flashthimbs/php file you also havn't changed alb=1 to aid=1 as suggested earlier. I did not notice you hadn't changed it.
change that and it should work. It does on my machine.
-
Hurray! This is simply beautiful, I can't thank you enough.
Is there somewhere you could direct me to where I can read an idiot's guide that will help me create the iFrame you spoke of so that the slideshow you helped me make could appear on http://www.robinwyatt.org/index.php?pr=Work_Experience ?
-
Just google iFrame. It will give you an idea of how it works
Pop this code in a table/div on your homepage where you want the slideshow to appear.
<iframe src="http://robinwyatt.org/mygalleryfolder/mooslide.php" frameborder="0" scrolling="Auto" width="340" height="270" title="Map">
News </iframe>
Good luck. I'll mark this thread as solved.
-
Thanks.
I have Soholaunch Pro, so I tried inserting the code you gave me as a custom code, as you can see in the attached screenshot. But as you can see at http://www.robinwyatt.org/index.php?pr=Work_Experience , the result was that http://www.robinwyatt.org/sohoadmin/version.php?process=MQ==&PHP_AUTH_USER=cm9iaW53eWE=&PHP_AUTH_PW=dGhvZ2FjaHU= appeared on the page where I had wanted to embed the slideshow. If not custom code, do any of those options at the top with the blue background look more credible? Or did I enter the code wrongly? Or... ???
-
Don't know, I do all my work in a plain text editor.
Sorry, we cannot support your general coding problems on here. I've helped you get your mod running but I cannot help you build your page. There are many forums and google groups out there that can provide that kind of support.
Good luck with your site. It does look interesting. If you have any further issues with coppermine feel free to ask.
-
Understood.
FYI, I sorted it. Inside the Soholaunch Pro text editor, there is an HTML button. This actually solves a lot of other confusion for me!
Thanks again. All the best.