Last change
on this file since 48058 was
48058,
checked in by dwojylac@…, 10 years ago
|
plugin galerie photo fancybox sans utilisation du portefolio
|
File size:
455 bytes
|
Line | |
---|
1 | <?php |
---|
2 | function wgalerie_point_point($match) { |
---|
3 | $str = ''; |
---|
4 | for ($i = $match[1]; $i <= $match[2]; $i++){ |
---|
5 | $str .= $i.','; |
---|
6 | } |
---|
7 | $str = substr($str, 0, -1); |
---|
8 | return $str; |
---|
9 | } |
---|
10 | |
---|
11 | function wgalerie_vers_tableau ($texte) { |
---|
12 | $texte = str_replace(' ', '', $texte); |
---|
13 | $texte = preg_replace_callback( |
---|
14 | '`(\d+)\.\.(\d+?)`U', |
---|
15 | 'wgalerie_point_point', |
---|
16 | $texte); |
---|
17 | $tableau = array(); |
---|
18 | $tableau = explode (',', $texte); |
---|
19 | return $tableau; |
---|
20 | } |
---|
21 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.