Here is a list of common Torrent Trader code usage and there meanings from my knowledge. I will update it when I think of more but I am going to try to list some of the common ones today. some of these are taken from post throughout the site so no
on almost everypage you need this. if you do not have it then you page may not function correctly because it is like a brain for invidual pages:
when i have some more time and think of some of the other things i will add it. I hope this will help some peeps and cut down on some questions pertaining to this. enjoy :D
on almost everypage you need this. if you do not have it then you page may not function correctly because it is like a brain for invidual pages:
require_once ("backend/functions.php");this is if you are going to use bbcode in your page. it is basically a function file for bbcode:require_once ("backend/bbcode.php");
this is for when you want to hide things from non members. put the code you want to hide in between the { and the }:
if ($CURUSER){ }
this is for when you want to hide things from members and let only non members see it. put the code you want to hide in between the { and the }:
if (!$CURUSER){ }
this is for restricted things to staff panel:
if (!$CURUSER || $CURUSER["control_panel"]!="yes"){
show_error_msg("Error","Sorry you do not have the rights to access this page!",1);
}
this is your typical error message. the message goes in between the quotes:
show_error_msg(" ",1);
this is if you would like to restrict by class. the number is the class number. note the error message does not always have to be in there. you can restrict without the error message. but if you do not use the error message then put the code you want to restrict between the { and the }:
if ($CURUSER["class"] < "7"){
show_error_msg("Error","Sorry you do not have the rights to view this page!",1);
}
if you want to restrict certain frames or blocks then wrap the code in this. the number is the class you want to restrict or only show it to.
if ($CURUSER["class"] < "4"){
}
this begins a frame. in between the quotes you can give the block a name:
begin_frame("");
this ends a frame:
end_frame();
this begins a block:
begin_block(" ");
this ends a block:
end_block();
this is for your header and usually goes before the begin frame or begin block. if you have more than one frame or block then you should on use this one time in the begining:
stdhead(" ");
this is for your footer and usually goes after the end frame or end block. if you have more than one frame or block then you should on use this one time in the end:
stdfoot();
this is one way of conecting to the mysql db along with the die function:
mysql_query(" ") or die(mysql_error());
this is another way to connect to the mysql db:
$query = " ";
mysql_query($query);when i have some more time and think of some of the other things i will add it. I hope this will help some peeps and cut down on some questions pertaining to this. enjoy :D