Sie sind nicht angemeldet.

[MODUL] twitpic gallery

1

Montag, 3. Januar 2011, 13:33

twitpic gallery

Hallo,

ich suche eine Funktion das mit alle Bilder bei twitpic rauszieht und eine diashow erstellt.
Nichts aufwendiges da ich es an meine CSS anpasse.

Das von twitpic gefällt mir nicht.
Beispiel: www.jumpgeil.de unten bei "on tour"

Danke im Vorraus
sixteeN

edit: habe was gefunden allerdings für wordpress..
kann das jemand umschreiben?

PHP-Quelltext

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
Plugin Name: Twitpic Expander
Plugin URI: http://wordpress.org/support/topic/304051
Description: Scans posts for twitpic URL's and automatically expands them and shows an image.  
Version: 1.1
Author: Jackson Laycock
Author URI: http://www.jacksonlaycock.com
*/
?>

<?php
function showtwitpic($text){
  $foo $text;
  $tmp strip_tags($text);

  // find a mention of twitpic
  if (preg_match_all('#twitpic.com/([\d\w]+)#'$tmp$matchesPREG_PATTERN_ORDER) > 0) {
    foreach ($matches[1] as $match) {
      $images .= "<a href='http://twitpic.com/{$match}'><img src='http://twitpic.com/show/large/{$match}' class='aligncenter' /></a>";
    }
    $text $foo '<center>' $images '</center>';
  }

  return $text;
}

add_filter('the_content''showtwitpic'21);
add_filter('the_excerpt''showtwitpic'21);
?>

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »sixteeN« (3. Januar 2011, 13:43)


Werbung

Ähnliche Themen