Before you ask please READ THIS

Changing the link to a brick and changing the link to attachment image

edited April 2013 in Hypershot Posts: 22
Hello, I'm wondering if I can change the link to an album list brick to a Page instead of the actual album? I have one project right now that has images, video, and audio and another that needs a link to another web page. Is this possible with a little customization?

Thanks!

Comments

  • AirAir
    Posts: 10,970
    Hello

    This is not easy customization. I know it was asked few times, but I can't remember did anyone achieved such result. You can search for it in Hypershot category, but not sure is it there.

    With regards.
  • ok so it is possible though?? I also wanted to shut off the link to the attachment page.
  • So far I've found this http://support.apollo13.eu/discussion/835/hypershot-brick-album-link-on-image#Item_7 but it doesn't quite give a straight answer. Any more info?
  • AirAir
    Posts: 10,970
    Hello,

    As I said I don't remember if anyone achieved this. This is too big change to do it easily. I will take a look on forum now and post here if I find anything.
    cherrymulti said: I also wanted to shut off the link to the attachment page.
    There is just same topic around yours, just keep your eyes open on topics;-) http://support.apollo13.eu/discussion/1081/how-to-disable-links-on-album-slider-imagess#Item_2

    With regards.
  • AirAir
    Posts: 10,970
    By the way - why to keep one album in list of albums? Maybe we can achieve what you wish without changing theme. What is your goal?
  • The reason is so I can keep my "links" visual. The goal for example, is to have a brick representing a project that may require an explanation and a link to the project, for example...http://clone.cherrymultimedia.com/labor-of-love-project. Right now I have to have 2 separate links to the same project to maintain the visual on the album list. I need the ability to create links within the project.
  • regarding shutting off the link attachment...I checked the links you posted but couldn't really figure out how to implement it. Didn't know how to find the line numbers, etc. Help? :)
  • AirAir
    Posts: 10,970
    OK so lets try it:-)
    Go to advance/meta.php line ~293 and change
    array(
    'name' => '',
    'type' => 'fieldset'
    ),
    to
    array(
    'name' => '',
    'type' => 'fieldset'
    ),
    array(
    'name' => __be( 'Custom link' ),
    'desc' => '',
    'id' => 'custom_link',
    'default' => '',
    'type' => 'input'
    ),
    Next albums-list.php line ~101
    change
    echo '<h2><a href="'. get_permalink() . '">' . get_the_title() . '</a></h2>';
    to:
    $custom_link = trim(get_post_meta($post->ID, '_custom_link', true));
                echo '<h2><a href="'. (strlen($custom_link)? $custom_link : get_permalink()) . '">' . get_the_title() . '</a></h2>';
    Tested, works:-)

    With regards.
  • AirAir
    Posts: 10,970
    cherrymulti said: regarding shutting off the link attachment...I checked the links you posted but couldn't really figure out how to implement it. Didn't know how to find the line numbers, etc. Help? :)
    Try again, maybe now it is abit different lines.

    Post above is about your main question, so please don't mix it.

    With regards.

  • How do I go about figuring out the corresponding lines/numbers?
  • ok I figured out how to change the php but how do i actually implement the link change? (sorry, new at this)
  • i did figure out how to remove the hovering link to attachment page though. :)
  • Hey just following up. This is the last thing before I go public. Thanks.
  • AirAir
    Posts: 10,970
    So what is the question now? :-)
    how to find lines? Just search for cited code, easy :-) I always use ~mark cause this line can change due to theme updates, or user customization, but in default theme they should be there in same line as mentioned.

    With regards.
  • no i figured out where to put the code. My question is now that the code is there, how do I actually go about changing where the image links?
  • AirAir
    Posts: 10,970
    Heh, I thought it was obvious and I didn't write. Go edit your album and you will see field Custom link. If it is filled then clicking in album will redirect you to that link.

    With regards
  • edited May 2013 Posts: 38
    Oh men... amazing, both, what you coded on the side and the website you've done on the other side.

    Question. Did that became 'standard' along update or should I go thru too ?
    Very nice tweak. Thanks both.
    Post edited by Paul on
  • AirAir
    Posts: 10,970
    Hi Paul:-)

    Nope it is not in standard, it just customization on demand :-) So you have to follow this steps :-)

    With regards.
  • Posts: 3
    Hi! Thanks for linking me to this Air! I've made the code amends to meta.php and albums-list.php but a custom field hasn't appeared :0( what could I been doing wrong, please? Thanks

    (I can't see a .php file labelled advance/meta so assumed meta was the one?
  • AirAir
    Posts: 10,970
    You don't see file extensions?:-) I think you made changes in right place.

    I don't know what could went wrong cause as you can imagine, it could be everything. Try again, and if it won't help I will try to check what is wrong on your installation.

    With regards.
  • Posts: 3
    Hi Air

    Sad times as it still won't work - Has their been an update since in the solution was found? Sorry to be a pain. Would you be able to look at it for me?

    Thank you
  • AirAir
    Posts: 10,970
    Maybe there were some update, I don't remember exactly. I hop you don't do changes in mentioned lines exactly but you search around for corresponding lines.

    If you want me to do this changes for you(what I don't have time for lately) then send me temporary access to your WP and FTP so I could check there what is going on. Send it here on forum via private message(click on my nick and there you will find option to send message) . In message please attach link to topic it applies to.

    With regards.
  • edited July 2013 Posts: 22
    Air, thank´s for sending me here. I´ve made the implementation above and it works great. I´ve got a question:

    Is there a possibility for a option: When clicking a brick-image (in the masonry-style layout) it either shows slideshow (like it does right now) OR redirects to a link. I´d like to use the custom link-option you did in this thread, but for images in albums.

    I´ll explain my situation: I´ve got a lot of projects I want to show, and I´m sorting them in the main menu by Web, Print, Illustration and Graffitti. A lot of my projects are just images, but for some I need to show more information, like writing something about it, not just show slideshow images. So I need a page for the project.

    EDIT: Oh, I solved it. For anyone else wondering, I set different Album genres and added them as menu items. (see documentation Add Album > Adding multiple Albums list)
    Post edited by pior on
  • AirAir
    Posts: 10,970
    Great you solved it by yourself cause solution wouldn't be so obvious for me :-)

    With regards.
Sign In or Register to comment.