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

accretio 8th December 2011 19:07

Personaling TorrentStrike login screen
 
1 Attachment(s)
okay daffy, i attached it to this post. thanks for all the trouble! :ok:

daffy 8th December 2011 19:15

1 Attachment(s)
here

accretio 8th December 2011 19:22

Personaling TorrentStrike login screen
 
@daffy, i tried it and now the "stats" and "nzbs" can't be seen even once i logged in. how can i fix this, i need the boxes to show once the user logs in? thanks :-)

daffy 9th December 2011 03:15

1 Attachment(s)
Sorry, i read wrong, it sounded like you wanted these removed altogether. ok try this.

accretio 9th December 2011 11:58

Personaling TorrentStrike login screen
 
hey @daffy, thanks for all the help. its working now, but there seems to be an error with the NZB's block. The error is as follows:
--------------------------------------------------------------------------
Fatal error: Call to
undefined function
phpnzb_categories_list()
in /home/binzawgm
/public_html/themes
/ICGstation
/stdfoot.php
on line 60
--------------------------------------------------------------------------
I'm sorry that i'm asking so much questions, etc. but I guess it's the best way to learn for now. how do i solve this? Thanks :ok:

EDIT: Never mind, sorted it out. had to be changed to . All is well again. thanks so much!

Kanpai! :ok:

Bigjoos 9th December 2011 16:46

PHP Code:

<?phpnzb_categories_list();?>

Should be

PHP Code:

<?php 
nzb_categories_list
();
?>

Dont use short open tags always ensure you use

PHP Code:

<?php

not

PHP Code:

<?

Your source code is ages old and there should be no usage of short open tag nowadays its old skool shit.

accretio 9th December 2011 17:44

Personaling TorrentStrike login screen
 
Hey guys, thanks for all the help over the past few weeks/days (bigjoos and daffy). But now I'd like to remove the panels at the top of the screen that say:

Home, Browse, Profiles, Forum, FAQ

How would i go about removing this only when the user is not logged in, just like with the "Stats" boxes, etc. I want it to only appear once the user has logged on. I understand that I need to edit the stdhead.php file (for those who don't know, i'm using torrentstrike) but what exactly should i remove or add in the code?

I have attached stdhead.php to the post, since I'm using a modded version of TStrike.

Thanks :ok:

accretio 10th December 2011 16:01

no seriously, how do i remove the panels?

daffy 10th December 2011 17:11

Quote:

Originally Posted by accretio (Post 31579)
no seriously, how do i remove the panels?

lmfao that is a advertisment spam shit

post your .php file please, i cannot see it

accretio 10th December 2011 17:30

Personaling TorrentStrike login screen
 
1 Attachment(s)
oh sorry, forgot to attach the file to my previous post. here's the stdhead.php file. thanks again @daffy for helping.

daffy 10th December 2011 20:09

1 Attachment(s)
try this, should only see home link, and other links when logged in

accretio 10th December 2011 21:06

Personaling TorrentStrike login screen
 
thanks a lot daffy, its working good and looks the way it should. thanks so much man, cheers! :ok:

daffy 11th December 2011 16:24

No problem. :ok:


All times are GMT +2. The time now is 10:50.

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