cotonti.com : XSAffiliates, show more then 1 random image in index.tpl https://www.cotonti.com Laatste forum onderwerpen Cotonti en Fri, 12 Dec 2025 00:56:12 -0000 Xerora Ma, 31 Aug 2009 11:18:32 -0000 DemptD
<!-- BEGIN: XSAFF -->
{XSAFF_IMAGES}
<!-- END: XSAFF -->

didnt work..

And with Xerora's modification the index wouldnt load :P]]>
Ma, 31 Aug 2009 09:55:45 -0000
Kilandor ]]> Ma, 31 Aug 2009 06:54:23 -0000 Xerora $sqlxsaff = sed_sql_query("SELECT * FROM $db_xsaff_aff WHERE aff_active='1' ORDER BY RAND() LIMIT 0,3"); while($rowxsaff = sed_sql_fetcharray($sqlxsaff)) { $t->assign("XSAFF_IMAGES" => "<div class='centerall'><a href='https://www.cotonti.com/plug.php?e=xsaff&m=redirect&id=".$rowxsaff['aff_id']."'><img src='https://www.cotonti.com/plugins/xsaff/affimg/".sed_cc($rowxsaff['aff_img'])."' style='width:88px;height:31px;border:0px' alt='".sed_cc($rowxsaff['aff_desc'])."' /></a></div>"); $t->parse("MAIN.XSAFF"); }
Try that.

XSAFF_IMAGES wasn't getting assigned to anything in the previous post.]]>
Ma, 31 Aug 2009 06:42:13 -0000
DemptD
<!-- BEGIN: AFF -->
{XSAFF_IMAGES}
<!-- END: AFF -->

Is that right? it didnt work, nothing showed up then.]]>
Ma, 31 Aug 2009 04:08:10 -0000
Kilandor
$sqlxsaff = sed_sql_query("SELECT * FROM $db_xsaff_aff WHERE aff_active='1' ORDER BY RAND() LIMIT 0,NUM_YOU_WANT_TO_SHOW");
while($rowxsaff = sed_sql_fetcharray($sqlxsaff))
{
	$t->assign("XSAFF_IMAGES", "<div class='centerall'><a href='https://www.cotonti.com/plug.php?e=xsaff&m=redirect&id=".$rowxsaff['aff_id']."'><img src='https://www.cotonti.com/plugins/xsaff/affimg/".sed_cc($rowxsaff['aff_img'])."' style='width:88px;height:31px;border:0px' alt='".sed_cc($rowxsaff['aff_desc'])."' /></a></div>");
	$t->parse("MAIN.XSAFF");
}

Just change NUM_YOU_WANT_TO_SHOW to how many you want to see, and add a new block(begin/end) around the tag called XSAFF]]>
Ma, 31 Aug 2009 03:28:05 -0000
DemptD
Heres xsaff.index.php:

if (!defined('SED_CODE')) { die('Wrong URL.'); }
$sqlxsaff = sed_sql_query("SELECT * FROM $db_xsaff_aff WHERE aff_active='1' ORDER BY RAND() LIMIT 0,1");
$rowxsaff = sed_sql_fetcharray($sqlxsaff);

$t->assign("XSAFF_IMAGES", "<div class='centerall'><a href='https://www.cotonti.com/plug.php?e=xsaff&m=redirect&id=".$rowxsaff['aff_id']."'><img src='https://www.cotonti.com/plugins/xsaff/affimg/".sed_cc($rowxsaff['aff_img'])."' style='width:88px;height:31px;border:0px' alt='".sed_cc($rowxsaff['aff_desc'])."' /></a></div>");

?>
]]>
Zo, 30 Aug 2009 22:04:34 -0000