Changing User Class to view torrents

If you don't know russian language or can't post in russian please, post your questions about TB Dev SZ Edition here. You're not allow to post your's questions at another forums of this category.
Правила форума
Only non-russian talks here.

Changing User Class to view torrents

Сообщение wildboy211 » 18 сен 2008, 01:37

Is there an update or patch where the admin can set to what level can view torrents and which level can download? Or what file must i edit to do something like that. I need all users (including anonymous) to view torrents, but only registered users can download.
wildboy211
 
Сообщения: 7
Зарегистрирован: 18 сен 2008, 01:34
Адрес трекера: http://www.torrentse.net

Re: Changing User Class to view torrents

Сообщение Nafania » 18 сен 2008, 09:04

in browse.php find lines
Код: Выделить всё
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
loggedinorreturn();
parked();


change it to
Код: Выделить всё
$userdata = session_pagestart($user_ip);
init_userprefs($userdata);
//loggedinorreturn();
parked();


in details.php find lines
Код: Выделить всё
$userdata = session_pagestart( $user_ip );
init_userprefs( $userdata );
parked();

loggedinorreturn();


change it to
Код: Выделить всё
$userdata = session_pagestart( $user_ip );
init_userprefs( $userdata );
parked();

//loggedinorreturn();


Then find this (or similiar) lines in all your installed templates
Код: Выделить всё
            <!-- BEGIN switch_curuser_view -->
            <li<!-- PHP -->echo (strpos($_SERVER['PHP_SELF'], 'browse')?' id="activetab"':'');<!-- ENDPHP -->><a href="{U_BROWSE}"><span>{L_BROWSE}</span></a></li>
            <!-- END switch_curuser_view -->


and replace it with
Код: Выделить всё
            <li<!-- PHP -->echo (strpos($_SERVER['PHP_SELF'], 'browse')?' id="activetab"':'');<!-- ENDPHP -->><a href="{U_BROWSE}"><span>{L_BROWSE}</span></a></li>
Аватара пользователя
Nafania
Администратор
 
Сообщения: 1207
Зарегистрирован: 30 июн 2007, 16:10

Re: Changing User Class to view torrents

Сообщение Nafania » 18 сен 2008, 09:09

And return copyright to footer or your will be banned on this forum
Аватара пользователя
Nafania
Администратор
 
Сообщения: 1207
Зарегистрирован: 30 июн 2007, 16:10

Re: Changing User Class to view torrents

Сообщение wildboy211 » 18 сен 2008, 11:18

Beautiful, works wonderfully, even though i didnt understand why we did this:

Then find this (or similiar) lines in all your installed templates

Code: Select all
<!-- BEGIN switch_curuser_view -->
<li<!-- PHP -->echo (strpos($_SERVER['PHP_SELF'], 'browse')?' id="activetab"':'');<!-- ENDPHP -->><a href="{U_BROWSE}"><span>{L_BROWSE}</span></a></li>
<!-- END switch_curuser_view -->



and replace it with

Code: Select all
<li<!-- PHP -->echo (strpos($_SERVER['PHP_SELF'], 'browse')?' id="activetab"':'');<!-- ENDPHP -->><a href="{U_BROWSE}"><span>{L_BROWSE}</span></a></li>


Isnt that just removing a comment?
wildboy211
 
Сообщения: 7
Зарегистрирован: 18 сен 2008, 01:34
Адрес трекера: http://www.torrentse.net

Re: Changing User Class to view torrents

Сообщение Nafania » 18 сен 2008, 13:06

It's a not comment, it's a template code.
If you will not remove it, than anonymous users can't see Browse link in top and left menus
Аватара пользователя
Nafania
Администратор
 
Сообщения: 1207
Зарегистрирован: 30 июн 2007, 16:10

Re: Changing User Class to view torrents

Сообщение wildboy211 » 18 сен 2008, 13:55

Nafania писал(а):It's a not comment, it's a template code.
If you will not remove it, than anonymous users can't see Browse link in top and left menus


Oh, okay, im starting to understand the programming of this. BTW, i returned the copyright code back to its original state.
wildboy211
 
Сообщения: 7
Зарегистрирован: 18 сен 2008, 01:34
Адрес трекера: http://www.torrentse.net


Вернуться в Forum for non-russian speak users

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 0

cron