• Home
  • Community
  • Submitted News
FAQ • Search • Login
Forum Home • Register

View unanswered posts | View active topics


Board index » Pligg » Pligg Hacks

All times are UTC


Check if URL is an image



Post new topic Reply to topic  Page 1 of 1
 [ 5 posts ] 
Print view Previous topic | Next topic 
 Check if URL is an image 
Author Message
isgaso

Joined: Fri Apr 18, 2008 9:54 am
Posts: 1
Post 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 (icon)

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

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


Add this:

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!


Mon Apr 21, 2008 9:28 am
Profile
LincolnHawks
Site Admin
User avatar

Joined: Wed Dec 12, 2007 9:34 pm
Posts: 296
Post Re: Check if URL is an image
cool idea,

I will see what i can do with this :)

What page were you thinking the idenifier image should appear on? step 2 of submission?

cheers


Thu Apr 24, 2008 1:42 am
Profile
Geoserv

Joined: Sun Jan 06, 2008 2:12 am
Posts: 23
Post Re: Check if URL is an image
This sounds great. I would definitely be interested a similar system.

Will have to think about how to achieve it though.

Geoserv.

_________________
http://www.newsdots.com | http://www.faqpal.com | http://www.topstumbles.com | http://www.apnaonline.ca | http://www.pliggs.com


Thu Apr 24, 2008 2:49 pm
Profile
nuki

Joined: Sun Apr 13, 2008 7:12 am
Posts: 8
Post Re: Check if URL is an image
me too ;-)


Thu May 08, 2008 9:07 pm
Profile
snok

Joined: Thu Jun 05, 2008 2:45 pm
Posts: 3
Post Re: Check if URL is an image
lol i tried this also... and failed. I think you must use "pregmatch" or something like "isin". Still trying... :)


Sat Jun 07, 2008 3:12 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 5 posts ] 

Board index » Pligg » Pligg Hacks

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

©2007-2008 Social CMS Buzz

Feed XML Favourite Valid XHTML Valid CSS WordPress