Gallery3:Modules:randimg

Spread the love

Просмотр картинок с галереи Gallery3 на стороннем сайте

Установка:

Скачать архив.

В архиве папка randimg, ее нужно залить в папку modules на сервере, после чего в Админке -> Модули включить модуль

далее вставляем на сайте где хотим показывать через код:

<?php $imglink = file_get_contents("http://EXAMPLE.COM/gallery3/index.php/randimg", "r"); echo "$imglink"; ?>

Варианты параметров:

  • size: accepted values are:
    • thumb (default if no size is specified)
    • resize
    • fullsize
  • maxsize: if this parameter is set, then both width and height are ignored. You may have a mixture of portrait and landscape images in your gallery, and this setting will apply to the longest dimension. That is, if the image is portrait then this parameter will apply to the height, and for landscape images it will apply to the width. In other words, the longest dimension will not exceed this value.
  • width: a width in pixels which will be applied via CSS.
  • height: a height in pixels which will be applied via CSS.
  • target: the target where the link will be opened.
  • album: the name of the album you would like to limit the random image to. This will not work for subalbums (albums within albums). Thanks to sjesse for suggesting this addition.

Примеры

  • http://EXAMPLE.COM/gallery3/index.php/randimg?size=resize
  • http://EXAMPLE.COM/gallery3/index.php/randimg?size=fullsize&width=600
  • http://EXAMPLE.COM/gallery3/index.php/randimg?size=fullsize&width=640&height=480&target=_blank
  • http://EXAMPLE.COM/gallery3/index.php/randimg?size=fullsize&maxsize=300
  • http://EXAMPLE.COM/gallery3/index.php/randimg?maxsize=300&album=my-awesome-album

Просмотров: 0


Spread the love
%d такие блоггеры, как: