====== New Rotation Templates ====== Each template consists of 2 parts: template itself and subtemplate (sometime just 'sub' to be short). Template is a regular html page with special tags, so script takes your template, replace tags with actual content (lets say replace tag with actual description of a gallery), saves results to cache and shows it ro user. **Each template MUST have hidden image rot_in and include , if you dont have it - script will not count thumb shows** All templates (except header and footer) should have at least 1 subtemplate. Basically subtemplate is a little template to output each thumb at this page. You can have as many templates as you want, but 99% of site uses 1 per page. Note, script uses parameter to count clicks, so you must have it too. Places to show thumbs: - output thumb 1 using subtemplate default if you don't mention template - it will use default anyway so = There's a sort form if you want format: for example a range of numbers аналогично outputs first 5 thumbs You can also add filters inside the tag this way you have 10 best thumbs or if you have space in name or you can use id or a couple of ids Outputs first 10 thumbs limited by sponsor. The same works for cateegories or you can exclude groups Sorting content limit You can also use : flash, movie_only and movie - outputs both flash and movies You can also mix parameters, for example You can also have a subtemplate right in main template <--- this is a subtemplate Note, that /category/super_name using mod_rewrite we change it to /?group_name=super_name in template we have script will output 10 thumb from the group 'super_name' because we have it in url parameters SO if you use for example script will output thumbs using 2 filters: group 'super_name' AND sponsor_id = 5. if you need another group at this page - you can override url parameters in tag like **Duration limit**
or use can use the same in url domain/scj/tube/?duration_min=10&duration_max=90 and the tag will be just
**Group limit** &date_start=2012-01-01&date_end=2013-01-02 there are some presets &date_limit=today (yesterday, this_week, this_month) ===== Template variables ===== = - gallery URL - important parameter for click counting description cutted to 40 chars safe description w\o special chars also known as title - title sutted to 40 chars first tag of gallery's tags for flash galleries (when sponsor gives you url to flv) With update 48 models were added if gallery has more then 1 model and so on For categories (groups) pages = = For search For custom galleries and so on example of IF statement
You have to mark places where you want to output thumbs: or - means output first thumb using subtemplate default or - means output first 5 thumbs using subtemplate default ===== Navigation (Pagination) ===== let's say you have 100 thumbs per page and 1 000 thumbs - that's why you need 10 pages , and here's code example
  • Other parameters for pagination * skip_href_deletion=true - do not delete href tag from current page * active_link_style=act_pg and link_style=not_act_page - adds styles for current\non-current pages For example you have following code
  • Let's say we are on the 2nd page of total 3 pages
  • 1
  • 2
  • 3
  • w\o skip_href_deletion=true it would be like
  • 1
  • 2
  • 3
  • Or Prev \ Next example ') { ?>
  • ') { ?>
  • ===== List of categories =====
  • * num - numbers like 1-5 mean from 1 to 5. * order - can be alphabet and clicks. * min_gallery_count limit by amount of galleries in сategory * set - you can you 2 sets of category thumbs * first_letter=... output categories with names starting with this letter only ===== Include template ===== You can include one template into another, for example, good idea to include header and footer in other templates. Also with update 48 you can include local and even remote file ===== Tag Cloud ===== You can also limit amount of tags displayed and sort them based on amount if galleries by this tag Tag cloud is created every 30 minutes and stored into the cache. So if you clear up the cache - tag cloud will be unavailable some time. Starting with update 49 you can create tag cloud with thumbs Creating of the best thumb for each tag is off by default because it adds some load, you can turn it on in Rotation - Settings. ===== and for groups and models Note that if you have something like this you'll get a result like this "group1,group2,group3," with 1 obsolete comma at the end That;'s why we have one more tag which gives you better result like this "group1,group2,group3" ===== Rows and Cols ===== There are settings for rows ans cols, it doesnt affect template, it's for [[Cell Stats]] ===== Custom Templates ===== You can have as many custom template as you want. For example, default template for custom image galleries - content_custom_pic, but you can create for example my_sponsor1_pic and set it as a template for selected galleries (in Import or later Massedit). But you can do more. Basic template of index page - index (yeap, it's easy :) ) But if you want separate template for trader trd.com you can create template index_trd (any name actually) and after that you have 3 options to use it. * ask trader to send traffic to http://your_domain.com/?force_template=index_trd * create rewrite for link1 * create file trd.php and set it as personal page for this trader content of trd.php ====== Developer Mode ====== Sometimes it's easier to edit template on FTP, not in admin. If you set Developer Mode ON - script will search in scj/tube/default_templates for file with names *.tpl and replace existing templates in DB with content of those files. For example, content_list.tpl - for template content_list, and so on. Make sure you turn OFF this option on high traffic. ====== Cache ====== Actually cache options are located under Rotation -Settings menu, but I think it worth mention here. When script processes template and replaces tags with actual data - it saves result into cache so next time, when another surfer loads the same page, script doesnt have to process it again. You can see Cache time in Rotation - Settings. It's in seconds, 900 by default. It means that if surfer visits your index page at 10:00, this pages will be saved in cache till 10:15. This saves server resources so set cache time based on server resources.