Thumbnail linking not working..

Discussion in 'Introduce Yourself' started by adithya, Apr 3, 2008.

  1. adithya

    adithya Regular Member

    Joined:
    Mar 23, 2008
    Messages:
    82
    Likes Received:
    0
    Location:
    India
    See this post
    http://www.oursrc.com/viewtopic.php?f=28&t=78#p504
    i uploaded the software screenshot in imageshack and posted the thumbnail here...
    Clicking the thumbnail should open the full image but it is not happening ....
    I think the image highlight feature has caused this trouble...
    Any way to overcome it...?
     
  2. Adam

    Adam Regular Member

    Joined:
    Mar 17, 2008
    Messages:
    164
    Likes Received:
    0
    Location:
    USA - oursrc.com
    I'm not having any issues with it. It maximizes the image according to your window size.
     
  3. Adam

    Adam Regular Member

    Joined:
    Mar 17, 2008
    Messages:
    164
    Likes Received:
    0
    Location:
    USA - oursrc.com
    wait i see what you mean. see the problem is that image shack uses a .th.gif on the end of all there graphics. I must install a fix to remove the .th in the image name. thanks for bringing that to my attention.
     
  4. Adam

    Adam Regular Member

    Joined:
    Mar 17, 2008
    Messages:
    164
    Likes Received:
    0
    Location:
    USA - oursrc.com
    ok it's been fixed.
     
  5. adithya

    adithya Regular Member

    Joined:
    Mar 23, 2008
    Messages:
    82
    Likes Received:
    0
    Location:
    India
    i checked it....and it's working...thanks :)
     
  6. thedudleys

    thedudleys Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    201
    Likes Received:
    0
    Location:
    Valrico, Fl
    glad this issue has been resolved...was hoping that it would be something simple...

    :D
     
  7. nightlinker

    nightlinker Regular Member

    Joined:
    Apr 3, 2008
    Messages:
    248
    Likes Received:
    0

    no problem that cant be resolve :D :D
     
  8. rangana

    rangana Regular Member

    Joined:
    Apr 12, 2008
    Messages:
    106
    Likes Received:
    0
    Location:
    Cebu City Philippines
    How did you fix it Adam??.. :-?

    PHP strip isn't it :D...or something far on my wits :)
     
  9. Adam

    Adam Regular Member

    Joined:
    Mar 17, 2008
    Messages:
    164
    Likes Received:
    0
    Location:
    USA - oursrc.com
    Well here was the original code I had to handle imageshack files:

    Code:
        // Function to convert strings with .th .jpg inside to .jpg
        function highstan($var1)
        {
           if (strpos($var1,".th .jpg") === false)
           {
              //do nothing
           }
           else
           {
              $var1 = str_replace(".th .jpg",".jpg",$var1);
           }
           return $var1;
        }
    
    Then as adithya pointed out, imageshack has .jpg,.gif and .png so here is the modified code:

    Code:
    // Function to convert strings all imagshack extensions
            function highstan($var1)
            {
               if  (!(strpos($var1,".th.jpg") === false))
               {
                  $var1 = str_replace(".th.jpg",".jpg",$var1);
               }
               if  (!(strpos($var1,".th.gif") === false))
               {
                  $var1 = str_replace(".th.gif",".gif",$var1);
               }
               if  (!(strpos($var1,".th.png") === false))
               {
                  $var1 = str_replace(".th.png",".png",$var1);
               }
               return $var1;
            }
    
    Not to difficult.
     
  10. rangana

    rangana Regular Member

    Joined:
    Apr 12, 2008
    Messages:
    106
    Likes Received:
    0
    Location:
    Cebu City Philippines
    Not indeed :D

    ....Thanks for sharing though :)
     
  11. thedudleys

    thedudleys Regular Member

    Joined:
    Apr 9, 2008
    Messages:
    201
    Likes Received:
    0
    Location:
    Valrico, Fl
    which knew that i what the difference was in the coding as we have no programming or js coding knowledge...

    :D
     
  12. spinky.jones

    spinky.jones Regular Member

    Joined:
    Apr 20, 2008
    Messages:
    108
    Likes Received:
    0
    well the thumbnail now is working pretty well.. :D
     

Share This Page