Setup Smartcj Correctly

admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

resellerhostings wrote:is this the lines i change or is there more lines i need to change
// create config

$tr = array();
$tr['__DB_HOST__'] = $mysql_host;
$tr["__DB_USER__"] = $mysql_user;
$tr["__DB_PASSWORD__"] = $mysql_pass;
$tr["__DB_NAME__"] = $mysql_name;
$tr["__PHP_PATH__"] = $php_path;
$tr["__ADMIN_EMAIL__"] = $admin_email;
$tr["__PATH_TO_LOG__"] = $scj_path . 'logs/';

What do you want to do with those changes ?
Don't forget to run script update
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

4) Could you please give me this url rewrite code? Admin couldn't write it.
RewriteRule scj_pro.lic [R=404,L]
6a) Should i put

Code: Select all
<?php $my_var = explode('x', '<!--THUMB_LINK-->'); ?>

in the subtemplate?
yes
6b) Should i put

Code: Select all
if (isset($_GET['a'])) {
$_GET['link'] = 'images/' . $_GET['a'] . 'x' . $_GET['b'] . 'x' . $_GET['c'];
}

in common.php of the root, or common.php of scj/cgi?
the rule of the thumb - all common.php should be the same.


6c) If i put

Code: Select all
if (isset($_GET['y'])) {
$_GET['link'] = 'images/' . $_GET['a'] . 'x' . $_GET['b'] . 'x' . $_GET['c'];
}

Then the url should be http://www.domain.com/tag/<!--TAG_NAME- ... =$my_var[2]?>
It depends on your rewrites
If you have it this way for tags - yes
It should work with galleries like http://www.domain.com/gallery/<!--GALLE ... =$my_var[2]?>
7) I uploaded the default htaccess from /scj/tube/ and pasted it in the root. Should i change all /scj/cgi/out.php paths to /out.php paths?
Why ?
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Setup Smartcj Correctly

Post by happydg »

7d) What code should i put in common.php to get <!–THUMB_LINK–>
http://domain.com/gallery/gallery-slug/ ... ml?y=41152
ie http://www.domain.com/gallery/<!--GALLE ... =$my_var[2]?>

8) I renamed rotin.php to raten.php in scj/cgi so google doesn't find it. But in Scj admin it says: cgi/raten.php is not a part of SCJ. Check it mannualy.

Should i also rename it somewhere in the settings?

9) I see some sites having special url rewrites. For example on their category page this link would go to a category. http://domain.com/go/?c=20&y=31x1x13625 Which would become http://domain.com/cat/category-name/. How to do this?
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

7) $_GET['y'] ? Not sure I understand the question

8. no. It's just a reminder that you did it.

9. You have to do some custom coding in common.php like

if ($_GET['c'] == 20) header('location: ... ');

Or you can open as categories by ids like

scj/tube/?group_id=20
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Setup Smartcj Correctly

Post by happydg »

7) Could you please paste here the whole code that should be in common.php to get a <!–THUMB_LINK–> like:

?y=41152

9a) I don't want to use the default scj url pattern scj/tube/?group_id=20.

If i use the custom coding in common.php do i need to do redirect for all the categories like this?

if ($_GET['c'] == 20) header('location: http://domain.com/tag/amateur/ ');
if ($_GET['c'] == 21) header('location: http://domain.com/tag/mature/ ');
etc...

Or is there an easiest way? Because i have hundreds of categories. If there is, could you please let me know the code?

9b) The url should be http://domain.com/?c=20&y=41152 so that clicks are tracked? I don't need to add <!–THUMB_LINK–> in common.php location like this also? location: http://domain.com/tag/amateur/?y=<!–THUMB_LINK–>

10) Can i also hide common.php with a rewrite rule?
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

7. $_GET['y']

8. Well, basically yes, you can simplify that code of course, just need to read a bit about php coding. Or you can order custom coding with us or any other party.

9. you still need THUMB_LINK

10, yes, take a look at the example with scj_pro.lic
I'm pretty much sure you can do copy\paste and replace operation to create a rewrite for another file :)
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Setup Smartcj Correctly

Post by happydg »

About question 2) I did put a htpasswd in scj/ folder to hide it from google but then the site doesn't work. For example when i click on a tag page it says 401 Authorization Required. When i remove this htpasswd it works.
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

It's not due to that line - 100%

Probably you've copied a wrong .htaccess

Try to read a bit about apache .htaccess files and rewrites just to get grasp of it.
Don't forget to run script update
happydg
Posts: 412
Joined: Mon Jul 08, 2013 2:22 pm

Re: Setup Smartcj Correctly

Post by happydg »

Is it possible that a gallery gets a different ctr for each category/tag ?

So i gallery gets a good rank on a category and a bad rank on another category.
admin
Site Admin
Posts: 37994
Joined: Wed Sep 10, 2008 11:43 am

Re: Setup Smartcj Correctly

Post by admin »

Yes, it's called separate stats but it obviously adds some load.

Check out - rotation - settings

Separate stats for each thumb in each category
Don't forget to run script update
Post Reply