SimplePortal

Customization => Custom Coding => Topic started by: allemand1 on June 20, 2009, 12:24:34 PM

Title: [HELPPP!] Create a new BBC!!!
Post by: allemand1 on June 20, 2009, 12:24:34 PM
I want to create a new BBC [ads], that when you put it, it diplays an ad only for guest.

I put this in POST.TEMPLATE:
Code: [Select]
'ads' => array('code' => 'ads', 'before' => '[ads]', 'after' => '[/ads]', 'description' => $txt['adsdesc']),
And in SUBS.PHP:
Code: [Select]
array(
'tag' => 'ads',
'content' => '         
global $context;
if ($context[\'user\'][\'is_guest\'])
{
$google_codigo= "<div style=\"float:left\">
<script type=\"text/javascript\"><!--
google_ad_client = \"pub-7294251511049014\";
/* 336x280, creado 21/03/09 */
google_ad_slot = \"5698312810\";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type=\"text/javascript\"
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">
</script>
</div>";
}else{
$google_codigo ="";
} ',
'block_level' => true,
),

But it doesnt work.... why?
Title: Re: [HELPPP!] Create a new BBC!!!
Post by: Eliana Tamerin on June 20, 2009, 02:03:10 PM
You probably want to visit the SMF Coding Discussion (http://www.simplemachines.org/community/index.php?board=60.0) board on the official SMF support site.
SimplePortal 2.3.8 © 2008-2024, SimplePortal