PDA

View Full Version : Module with Banner code


MotMann
07-23-2009, 11:33 AM
What i must do, if i need on the right side a Bannermodule in Forumdisplay?

I create in Module > Review Module > Switch to Forumdisplay > create a custon Module on the right side.

But i don't found the way, where i can put the html Bannercode in (from Google) ...

Morgan
07-24-2009, 02:05 PM
If you want the ads as a module, you would need to create a PHP file in the /geek/gars/mode/display directory. Files in that directory are used to display content to the screen, and you can look at the files currently there is get examples of how to create the PHP file and then add that file as a module, or you could edit the GARS_forumdisplay template, assuming that is the template you are using for the forumdisplay page.

In the GARS_forumdisplay template are variables like the following, where X is 1, 2, 3, or 4:

$show[GARS_modpositionX]


1: Above threads
2: Left of threads
3: Right of threads
4: Below threads

Look for those variables in the template and add your ad code where you want it to appear.

Similarly, in the GARS_pb template are variables like the following, where X is 1, 2, 3, 4, 5, or 6:

$post[GARS_modpositionX]


1: Above Header
2: Inside Header
3: Below Header
4: Left of content
5: Right of content
6: Below content

MotMann
07-24-2009, 03:22 PM
I use these Code in GARS_forumdisplay template

<if condition="$show[GARS_columns]">
<if condition="$show[GARS_modposition3]">
</td><td valign="top" width="$stylevar[gars_mod_width]" style="padding-top:10px; padding-$stylevar[left]:10px">
$show[GARS_modposition3]
<br />
<img src="clear.gif" width="$stylevar[gars_mod_width]" alt="" height="1px" border="0" />

<!-- Google Start-->
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXX";
/* 160x600, Xbox Skyscraper */
google_ad_slot = "XXXXXXXXX";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Google End -->
</td>
</if>
</tr></table>
</if>
<if condition="$show[GARS_modposition4]">

Is that correct?

Morgan
07-24-2009, 05:48 PM
Note that you placed the Google code inside if-template conditionals, which will work as long as you have a module on forumdisplay to the right of threads.

MotMann
07-25-2009, 12:49 AM
Sorry.. i don't understand you. Im from Germany ;)

Did you mean, that the Banner goes away, until i don't displayd the modules on the right side? That's i know....

Morgan
07-27-2009, 06:07 PM
Yes, the way you have it, it goes away when there is no right of threads module.

henrikhansen
07-27-2009, 07:09 PM
MotMann, if you have trouble with this, it might be more easy for you to use the Template add on module (in the add-on section). Some people use this add on for adsense. If you use this, you create a template for your adsense code which the template module will handle for you.