Thumbs and test thumbs, sorting, pagination

Thumbs

Thumbs output works in site templates only, i.e. you can use it only in site/*.php files

  • <?=Inxy::thumb(1)?> - outputs one thumb
  • <?=Inxy::test(1)?> - outputs one test thumb

You can output many thumbs in one command


<?=Inxy::thumb(4)?> 

equal to


<?=Inxy::thumb(1)?>
<?=Inxy
::thumb(1)?> 
<?=Inxy::thumb(1)?> 
<?=Inxy::thumb(1)?>  

Script uses sub/mov.php, sub/pic.php, sub/all.php subtemplates to render thumb and surrounding elements (description, duration etc). Name of subtempletes depends on current group name. See thumb subtemplate

Sort order

By default thumbs ordered by CTR. To sort thumbs using gallery publish date use this command: Inxy::orderByDate()

Pagination

Use <?=Inxy::paginator()?> to render paginator

Change thumb subtemplate name

Somtimes you need to change name of thumb subtemplate. E.g page rss.html often neet defferent subtemplate. To change subtemplate name use <?Inxy::setThumbSub($name[, $use_prefix false])?> . Note change area is all template and you can not use two defferent subtemplates at one page.

Subtemplate name consist of two parts: name and group name prefix. E.g. we have mov group active:

  • <?=Inxy::setThumbSub('foo')?> - use subtemplate sub/foo.php
  • <?=Inxy::setThumbSub('.rss'true)?> - use subtemplate sub/mov.rss.php
  • <?=Inxy::setThumbSub(''true)?> - use subtemplate sub/mov.php (default value)