vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Adsense looks like post on search result page (https://vborg.vbsupport.ru/showthread.php?t=134765)

Sir_Yaro 12-24-2006 10:00 PM

Adsense looks like post on search result page
 
This hack adds adsense advert which looks almost exactly like any other search results. It display random post date, random number of the replies and thread displays.

U may need to change fake forum name (from "Oprogramowanie") and it's id number in this line:
Quote:

<td class="alt1"><a href="forumdisplay.php?f=12">Oprogramowanie</a></td>
to something different and id number of user "User" in this line:
Code:

<a href="member.php?u=5957">User</a>
IF ANYONE KNOWS HOW TO DISPLAY RANDOM USER IN A TEMPLATE PLEASE LET ME KNOW


in search_results template find:
Code:

$searchbits

<if condition="$show['ajax_js']">
        <script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js"></script>
        <script type="text/javascript">
        <!--
        vB_AJAX_Threadlist_Init('threadslist');
        //-->
        </script>
</if>

</if>

and add ABOVE or/and BELOW:

Code:

<tr>
    <td height="60" class="alt1">
        <img src="$stylevar[imgdir_statusicon]/thread_hot.gif" alt="" border="" />    </td>
        <td height="60" align="center" class="alt2">&nbsp;</td>

    <td height="60" align="left" class="alt1">
        <div>

*** PUT YOUR ADSENSE CODE HERE ****

<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
        </div>       
    </td>
   


    <td height="60" align="center" class="alt2 smallfont">
<div class="smallfont" style="text-align:right; white-space:nowrap">
<SCRIPT Language="JavaScript">
zmiana = Math.floor((Math.random() * 29) + 1);
document.write(zmiana);
</SCRIPT>-0<SCRIPT Language="JavaScript">
zmiana = Math.floor((Math.random() * 8) + 1);
document.write(zmiana);
</SCRIPT>-2006 <span class="time">
0<SCRIPT Language="JavaScript">
zmiana = Math.floor((Math.random() * 8) + 1);
document.write(zmiana);
</SCRIPT>:<SCRIPT Language="JavaScript">
zmiana = Math.floor((Math.random() * 49) + 10);
document.write(zmiana);
</SCRIPT>
</span><BR>
by
<a href="member.php?u=5957">User</a>
<img class="inlineimg" src="images/buttons/lastpost.gif" alt="Go to last post" border="0" />
</td>

        <td class="alt1" align="center"><a href="#" onclick="who(8176); return false;">
<SCRIPT Language="JavaScript">
zmiana2 = Math.floor((Math.random() * 75)+2);
document.write(zmiana2);
</SCRIPT>
</a></td>
        <td height="60" align="center" class="alt2">
<SCRIPT Language="JavaScript">
zmiana = Math.floor((Math.random() * 175)+zmiana2);
document.write(zmiana);
</SCRIPT>
</td>
<td class="alt1"><a href="forumdisplay.php?f=12">Oprogramowanie</a></td>
</tr>



As a ADSENSE CODE try to use this:
Code:

<script type="text/javascript"><!--
google_ad_client = "pub-YOUR-NUMBER";
google_ad_width = 300;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text";
google_ad_channel = "YOUR CHANNEL";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "22229C";
google_color_text = "000000";
google_color_url = "008000";
//--></script>

it fit perfectly an it has proper colors...

Shazz 12-25-2006 07:54 PM

Very nice!
Going to try it out now

Barakat 12-26-2006 01:39 AM

i love it installed .

emdee 12-27-2006 02:59 PM

i dont mean to be critical, but isnt this against AdSense TOS?
especially that there does not seem to be a place saying "ads by google" or "advertisements"?
perhaps statement like those could be added somewhere to avoid problems.
( unless it is there on the image and somehow i am not seeing it or not visible)

thanks
emdee

Sir_Yaro 12-27-2006 03:49 PM

if u afraid of that just change
google_ad_height = 46;
to
google_ad_height = 60;

joeychgo 12-28-2006 02:03 AM

Quote:

Originally Posted by emdee (Post 1145847)
i dont mean to be critical, but isnt this against AdSense TOS?
especially that there does not seem to be a place saying "ads by google" or "advertisements"?
perhaps statement like those could be added somewhere to avoid problems.
( unless it is there on the image and somehow i am not seeing it or not visible)

thanks
emdee



I think likely so --- be careful before you use this - I would check with Google on this one.


All times are GMT. The time now is 02:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01067 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete