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 revision Previous revision
Next revision
Previous revision
new_rotation_step_by_step [2017/04/07 15:17]
admin [Nginx ReWrites]
new_rotation_step_by_step [2019/08/12 13:19] (current)
admin [Setup]
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). +Basically any 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. 
- +
-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 ===== ===== Basics =====
  
-New rotation is based on old rotation ie same templates, subtemplates and so on [[Rotation Step by Step]] +Basically there are 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 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/​]])+
    
  
Line 22: Line 16:
   * 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)   * 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)   * 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)
 +  * Add content [[new_rotation_content]] in Rotation - Import, the process of adding content in maintenance - logs (gallery_grabber.log) ​
 +  * in few minutes you should see content in Rotation - List thumbs
 +  * then you should see you site up and running
  
  
-===== Old Rewrites for version 1.X ===== 
  
-<​code>​ +===== Rewrites for Apache ​=====
-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]  +
- +
-</​code>​ +
- +
- +
- +
-**That'​s it.** +
- +
- +
-**Nginx ReWrites** ​+
  
 <​code>​ <​code>​
 +ewriteEngine On
  
-#old style +RewriteBase / 
-if ($args) ​+RewriteCond %{REQUEST_FILENAME} !-f 
-rewrite ^/​gallery/​(.*)/​(.*)/​index.html$ /​scj/​cgi/​out.php?​link=images/​$query_string&​url=content&​content_id=$2 last; +RewriteCond %{REQUEST_FILENAME!-d 
-+RewriteRule ​^([^/]{2})/(.*)$ $2?force_lng=$1&%{QUERY_STRING} [L]
-rewrite ​^/gallery/(.*)/(.*)/​index.html$ /​scj/​tube/?​content_id=$last; +
-rewrite ^/​gallery/​(.*)/(.*)//​scj/​tube/?​content_id=$2 last; +
-rewrite ^/​gallery/​(.*)/​(.*)/​(.*).html$ /scj/tube/?content_id=$2&item_id=$3 last;+
  
-#style 2.0 +RewriteRule ​^category/([^/]+)/$ /script_folder_name/​cgi/​out.php?​url=content&​p=100&​dont_count_in_trade=true&​skip_sell=true&​group_name=$1&​order=ctr&​%{QUERY_STRING[L] 
-if ($args) { +RewriteRule ​^category/​([^/​]+)/​([^/​]+)/​([^/​]+)/​$ /script_folder_name/cgi/out.php?url=content&​p=100&​dont_count_in_trade=true&​skip_sell=true&​group_name=$1&order=$2&​page=$3&​%{QUERY_STRING} [L]
-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) { +#slug galleries 
-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; +RewriteRule ​^gallery/([^/]+)/index.html$ /script_folder_name/​cgi/​out.php?​url=content&​slug=$1&%{QUERY_STRING} [L
-} +RewriteRule ​^gallery/([^/]+)/([0-9]{1,2}).html$ /script_folder_name/​cgi/​out.php?​url=content&​slug=$1&item_id=$2&%{QUERY_STRING} [L]
-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;​ +#tags 
-rewrite ​^/search/(.*)/(.*)/(.*)/(.*)/$ /scj/​tube/​index.php?​search_type=$1&search=$2&​order=$3&page=$4; +RewriteRule ​^tag/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/​tube/​index.php?​tag=$1&page=$3&​order=$2&%{QUERY_STRING} [L] 
-rewrite ​^/action/(.*)/(.*)/$ /scj/​tube/​index.php?​action=$1&action_params=$2 last; +RewriteRule ​^tag/([^/]+)/([^/]+)/$ /script_folder_name/​tube/​index.php?​tag=$1&page=$2&​%{QUERY_STRING} [L] 
-rewrite ​^/action/(.*)$ /scj/​tube/​index.php?​action=$1 last;+RewriteRule ​^tag/([^/]+)/$ /script_folder_name/​tube/​index.php?​tag=$1&​%{QUERY_STRING} [L]
  
-rewrite ​^/go/(.*)/$ /scj/tube/?action=sponsor&​sponsor_slug=$1& ​last; +#model galleries 
-rewrite ​^/search_log/(.*)/$ /scj/tube/?search_log=all&page=$1last;+RewriteRule ​^model_galleries/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries [L] 
 +RewriteRule ​^model_galleries/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&page=$2&force_template=model_galleries [L]
  
-rewrite ​^/sponsor/(.*)/$ /scj/tube/?sponsor_slug=$1&​force_template=sponsor_page last; +RewriteRule ​^model/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&​force_template=model_galleries&​%{QUERY_STRING} [L] 
-rewrite ​^/sponsor_galleries/(.*)/(.*)/$ /scj/tube/?sponsor_slug=$1&page=$2&force_template=sponsor_list last;+RewriteRule ​^model/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/?model_slug=$1&force_template=model_galleries&​order=$2&page=$3&​%{QUERY_STRING} [L]
  
-rewrite ​^/models//scj/​tube/?​force_template=model_list last; +RewriteRule ​^search/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&page=$2&​%{QUERY_STRING} 
-rewrite ​^/models/(.*)/$ /scj/tube/?force_template=model_list&model_first_letter=$1 last; +RewriteRule ​^search/([^/]+)/([^/]+)/([^/]+)/$ /script_folder_name/tube/index.php?search=$1&​order=$2&​page=$3&​%{QUERY_STRING}
-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>​ </​code>​
new_rotation_step_by_step.1491578246.txt.gz · Last modified: 2017/04/07 15:17 by admin