forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: PvtPulse on February 17, 2015, 07:58:25 am

Title: Creating Custom Fields
Post by: PvtPulse 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.
Title: Re: Creating Custom Fields
Post by: netb on February 17, 2015, 10:47:15 am
What do you mean by a custom field? You could use the keywords for this purpose.
Title: Re: Creating Custom Fields
Post by: allvip 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 (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.
Title: Re: Creating Custom Fields
Post by: PvtPulse 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*.
Title: Re: Creating Custom Fields
Post by: PvtPulse on February 24, 2015, 06:40:19 am
any suggestions?
Title: Re: Creating Custom Fields
Post by: netb on February 24, 2015, 12:27:29 pm
You want this to happen automatically you mean?
Title: Re: Creating Custom Fields
Post by: PvtPulse 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.
Title: Re: Creating Custom Fields
Post by: netb 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".
Title: Re: Creating Custom Fields
Post by: netb 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
Title: Re: Creating Custom Fields
Post by: PvtPulse 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 (http://i.imgur.com/uvoVirf.png)
Title: Re: Creating Custom Fields
Post by: ron4mac 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.
Title: Re: Re: Creating Custom Fields
Post by: PvtPulse 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.
Title: Re: Re: Creating Custom Fields
Post by: ron4mac 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)
Title: Re: Creating Custom Fields
Post by: PvtPulse on March 04, 2015, 11:18:53 pm
It is based off the CURVE theme.
Title: Re: Creating Custom Fields
Post by: ron4mac 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.
Title: Re: Re: Creating Custom Fields
Post by: PvtPulse 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.
Title: Re: Re: Creating Custom Fields
Post by: ron4mac 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.
Title: Re: Creating Custom Fields
Post by: PvtPulse on March 05, 2015, 06:46:29 pm
thank you so much
Title: Re: Creating Custom Fields
Post by: ron4mac 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.
Title: Re: Creating Custom Fields
Post by: PvtPulse on March 06, 2015, 09:15:06 am
OMG! THANK YOU SO MUCH! U are the best! U brought my thoughts to life!!!