vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   First post ad- guests only (https://vborg.vbsupport.ru/showthread.php?t=260658)

yamahapaul 03-19-2011 05:36 PM

First post ad- guests only
 
How and where do I place this code-

HTML Code:

<SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.co.uk/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822/GB/midlaherit-21/8002/d03520b8-633a-4e27-b9ac-93cb2ff12515"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fmidlaherit-21%2F8002%2Fd03520b8-633a-4e27-b9ac-93cb2ff12515&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT>
so that it is viewable in the first post of a thread as in the same location as adsense and viewable by guests only?

BirdOPrey5 03-19-2011 05:46 PM

You should put it in the appropriate ad location template and surrond the code with this conditional:

Code:

<if conditon="$show[guest]">
original code
</if>


yamahapaul 03-19-2011 05:53 PM

I tried all the ad locations for first post but they either showed it above the context of the post or outside it so I'm still head scratching at the moment..

BirdOPrey5 03-19-2011 06:09 PM

You can put it directly in the postbit template if you want and use this condition:

Code:

<if conditon="$show[guest] AND $post[isfirstshown]">
original code
</if>


yamahapaul 03-19-2011 06:28 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2175191)
You can put it directly in the postbit template if you want and use this condition:

Code:

<if conditon="$show[guest] AND $post[isfirstshown]"><SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.co.uk/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822/GB/midlaherit-21/8002/8e6f80af-66e4-4fc7-8a48-a7545e5b3801"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fmidlaherit-21%2F8002%2F8e6f80af-66e4-4fc7-8a48-a7545e5b3801&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT></if>


I'm not 100% sure whereabouts in there to put it so that shows the same as the adsense would look..

BirdOPrey5 03-19-2011 07:07 PM

I'm not sure how adsense looks, I mean, it looks like whatever it does depending on the ad location template used usually and it depends on what size/shape ad you choose when making your ad.

Places I would try would be immediately before or after $post[message] in the postbit(_legacy) template... probably right after that is best. Do you have a screen shot of an example of what you want it to look like?

yamahapaul 03-19-2011 07:28 PM

1 Attachment(s)
I want to achieve something like the attached and the ad is more or less the same sort of size as mine I think.... the only difference here is that I'm running 3.8.5 and the example is 4. something or other..

BirdOPrey5 03-19-2011 07:45 PM

That's probably using some <div> or <table> tags to align the ad to the right. On that page use your browser to view the HTML source and you'll see the HTML around the ad... Just copy it and put it around your ad code.

To me it looks like a <table> but I'm not sure, it could definitely be done with a table...

In your postbit_legacy

find:
Code:

$post[message]
and replace with:
Code:

<if conditon="$show[guest] AND $post[isfirstshown]">
<table border="0" width="100%">
<tr>
<td VALIGN="top">
$post[message]
</td>
<td VALIGN="top" width="200">
Ad Code Here
</td>
</tr>
</table>
<else />
$post[message]
</if>

The width="200" is what I'm guessing is the width, in pixels, of the google ad- set it whatever the real width is.


All times are GMT. The time now is 11:45 AM.

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.01016 seconds
  • Memory Usage 1,732KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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