Go Back   Pligg CMS Forum > Pligg Development > Modification Tutorials

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-19-2008, 08:13 AM
Casual Pligger
Pligg Version: 9.8
Pligg Template: basic
 
Join Date: Oct 2007
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Exclamation Check if URL is an image

I want to edit submit_step_2.tpl to achieve that when an user post a URL, system can show what kind of type is URL -> WEB / IMAGE / VIDEO

In line 26 (Pligg 9.9) you can see this:

PHP Code:
<a href="{$submit_url}" class="simple">{$submit_url}</a
Add this:

PHP Code:
 {if $url_short eq "http://www.collegehumor.com" || $url_short eq "http://www.guba.com" || $url_short eq "http://video.google.com" || $url_short eq "http://video.google.co.uk" || $url_short eq "http://youtube.com" || $url_short eq "http://www.youtube.com" || $url_short eq "http://uk.youtube.com" || $url_short eq "http://br.youtube.com" || $url_short eq "http://fr.youtube.com" || $url_short eq "http://ie.youtube.com" || $url_short eq "http://it.youtube.com" || $url_short eq "http://jp.youtube.com" || $url_short eq "http://nl.youtube.com" || $url_short eq "http://pl.youtube.com" || $url_short eq "http://es.youtube.com" || $url_short eq "http://www.livevideo.com" || $url_short eq "http://www.youare.tv" || $url_short eq "http://youare.tv" || $url_short eq "http://stage6.divx.com" || $url_short eq "http://www.metacafe.com" || $url_short eq "http://soapbox.msn.com" || $url_short eq "http://www.gofish.com" || $url_short eq "http://www.ifilm.com" || $url_short eq "http://www.veoh.com" || $url_short eq "http://vimeo.com" || $url_short eq "http://www.vimeo.com" || $url_short eq "http://vids.myspace.com" || $url_short eq "http://one.revver.com" || $url_short eq "http://xoinks.com" || $url_short eq "http://www.xoinks.com" || $url_short eq "http://www.dailymotion.com" || $url_short eq "http://www.liveleak.com" }
             <
img src="{$my_pligg_base}/templates/{$the_template}/images/film.png" align="bottom" alt="Video" /> <b>(Video)</b>
             {elseif 
$url_short eq "http://*[.gif|.jpg|.bmp]$"}
            <
img src="{$my_pligg_base}/templates/{$the_template}/images/image.png" align="bottom" alt="Imagen" /> <b>(Imagen)</b>
             {else}
            <
img src="{$my_pligg_base}/templates/{$the_template}/images/web.png" align="bottom" alt="Web" /> <b>(Web)</b>
            {/if} 
I need help please!
Reply With Quote
  #2 (permalink)  
Old 04-21-2008, 06:53 AM
Casual Pligger
Pligg Version: 9.8
Pligg Template: basic
 
Join Date: Oct 2007
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
any ideas?
Reply With Quote
  #3 (permalink)  
Old 04-22-2008, 04:41 AM
Casual Pligger
Pligg Version: 9.8
Pligg Template: basic
 
Join Date: Oct 2007
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
anybody???
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit step 2 image link werushka General Help 1 03-08-2008 07:47 PM
Miising loading image in image upload/thickbox module Peter General Help 5 12-06-2007 02:24 AM
how to resize uploaded image like in indianpad jitu "Mollio-Beat" 1 10-19-2007 10:31 AM
Image Upload / Image display with stories mod - Will pay for dev and share adampoots Modification Tutorials 11 04-10-2007 07:22 PM


Search Engine Friendly URLs by vBSEO 3.2.0