网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   vBulletin技术交流 (https://www.0058.net/forumdisplay.php?f=6)
-   -   Adsense as a poster on your forums (https://www.0058.net/showthread.php?t=2922)

car 2008-01-14 02:16 PM

Adsense as a poster on your forums
 
vB Version: 3.5.3

So I've been playing around a bit with my new vb board, and figured out how to make it appear as if the "advertiser" has the second post on every page.

You can play around with the code some more to change some of the messages from the ones I have on there (i.e. posts: location:, etc)

For kicks, I have the "online" icon set to say "Google is online", so change this tag if you want it to say something else.

This was designed for "legacy". I do not know if it works for the new forum layout

You can also ad a custom ad "Avatar" as well. Just replace the "<!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->" with the code for the avatar.

Add this code to the END of your postbit_legacy template
Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">


<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal" align="left">       
            <!-- status icon and date -->
                        Sponsored Ads           
        </td>
        <td class="thead" style="font-weight:normal" align="right">
            &nbsp;
            #<a><strong>1.5</strong></a>
        </td>
       
</tr>
<tr valign="top">
    <td class="alt2" width="175">
           
            <div>

                <a class="bigusername" href="">Advertisement</a>
            </div>
           
                        <div class="smallfont"><div class="smallfont">Sponsored posting</div></div>
            <div class="smallfont">
                    &nbsp;<br />
                    <!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->
            </div>
                       
            <div class="smallfont">
                &nbsp;<br />
                <if condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
                <if condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
                <if condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
                <div>
                    $vbphrase[posts]: lots
                </div>
            </div>                                   
       
    </td>
    <td class="alt1">
   

            <!-- icon and title -->
            <div class="smallfont">
                <if condition="$post['title']"><strong>Sponsored...</strong></if>
            </div>
            <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
            <!-- / icon and title -->
       
        <!-- message -->
        <div align="center">
                        <!--PUT YOUR ADSENSE CODE HERE -->
                        </div>
        <!-- / message -->
           
   
    </td>
</tr>
<tr>
    <td class="alt2">
        <img class="inlineimg" src="images/statusiconrunes/user_online.gif" alt="Google is online" border="0" />
        &nbsp;
    </td>
    <td class="alt1" align="right">
   
        <!-- controls -->
        <!-- / controls -->
    </td>   
</tr>
</table>

</div>
$spacer_close

</if>



All times are GMT +8. The time now is 03:45 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.