Tüm bağlantıları bulmak ve bir liste yapma

0 Cevap php

nasıl tüm linkler (yok demirleri) bulmak ve jQuery, göründükleri sırayla, bir liste içine yerleştirebilirsiniz.

Örneğin:

Lorem ipsumdolor, sit amet consectetur elit adipiscing. Donec amet ipsum ut justo fermentum hendrerit ultricies oturmak.

Yani, bu olacak:

Lorem ipsum

sit amet,

elit adipiscing.

sit amet ipsum ut justo fermentum hendrerit ultricies.

Basically I'm using embed.ly for my site, so when a user fills in a form, the youtube/flickr links automatically appear where he created them. The problem I'm having is that the thumbnail for the youtube video appears to be too large, and does not toggle properly (i.e. I want the user to click on the thumbnail for the video to show up). (So, for example if the user clicks on the dolar link, the youtube video should appear below it, like it does in the embed.ly samples).

Php markdown ile sunucu tarafında php kullanıyorum.

Embedly için sorgu kod aşağıda:

<script type="text/javascript">

$(document).ready(function() {
  $("a").embedly({}, function(oembed, dict){
    if ( oembed == null)
      alert("no embedly content found");    
    var output = "<a class='embedly' href='#'><img src='"+oembed.thumbnail_url+"' /></a><span>"+oembed.title+"</span>";
    output += oembed['code'];
    $(dict["node"]).parent().html( output );
  });
  var anchors = $("a");  anchors.embedly();  anchors.filter("[href*=flx.me]").addClass("googlenl");
  $('a.embedly').live("click", function(e){
    e.preventDefault();
    $(this).parents('li').find('.embed').toggle();
  });
});
</script>

Bir video link ekler zaman benim site yapar html:

>    <div id="content">
>     <div class="youtube">
>             <p><a class="embedly" href="#"><img
> src="phpForum_files/hqdefault.jpg"></a><span>&#65333;&#65317;&#65318;&#65313;Chanpions
> League 2005-2006 RealMadrid vs Arsenal
> 2ndleg</span><div
> class="embed"><object height="360"
> width="640"><param name="wmode"
> value="opaque"><param name="movie"
> value="http://www.youtube.com/v/7aPGa9Gqj2c?fs=1"><param
> name="allowFullScreen"
> value="true"><param
> name="allowscriptaccess"
> value="always"><embed
> src="phpForum_files/7aPGa9Gqj2c.swf"
> type="application/x-shockwave-flash"
> allowscriptaccess="always"
> allowfullscreen="true" wmode="opaque"
> height="360"
> width="640"></object></div></p>
>     </div> </div>

Uzun soru için özür dilerim. Şerefe.

0 Cevap