Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorelias75
    • CommentTimeJul 31st 2009 edited
     
    For this website www.FreeFilmPosters.com I want to assign an ebay affiliate link under each image. It will be something like "search for this poster on ebay". The link will refer to a script that will capture the file name keywords to generate relevant ebay results. Where exactly should I place this link?
    •  
      CommentAuthorkimparsell
    • CommentTimeJul 31st 2009
     
    Which template are you using? What level do you want this link to show on, i.e., collection, album, or full picture?
    • CommentAuthorelias75
    • CommentTimeAug 1st 2009
     
    Kimparsell thanks for your reply, I am using the default theme and I would like the link to show on the full picture between the picture and the comments area
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 2nd 2009 edited
     
    It doesn't appear that you are including any descriptions with the images, so that's a good place to add this in the template.

    Open picture.php in your theme and locate the following code (you may or may not have removed the plogger function to display the description already):

    print '<p id="description">' . plogger_get_picture_description() . '</p>';
    To display your link under every image, change it to read:

    print '<p id="description">'<a title="search for this poster on ebay" href="link to your script here">search for this poster on ebay</a>'</p>';
    • CommentAuthorelias75
    • CommentTimeAug 3rd 2009 edited
     
    I got the following error:

    Parse error: syntax error, unexpected T_STRING in /home/elias75/public_html/FreeFilmPosters.com/ploggerb3/themes/default/picture.php on line 43

    here is the exact piece of code I am using... a more experienced eye in php will probably figure it out in minutes

    print '<p id="description">'<a href="http://www.freefilmposters.com/go.php?' . $picture_name . '">Buy ' . $picture_name . ' posters on eBay</a>';

    please let me know what needs to be changed in order to get this running! cheers :)
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 3rd 2009 edited
     
    Try the following and let me know if it works for you:
    print '<p id="description"><a href="http://www.freefilmposters.com/go.php?'.plogger_get_picture_caption().'">Buy '.plogger_get_picture_caption().' posters on eBay</a>';
    I changed the variable $picture_name to the actual Plogger function for displaying the image caption.

    edit: sidtheduck fixed single quote and double quote issues.
    • CommentAuthorelias75
    • CommentTimeAug 4th 2009
     
    well done! it works like charm! You guys rule!!
    • CommentAuthorelias75
    • CommentTimeAug 6th 2009
     
    I just did an update to the VERSION: 1.0-RC1-Rev601 and I need this to be done again from scratch! Should I change the same code in the picture.php of my theme? Sorry if this is a silly question but the code looks slightly different and I just want to be on the safe side.... I am using the Classic theme Version 1.2....
    also how do I remove the View Image Details and the date??
    many thanx in advance!
    •  
      CommentAuthorsidtheduck
    • CommentTimeAug 6th 2009
     
    elias75,

    Yes you should be able to use the same code for the Affiliate LInk. You could have used your old theme files as well (it should have notified you of old theme files during the _upgrade process).

    To remove the View Image Details, just delete the following code in picture.php:
    <p id="exif-toggle"><?php echo plogger_get_detail_link(); ?></p>
    <div id="exif-data-container">
    <?php echo generate_exif_table(plogger_get_picture_id()); ?>
    </div><!-- /exif-data-container -->


    To remove the date, just delete the following code:
    <td class="align-right"><h2 class="date"><?php echo plogger_get_picture_date()?></h2></td>
    • CommentAuthorelias75
    • CommentTimeAug 6th 2009
     
    strange but I still see both date & image details... here is what is left in the code for your to check...

    <?php plogger_get_header(); ?>

    <div id="inner-wrapper">

    <div id="big-picture-container">
    <?php if (plogger_has_pictures()) : while(plogger_has_pictures()) : plogger_load_picture(); // Equivalent to the WordPress loop
    // Find thumbnail width/height
    $thumb_info = plogger_get_thumbnail_info();
    $thumb_width = $thumb_info['width']; // The width of the image. It is integer data type.
    $thumb_height = $thumb_info['height']; // The height of the image. It is an integer data type.
    ?>
    <table id="caption-date-table">
    <tr>
    <td><h2 id="picture-caption"><?php echo plogger_get_picture_caption(); ?></h2></td>

    </tr>
    </table><!-- /caption-date-table -->

    <table id="prev-next-table">
    <tr>
    <td id="prev-link-container"><?php echo plogger_get_prev_picture_link(); ?></td>
    <td id="next-link-container"><?php echo plogger_get_next_picture_link(); ?></td>
    </tr>
    </table><!-- /prev-next-table -->

    <div id="picture-holder">
    <a accesskey="v" href="<?php echo plogger_get_source_picture_url(); ?>"><img class="photos-large" src="<?php echo plogger_get_picture_thumb(THUMB_LARGE); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" title="<?php echo plogger_get_picture_caption('clean'); ?>" alt="<?php echo plogger_get_picture_caption('clean'); ?>" /></a>
    <p id="description"><?php echo plogger_get_picture_description(); ?></p>

    </div><!-- /picture-holder -->

    </div><!-- /big-picture-container -->

    <?php echo plogger_display_comments(); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <div id="no-pictures-msg">
    <h2><?php echo plog_tr('Not Found') ?></h2>
    <p><?php echo plog_tr('Sorry, but the image that you requested does not exist.') ?></p>
    </div><!-- /no-pictures-msg -->
    <?php endif; ?>
    </div><!-- /inner-wrapper -->

    <?php plogger_get_footer(); ?>
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 6th 2009
     
    elias75: On removing the date, I'd recommend leaving the td tags and only removing the content between them. Change this:
    <td class="align-right"><h2 class="date"><?php echo plogger_get_picture_date()?></h2></td>
    to this:
    <td class="align-right"></td>
    For displaying your affiliate link, change the code you had before to read as follows:
    <p id="description"><a href="http://www.freefilmposters.com/go.php?<?php echo plogger_get_picture_caption(); ?>">Buy <?php echo plogger_get_picture_caption(); ?> posters on eBay</a></p>
    I would also recommend making a copy of the modified default theme folder you're using, renaming it to freefilmposters, and uploading it to your plog-content/themes/ folder. If you continue using the folder name default, any changes you've made will be overwritten in future upgrades. By using a custom folder name, the upgrade process shouldn't touch that. As always, be sure you back up a copy of all of your theme files to your computer so they can be restored in the event of an issue during an upgrade.
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 6th 2009
     
    Do you want the caption displayed? If so, which side (left or right)? Let me know and I'll get the picture.php code worked up for you.
    • CommentAuthorelias75
    • CommentTimeAug 6th 2009
     
    kimparsell thanks for the advice! I will definitely do as you recommend....

    strange though cause any changes I made to the picture.php file they do not show up! There must be a conflict somewhere else... I am 100% sure I edit the right file and I am 100% sure I FTP it correct....
    • CommentAuthorelias75
    • CommentTimeAug 6th 2009
     
    yes please I want the caption displayed on the left
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 6th 2009
     
    Here is the code that incorporates the changes you requested (remove date and image details, add affiliate link).

    Open picture.php in your theme and replace all of the code in that file with the following:
    <?php plogger_get_header(); ?>

    <div id="inner-wrapper">

    <div id="big-picture-container">
    <?php if (plogger_has_pictures()) : while(plogger_has_pictures()) : plogger_load_picture(); // Equivalent to the WordPress loop
    // Find thumbnail width/height
    $thumb_info = plogger_get_thumbnail_info();
    $thumb_width = $thumb_info['width']; // The width of the image. It is integer data type.
    $thumb_height = $thumb_info['height']; // The height of the image. It is an integer data type.
    ?>
    <table id="caption-date-table">
    <tr>
    <td><h2 id="picture-caption"><?php echo plogger_get_picture_caption(); ?></h2></td>
    <td class="align-right"></td>
    </tr>
    </table><!-- /caption-date-table -->

    <table id="prev-next-table">
    <tr>
    <td id="prev-link-container"><?php echo plogger_get_prev_picture_link(); ?></td>
    <td id="next-link-container"><?php echo plogger_get_next_picture_link(); ?></td>
    </tr>
    </table><!-- /prev-next-table -->

    <div id="picture-holder">
    <a accesskey="v" href="<?php echo plogger_get_source_picture_url(); ?>"><img class="photos-large" src="<?php echo plogger_get_picture_thumb(THUMB_LARGE); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" title="<?php echo plogger_get_picture_caption('clean'); ?>" alt="<?php echo plogger_get_picture_caption('clean'); ?>" /></a>
    <p id="description"><a href="http://www.freefilmposters.com/go.php?<?php echo plogger_get_picture_caption(); ?>">Buy <?php echo plogger_get_picture_caption(); ?> posters on eBay</a></p>
    </div><!-- /picture-holder -->

    </div><!-- /big-picture-container -->

    <?php echo plogger_display_comments(); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <div id="no-pictures-msg">
    <h2><?php echo plog_tr('Not Found') ?></h2>
    <p><?php echo plog_tr('Sorry, but the image that you requested does not exist.') ?></p>
    </div><!-- /no-pictures-msg -->
    <?php endif; ?>
    </div><!-- /inner-wrapper -->

    <?php plogger_get_footer(); ?>

    Upload the edited version of this file to your theme folder on your server and you should see the changes reflected.

    Let us know if you're still having any issues.
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 6th 2009 edited
     
    If you have copied and renamed your theme folder, make sure to go the Themes page in the admin section and select the modified theme as the one you want displayed. If you still have it set to Classic (default) then that could explain why you aren't seeing the changes.
    • CommentAuthorelias75
    • CommentTimeAug 6th 2009
     
    ok it's all sorted now! I have copied all the files from the 'default' theme into a new folder (named as freefilmposters) as you suggested and made all the changes in the picture.php. I have saved this new folder and uploaded to the plog-content/themes/ . In the admin area I can see now 2 identical Classic themes but I can tell which one is which. If I select the right one plogger works like charm. I have also altered the affiliate link a bit so that it opens in a new window.
    tomorrow I will sort out the title tag issue and will donate again!

    PLOGGER IS SUCH A GREAT SCRIPT AND YOU GUYS PROVIDE THE BEST SUPPORT!
    Cheers! :) :) :) :) :)
    •  
      CommentAuthorkimparsell
    • CommentTimeAug 6th 2009
     
    Elias: To change the name of your custom theme, open meta.php in your custom theme's folder, and make the following changes to the code at the bottom (lines 14-19):
    $theme_name = 'Free Film Posters';
    $version = '1.0';
    $author = 'Elias';
    $url = 'http://www.freefilmposters.com/';
    $description = 'This is the custom Plogger theme for Free Film Posters. It is a modified version of the Classic (default) Plogger theme.';
    $license = 'GNU General Public License (GPL)';

    That will show your custom theme with the name you have given it, rather than having two Classic themes.

    Glad that it's all gotten sorted out for you. :)