Results 1 to 6 of 6

vbSEO removing important comments

This is a discussion on vbSEO removing important comments within the Bug Reporting forums, part of the vBSEO SEO Plugin category; Hi, vbSEO correctly removes these comments : PHP Code: <!--  google_ad_section_start  -->  Actually, these comments are used by Google Adsense ...

  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    67
    Liked
    0 times

    vbSEO removing important comments

    Hi,

    vbSEO correctly removes these comments :

    PHP Code:
    <!-- google_ad_section_start --> 
    Actually, these comments are used by Google Adsense in order to better target adsense ads, so they shouldn't be removed.

    Is there a way to keep these comments while still compressing the output?

  2. #2
    Member
    Join Date
    Aug 2005
    Posts
    67
    Liked
    0 times
    Never mind, I found a workaroud...

  3. #3
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,847
    Liked
    32 times
    Blog Entries
    9
    @SEO Report:

    What was the workaround?

  4. #4
    Member
    Join Date
    Aug 2005
    Posts
    67
    Liked
    0 times
    Instead of

    PHP Code:
    $output make_crawlable($output); 
    I added the following two lines (note the ! char removed then restored):

    PHP Code:
    $output str_replace("<!-- google_ad_section_""<-- google_ad_section_"$output);
    $output make_crawlable($output);
    $output str_replace("<-- google_ad_section_""<!-- google_ad_section_"$output); 
    I could also replace all google comments in templates with

    PHP Code:
    <-- google_ad_section_ 
    (without the ! char)

    then add only one line after the make_crawlable() function:

    PHP Code:
    $output make_crawlable($output);
    $output str_replace("<-- google_ad_section_""<!-- google_ad_section_"$output); 

  5. #5
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,847
    Liked
    32 times
    Blog Entries
    9
    Nice workaround.

    Good idea. You would definitely get a small performance saving by editing the template and doing only 1 string replacement instead of the 2.

  6. #6
    Senior Member
    Real Name
    Joseph Ward
    Join Date
    Jun 2005
    Posts
    23,847
    Liked
    32 times
    Blog Entries
    9
    @SEO Report:

    Since many forums will be running Adsense, we updated the latest version to skip the removal of these comments.

    /* NOTE: This issue has been resolved in vBSEO 2.0 Gold. */

Similar Threads

  1. vBSEO 2.4.0 Released - Includes Google AdSense Targeting Feature!
    By Juan Muriente in forum vBSEO Announcements
    Replies: 74
    Last Post: 05-20-2006, 10:29 PM
  2. vBSEO 2.0 RC7 Released
    By Juan Muriente in forum vBSEO Announcements
    Replies: 17
    Last Post: 09-09-2005, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •