Update 47 (2011.06.20)

Post Reply
Site Admin
Posts: 32326
Joined: Wed Sep 10, 2008 11:43 am

Update 47 (2011.06.20)

Post by admin »

[news_title]Multiserver setup, one DB and more[/news_title]

Update 47


Import Sets

Various sponsors provide URLs in various formats: RSS (and some sponsors нuse nonstandard fields), XML, dump. Before update 47 you could add only standard RSS feed and It was inconvenient for automatic feeding of you site. Import Set introduced for take care of this. With Import Sets you can automatically import galleries from virtually any source with any options including Custom Galleries, additional thumbs and so on.

How it works: Rotation - Import Sets, click "Add New". It opens the Import form with only few exceptions: input field for feed url (RSS, dump, XML), period of regrab, type of grab and delimiter. So type url to your gallery dump for example, click test, select what you want to import from this dump, select options as with regular import and click save. Script will import data from this dump every X hours.


* Sometimes there's no direct URL to thumb in RSS and it looks like "some text <img src=....>". Select "Parse Thumb", not "Thumb" in such cases.
* Delimiter - a division of the fields, it usually '|' for dumps, for RSS 'item' or 'video'

Import: Deep fetch

Some FHGs dont have direct links to images\movies, instead thumbs are linked to regular html page with big image. Try 'Deep Fetch' in this case, script will parse all linked pages trying to find big images. Note, it takes much more time to grab in this mode so use wisely.


Rotation - Settings - Import Replacements This is useful if you want automatically replace some parts of your import, for example if you use Tube Import and you want to replace some part of embed code (for example delete direct link to tube site) - this is exectly what you need.

Remote Pages

Rotation - Settings: let's say you have a separate script for link trade (link exchange), this script creates regular html file with block of link which you have to include in you templates. It's easy if file is located at the same host (you can do <? include('file.html') ?>), but what if file is located at remote host ? Of course, you can do even include('http://remote/file.html') but it's very bad practice caz script will load this file from remote host on each page request, creating load on both servers.

What you have to do is to add this page to Remote Pages in Rotation - Settings. (format http://other_server/1.html|somepage.html)
Every 15 minutes script will download and save http://other_server/1.html as /scj/rot_pages/ somepage.html, and later you can include it as a local file include ('/home/user/domain/scj/rot_pages/somepage.html').

You can just add URL (http://other_server/1.html, ie without somepage.html) - then page will be saved with the original name, ie 1.html

Order by rating

There were 3 types of sort: CTR, Date and Duration. Now you can use one more - Rating.
Direct link is something like /scj/tube/?group_id=1&order=rating
With default rewrites: /category/1/category_name/rating/1/


Let's say you had gallery /gallery/some_desc/index.html and someone addded it as a bookmark. But in a while u've deleted this gallery, and that somebody clicks his bookmark - script will output template "Content_not_found".

Template Transfer

Very usefull feature for designers. You can upload and donwload all templates with 1 click. Check bottom of Rotation - CMS - Templates. Note downloadable file is a plain sql file, be careful - the changes can not be "rolled back".

Related Galleries

Usually there are some other thumbs on the pages with custom content (custom galleries), this is so called 'related thunbs'. You can choose between 3 types of related galleries, check Rotation - CMS - Settings.

Gallery Slug

Up to update 47 links to the galleys all look like the http://domain/gallery/some_descriptions ... index.html.
Let's change it to something like http://domain/gallery/some_descriptions/index.html

Add this to .htaccess

Code: Select all

# Slug galleries
#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]

Code: Select all

in subtemplates replace




That's all.

Category Slug

Almost the same as Gallery Slug. Changing something like /category/15/category_name/ctr/1 / to /category/category_name/ctr/1/ or just /category/category_name/.

How to do it

1. Add to .htaccess

Code: Select all

RewriteCond% {QUERY_STRING} ^(.+)$
RewriteRule ^ category /([^/]+)/$ [L]
RewriteRule ^ category /([^/]+)/$ / scj / tube / index.php? Group_name = $ 1 [L]
RewriteRule ^ category /([^/]+)/([^/]+)/([^/]+)/$ [L]
</ Code>

2. Template Changes


this is how it was

<category order=alphabet num=1-5>
   <li> <a href="/category/<!--CATEGORY_ID-->/<!--CATEGORY_NAME-->/ctr/1/"><!--CATEGORY_NAME-->(<!--TOTAL_ITEMS-->)</a></li>

change it to 

<category order=alphabet num=1-5>
   <li> <a href="/category/<!--CATEGORY_NAME-->/ctr/1/"><!--CATEGORY_NAME-->(<!--TOTAL_ITEMS-->)</a></li>

Cast priority

Let's say you have a large database and you've just added your favorite sponsor and would like to test it's thumbs first - use "cast priority" select box when you add galleries.


Use this tag in every template where you'd like to count hits. If you dont want to count hits on some pages (sitemap for example) don't use it there.

Tag Cloud

There was a couple of changed in tag cloud:
* Tags can be copied from one site to another (in the Global Admin)
* File scj/includes/conf/gal_cloud_skip.txt contains 'stop words' that will not be added to the tags ever. This is useful given you do not have to deal with each new site tags such as "a, the, is, of " and so on.

Test feature: rotate page for rows

Let's say you have thumbs 1 - 100 on index page (ot category page, actually it doesn't matter) and surfer visits your site for the first time from trader1. He see thumbs 1-100. It's ok, but ina while he comes from trader2 and basically we have to show him the same 1-100 thumbs. With this feature you can automatically show thumbs 101-200 , ie thumbs he haven't seen before. Should be good for productivity.


Traffic Sell

Traffic Rules - Sell Traffic we have new opportunity to indicate what specific traffic to send for sale (Sell only this countries). Comma-separated names of countries according to how their names mod_geoip ISO 3166 (for example: US, DE)


Some changes in Settings - CJSettings - toplist
* Added option "How often do you want script to recreate trader's thumbs, hours", it was 1-2 days before, but be careful, if you set it too low it will create more load on your server. let's say you have 10 sites on 1 server, ech with 200 traders = 2000 thumbs a day. If you set it to 6 hours = 8000 thumbs a day.
* "How many thumbs" - can create more than one thumb. By default script take first thumbs takes the first thumb of trader's page and save it as scj/top/tt/trader.com.jpg. You can create more diffrent toplists with more trader thumbs, script will save additional thumbs as /scj/tt/trader.com2.jpg, /scj/top/tt/trader.com3.jpg and so on. Again - use it carefully, because if you have 10 sites 200 traders each and want to create 3 thumbs for each trader = 10*200*3 = 6000 thumbs a day.

Banned words

Settings - Config Files - banned_words.txt
Those words are compared against whois record of trader's domain, so if you want to ban someone's domains - add it to banned_words.txt
Note, you can use wildcard * for example trader have in html code

<a href='bla-bla'>Someweirdword</a>

If you want to find only exect match for 'Someweirdword' - add it as is. You let's say you want to find part of word, for example just 'weird' add it as '*weird*'

Average Prod (All history)

New column in Trade Screen - Average Prod (All history). Show average productivity thought all saved history. Added columns in Settings - Layouts.
Have you done script update ?

Post Reply