View Full Version : partner links
Erwan Poupard
12-11-2006, 07:15 PM
Hi,
I would like to modify how the partner links are dispayed.
I want to display parner link only on the box, and not in the listing.
I would like to display a partner link in a box for a category. Exemple : I create a partner link in the categorie "XBOX", i want to show this link only on the box of the XBOX category .
How can i do that ?
Thx.
Dave Baker
12-11-2006, 07:50 PM
Hello Erwan Poupard and welcome to our support forum!
I want to display parner link only on the box, and not in the listing.
***Open classes/Dir.php and find this function***
function getLinksByCategory($aCategory = 0, $aStart = 0, $aLimit = 0, $aFeatured = TRUE, $aSponsored = FALSE, $aEditor = '')
*** In the function find code***
$sql .= 'FROM `'.$this->mPrefix.'link_categories` `t2` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'links` `t1` ON `t1`.`id` = `t2`.`id_link` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'categories` `t3` ON `t2`.`id_category` = `t3`.`id` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'editors` `t4` ON `t1`.`id_editor` = `t4`.`id` ';
$sql .= 'WHERE `t2`.`id_category` = \''.$aCategory.'\' AND `t1`.`status` = \'active\' ';
$sql .= 'AND `t1`.`featured` = \'0\' ';
***Below this code code add***
$sql .= 'AND `t1`.`partner` = \'0\' ';
***Save file***
I would like to display a partner link in a box for a category.
***Open classes/Dir.php and find this function***
function getPartnerLinks($aCategory = 0, $aStart =0, $aLimit = 0)
*** In the function find line of code***
$sql .= $aCategory ? "AND t2.`id_category` <> '{$aCategory}' " : '';
***Replace with the following code***
$sql .= $aCategory ? "AND t2.`id_category` = '{$aCategory}' " : '';
***Save file***
Erwan Poupard
12-12-2006, 08:00 AM
Yeah, thx a lot for your help, it's working perfecty ;)
Erwan Poupard
12-12-2006, 10:24 AM
hum... I have a last request :)
All my partner links are displayed on the home page,
is it possible to not show my partners category links at the home ? only at the category of the link ?
Thx a lot.
Dave Baker
12-13-2006, 05:29 PM
Erwan Can you describe what you want in more detail?
All my partner links are displayed on the home page,
is it possible to not show my partners category links at the home ? only at the category of the link ?
If you implemented this modification:
I want to display parner link only on the box, and not in the listing.
***Open classes/Dir.php and find this function***
function getLinksByCategory($aCategory = 0, $aStart = 0, $aLimit = 0, $aFeatured = TRUE, $aSponsored = FALSE, $aEditor = '')
*** In the function find code***
$sql .= 'FROM `'.$this->mPrefix.'link_categories` `t2` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'links` `t1` ON `t1`.`id` = `t2`.`id_link` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'categories` `t3` ON `t2`.`id_category` = `t3`.`id` ';
$sql .= 'LEFT JOIN `'.$this->mPrefix.'editors` `t4` ON `t1`.`id_editor` = `t4`.`id` ';
$sql .= 'WHERE `t2`.`id_category` = \''.$aCategory.'\' AND `t1`.`status` = \'active\' ';
$sql .= 'AND `t1`.`featured` = \'0\' ';
***Below this code code add***
$sql .= 'AND `t1`.`partner` = \'0\' ';
***Save file***
"partner links " should not appear in listing of categories including the home category.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.