Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Strike (http://www.bvlist.com/forumdisplay.php?f=21)
-   -   Personaling TorrentStrike login screen (http://www.bvlist.com/showthread.php?t=7315)

accretio 7th December 2011 19:27

Personaling TorrentStrike login screen
 
Hi, i'm currently trying to design my tracker and i'm using torrentstrike 0.4. However, i want my login screen to show very little of my sites content and i want the "stats" and torrent categories boxes to not appear at the login screen. how can i change that? i'm using the icgstation theme that comes with it. what should i edit? thanks :sos:

daffy 7th December 2011 19:52

Are you wanting these removing altogether ? or just to be viewed for members only?

Bigjoos 7th December 2011 20:18

PHP Code:

if(isset($CURUSER)) {
code you want to block remember to break in and out of php otherwise you will drop the site 



accretio 7th December 2011 20:28

Personaling TorrentStrike login screen
 
@daffy, basically what i want is for the boxes such as: stats & categories not to be shown at the login screen. only once the user logs in should they be able to see the boxes. how do i do this?

Bump:
Quote:

Originally Posted by Bigjoos (Post 31540)
PHP Code:

if(isset($CURUSER)) {
code you want to block remember to break in and out of php otherwise you will drop the site 



@Bigjoos, what file is this from and will this remove the boxes even after the user logs in? i would like the stats and categories boxes to be shown only once the user logs in. sorry if i'm asking a dumb question, but i'm still getting used to this. thanks :chch:

daffy 7th December 2011 20:45

post your stdhead mate. that code what joos showed you is what you need to add. you need to add

Code:

if(isset($CURUSER)) {
above the block code you wan to hide from guest/login

and
Code:

}
goes below the block code so your wrap it around. only current users will see (registered)

so your categories will be from

Code:

categories_block("Cats");
to

Code:

if(isset($CURUSER)) {
categories_block("Cats");
}


Bigjoos 7th December 2011 20:49

Aye like daffys says - just follow that..

PHP Code:

<?php
if ($CURUSER)  

}

Would become

PHP Code:

<?php
if ($CURUSER)  

?>
<table><tr><td>......
<?php
}

^^ Means any php/html within the if curuser is hidden unless logged into the site.

Now remember to use php tags to break in and out otherwise whitey screens and syntax errors unless your aware of that scenario.

PHP Code:

?>
<html shits here>
<?php


accretio 8th December 2011 00:40

Personaling TorrentStrike login screen
 
thanks a lot guys, will try it and see how it goes!

Bigjoos 8th December 2011 01:27

If you dont manage it then simply post back with a section of the code and we can show you what you need to do, that way you learn and know how to do the rest : )

accretio 8th December 2011 11:57

Personaling TorrentStrike login screen
 
@Bigjoos, okay will see how it goes. thanks

EDIT: got the hang of it guys and its working great. the boxes don't show anymore, only when the user logs in. thats exactly what i wanted. thanks!

Bump: Okay guys, sorry to bother again, but i'm sitting with another problem:

i removed the "General" box successfully and now i'm trying to remove the "Stats" and "NZB's" boxes.

i'm not too sure what to do here, and when i try always get errors. what am i doing wrong?

here is the code below: stdfoot.php

PHP Code:

<!--- block panel start here -->
<?
          $USERS 
number_format(get_row_count("users""WHERE class='0'"));
          
$poweruser number_format(get_row_count("users""WHERE class='16'"));
          
$uploaders number_format(get_row_count("users""WHERE class = '48'"));
          
$Moderator number_format(get_row_count("users""WHERE class = '64'"));
          
$ADMINISTRATOR number_format(get_row_count("users""WHERE class = '80'"));
          
$sysop number_format(get_row_count("users""WHERE class = '96'"));
          
$warnedu number_format(get_row_count("users""WHERE warned='yes'"));
          
$disabled number_format(get_row_count("users""WHERE enabled='no'"));
          
$VIP number_format(get_row_count("users""WHERE class='32'"));
          
$registered number_format(get_row_count("users"));
          
$unverified number_format(get_row_count("users""WHERE status='pending'"));
          
$nzbs number_format(get_row_count("nzbs"));
          
?>
<?
              begin_block
("Stats");?>
              <table width="100%" border="0" cellspacing="0" cellpadding="0" class="forumline" align="center">
                 <tr><td class="row1"><font color="Black"><strong>Users<strong></td><td class="row1" align="right"><?=$USERS?></td></tr>
                 <tr><td class="row1"><font color="#D21E36"><strong>Power Users<strong></td><td class="row1" align="right"><?=$poweruser?></td></tr>
                 <tr><td class="row1"><font color="#EAEE0F"><strong>Uploaders<strong></font></td><td class="row1" align="right"><?=$uploaders?></td></tr>
                 <tr><td class="row1"><font color="#EE950F"><strong>Moderator<strong></td><td class="row1" align="right"><?=$Moderator?></td></tr>
                 <tr><td class="row1"><font color="#30EE0F"><strong>Adminstrator<strong></td><td class="row1" align="right"><?=$ADMINISTRATOR?></td></tr>
                 <tr><td class="row1"><font color="#0F6CEE"><strong>Sysop<strong></td><td class="row1" align="right"><?=$sysop?></td></tr>
                 <tr><td class="row1"><font color=FF0000>Disabled users</font> <img src= pic/disabled.gif> </td><td class="row1" align="right"><b><font color=FF0000><?=$disabled?></font></b></td></tr>
                 <tr><td class="row1"><font color=0000FF>Warned users</font> <img src= pic/warned.gif> </td><td class="row1" align="right"><b><font color=0000FF><?=$warnedu?></font></b></td></tr>
                 <tr><td class="row1"><font color=009933>VIP's</font> <img src= pic/star.gif> </td><td class="row1" align="right"><b><font color=009933><?=$VIP?></font></b></td>
                 <tr><td class="row1">Registered users</td><td class="row1" align="right"><?=$registered?></td></tr>
                 <tr><td class="row1">Unconfirmed users</td><td class="row1" align="right"><?=$unverified?></td></tr>
                 <tr><td class="row1">NZB's</td><td class="row1" align="right"><?=$nzbs?></td></tr>
              </table>
              <?
              end_block
();

                
begin_block("NZB's");?>
              <table width="100%" border="0" cellspacing="1" cellpadding="1" class="forumline" align="center">
              <tr><td class="row1" align="center" width="100%">Search NZB's:<form method="get" action="nzbbrowse.php">
              <input type="hidden" name="searchwhere" value="title" />
              <input type="submit" value="Go!" style='height: 18px' />
              <input type="text" name="search" size="15" value="<?= safe($_GET["searchstr"]) ?>" />
              </form></td></tr>
              <tr><td class="row2" align="center" width="100%"><a href="nzbbrowse.php">View Latest</a></td></tr>
              <?nzb_categories_list();?>
              <tr><td class="row2" align="center" width="100%"><a href="uploadnzb.php">Upload NZB</a></td></tr>
              </table>
              <?
              end_block
();
?>
<!--- block panel finish here -->

*i'm using nzbstrike, thanks. :ok:

EDIT: if you want me to upload the actual file, just give me a shout, okay.

daffy 8th December 2011 17:20

upload the file bud


All times are GMT +2. The time now is 03:29.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.