View Full Version : $postbit[message]
induslady
11-25-2013, 05:55 AM
Hi,
I am trying to include Infolinks ads in my website.
In order to show the ads ONLY in the post content within a thread and NOT in post header, navbar, footer, etc. I was told to add infolinks "javascript" code in SHOWTHREAD template and add <!--INFOLINKS_ON--> and <!--INFOLINKS_OFF--> tags in postbit / postbit_legacy templates around $posbit[message]
I am using vBulletin 4.2.1 and I don't see $postbit[message] in any of the postbit templates.
What is the equivalent of it?
Have anyone implemented Infolinks in vBulletin 4.2.1 ONLY within the post content?
Please help.
tbworld
11-25-2013, 06:30 AM
Hi,
I am trying to include Infolinks ads in my website.
In order to show the ads ONLY in the post content within a thread and NOT in post header, navbar, footer, etc. I was told to add infolinks "javascript" code in SHOWTHREAD template and add <!--INFOLINKS_ON--> and <!--INFOLINKS_OFF--> tags in postbit / postbit_legacy templates around $posbit[message]
I am using vBulletin 4.2.1 and I don't see $postbit[message] in any of the postbit templates.
What is the equivalent of it?
postbit_legacy (Line #101)
{vb:raw post.message}
I hope it helps :)
induslady
11-25-2013, 04:36 PM
Hi tbworld,
Thank you for your response.
I tried wrapping it like this:
<!-INFOLINKS_ON->{vb:raw post.message}<!-INFOLINKS_OFF->
I tried in both postbit and postbit_legacy template. But it didn't work!!
The in-text ads do show-up in the navbits, footer, posthead, etc.
Do you think including those tags above need some other formatting?
Anyone implemented Infolinks?
If your site has info across the top of the post (like this site) you want to change postbit, if it's on the left you should change postbit_legacy.
Did you view the html source of the page after you added the changes? Check to see if the javascript is being included and if you see the <!–-INFOLINKS_ON–->.
induslady
11-25-2013, 07:19 PM
Hi Kh99,
Thank you for your response.
Like I said I tried adding in postbit template. Then did view source, but could find only the javascript included. Infolinks on / off isn't included.
Similarly, I then tried adding in postbit_legacy template (removed from postbit) and did view source. It's the same, only javascript is seen to be included.
I am not sure what you mean by "If your site has info across the top of the post (like this site)". Do you mean navbar, thread title/description and postbit head? If yes, I have those on the top of the site across the site.
tbworld
11-26-2013, 01:13 AM
I could not find 'Infolinks' JavaScript loaded on your forum page. Maybe you have it disabled at this point. PM me when you have it loaded and I will take a look at your page. I do not use 'Infolinks', nor do I have the instructions for it, but I am sure it works the way most of the advertisement packages work.
Nice site. :)
induslady
11-26-2013, 01:56 AM
Hi Tbworld,
I have the javascript of Infolinks included in showthread template. So if you go to a thread page and do view source you should be able to see it (all the way at the bottom).
Also, I have INFOLINKS_ON and INFOLINKS_OFF included in the postbit_legacy template. That I don't see in the view source!!
Attaching here a view source (txt file) of one of the thread pages from my site.
PS: Thank you for the compliments about my site :)
tbworld
11-26-2013, 01:08 PM
I reviewed your site again on the showthread page and noticed that the 'infolinks' are working with no JavaScript errors on the page.
induslady
11-26-2013, 05:17 PM
Yeah...it's working good. No issues there.
But my requirement is to control the display of ads ONLY within the post content.
Not in Navbits, posthead, footer of the page, etc. "INFOLINKS_ON" and "INFOLINKS_OFF" included in postbit / postbit_legacy aren't working. I need help with that.
tbworld
11-27-2013, 09:16 AM
Sorry, I didn't quite understand the problem you were having, but I understand now. :)
I know that it is not working for you around the '<vb:raw post.message>', but are the infolink comments getting parsed anywhere else correctly?
<!--INFOLINKS_OFF-->
<div>HTML that you do not want parsed by Infolinks</div>
<!--INFOLINKS_ON-->
induslady
12-02-2013, 03:48 PM
Hi Tbworld,
I tried using Infolinks comments around <div> </div> in postbit_legacy template, to avoid displaying infolinks ads in the posthead.
But it isn't working!!
What other options can I try?
nhawk
12-03-2013, 09:59 AM
Try this...
Go to ACP->Plugins & Products->Add New Plugin
Use these settings...
Product: vBulletin
Hook Location: postbit_display_complete
Title: Infolinks in posts
Execution Order: 5
Plugin PHP Code:
$post['message'] = "<!--INFOLINKS_ON-->" . $post['message'] . "<!--INFOLINKS_OFF-->";
Plugin is Active: Yes
See if that works for you.
induslady
12-03-2013, 07:10 PM
Appreciate your post, nhawk.
But it didn't work!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.