User Tools

Site Tools

Translations of this page:

Sidebar

Documentation index

  • New Style Rotation
rotation_pages

Rotation Pages

Template is a regular html with special tags which are replaced by actual thumbs. Upon creation of template try to image whole page as a table and add rows\cols numbers (it's just for your future conveniences)

First of all you have to add at least 1 subtemplate. Subtemplate - this is how each of your thumbs looks like.

<a href="/out.php?url=<!--URL-->&link=<!--LINK-->" > <img src="<!--THUMB_URL-->"> <!--DESCRIPTION--></a>

you can have as much subtemplates as you want. Notice that script uses &link parameter to track clicks o dont forget to add it.

Variables:

<!--URL--> = <!--GAL_URL--> - gallery URL
<!--LINK--> - link, obligatory parameter
<!--SKIMMING--> - skimming, only if you edit personal skimming for each cell in ([[Cells stats]])
<!--THUMB_URL--> thumb URL
<!--DESCRIPTION-->  
<!--ID--> thumb ID (in DB)
<!--ALT--> alt description
<!--CONTENT_TYPE--> pic or movie
<!--CREATED--> time of page recreation

There are 2 options to mark place in template where you want to see thumbs:

<thumb num=1></thumb>

or

as pattern <!--subtemplatename_thumbnum-->
example
<!--default_1--> 

This means that script have to replace this tag with thumb number 1 (by CTR) using subtemplate default. There's no template name in the first example, so script assumes it's 'default'.

You can make a bridgments like

<thumb num=1-5></thumb>
the same as 
<!--default_1-5--> 

will be replaced with thumbs 1,2,3,4,5

You can also use special parameters , for example

<thumb num=1 group=Images></thumb>

or

<thumb num=1 group=Images template=my_tpl></thumb>

I hope there parameters are self-explained. Notice that group name is case-sensitive.

All templates are in DB so you will not see any files on ftp till rotation. To force file creation go to Rotation → Specials.

You can include results as any other file, for example

<!--#include file="scj/rot_pages/test.html"-->

Examples

You can see default template - test.html

subtemplate default

<a href="/out.php?url=<!--URL-->&link=<!--LINK-->&p=65"><img src="<!--THUMB_URL-->" height="180" width="240"></a> <!--DESCRIPTION_20-->

template

<html>
<title>Test</title>
<body>
<thumb num=1></thumb>
<thumb num=2></thumb>
<thumb num=3></thumb>
<thumb num=4></thumb>
<thumb num=5></thumb>
<thumb num=6></thumb>
<thumb num=7></thumb>
<thumb num=8></thumb>
</body>
</html>

As a result you'll see file scj/rot_pages/test.html.

Script recreates files in compliance with Rotation-Settings (for example once in 10 minutes or 1000 clicks).

rotation_pages.txt · Last modified: 2014/01/29 18:04 (external edit)