User Tools

Site Tools


Translations of this page:



rotation_parameter

Rotation parameter

Pass Options

In the normal variant, URLs look like http://domain/gallery/cool/index.html?12x34x567, where the numbers at the end are the Rotation parameter. This is used to track click statistics on thumbs and to calculate Cell K.

In Thumb CMS there are several options for working with this:

1. You can use the old variant http://domain/gallery/cool/index.html?12x34x567 and it will work the same way. In this case you get 100% transfer of the rotation parameter.

2. Passing through AJAX In this case, the rotation parameter will only be transferred if the user has JavaScript enabled. Clicks from users without JavaScript will not be counted, which may be good.

How to set it up:

The base template should look like this:

<script type="text/javascript" src="/scj/includes/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
   $('a[rot_id]').each(function(){
      $(this).bind('click', function(){

         $.get('/scj/cgi/out.php',
            {
               'link': 'images/' + $(this).attr('rot_id'),
               'url': 'counter',
               'click_count': 'rotation_only'
            },
              function(data) {
              }
         );

      });
   });
});

</script>

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

3. Without rotation parameter

In this case, enable the Use Magic Rotation Parameter option in Rotation - Settings. The script will then try to determine where the click was made.

In this case you don't need to add the rotation parameter at all.

These are the available link options:

  1. http://domain/gallery/cool/index.html - or any other rewrite. The point here is that the script receives $_GET['slug'] = cool through rewrite - the gallery slug and the script can understand who to credit the click to. Backward compatibility with the variant http://domain/gallery/cool/index.html?12x34x567 is also preserved.
  2. cgi/out.php?url=http://domain/gallery/cool/index.html - the same as the previous option - just a redirect to http://domain/gallery/cool/index.html, where again there is a slug and the script knows which gallery to credit the click to.
  3. cgi/out.php?url=/gallery/cool/index.html - this works the same way as option 2
  4. cgi/out.php?url=http://domain/gallery/cool/index.html&link=12x34x567 - there is a rotation parameter
  5. cgi/out.php?url=http://another_domain/somegallery/at/sponsor/host/index.html - if the URL http://another_domain/somegallery/at/sponsor/host/index.html is in the database, that is, when adding a gallery this exact URL was used - the rotation parameter is not needed. The script can find it in the database by the gallery URL and record the click. You can also add the rotation parameter to the URL here, saved for backward compatibility.
  6. cgi/out.php?url=http://master/gallery/cool/index.html&link=12x34x567 - use this when, for example, a slave sends traffic to galleries on the master. In this case the database contains the specific URL http://master/gallery/cool/index.html as a real URL, not as a rewrite. The script on the slave does not receive a slug, so rewrite parsing only happens on the master. In this setup the rotation parameter is mandatory.
  7. And for completeness cgi/out.php?url=http://some_url/index.html - a link to any URL via out. There is no rotation parameter, the click in rotation will not be credited to anyone, the click in trade will always be credited.

The general rule is: a click in rotation can be credited if at least one of these conditions is met

  1. if the script receives &slug=… and it's clear which gallery it is
  2. if it receives &url=… and this URL is in the database with 100% match
  3. if there is a rotation parameter
  4. if there is &group_name or &group_id

Note on options 2 and 3

If a user clicks on out.php?url=/blabla/something/other/, the only way to determine which gallery is at that URL is if you redirect to it, allowing rewrites to work and the script to receive the gallery slug. If you send to a trader instead, the rewrite won't work, so the script won't know which gallery this is and can't count the click-through rate.

For these links, thumb clicks are only counted when the user actually visits the gallery. So if you have 50% skimming, the CTR will be half; with 0% skimming, no thumb clicks will be counted at all.

What to do:

  • you can add &slug= to the URL so the script immediately sees which gallery this is, conditionally out.php?url=/blabla/something/other/&slug=something
  • you can try to parse the URL itself in .htaccess and add &slug= there already
rotation_parameter.txt · Last modified: 2026/04/20 08:15 by 127.0.0.1