Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #276
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    I wanted to make use of the model and property release information I have been recording as I upload my images and display it on the image page for the buyer to see. I do note in the intro text that all images except editorial are released but I think it assures buyers to see that information on a specific image.

    IOW that we’re not fly-by-night flakes just because we’re selling directly vs. through an agency 🙂

    I’ve made some changes to content-image.php to do this and if anyone else is interested, I can post the code I’ve added (in the long run, I think we need to do some work to make these sorts of changes much less ad hoc and messy, but that’s a bigger subject)

    So here’s what an image looks like with both Model and Property releases:

    http://www.digitalbristles.com/image/dad-fell-asleep-daughter-kiss/

    Property but not model, and model but not property:

    http://www.digitalbristles.com/image/chair-at-the-end-of-the-dock/
    http://www.digitalbristles.com/image/young-girl-at-the-beach/

    An editorial image which says “No” for both:

    http://www.digitalbristles.com/image/male-and-female-queen-conch/

    And an image which has no releases but doesn’t need any

    #3018
    Profile photo of Christine
    Christine
    Participant

    Hi Jo Ann, I would love to make use ofnthat code please, might even prompt me to go back ad do the dogs and re-add model release information. I wonder if it could be added to the genitics lab/code editor plug in so it would not have to be edited with any updates?

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #3019
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    The formatting doesn’t look great in the forum editor, but I think you can cut and paste this. I’ve included the line above and below my edits so you can locate the spot in the file to add the change.

    As far as getting these changes available to everyone, I guess it depends on (a) Leo and (b) if other people find them useful.

    For a sort-of source code control I am keeping copies of the files I edit and putting a comment in each at the top with a date and what I edited, plus each edit has the jas begin and jas end comments to help me locate things that need to be lifted into new versions.

    This isn’t ideal by any means, but there’s a lot of potential for cleanup and organization at some point in the future to try and make this more readily customized, easier to maintain, etc. etc.

    big snip here – this is just to locate



    < ?php //code "borrowed" from symbiostock_marketer() in marketer_functions.php
    // model release
    $id = get_the_ID();
    $model_released = get_post_meta( $id, ‘symbiostock_model_released’, ‘N/A’ );
    if ( empty( $model_released ) || $model_released == false ) {
    $model_released[ 0 ] = ‘N/A’;
    } //empty( $model_released ) || $model_released == false

    //property release
    $property_released = get_post_meta( $id, ‘symbiostock_property_released’, ‘N/A’ );
    if ( empty( $property_released ) || $property_released == false ) {
    $property_released[ 0 ] = ‘N/A’;
    } //empty( $property_released ) || $property_released == false
    ?>

    Image No. < ?php echo $postid;?> Model Released: < ?php echo $model_released; ?> Property Released: < ?php echo $property_released; ?>


    < ?php do_action( 'ss_after_img_page_preview' ); ?>

    #3020
    Profile photo of Christine
    Christine
    Participant

    Thank you

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #3021
    Profile photo of tdahl-stock
    tdahl-stock
    Participant

    Thank you very much. I also just added a “|” between them to help separate them.

    http://stock.tdahlphotography.com/image/assorted-guns/

    Couple of things: (anyone correct me if I am wrong here)

    Jo Ann, I assume you are running the Clean Theme? Mine show up at the top of the image and not the bottom of the image. I am not running the clean theme. I did double check and inserted the clip directly after “

    Just to note for anyone new, this file can be added to the child theme and edited there, leaving the unedited in the Symbiostock Theme.

    #3022
    Profile photo of tdahl-stock
    tdahl-stock
    Participant

    I am using clean theme. So i would copy that file from the SY folder and put the copy into the clean theme folder and make changes there? I thought there was some discussion about that not working because the folder hierarchy isnt there. I know i tried this with the network-manager.php file and it did not work. Ideas for getting it to work with clean theme anyone?

    I was not sure, so in my case I did copy the content-image.php file into my Symbiostock-Child theme main folder. I edited it in the child theme and it worked. I do not have a good grasp of what files work this way and which do not so if I am editing files I always edit them in the child theme first.

    I am not familiar with the Clean Theme so somebody else would have to chime in on that.

    #3023
    Profile photo of Christine
    Christine
    Participant

    I am not using Clean Theme and it is at the bottom of the image

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #3024
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    I like the idea of the vertical bar. As far as above vs. below, I’d suggest (from a purely visual point of view) that it’d be better and less distracting somewhere below the image.

    I’m not sure how yours could appear above if you followed the on the line (which is really long ) which begins with the item-preview content-box as that’s the code that displays the image. I just snipped out the guts of the line to make it a bit more readable in the forum editor

    I am running CleanTheme and I’ll try making the changes there and see if they work (although that still means you need to save any modified files for when a CleanTheme update happens – if changes are in the files the child theme provides, although this one isn’t in CleanTheme 2.0). I may have to read up a bit on child themes to see how much stuff you need to have in the child for the functions to work.

    I wondered about grandchild themes – I am assuming that’s not possible, but it’d be nice if it did work 🙂

    I’ll post here with what I find out.

    #3025
    Profile photo of tdahl-stock
    tdahl-stock
    Participant

    I’m not sure how yours could appear above if you followed the on the line (which is really long ) which begins with the item-preview content-box as that’s the code that displays the image. I just snipped out the guts of the line to make it a bit more readable in the forum editor

    It is below the image now. I misread the original instructions. Not enough coffee yet this morning 🙂 I took “big snip here” as where to put the snip of code which was right after “

    ” which put the information right where I told it to, at the top. 🙂
    #3026
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    That’s the lovely thing about code – it does what you said, not what you meant 🙂

    Glad it’s sorted

    #3027
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    So what I’ve found out so far – and my experiment on my site seems to bear this out – is that you can replace PHP files from the parent theme within the child theme providing

    – the PHP file is in the WordPress template hierarchy. There’s a graphic there that shows it. Essentially there’s a list of places and an order in which WordPress will look to find the files needed. If you want to modify a PHP file that doesn’t fall into one of those, you’ll have to modify in the parent theme

    -With the exception of functions.php, you have to copy the entire PHP file to the child theme. You cannot just place the items you want to override in the child PHP file. functions.php you can just write the overrides and no includes are needed (as they would be with the styles.css file. Search for functions.php in this file to read more

    So the comments marking edits are very important because you’ll have to put your PHP edits into updated parent files on each new version…

    I’m going to read about action hooks and action filters, which sound like a way out of this. You plunk placeholders in at useful places in the parent theme so that child themes can just write functions to do something at that location and thus allow overrides without copying the parent PHP in its entirety.

    #3028
    Profile photo of JoAnnSnover
    JoAnnSnover
    Participant

    Basic answer is yes, for content-customer.php, content-image.php, content-noresults.php and page-customer.php, all of which I’ve posted about mods for.

    For cart.php and interpreter.php, they need to be edited in the symbiostock parent directories (under inc/classes then /cart and /network-manager respectively).

    And yes, it will show N/A for model or property releases for images left with the defaults. You can modify the code to be blank if you want, but I think it’s worth showing explicitly where there’s no need for a release, which is what I think N/A means.

    #3029
    Profile photo of Christine
    Christine
    Participant

    When you upgrade to V. 2.5.8 (no rush, still being worked on) you will need to redo your content-image.php you have added to your child theme to prevent the layout being changed. It does actually look quite good with the change but I edited it anyway.

    http://kerioakimaging.com - trying to reopen
    http://nail-art-at.kerioak.com - Art and Nail Art

    #3030
    Profile photo of Andre
    Andre
    Participant

    Thanks for the code. I think this really is an essential feature and it should be an option in the base theme.

    #3031
    Profile photo of Andre
    Andre
    Participant

    I took the freedom to adjust the code a little bit. I hope yo don’t mind.
    Dropped the table structure (since tables are not wanted anymore wherever they can be avoided) and added a few customization attributes like, font size, color, margin, centering the text etc.




    < ?php //code "borrowed" from symbiostock_marketer() in marketer_functions.php
    // model release
    $id = get_the_ID();
    $model_released = get_post_meta( $id, 'symbiostock_model_released', 'N/A' );
    if ( empty( $model_released ) || $model_released == false ) {
    $model_released[ 0 ] = 'N/A';
    } //empty( $model_released ) || $model_released == false

    //property release
    $property_released = get_post_meta( $id, 'symbiostock_property_released', 'N/A' );
    if ( empty( $property_released ) || $property_released == false ) {
    $property_released[ 0 ] = 'N/A';
    } //empty( $property_released ) || $property_released == false
    ?>

    Image No. < ?php echo $postid;?> ? Model Released: < ?php echo $model_released; ?> ? Property Released: < ?php echo $property_released; ?>



    Can be seen at http://picturebreeze.com/stock/photos/image/frio-river-in-concan-texas/

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic.