pancakes

MicrostockGroup Sponsors


Author Topic: Editorial Only Images  (Read 8461 times)

0 Members and 1 Guest are viewing this topic.

johnmessingham

« on: July 14, 2013, 03:36 »
0
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.


« Reply #1 on: July 14, 2013, 03:54 »
0

johnmessingham

« Reply #2 on: July 14, 2013, 04:05 »
0

steheap

  • Author of best selling "Get Started in Stock"

« Reply #3 on: July 14, 2013, 09:56 »
0
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

« Reply #4 on: July 14, 2013, 11:34 »
0
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

  • Author of best selling "Get Started in Stock"

« Reply #5 on: July 14, 2013, 11:58 »
0
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

steheap

  • Author of best selling "Get Started in Stock"

« Reply #6 on: July 14, 2013, 15:47 »
0
Quote
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


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

« Reply #7 on: July 14, 2013, 16:01 »
0
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 :)

steheap

  • Author of best selling "Get Started in Stock"

« Reply #8 on: July 14, 2013, 17:37 »
0
Quote
I 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

johnmessingham

« Reply #9 on: July 15, 2013, 05:07 »
0
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.

« Reply #10 on: July 15, 2013, 08:14 »
0
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

« Reply #11 on: July 16, 2013, 10:20 »
0
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)

Code: [Select]
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:

Code: [Select]
<?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.      

« Reply #12 on: July 16, 2013, 10:41 »
0
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

« Reply #13 on: July 16, 2013, 10:44 »
0
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.

« Reply #14 on: July 16, 2013, 10:53 »
0
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

« Reply #15 on: July 16, 2013, 11:51 »
0
Here is some code that should be more efficient (I tried to change the post above but could not).

Code: [Select]
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;
}

}

« Reply #16 on: July 16, 2013, 12:01 »
0
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.

« Reply #17 on: July 17, 2013, 00:56 »
0
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

« Reply #18 on: July 17, 2013, 03:47 »
0
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.

« Reply #19 on: July 17, 2013, 07:43 »
0
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?

« Reply #20 on: July 17, 2013, 08:16 »
0
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:
Code: [Select]
<?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

« Reply #21 on: July 17, 2013, 08:31 »
0
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.

« Reply #22 on: July 17, 2013, 08:33 »
0
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.

« Reply #23 on: July 17, 2013, 09:15 »
0
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:
Code: [Select]
<?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 ?

« Reply #24 on: July 17, 2013, 10:32 »
0
 I got the id using the plugin "reveal ids".

It is not working for me :(

Please help
« Last Edit: July 17, 2013, 11:41 by Nikd90 »

johnmessingham

« Reply #25 on: July 17, 2013, 14:52 »
0
I got the id using the plugin "reveal ids".

It is not working for me :(

Please help

Did you amend both the 'functions.php' and the 'content-image.php' files?

« Reply #26 on: July 17, 2013, 19:03 »
0
You don't need the term_id for the category but the term_taxonomy_id which is a different one. I made that mistake when I tried first.

« Reply #27 on: July 17, 2013, 22:54 »
0
I just checked that all the images under "religion" category are marked as editorial. RevealID shows the category for religion as 380, while that for editorial it is 381.
Can you please help me on this?

johnmessingham

« Reply #28 on: July 18, 2013, 02:36 »
0
The ID required is one you get from the 'Image Category' option under 'Royalty Free Images'. Hover over the category required and look for the 'tag_ID' value displayed as part of the link at the bottom of the browser window.

If this is the one you have then I am not sure what the problem is.

« Reply #29 on: July 18, 2013, 04:32 »
+1
I extended my stock plugin here:

http://ajotte.com/stock-plugin/

Now it shows "EDITORIAL USE ONLY" messages, when image has category Editorial.
Message is shown on the right side of image. I could display it under image, but I'd like to avoid possible conflict with other plugins, which will do something in image page too.

Example:
http://ajotte.com/image/statue-of-liberty/

Maybe it will be useful for someone :)

« Reply #30 on: July 18, 2013, 06:54 »
0
I extended my stock plugin here:

http://ajotte.com/stock-plugin/

Now it shows "EDITORIAL USE ONLY" messages, when image has category Editorial.
Message is shown on the right side of image. I could display it under image, but I'd like to avoid possible conflict with other plugins, which will do something in image page too.

Example:
http://ajotte.com/image/statue-of-liberty/

Maybe it will be useful for someone :)


Thanks :) I can't believe I am so out of touch with programming. I left programming 6 years back but thought I'll be able to do all this stuff..

« Reply #31 on: July 18, 2013, 07:09 »
0
I extended my stock plugin here:

http://ajotte.com/stock-plugin/

Maybe it will be useful for someone :)


Very useful. Another awesome contribution to the SYS community. Thanks a lot.
Works like a charm. http://picbreeze.com/image/american-navy-concept/

« Reply #32 on: July 18, 2013, 07:17 »
0
I extended my stock plugin here:

http://ajotte.com/stock-plugin/

Maybe it will be useful for someone :)


Very useful. Another awesome contribution to the SYS community. Thanks a lot.
Works like a charm. http://picbreeze.com/image/american-navy-concept/


Can you send me your function.php file? I am not sure what I am doing incorrectly.

Do we have to use "==" or "=" to compare?

« Reply #33 on: July 18, 2013, 07:23 »
0


Can you send me your function.php file? I am not sure what I am doing incorrectly.

Do we have to use "==" or "=" to compare?

I think you have broken something - you do not have anything on your image pages but the image, title and little smiley face showing something is wrong

« Reply #34 on: July 18, 2013, 07:35 »
0


Can you send me your function.php file? I am not sure what I am doing incorrectly.

Do we have to use "==" or "=" to compare?

I think you have broken something - you do not have anything on your image pages but the image, title and little smiley face showing something is wrong


It was all fine few minutes back.. Haven't done anything that would break it.. ANy idea what should I do?

« Reply #35 on: July 18, 2013, 07:37 »
0
I extended my stock plugin here:

http://ajotte.com/stock-plugin/

Maybe it will be useful for someone :)



Very useful. Another awesome contribution to the SYS community. Thanks a lot.
Works like a charm. http://picbreeze.com/image/american-navy-concept/


Can you send me your function.php file? I am not sure what I am doing incorrectly.

Do we have to use "==" or "=" to compare?


Why don't you just use the plugin by ajt? It works out of the box and this way you don't have to mess with any code.

I could send you my functions.php but there are already other functions in it that might confuse you even more.
« Last Edit: July 18, 2013, 07:39 by Redneck »

« Reply #36 on: July 18, 2013, 07:52 »
0
reinstalled the theme.. looks fine now

« Reply #37 on: July 18, 2013, 15:26 »
+1
just a cautionary note - if you edit a function like content-image.php in your child-theme, it's true that future theme updates won't override your changes -- but at the same time, any OTHER changes, fixes or improvements to content-image.php in the theme won't be picked up by your child theme.

so while adding css new features, etc are fairly safe, changing code may have unintended consequences

johnmessingham

« Reply #38 on: July 18, 2013, 15:51 »
0
just a cautionary note - if you edit a function like content-image.php in your child-theme, it's true that future theme updates won't override your changes -- but at the same time, any OTHER changes, fixes or improvements to content-image.php in the theme won't be picked up by your child theme.

so while adding css new features, etc are fairly safe, changing code may have unintended consequences

Good point Steve.  I have a development background so this sort of development is something I do on a regular basis and understand the pitfalls. I sometimes forget others are not so experienced.


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
4795 Views
Last post October 14, 2008, 17:10
by madelaide
0 Replies
2608 Views
Last post March 25, 2011, 00:52
by bizair
24 Replies
11282 Views
Last post January 02, 2012, 19:11
by cascoly
2 Replies
2067 Views
Last post April 07, 2013, 07:25
by alberto
1 Replies
3047 Views
Last post August 01, 2013, 07:37
by Niakris

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors