User Tools

Site Tools

Translations of this page:


Documentation index

  • New Style Rotation

Rotation parameter

Rotation parameter

Pass Options

Default URLs like like http://domain/gallery/cool/index.html?12x34x567, where 12x34x567 is so called rotation parameter ie that's a way for the script to understand where a click happens (you can think of it as google's tracking parameters)

You have 3 options to work with it.

1. You can use old style link like http://domain/gallery/cool/index.html?12x34x567 and that's a 100% guarantee that the rotation parameter will be passed to the script

2. Pass it via AJAX call The parameter will be passed only if you have JS on. Which is good in some way.

Base template

<script type="text/javascript" src="/scj/includes/js/jquery.js"></script>
<script type="text/javascript">
      $(this).bind('click', function(){

               'link': 'images/' + $(this).attr('rot_id'),
               'url': 'counter',
               'click_count': 'rotation_only'
              function(data) {



<thumb num=1-10>
<a href="/gallery/<!--GALLERY_SLUG-->/index.html" target=_blank rot_id='<!--THUMB_LINK-->'> text </a>

3. No rotation parameter at all - that's a new one.

Rotation - Settings - Use Magic Rotation Parameter

SmartCJ will try to guess where each click has been clicked and the script does it extremely good. Give it a try.

So let's see what link options we have for “magic rotation”:

  1. http://domain/gallery/cool/index.html - or any other rewrite. The main idea is to pass $_GET['slug'] = cool - so the script can guess the thumb by gallery's slug
  2. cgi/out.php?url=http://domain/gallery/cool/index.html - pretty much the same as prev one , we have a gallery slug
  3. cgi/out.php?url=/gallery/cool/index.html - the same as option 2
  4. cgi/out.php?url=http://domain/gallery/cool/index.html&link=12x34x567 and cgi/out.php?url=/gallery/cool/index.html&link=12x34x567 also the same as 2
  5. cgi/out.php?url=http://another_domain/somegallery/at/sponsor/host/index.html - if we have this url http://another_domain/somegallery/at/sponsor/host/index.html in our DB - script can detect the thumb, otherwise you need to use an old-style rotation parameter
  6. cgi/out.php?url=http://master/gallery/cool/index.html&link=12x34x567 - we want to send to galleries at a master site and we don't have this http://master/gallery/cool/index.html URL in DB - in this case we have to use old style rotation parameter

The rule of the thumb : a click can be counted if

  1. the script gets &slug=-..
  2. the script gets &url=… and this url exists in DB
  3. if you use old-slyle rotation parameter
  4. you have &group_name or &group_id for category thumbs
tcms_rotation_parameter.txt · Last modified: 2016/10/18 20:37 by admin