Need Help With A Line Of PHP

5 replies
How you guys doin.. My first time in the programming section. Anyway. I need a little help with a line of php for my website.

Here is what Im tryn to do.

I am using this theme that has a portoflio page setup for a category that you select. Here is the theme's example:

Portfolio | Boldy by Site5.com

The category is "Portfolio" and you can see that Portfolio Item1,2,3... are the seperate posts

When you click on the images (which are the set featured images for those posts) they zoom out to a nice floating image platform that is showing you the full size of that image.

I want to be able to link that image to a video or any sort of embed item or file of my choice not just the url of the picture.

I am essentially trying to have those pictures link to seprate videos that will pop out and float above the page just as you see the images doing.

I know this is possible.

So I narrowed down the line of code that does this in the portfolio.php file of the theme:

PHP Code:
<a href="<?php echo get_thumb_urlfull() ?>" rel="prettyPhoto" title="<?php the_title();?>"><?php the_post_thumbnail(); ?></a>
If I read this correctly, this part of the code here is the url that the image links to:

PHP Code:
<a href="<?php echo get_thumb_urlfull() ?>
If I change this code to represent the link path of the first image of each post, I could essentially link these pictures to any file I wanted.

So all I would need to do is wrap my first image with:

<a href="mywebsite.com/any-file.mov"></a>

I just don't know the line of php that would reflect this function or if that floating image box would even allow a movie to be played in it.

If any of you could help me with this it would be greatly, greatly appreciated. I am ok with modifying php but this one is a true stumper for me :confused:
#line #php
  • Profile picture of the author DEaFeYe
    Banned
    [DELETED]
    {{ DiscussionBoard.errors[5053324].message }}
    • Profile picture of the author snowcloud
      Originally Posted by DEaFeYe View Post

      you need more than help with a line of PHP... you're using PHP you could catch the AIDS virus from it...

      that said I have nothing helpful to add at the moment
      thanks man that helps a lot...
      {{ DiscussionBoard.errors[5054012].message }}
  • Profile picture of the author snowcloud
    does nobody know how to solve this or even just point me in the right direction?..
    {{ DiscussionBoard.errors[5054665].message }}
  • Profile picture of the author andrejvasso
    It seems that you are using this plugin for the lightbox effect.

    Go check their website out and I am sure you will find something about linking videos (hint: look at the demos - they have some video stuff there!)
    {{ DiscussionBoard.errors[5055399].message }}
  • Profile picture of the author snowcloud
    I wanted to reply back here to say that I actually figured out how to do this.

    The theme was set to have the featured images of each post show up on this portfolio page but, I wanted to have any form of media show up there.

    All I needed to do was change the code to represent the content of each post.

    This was the orignial line of code:

    PHP Code:
    <a href="<?php echo get_thumb_urlfull() ?>" rel="prettyPhoto" title="<?php the_title();?>"><?php the_post_thumbnail(); ?></a>
    This is literally all I had to change it too:

    PHP Code:
    <?php the_content(); ?>
    Then I just used images inside those posts that were sized according to the default max pixels for each portfolio entry and linked those images to videos. Fairly simple.
    {{ DiscussionBoard.errors[5112768].message }}
  • Profile picture of the author Iain Key
    Nice one, thanks for letting us know
    {{ DiscussionBoard.errors[5113188].message }}

Trending Topics