Changeset 34890 in spip-zone for _plugins_/spicasa/spicasa_options.php


Ignore:
Timestamp:
Feb 3, 2010, 9:44:48 PM (11 years ago)
Author:
gaitan@…
Message:

add cfg customization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/spicasa/spicasa_options.php

    r34862 r34890  
    11<?php
     2
    23function spicasa_init(){
    34$p=explode(basename(_DIR_PLUGINS)."/",str_replace('\\','/',realpath(dirname(__FILE__))));
     
    1011
    1112include_spip('inc/distant'); // pour 'copie_locale'
    12 }
    13 
     13
     14}
    1415
    1516function spicasa_resultados($query, $id_article, $debut=1, $max_results=250, $items_page=50){
     
    1718        spicasa_init();   
    1819
     20
     21
    1922                $pic = new Picasa();
    2023                $query = str_replace(" ", "+", $query);
    21                 $images = $pic->getImages(null, $debut+$items_page, $debut, $query, null, "public", null, 800);
     24                $images = $pic->getImages(null, $items_page, $debut, $query, null, "public", null, lire_config('spicasa/imgmax',1024));
    2225
    2326                if($images->getTotalResults() < $max_results) $max_results=$images->getTotalResults();
     
    6164    spicasa_init();   
    6265        $pic = new Picasa();
    63         $image = $pic->getImageById($user, $id_album, $id_image, null, 800);
     66        $image = $pic->getImageById($user, $id_album, $id_image, null, lire_config('spicasa/imgmax',1024));
    6467        foreach($image->getContentUrlMap() as $value) $url = $value; //just one
    6568
     
    174177         spicasa_init();
    175178         $pic = new Picasa();
    176              $album = $pic->getAlbumById($user, $id_album, null, null, null, null, null, 800);
     179             $album = $pic->getAlbumById($user, $id_album, null, null, null, null, null, lire_config('spicasa/imgmax',1024));
    177180         foreach($album->getImages() as $img){   
    178181                $id_image = $img->getIdnum();
     
    188191     spicasa_init();
    189192         $pic = new Picasa();
    190      $album = $pic->getAlbumById($user, $id_album, null, null, null, null, null, 800);
     193     $album = $pic->getAlbumById($user, $id_album, null, null, null, null, null, lire_config('spicasa/imgmax',1024));
    191194     foreach($album->getImages() as $img){   
    192195                $id_image = $img->getIdnum();
Note: See TracChangeset for help on using the changeset viewer.