5
With Smartsection, I use the following custom template for the smartsection_item.html template. You can see a live demo
HERE <{include file='db:smartsection_header.html'}>
<div class="item">
<{if $display_whowhen_link}>
<div class="itemInfo"> <span class="itemPoster">
<div class="smartsection_item_head_who"> <{$item.who_when}> (<{$item.counter}> <{$lang_reads}>) div>
span> div>
<{/if}>
<div class="itemBody">
<{if $pagenav}>
<div class="smartsection_pagenav_top"><{$lang_page}>: <{$pagenav}>div>
<{/if}>
<div class="itemText">
<div class="gads"><script type="text/javascript">
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
script>div>
<{$item.maintext}>div>
<{if $pagenav}>
<div class="smartsection_pagenav_bottom"><{$lang_page}>: <{$pagenav}>div>
<{/if}> div>
<{if $itemfooter}>
<div class="smartsection_itemfooter"><{$itemfooter}>div>
<{/if}>
<div class="pre_itemInfo">
<div class="itemInfo" style="height: 14px;"> <{if $display_comment_link && $item.cancomment}> <span style="float: left;"><a href="<{$xoops_url}>/modules/smartsection/item.php?itemid=<{$item.itemid}>"><{$item.comments}> <{$lang_comments}>a>span> <{else}> <span style="float: left;"> span> <{/if}> <span style="float: right; text-align: right;"><{$item.adminlink}>span>
<div style="height: 0; display: inline; clear: both;">div>
div>
div>
div>
<br />
<{if $item.files}>
<table border="0" width="90%" cellspacing="1" cellpadding="0" align="center" class = "outer">
<tr>
<td colspan="4" class="itemHead"><b><{$lang_files_linked}>b>td>
tr>
<tr class="even">
<td align="left" width="45%" class="itemTitle"><b><{$lang_file_name}>b>td>
<td align="center" class="itemTitle"><b><{$lang_file_type}>b>td>
<td align="center" width="150px" class="itemTitle"><b><{$lang_datesub}>b>td>
<td align="center" width="50px" class="itemTitle"><b><{$lang_hits}>b>td>
tr>
<{foreach item=file from=$item.files}>
<tr>
<td valign="middle" class="odd" align="left"> <a href="visit.php?fileid=<{$file.fileid}>" target="_blank"><img src="<{$smartsection_url}>images/icon/file.gif" title="<{$lang_download_file}>" alt="<{$lang_download_file}>"/> <b><{$file.name}>b>a>
<div><{$file.description}>div >
<td valign="middle" class="odd" align="center"><{$file.type}>td>
<td valign="middle" class="odd" align="center"><{$file.datesub}>td>
<td valign="middle" class="odd" align="center"><{$file.hits}>td>
tr>
<{/foreach}>
table>
<br />
<{/if}>
<{if $smarttie==1}> <{include file='db:smarttie_links.html'}> <{/if}>
<{if $other_items == "previous_next"}> <{if $previous_item_link || $next_item_link}>
<table class="outer">
<tr>
<td class="itemHead" colspan="2"><b><{$lang_items_links}>b>td>
tr>
<tr style="vertical-align: middle;">
<td class="odd" width="50%" align="left"> <{if $previous_item_link}> <a href="<{$previous_item_url}>"><img style="vertical-align: middle;" src="<{$smartsection_images_url}>links/previous.gif" title="<{$lang_previous_item}>" alt="<{$lang_previous_item}>"/>a> <{$previous_item_link}> <{/if}> td>
<td class="odd" width="50%" align="right"> <{if $next_item_link}> <{$next_item_link}> <a href="<{$next_item_url}>"><img style="vertical-align: middle;" src="<{$smartsection_images_url}>links/next.gif" title="<{$lang_next_item}>" alt="<{$lang_next_item}>"/>a> <{/if}> td>
tr>
table>
<{/if}> <{elseif $other_items == 'all'}>
<table border="0" width="90%" cellspacing="1" cellpadding="3" align="center" class= "outer">
<tr>
<td align="left" class="itemHead" width='65%'><b><{$lang_item}>b>td>
<{if $display_date_col == 1}>
<td align="center" class="itemHead" width="25%"><b><{$lang_datesub}>b>td>
<{/if}> <{if $display_hits_col == 1}>
<td align="center" class="itemHead" width="10%"><b><{$lang_hits}>b>td>
<{/if}> tr>
<{foreach item=item from=$items}>
<tr valign="top">
<td class="even" align="left"><{$item.titlelink}>b>td>
<{if $display_date_col == 1}>
<td class="odd" align="left"><div align="center" valign="middle"><{$item.datesub}>div>td>
<{/if}> <{if $display_hits_col == 1}>
<td class="odd" align="left"><div align="center"><{$item.counter}>div>td>
<{/if}> tr>
<{/foreach}>
table>
<{/if}> <{if $isAdmin == 1}>
<div class="smartsection_adminlinks"><{$smartsection_adminpage}>div>
<{/if}> <{if ($commentatarticlelevel && $item.cancomment) || $com_rule <> 0}>
<table border="0" width="100%" cellspacing="1" cellpadding="0" align="center" >
<tr>
<td colspan="3" align ="left"> <div style="text-align: center; padding: 3px;
margin:3px;"> <{$commentsnav}> <{$lang_notice}>div>
<div style="margin:3px; padding: 3px;">
<{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.html"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.html"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.html"}> <{/if}>
div>td>
tr>
table>
<{/if}> <{include file='db:system_notification_select.html'}>
In my style.css, I define the following class to make the text wrap around the Google ad.
.gads {
margin: 0 0 0 4px;
float: right;
}
Keep in mind that Google only allows 3 ad blocks per page. If you go over that limit, none or only some of your ads will display. Also, until Google spiders your site, you will most likely get a blank space where the ad should show up.
HTH.
James
Insanity can be defined as "doing the same thing over and over and expecting different results."
Stupidity is not a crime. Therefore, you are free to go.