PHP Code:
$vbulletin->input->clean_gpc('r', 'page', TYPE_UINT);
you should get into the habit of
"cleaning" any $_GET, $_REQUEST, and $_POST data .... the above is a vb function that cleans/converts data that will be used
if you study the vb files or any product/plugin found here (vb.org) you will find the above line more frequently
This:
PHP Code:
$page = (empty($vbulletin->GPC['page'])) ? 1 : $vbulletin->GPC['page'];
does the same thing as
PHP Code:
if(!isset($_GET['page'])){
$page = 1;
} else {
$page = $_GET['page'];
}
The ?: operator is used as a shorthand replacement for the if-then-else conditional statement; the general form is
condition ? op1 : op2. If condition is true, the statement evaluates as
op1; otherwise, it evaluates as
op2.