pic of the day pic of the day
 

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

pic of the day

Started by Matt22, October 25, 2004, 11:39:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matt22

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?

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

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?


Casper

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.

  • I have based the code on the fact your site has the potd album as album id=11.  If this is changed, open the potd.php in your editor (such as notepad), and change all instances(4) of '11' to the actual album id number.

  • Rename both files to remove the '.txt'.  Upload the 2 files into your coppermine folder.

  • Add your potd pic to the album.

  • Now enter your config page, and add 'anycontent' to the 'contents of main page',at the start if you want it at the top of the page.

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

#4
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?

Joachim Müller

#5
Quote from: Matt22 on October 25, 2004, 10:48:36 PMby 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

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

#7
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

Casper

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;
$img = "<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"  border=\"0\">";

Change it to;
$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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

#9
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.

Casper

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;

$img = "<img src=\"albums/{$picture['filepath']}{$picture['filename']}\"  border=\"0\">";

Change it to this;

$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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

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


Casper

#12
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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

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?

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

OK,

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

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


And replace it with this;

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


Please report if this worked.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Matt22

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?


abdallah

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