Advanced search  

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

Pages: [1]   Go Down

Author Topic: pic of the day  (Read 8481 times)

0 Members and 1 Guest are viewing this topic.

Matt22

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
pic of the day
« 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?
« Last Edit: October 30, 2004, 03:37:24 pm by Casper »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #1 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: ***How can I let only Albums display?***
« Reply #2 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?

Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #3 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.

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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: ***How can I let only Albums display?***
« Reply #4 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?
« Last Edit: October 26, 2004, 12:58:50 am by Matt22 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: ***How can I let only Albums display?***
« Reply #5 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
« Last Edit: October 26, 2004, 05:14:02 am by GauGau »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #6 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: ***How can I let only Albums display?***
« Reply #7 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
« Last Edit: October 26, 2004, 02:09:06 pm by Matt22 »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #8 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: ***How can I let only Albums display?***
« Reply #9 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.
« Last Edit: October 26, 2004, 04:32:20 pm by Matt22 »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #10 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: ***How can I let only Albums display?***
« Reply #11 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
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?

Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: ***How can I let only Albums display?***
« Reply #12 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.
« Last Edit: October 26, 2004, 08:06:13 pm by Casper »
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
I've Read Manual - Doesnt answer my question
« Reply #13 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?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: pic of the day
« Reply #14 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.
Logged
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

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: pic of the day
« Reply #15 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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: pic of the day
« Reply #16 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?

Logged

abdallah

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • ZEIT-ZEICHEN-BLOG.de
Re: pic of the day
« Reply #17 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
Logged
Pages: [1]   Go Up
 

Page created in 0.083 seconds with 19 queries.