Jump to content
Sign in to follow this  
icatcher

iBlogPro 5 Vanilla Forums Theme issue with Google AdSense

Recommended Posts

icatcher    0
icatcher

Hi everyone I'm trying to implement the Vanilla Forum and found a bug I couldn't fix myself with the iBlogPro 5 Vanilla Forums Theme. I've implemented a Google AdSense Leaderboard Ad into the branding section of iBlogPro 5 / Pagelines itself and now with the Vanilla Theme activated, the Ad shows up twice but only on the forum pages. Here are as much information as possible, to support you finding the issue, so I or eveb the theme creator can fix it: a) My iBlogPro 5 Setup: - Pagelines v. 2.1.1 - iBlogPro v.5.1.1 - Vanilla Forum v.2.0.18.3 - Website without issue: icatcher.com - Vanilla Forum with issue: icatcher.com/forum B) My Google AdSense Implementation: I've changed the code in pagelines -> sections -> branding -> section.php like this:

[...] function section_template() { printf('
'); printf('
'); echo adrotate_group(1); printf('
'); pagelines_main_logo(); [...]
I've already tried to implement the Google AdSense code directly (without the AdRotate Plugin) and with the method described in your support forum (http://www.pagelines.com/forum/discussion/16343/header-questions-ad-placement-social-icons-move/p1) but the result is the same. Therefore I assume that there is something wrong with the Vanilla Forum Theme for iBlogPro 5 and not with the iBlogPro 5 Theme itself. Many thanks in advance for all your help!

Share this post


Link to post
Share on other sites
Rob    547
Rob
I am trying to look at your site via the link provided and I'm getting: "Fehler beim Aufbau einer Datenbankverbindung". Please fix the error and provide a working link for us to provide support.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
icatcher    0
icatcher
@rangelone: I tried to access both URLs from different computers, mobile devices and browsers, both links are working correctly, please try again.

Share this post


Link to post
Share on other sites
Simon    247
Simon
Heres the solution. 1) NEVER edit core framework files. 2) Open wp-content/plugins/pagelines-customize/functions.php add: [code]add_action( 'pagelines_before_branding', 'my_adsense_code' ); function my_adsense_code() { printf( '
%s
', adrotate_group(1) ); }[/code] 3) Open the pagelines vanilla theme folder and look for default.master.php look for [code] // Integration - PageLines Head - js echo plhead['js']; [/code] Replace with: [code] // Integration - PageLines Head - js preg_match( '#((<[s/]*scriptb[^>]*>)([^>]*)())#', $plhead['js'], $js ); echo implode( $js, "n" );[/code]

Share this post


Link to post
Share on other sites
icatcher    0
icatcher
@Simon: 3) indeed corrected the issue, but if I implement 2) and remove the changes I did in the core framework then the banner gets displayed twice on the website. Therefore I'm using 3) with my core framework change. If you can provide me with a solution on how to implement 2) without the banner appearing twice, I'll never touch the core framework again ;)

Share this post


Link to post
Share on other sites
Simon    247
Simon
2 and 3 are supposed to be used together, i tested with standard branding enabled.

Share this post


Link to post
Share on other sites
icatcher    0
icatcher
@Simon: I meant that for me 1+3 works but 2+3 doesn't work, when I use the pagelines customize plugin, then the banner appears twice (even though I removed the code I've changed in the core framework). This was also the reason why I used to modify the core files in the first place, because the customize plugin couldn't do the trick.

Share this post


Link to post
Share on other sites
Simon    247
Simon
The method with the action does work, pagelines-customize plugin has to be active. http://screencast.com/t/avbOj7Ntoop Thats with the action code in customize plugin, with it active and that regex code in the vanilla template.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×