MicrostockGroup Sponsors

Editorial Only Images

Started by johnmessingham, July 14, 2013, 09:36

Previous topic - Next topic

johnmessingham

Hi All,

First of all I would like to thank the Symbiostock team for the theme and the work they have done developing it.

I have a number of images that are only available for editorial use and wondered how others dealt with displaying this on the image details page.

ajt

My fisheye straightener: http://anglerfish.ajotte.com


steheap

I don't see what the issue is. I have put quite a lot of editorial shots on my site - including some exclusively: http://www.backyardstockphotos.com/image/interior-parish-church-gerlachsheim-germany-5

I note the restriction in the description, also my EULA clearly states that no assumptions should be made about releases unless I specifically say I have one, and, at the end of the day, the use of an image is solely the responsibility of the buyer, not the seller.

Normally I bold these words - the editorial ones - for some reason I didn't on the image I used as an example. I think the use of red font is probably a good idea as well.

steve
Stock Photo Blog: http://www.backyardsilver.com

Kerioak~Christine

I have an editorial category and did have wording in red but have gone a step further now with this : http://stockimages.kerioak.com/image/police-cctv-unit

steheap

I think that is the best idea - no-one can say that they didn't see it. I think I will add something similar to my descriptions.

Steve
Stock Photo Blog: http://www.backyardsilver.com

steheap

QuoteI have an editorial category and did have wording in red but have gone a step further now with this : http://stockimages.kerioak.com/image/police-cctv-unit

I've now followed in your footsteps. I feel much better about this - I think it is very clear what we are saying about these images: http://www.backyardstockphotos.com/image/aerial-view-of-the-old-town-square-in-warsaw

Steve
Stock Photo Blog: http://www.backyardsilver.com

ajt

Quote from: steheap on July 14, 2013, 21:47
I've now followed in your footsteps. I feel much better about this - I think it is very clear what we are saying about these images: http://www.backyardstockphotos.com/image/aerial-view-of-the-old-town-square-in-warsaw

Nice banner, I have to do something similar.

I live near Warsaw (100km), and don't have any stock photo from there. Maybe this summer :)
My fisheye straightener: http://anglerfish.ajotte.com

steheap

QuoteI live near Warsaw (100km), and don't have any stock photo from there. Maybe this summer :)

I only live 3500 miles away, but there is no need to go. There is nothing to see, very boring, dull. Besides, I don't need the competition!  ;D

Steve
Stock Photo Blog: http://www.backyardsilver.com

johnmessingham

Quote from: Tinny on July 14, 2013, 17:34
I have an editorial category and did have wording in red but have gone a step further now with this : http://stockimages.kerioak.com/image/police-cctv-unit

This is the route I have gone. I created an 'Editorial' category and added code to display a message if the displayed image is in that category.

Redneck

Quote from: johnmessingham on July 15, 2013, 11:07
Quote from: Tinny on July 14, 2013, 17:34
I have an editorial category and did have wording in red but have gone a step further now with this : http://stockimages.kerioak.com/image/police-cctv-unit

This is the route I have gone. I created an 'Editorial' category and added code to display a message if the displayed image is in that category.

Do you mind sharing what exactly you've done?

johnmessingham

Quote from: Redneck on July 15, 2013, 14:14
Do you mind sharing what exactly you've done?

First I created a new image category called 'Editorial'.

I then created a new function in the functions.php file (I am using a child theme rather than editing the symbiostock files)


function isEditorial($postid) {

    global $wpdb, $table_prefix;

$categories = $wpdb->get_results( "SELECT * FROM `".$table_prefix."term_relationships` WHERE `object_id` = " . $postid );

foreach ($categories as $category) {
if ($category->term_taxonomy_id == 35) {
return 1;
}
}

return 0;
}


You would need to change the 35 to match your category

I then added the following to the 'content-image.php' file:


<?php if (isEditorial($post->ID)) echo '<span style="color: #FF0000; font-weight: bold;">Editorial Use Only</span>'?>
   

I am sure there are other ways but this suits me as I wanted an 'Editorial' category anyway.

Hope this helps.      

Redneck

That's awesome. Thank you so much.

Just to be clear, you did edit the original /wp-content/themes/symbiostock/content-image.php, didn't you?

johnmessingham

Quote from: Redneck on July 16, 2013, 16:41
That's awesome. Thank you so much.

Just to be clear, you did edit the original /wp-content/themes/symbiostock/content-image.php, didn't you?

Your welcome and no, I copied the 'content-image.php' into my child theme before editing it.

Redneck

Quote from: johnmessingham on July 16, 2013, 16:44
Quote from: Redneck on July 16, 2013, 16:41
That's awesome. Thank you so much.

Just to be clear, you did edit the original /wp-content/themes/symbiostock/content-image.php, didn't you?

Your welcome and no, I copied the 'content-image.php' into my child theme before editing it.

Ah ok, of course. Otherwise it would have been overwritten with the next update.
Again, thanks a lot. You made my day.

johnmessingham

Here is some code that should be more efficient (I tried to change the post above but could not).


function isEditorial($postid) {

    global $wpdb, $table_prefix;

// Change 35 to match the id of your editorial category.
$categories = $wpdb->get_results( "SELECT * FROM `".$table_prefix."term_relationships` WHERE `object_id` = " . $postid . " AND `term_taxonomy_id` = 35" );

if ($categories) {
return 1;
} else {
return 0;
}

}

Redneck

Got it running, just still customizing text and appearance a little bit.
http://picbreeze.com/image/ferry-loaded-with-vehicles-crossing-sea/

Awesome contribution, Thanks again.

Nikd90

Quote from: johnmessingham on July 16, 2013, 16:44
Quote from: Redneck on July 16, 2013, 16:41
That's awesome. Thank you so much.

Just to be clear, you did edit the original /wp-content/themes/symbiostock/content-image.php, didn't you?

Your welcome and no, I copied the 'content-image.php' into my child theme before editing it.
Sorry a dumb question. How do you copy files in the server? Which software do you use?

johnmessingham

Quote from: Nikd90 on July 17, 2013, 06:56
Sorry a dumb question. How do you copy files in the server? Which software do you use?

The easiest way to copy a file if you do not do much development work is probably to download the file using an FTP program and then upload it to the new location.

Nikd90

Quote from: johnmessingham on July 17, 2013, 09:47
Quote from: Nikd90 on July 17, 2013, 06:56
Sorry a dumb question. How do you copy files in the server? Which software do you use?

The easiest way to copy a file if you do not do much development work is probably to download the file using an FTP program and then upload it to the new location.

Few more question:
1) Do I just paste the code at the end of the file?
2) How do I know the id of my Editorial Category?

Redneck

Quote from: Nikd90 on July 17, 2013, 13:43
Quote from: johnmessingham on July 17, 2013, 09:47
Quote from: Nikd90 on July 17, 2013, 06:56
Sorry a dumb question. How do you copy files in the server? Which software do you use?

The easiest way to copy a file if you do not do much development work is probably to download the file using an FTP program and then upload it to the new location.

Few more question:
1) Do I just paste the code at the end of the file?
2) How do I know the id of my Editorial Category?

1) No, you paste it at a position where you want it to appear. Usually underneath the image.

I've placed it under this line:
<?php do_action'ss_before_img_page_description' ); ?>

2) I looked it up in the database (phpMyAdmin) but I'm sure there is probably a more convenient way to find it.

johnmessingham

Quote from: Redneck on July 16, 2013, 18:01
Got it running, just still customizing text and appearance a little bit.
http://picbreeze.com/image/ferry-loaded-with-vehicles-crossing-sea/

I hope you don't mind but I have used your style/wording on my image page.

Redneck

Quote from: johnmessingham on July 17, 2013, 14:31
Quote from: Redneck on July 16, 2013, 18:01
Got it running, just still customizing text and appearance a little bit.
http://picbreeze.com/image/ferry-loaded-with-vehicles-crossing-sea/

I hope you don't mind but I have used your style/wording on my image page.

Don't mind at all. Still grateful for your help.

Nikd90

Quote from: Redneck on July 17, 2013, 14:16
Quote from: Nikd90 on July 17, 2013, 13:43
Quote from: johnmessingham on July 17, 2013, 09:47
Quote from: Nikd90 on July 17, 2013, 06:56
Sorry a dumb question. How do you copy files in the server? Which software do you use?

The easiest way to copy a file if you do not do much development work is probably to download the file using an FTP program and then upload it to the new location.

Few more question:
1) Do I just paste the code at the end of the file?
2) How do I know the id of my Editorial Category?

1) No, you paste it at a position where you want it to appear. Usually underneath the image.

I've placed it under this line:
<?php do_action'ss_before_img_page_description' ); ?>

2) I looked it up in the database (phpMyAdmin) but I'm sure there is probably a more convenient way to find it.

Not sure how to use phpMyAdmin.. Is there any other way ?

Nikd90

#24
 I got the id using the plugin "reveal ids".

It is not working for me :(

Please help