forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: Matt22 on October 25, 2004, 11:39:57 am

Title: pic of the day
Post by: Matt22 on October 25, 2004, 11:39:57 am
On my main page I want a Picture Of The Day and I am doing this
by making a catagory and then an album, BUT i only want to show the album
because I just want people to click ONCE to open the main picture screen with the comments box.

Here is my site www.bfv-potd.tk you can see that the Archive being a catagory and then and album is FINE
because there will be alot of pictures in there, but with Picture Of The Day I only want one and I only want
to show the album.

Can anyone help?
Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 25, 2004, 12:18:29 pm
Move the pic of the day album out of the category, and into *NO category.
The album itself will then be on the front page.
Title: Re: ***How can I let only Albums display?***
Post by: Matt22 on October 25, 2004, 12:43:52 pm
Thanks but now I've done that, how can I make the size of the thumbnail as big
as it is when you normaly go into a catagory to see an album?

Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 25, 2004, 06:01:05 pm
OK,reading this and your other posts, you want a manually controlled pic of the day display.

I've run up a quick hack, that will do what you want.

Attached are 2 files, potd.php and anycontent.php.  The potd.php is based on the random image include hack for version 1.2.0 by GTROLL.


Now, as long as you onlyhave the one pic in this album, it will work fine.  I suggest you make another album, for the archive, and each day when you put your new pic in the potd album, you move the old one to this archive.

I'm sure one of the real coders will be able to clean this up, but it works.
Title: Re: ***How can I let only Albums display?***
Post by: Matt22 on October 25, 2004, 10:48:36 pm
SWEET!, thanks a million! :),
I have done what you said (by the way, the potd.php isnt a download, its a website with code on it,
i copied this into a notepad and saved it as potd.php and then uploaded it to the coppermine folder if that was the right thing to do)

Take a look at my site now - http://www.bravoclan.com/coppermine

Can I ask you though, because the picture of the day file on the main page isnt an album, i cannot upload
to it because it says that there is no album to upload to.
You were saying something about album id 11?
Title: Re: ***How can I let only Albums display?***
Post by: Joachim Müller on October 26, 2004, 05:07:08 am
by the way, the potd.php isnt a download, its a website with code on it, i copied this into a notepad and saved it as potd.php and then uploaded it to the coppermine folder if that was the right thing to do
OMG, you seem to know your way around on the internet and with your browser ::).

I suggest you be gratefull that Casper is helping you, with the negative attitude you showed in your posts. Of course you can not upload to potd.php, but to the album that has the id 11, that's what Casper suggested. If you do, the pic will show up - that's the way Casper has built the file potd.php to work.

Joachim
Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 26, 2004, 12:31:42 pm
When I first went to your site, you had a potd album, which had the album id 11.
This album appears to have been deleted.  Please do as I suggested, create a new album, which is where you should put your potd.
Then edit the potd.php to replace the 4 instances of '11' with the actual id number of this new album.

The potd will then show up full size where you currently have the broken image icon.
Title: Re: ***How can I let only Albums display?***
Post by: Matt22 on October 26, 2004, 01:32:21 pm
Cheers casper for your all you help, i apprechiate it greatly.

Although, i need a little more help:

You are saying i should make an album and then change the potd.php file
to match the album ID number of the new album.

1.How do i find the album ID ?

When I have found out the album ID,
I then I edit the the potd.php file whereever it says 11 to the number
of the new album, but will this make the album 'disolve' into
the massive pic of the day on the main screen?
If this all goes to plan, i have one last question:

Will the comments box display for the massive pic of the day on the frontpage?


P.s. GauGau please do not tell me im asking to many questions, caspers helping
me with this and clearly with something like this there is no way i would have
the time for ONE post per question. it would take all day.

Thanks
Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 26, 2004, 02:44:37 pm
You keep managing to find different ways of shouting at us.  Please post in standard font, and please respect the board rules, as everyone else does.

To find the album id, simply look in the address bar when you open it.  It will say somethin like 'http://www.bravoclan.com/coppermine/thumbnails.php?album=13', which means album id 13.


It willnot make the album 'disolve', but it will show the pic in that album in the potd box.
If the pic is too big for your needs, change this code in potd.php, which will show the intermediate size pic instead;

Find;
Code: [Select]
$img = "<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"  border=\"0\">";
Change it to;
Code: [Select]
$img = "<img src=\"albums/{$picture['filepath']}normal_{$picture['filename']}\"  border=\"0\">";
The comment box will not display on the frontpage, but by clicking on the pic it will.
Title: Re: ***How can I let only Albums display?***
Post by: Matt22 on October 26, 2004, 03:19:13 pm
ok right, so how do i change the size of the picture of the day on the main page? i want to make about
double the size of a thumbnail.
and how would i also change the size (to make it even bigger) of the page that is view when clicked on (the page with
the comments box). Is it able to be made bigger than 100%, e.g. 130%

Thanks for all your help, this is the last i need to know.
Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 26, 2004, 06:27:31 pm
The following will work, and display correctly, ONLY if all images you use as potd have the same width/height ratio as your current one.  This is the standard screen and camera ratio so should be ok.

Find this code in the potd.php;

Code: [Select]
$img = "<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"  border=\"0\">";
Change it to this;

Code: [Select]
$img = "<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"  border=\"0\" height=\"150\" width=\"200\">";
You are advised not to display the originals bigger than uploaded, as they will look bad.
Title: Re: ***How can I let only Albums display?***
Post by: Matt22 on October 26, 2004, 06:54:19 pm
Yeh but which .php file do I have edit to set the size for the massive picture?

And also....
I have a new question.
Click here
www.bravoclan.com/coppermine (http://www.bravoclan.com/coppermine)
And, as a guest, try to upload a potd/movie clip.

Is it telling you that you dont have rights to upload?
Why is this,in 'Groups' I have 'Yes' on all the Guest permissions.

Is there any other way that its stopping a guest from uploading?

Title: Re: ***How can I let only Albums display?***
Post by: Casper on October 26, 2004, 07:53:18 pm
You have been told on several occassions that we have a 1 question per thread policy, so I will not answer unrelated questions here.

Please read the docs, as you questions about permissions are all answered there.
Title: I've Read Manual - Doesnt answer my question
Post by: Matt22 on October 30, 2004, 11:48:53 am
Hi, I need some help on adding text, i think i need some help
with editing a php file.

On my main page www.bfv-potd.tk how can I make the
picture name display at the bottom of the small BFV Picture Of The Day box?

And when you click on it I then want the picture name to be displayed
at the TOP instead of at the bottom.

How can this be done?
Title: Re: pic of the day
Post by: Casper on October 30, 2004, 03:38:25 pm
As this is a question regarding the potd mod I did for you, I've merged it with that topic, and unlocked it.

I will look into this.
Title: Re: pic of the day
Post by: Casper on October 30, 2004, 03:48:38 pm
OK,

this is not tested, but should work.  Open your potd.php, and find;

Code: [Select]
$content .= "<a href=\"displayimage.php?album=4&pos=0\">$img<br></a><br><br>";
$stop++;

And replace it with this;

Code: [Select]
$content .= "<a href=\"displayimage.php?album=4&pos=0\">$img<br>" . truncate_string444($picture['filename']) . "</a><br><br>";
$stop++;

Please report if this worked.
Title: Re: pic of the day
Post by: Matt22 on October 30, 2004, 04:06:27 pm
Cool thanks, that worked.
How how can I get rid of the .JPG as part of the filename and also how do you change the font to white?

Title: Re: pic of the day
Post by: abdallah on February 03, 2005, 07:00:57 pm
Hallo Caspar

I found your great job with the potd.php. I was searching the forum long time for something like this.
Is it also possible to show the last uploadet picture? (Not only from one album, simply the lastuploadet)

Would be great, if you could tell me, what to change. Then CPG would be the best solution for a photoblog   :)

Thanks a lot, abdallah