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
(Visited 2 times, 1 visits today)

Spread the love