User Tools

Site Tools

Translations of this page:

Sidebar

Documentation index

new_rotation_step_by_step

New Rotation Step By Step

There are 2 types of rotation: Old (Rotation - Pages) and New (Rotation - CMS).

Let's say you have 2 categories. With old rotation you have to create 2 pages (category1.html and category2.html), while with new rotation you have to edit only 1 template - content_list and script will output thumbs for each category using this template. This is very important if you have lots of categories.

Basically any multiniche site consists of at least 2 pages: index (with list of thumbs or list of categories or both) and X pages with list of thumbs for each category. You can also have galleries created by SmartCJ (Demo http://demo.smartcj.com/). You can also add use registration, favorites, votes, comments and so on. It's all available but to simplify process right now we will work with basic templates only.

Basics

New rotation is based on old rotation ie same templates, subtemplates and so on Rotation Step by Step

There 2 types of galleries: embedded and external. External - this is regular FHG. Embedded - galleries created by SmartCJ. Script can create custom galleries from sponsor's FHG (download all content from FHG and create new gallery at your domain with your design), from flv files, actually from any content. You can use both types of content at one site (Demo http://demo.smartcj.com/)

Setup

  • Rotation → Settings turn it on ( Rotation = On )
  • Rotation - Groups : Create groups (categories, niches) for your site, minimum 1, maximum - unlimited.
  • Copy (!!! copy, not move, do not delete source) to the root of your domain index.php and common.php from scj/cgi
  • Create .htaccess at the root of your domain (NOTE If you use nginx or lighttpd - ask admin to add those rules to config file)
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.+)$ 
RewriteRule ^gallery/(.*)/(.*)/index.html$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&content_id=$2 [L]
RewriteRule ^gallery/(.*)/(.*)/index.html$ /scj/tube/?content_id=$2 [L]
RewriteRule ^gallery/(.*)/(.*)/$ /scj/tube/?content_id=$2 [L]
RewriteRule ^gallery/(.*)/(.*)/([0-9]{1,2}).html$ /scj/tube/?content_id=$2&item_id=$3 [L]

#slug galleries
RewriteCond %{QUERY_STRING} ^(.+)$ 
RewriteRule ^gallery/([^/]+)/index.html$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&slug=$1 [L]
RewriteRule ^gallery/([^/]+)/index.html$ /scj/tube/?slug=$1 [L]
RewriteRule ^gallery/([^/]+)/$ /scj/tube/?slug=$1 [L]
RewriteRule ^gallery/([^/]+)/([0-9]{1,2}).html$ /scj/tube/?slug=$1&item_id=$2 [L]

RewriteCond %{QUERY_STRING} ^(.+)$ 
RewriteRule ^category/([^/]+)/$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=ctr [L]
RewriteRule ^category/([^/]+)/$ /scj/tube/index.php?group_name=$1 [L]
RewriteRule ^category/([^/]+)/([^/]+)/([^/]+)/$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=$2&page=$3 [L]
RewriteCond %{QUERY_STRING} ^(.+)$ 
RewriteRule ^category/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_id=$1&order=$3&page=$4 [L]
RewriteRule ^category/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /scj/tube/index.php?group_id=$1&order=$3&page=$4 [L]

RewriteRule ^tag/(.*)/$ /scj/tube/index.php?tag=$1
RewriteRule ^search/(.*)/(.*)/(.*)/(.*)/$ /scj/tube/index.php?search_type=$1&search=$2&order=$3&page=$4
RewriteRule ^action/(.*)/(.*)/$ /scj/tube/index.php?action=$1&action_params=$2 [L]
RewriteRule ^action/(.*)$ /scj/tube/index.php?action=$1 [L]

RewriteRule ^go/(.*)/$ /scj/tube/?action=sponsor&sponsor_slug=$1& [L]
RewriteRule ^search_log/(.*)/$ /scj/tube/?search_log=all&page=$1& [L]


RewriteRule ^sponsor/(.*)/$ /scj/tube/?sponsor_slug=$1&force_template=sponsor_page [L]
RewriteRule ^sponsor_galleries/(.*)/(.*)/$ /scj/tube/?sponsor_slug=$1&page=$2&force_template=sponsor_list [L]

RewriteRule ^models/$ /scj/tube/?force_template=model_list [L]
RewriteRule ^models/(.*)/$ /scj/tube/?force_template=model_list&model_first_letter=$1 [L]
RewriteRule ^model/(.*)/(.*)/(.*)/$ /scj/tube/?model_slug=$1&force_template=model_galleries&order=$2&page=$3 [L]
RewriteRule ^model/(.*)/$ /scj/tube/?model_slug=$1&force_template=model_galleries [L]

RewriteRule ^report/(.*)/$ /scj/tube/?content_id=$1&force_template=content_report [L] 
  • Settings - CJPages: type PATH (not URL, you need PATH!!!) to scj/tube/index.php (for example /usr/home/user/domain.com/scj/tube/index.php)

That's all.

Adding content

Take a look at New Rotation Content

When you add content it takes sometime to process it and add to DB. Please, be patient.

Note All galleries are dynamic, that means you will not file real files like /gallery/cool_gallery/index.html on FTP. Those links are virtual, galleries are created 'on-the-fly'. it's fast and very useful for adds and so on.

Nginx ReWrites

#old style
if ($args) {
rewrite ^/gallery/(.*)/(.*)/index.html$ /scj/cgi/out.php?link=images/$query_string&url=content&content_id=$2 last;
}
rewrite ^/gallery/(.*)/(.*)/index.html$ /scj/tube/?content_id=$2 last;
rewrite ^/gallery/(.*)/(.*)/$ /scj/tube/?content_id=$2 last;
rewrite ^/gallery/(.*)/(.*)/(.*).html$ /scj/tube/?content_id=$2&item_id=$3 last;

#style 2.0
if ($args) {
rewrite ^/gallery/([^/]+)/index.html$ /scj/cgi/out.php?link=images/$query_string&url=content&slug=$1 last;
}
rewrite ^/gallery/([^/]+)/index.html$ /scj/tube/?slug=$1 last;
rewrite ^/gallery/([^/]+)/$ /scj/tube/?slug=$1 last;
rewrite ^/gallery/([^/]+)/(.*).html$ /scj/tube/?slug=$1&item_id=$2 last;

if ($args) {
rewrite ^/category/([^/]+)/$ /scj/cgi/out.php?link=images/$query_string&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=ctr last;
}
rewrite ^/category/([^/]+)/$ /scj/tube/index.php?group_name=$1 last;
if ($args) {
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/$ /scj/cgi/out.php?link=images/$query_string&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_name=$1&order=$2&page=$3 last;
}
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/$ /scj/tube/index.php?group_name=$1&order=$2&page=$3 last;

if ($args) {
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /scj/cgi/out.php?link=images/$query_string&url=content&p=100&skip_to_cookie=true&skip_sell=true&group_id=$1&order=$3&page=$4 last;
}
rewrite ^/category/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /scj/tube/index.php?group_id=$1&order=$3&page=$4 last;

rewrite ^/tag/(.*)/$ /scj/tube/index.php?tag=$1;
rewrite ^/search/(.*)/(.*)/(.*)/(.*)/$ /scj/tube/index.php?search_type=$1&search=$2&order=$3&page=$4;
rewrite ^/action/(.*)/(.*)/$ /scj/tube/index.php?action=$1&action_params=$2 last;
rewrite ^/action/(.*)$ /scj/tube/index.php?action=$1 last;

rewrite ^/go/(.*)/$ /scj/tube/?action=sponsor&sponsor_slug=$1& last;
rewrite ^/search_log/(.*)/$ /scj/tube/?search_log=all&page=$1& last;

rewrite ^/sponsor/(.*)/$ /scj/tube/?sponsor_slug=$1&force_template=sponsor_page last;
rewrite ^/sponsor_galleries/(.*)/(.*)/$ /scj/tube/?sponsor_slug=$1&page=$2&force_template=sponsor_list last;

rewrite ^/models/$ /scj/tube/?force_template=model_list last;
rewrite ^/models/(.*)/$ /scj/tube/?force_template=model_list&model_first_letter=$1 last;
rewrite ^/model/(.*)/(.*)/(.*)/$ /scj/tube/?model_slug=$1&force_template=model_galleries&order=$2&page=$3 last;
rewrite ^/model/(.*)/$ /scj/tube/?model_slug=$1&force_template=model_galleries last;

rewrite ^/report/(.*)/$ /scj/tube/?content_id=$1&force_template=content_report last;
new_rotation_step_by_step.txt · Last modified: 2014/01/29 18:04 (external edit)