User Tools

Site Tools


new_rotation_step_by_step

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
new_rotation_step_by_step [2017/04/07 15:17] – [Nginx ReWrites] adminnew_rotation_step_by_step [2026/03/21 10:11] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== New Rotation Step By Step ====== ====== New Rotation Step By Step ======
  
-There are 2 types of rotation: Old (Rotation - Pages) and New (Rotation - CMS).+A modern rotation system that meets current needs.
  
-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 templateThis is very important if you have lots of categories.+This rotation is built on the old system but lets you quickly build multi-nichemulti-content sitesYou can also create your own galleries from FHG content or upload content via FTP.
  
-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 categoryYou 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+Most multi-niche sites have 4 core pages: index, category thumb list, content page (video or gallery)and optionally a search pageWith SmartCJ, you can launch such a site in 15 minutes.
  
 +Extended versions add user registration, favorites, voting, comments, and more—all built into SmartCJ. For now, we'll focus on the basic 4 templates.
  
-===== Basics =====+The system is extremely flexible. You can create almost any site type with it.
  
-New rotation is based on old rotation ie same templates, subtemplates and so on [[Rotation Step by Step]]+===== Basic Concepts =====
  
-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/]]) +There are two main content types for tube CMS:
- +
  
-===== Setup =====+**External galleries** - Content from sponsors (like FHG) that lives on their servers. Clicking links external galleries is an external redirect.
  
-  Rotation -> Settings turn it on ( Rotation = On ) +**Embedded galleries** Content played directly on your site (like any tube site). The video stays on your domain; no external redirects.
-  * Rotation - Groups : Create groups (categories, niches) for your site, minimum 1, maximum - unlimited. +
-  * Copy (!!! copy, not move, do not delete sourceto 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) and add rewrite rules [[tcms_install|Install]]Those rewrites are for version 2.X (TCMS) +
-  * 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)+
  
 +You can use both types. SmartCJ can also convert sponsor content into either format.
  
-===== Old Rewrites for version 1.X =====+===== Engine Setup =====
  
-<code> +  * Go to Rotation → Settings and enable the rotation engine (Rotation = On) 
-RewriteEngine On +  Go to Rotation - Groups and create site categoriesYou can create unlimited categories. 
-RewriteCond %{QUERY_STRING} ^(.+) +  Copy index.php from the **scj/cgi*directory to your domain root (along with common.php
-RewriteRule ^gallery/(.*)/(.*)/index.html$ /scj/cgi/out.php?link=images/%{QUERY_STRING}&url=content&content_id=$2 [L] +  Verify that your rewrite rules are configured (see [[Installation]])
-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 +===== Adding content =====
-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} ^(.+)$  +All galleries are DYNAMIC—no physical directories or files are created on your serverGallery links are virtual; the script generates them on the flyThis is convenient because if you change advertising, it updates everywhere automatically without regenerating galleries.
-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 +See [[New Rotation Content]] for details.
-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] +After adding content, your site will have galleriesNext, move to [[New Rotation Templates]] to customize appearance.
-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]  
- 
-</code> 
- 
- 
- 
-**That's it.** 
- 
- 
-**Nginx ReWrites**  
- 
-<code> 
- 
-#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; 
- 
-</code> 
new_rotation_step_by_step.1491578246.txt.gz · Last modified: by admin