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]   Go Down

Author Topic: Creating Custom Fields  (Read 7849 times)

0 Members and 1 Guest are viewing this topic.

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Creating Custom Fields
« on: February 17, 2015, 07:58:25 am »

Is there any way to create a custom field? I would like for photos over 1600px to be able to have a "HQ" tag on it.
Logged

netb

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 82
Re: Creating Custom Fields
« Reply #1 on: February 17, 2015, 10:47:15 am »

What do you mean by a custom field? You could use the keywords for this purpose.
Logged

allvip

  • Global Moderator
  • Coppermine addict
  • *****
  • Country: 00
  • Offline Offline
  • Posts: 1290
Re: Creating Custom Fields
« Reply #2 on: February 17, 2015, 01:01:36 pm »

Maybe this can help Custom fields for image descriptions http://forum.coppermine-gallery.net/index.php/topic,72352.0.html

If you do a search on the forum you will find more topics about custom fields.
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #3 on: February 21, 2015, 09:40:05 pm »

For instance. When uploading, i would like to either:

- be able to check a box, to let the gallery know that the photo is HQ
or
- The  gallery be able to see that the file dimensions are greater than 2000px.

WHEN the gallery is noticed to be HQ, on the album view (http://chrisbrownfan.com/photos/thumbnails.php?album=146) under the photo there will be a customized tag like *HQ*.
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #4 on: February 24, 2015, 06:40:19 am »

any suggestions?
Logged

netb

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 82
Re: Creating Custom Fields
« Reply #5 on: February 24, 2015, 12:27:29 pm »

You want this to happen automatically you mean?
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #6 on: February 25, 2015, 04:35:10 am »

Yer or no. Either I want it to notice the image size in the mysql or give me an option box to check in order to apply the tag.
Logged

netb

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 82
Re: Creating Custom Fields
« Reply #7 on: February 25, 2015, 02:23:53 pm »

But there is already such a feature in coppermine http://documentation.coppermine-gallery.net/en/keywords.htm I don't understand what do you need. Can't you use the keywords they are the same thing as "tags".
Logged

netb

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 82
Re: Creating Custom Fields
« Reply #8 on: February 25, 2015, 02:25:00 pm »

Look here in the demo, they can also appear on the search page. http://coppermine-gallery.net/demo/cpg15x/search.php
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #9 on: February 28, 2015, 05:20:04 pm »

I don't think my thoughts are coming across clearly, so I made a little mock-up of what I'm trying to accomplish. I hope that's ok.

http://i.imgur.com/uvoVirf.png
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1188
Re: Creating Custom Fields
« Reply #10 on: March 02, 2015, 06:19:18 am »

What you are looking to accomplish can be pretty easily done by a bit of modification to the theme.php file in your theme folder. If one of an image's dimensions is above a certain pixel count threshold or the image has a certain keyword (e.g. *HQ*), then some sort of indicator could be displayed along with the thumbnail. No "additional fields" would need to be added.
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Re: Creating Custom Fields
« Reply #11 on: March 04, 2015, 04:12:56 pm »

What you are looking to accomplish can be pretty easily done by a bit of modification to the theme.php file in your theme folder. If one of an image's dimensions is above a certain pixel count threshold or the image has a certain keyword (e.g. *HQ*), then some sort of indicator could be displayed along with the thumbnail. No "additional fields" would need to be added.

EXACTLY what I'm looking for! Can you show me a guide on how to do it, or give me a mock-up? I've been trying to do this for a while now.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1188
Re: Re: Creating Custom Fields
« Reply #12 on: March 04, 2015, 08:28:18 pm »

EXACTLY what I'm looking for! Can you show me a guide on how to do it, or give me a mock-up? I've been trying to do this for a while now.
What theme are you using? (if it is freely available)
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #13 on: March 04, 2015, 11:18:53 pm »

It is based off the CURVE theme.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1188
Re: Creating Custom Fields
« Reply #14 on: March 05, 2015, 01:52:31 am »

It is based off the CURVE theme.
If the site where you want this is chrisbrownfan.com, it looks like it might be water_drop instead.
At any rate, if you attach the theme.php file from your theme folder, I'll put something in place for you to work with. It may not be able to key off keywords but should work for some image dimension thresholds.
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Re: Creating Custom Fields
« Reply #15 on: March 05, 2015, 07:39:10 am »

If the site where you want this is chrisbrownfan.com, it looks like it might be water_drop instead.
At any rate, if you attach the theme.php file from your theme folder, I'll put something in place for you to work with. It may not be able to key off keywords but should work for some image dimension thresholds.

Ok, thanks for the info. When I opened the theme.php...it was empty. So I zipped the whole theme folder, maybe you can see something that I'm missing. I know I'm using this on a fresh install, so if this is water_drop, then It is based off the original theme that comes with the download.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1188
Re: Re: Creating Custom Fields
« Reply #16 on: March 05, 2015, 01:05:31 pm »

I know I'm using this on a fresh install
Your site is using CPG 1.5.30 ... you really should upgrade to 1.5.34. I'll be making the mod for you based on the 1.5.34 release (which should be okay whether you upgrade your site or not). It may be a day or two (or 3) before I have time to do this for you.
« Last Edit: March 05, 2015, 01:12:57 pm by ron4mac »
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #17 on: March 05, 2015, 06:46:29 pm »

thank you so much
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1188
Re: Creating Custom Fields
« Reply #18 on: March 06, 2015, 05:19:38 am »

Set the image dimension thresholds as you desire at the top of the theme.php file. And set the .thumb_iq class(es) in the style.css file to suit your needs.
Logged

PvtPulse

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 75
Re: Creating Custom Fields
« Reply #19 on: March 06, 2015, 09:15:06 am »

OMG! THANK YOU SO MUCH! U are the best! U brought my thoughts to life!!!
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.