Random pic from the forum

Discussion in 'Feedback and Suggestions' started by Dweller, Feb 27, 2006.

  1. Dweller

    Dweller Inconspicuous Supporter

    Joined:
    Apr 19, 2004
    Messages:
    668
    Likes Received:
    3
    Location:
    Portland, Oregon
    Can others edit my Photos:
    Photos OK to edit
    I would like to see somewhere on here a "random pic" slideshow that would show a pic from one of the gallery threads. I think if it was on the front page it could help draw people in to post some of their own work. What I am visualizing is perhaps below the contest winners it could display some random pic

    There is likely some coding involved and I do not know how much work it would be to make it happen but I think to that this could be leveraged into a TPF slideshow that people could pull up at any time to see some of whats been posted in the last few days.

    Bonus points for making each pic a link to the thread it came from.
     
  2. Chase

    Chase I am now benign! Staff Member Supporting Member

    Joined:
    Mar 9, 2003
    Messages:
    7,810
    Likes Received:
    51
    Location:
    Deep in the heart of Texas!
    Can others edit my Photos:
    Photos OK to edit
    Wow, that might be some serious coding, but I do like the idea.

    Just hate to admit that it is far beyond what I think I'm capable of doing.
     
  3. markc

    markc TPF Noob!

    Joined:
    Mar 8, 2004
    Messages:
    4,237
    Likes Received:
    6
    Location:
    Rochester, NY Velocity: Unknown
    Can others edit my Photos:
    Photos NOT OK to edit
    Yeah, it's not really feasable. Scraping image links from the threads would be pain because you wouldn't know which ones to use. Creating a list of links and randomly posting an image from it would be easy though. I suppose you could ask for submissions and update the list each month with new ones or ones people wanted removed.

    Here's the code you could stick in the homepage or where ever you wanted it:

    Code:
    <?php
    
    // list of image links each in quotes and separated by commas
    $images = array (
    
    'http://www.markcarpenter.com/albums/MC-LW-Panel2/WhyDoYouHesitateMyBrother.highlight.jpg',
    'http://www.markcarpenter.com/albums/Portraits/K2730.highlight.jpg',
    'http://www.markcarpenter.com/albums/Weddings/VowsTouch.highlight.jpg'
    
    );
    
    // uncomment the following line if using PHP before version 4.2.0
    // srand((double)microtime()*1000000);
    $random = rand(0,count($images)-1);
    echo '<img src="'.$images[$random].'">';
    
    ?>
    Here's a page with the above code in it: http://www.photogs.net/tpf/randomimage.php
     
  4. woodsac

    woodsac TPF Noob!

    Joined:
    Jul 14, 2005
    Messages:
    5,712
    Likes Received:
    260
    Location:
    In a black hole
    Can others edit my Photos:
    Photos NOT OK to edit
    Sounds tricky :scratch:

    I did a little research as well. <<< read as very little

    I found some vbulletin code that would allow for a slideshow, with clickable images as direct links. But....all of those images were in a specific gallery :( It really sounded like a lot of work to do it this way. Like Mark said, you would have to regularly update the code with direct image links. And then you run into the problem of users breaking their own links :er:
     
  5. markc

    markc TPF Noob!

    Joined:
    Mar 8, 2004
    Messages:
    4,237
    Likes Received:
    6
    Location:
    Rochester, NY Velocity: Unknown
    Can others edit my Photos:
    Photos NOT OK to edit
    Yup. I have one that also pulls images from a specific folder like you mentioned that would avoid that, but would require putting the images on the server. Either way it would take some upkeep.
     
  6. markc

    markc TPF Noob!

    Joined:
    Mar 8, 2004
    Messages:
    4,237
    Likes Received:
    6
    Location:
    Rochester, NY Velocity: Unknown
    Can others edit my Photos:
    Photos NOT OK to edit
    Oh, and you'd also have to trust the people who's links you put in there. They could swap images to whatever they wanted whenever they wanted. Plus there's no size control as it is now.
     
  7. hobbes28

    hobbes28 Incredible Supporting Member

    Joined:
    Jul 10, 2004
    Messages:
    4,807
    Likes Received:
    41
    Location:
    at work...
    I can probably code something up to mirror stuff we have in the gallery and may even be able to pull from images posted here.... hmmmmm..
     
  8. markc

    markc TPF Noob!

    Joined:
    Mar 8, 2004
    Messages:
    4,237
    Likes Received:
    6
    Location:
    Rochester, NY Velocity: Unknown
    Can others edit my Photos:
    Photos NOT OK to edit
    I think you'd have to take into consideration that some people may not want their posts to end up on the front page. Probably not many, but there may be some.
     
  9. JohnMF

    JohnMF TPF Noob!

    Joined:
    Mar 25, 2005
    Messages:
    3,009
    Likes Received:
    11
    Location:
    UK
    there is already a simple hack for this on vbullet. It uses a random image from the gallery and displays it on your landing page. There is another one whcih displays three random pics which looks good too. they are easy to set up, i had them both on a vb forum i used to have, and i dont have a clue about coding.

    Cant remember what they where called, but im pretty sure i got them from www.vbulletin.org . should be easy enough to find
     
  10. Chase

    Chase I am now benign! Staff Member Supporting Member

    Joined:
    Mar 9, 2003
    Messages:
    7,810
    Likes Received:
    51
    Location:
    Deep in the heart of Texas!
    Can others edit my Photos:
    Photos OK to edit
    Good info. I think the orginal idea was more around pulling images from posts, which would be much more difficult.

    This may be something we end up looking more into down the road a bit, but I don't think we'll be implementing this idea in the near future.
     

Share This Page