Results 1 to 4 of 4

Need help with comment tags

This is a discussion on Need help with comment tags within the Troubleshooting forums, part of the vBSEO SEO Plugin category; I have vBSEO HTML cleanup turn on. There are several places in the vb templates where I've put HTML comment ...

  1. #1
    Junior Member Array
    Real Name
    Ken Payne
    Join Date
    Jul 2006
    Posts
    23
    Liked
    0 times

    Need help with comment tags

    I have vBSEO HTML cleanup turn on. There are several places in the vb templates where I've put HTML comment tags around bloated default VB template items, so vBSEO can strip these out of the final HTML output. So I can't turn off HTML cleanup.

    Here's the problem, I've recently installed Infolinks for thread display and cms articles. Its turning signature items, breadcrumbs, etc. into infolink links. Infolinks has comment tags similar to Adsense:

    <!--INFOLINKS_ON-->
    <!--INFOLINKS_OFF-->

    I put one before and one after the post content in VB's template. Same thing for CMS article content. vBSEO's HTML cleanup strips these out. I tried using VB's replacement variables to accomplish this, by changing:

    <!--INFOLINKS_ON--> to <INFOLINKS_ON>
    and
    <!--INFOLINKS_OFF--> to <INFOLINKS_ON>

    and then setting replacement variables to change them back in the final output. The problem is the vBSEO HTML clean appears to take place after replacement variables, so they are still stripped out.

    How do I accomplish what I need to do?

    Thanks in advance.

    Also, I need to change my user id. I haven't been associated with the site named in my user id for several years.

  2. #2
    vBSEO Staff Array Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,859
    Liked
    567 times
    Blog Entries
    2
    Hi Ken,

    Some time ago, a customer had a similar issue. Although I haven't tested this yet, you can try to modify vbseo/includes/functions_vbseo.php file:

    Find:

    PHP Code:
    $newtext preg_replace(
    array(  
    '#(<pre[^>]*?>)(.*?)(</pre>)#eis'
    Add above:

    PHP Code:
    preg_match_all('#(<!--INFOLINKS_ON-->.*?<!--INFOLINKS_OFF-->)#is'$newtext$exclmPREG_SET_ORDER);
    foreach(
    $exclm as $xi=>$xc)$newtext str_replace($xc[1], '[clean_excl'.$xi.']'$newtext); 
    Find:

    PHP Code:
    "\n"
    ),
    $newtext); 
    Add below:

    PHP Code:
    foreach($exclm as $xi=>$xc)$newtext str_replace('[clean_excl'.$xi.']'$xc[1], $newtext); 
    Please let us know how it goes.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  3. #3
    Junior Member Array
    Real Name
    Ken Payne
    Join Date
    Jul 2006
    Posts
    23
    Liked
    0 times
    I found a cleaner/quick way, lol.

    Installed mod_pagespeed. Turned off vbseo's html cleanup and turned on mod_pagespeed's html cleanup. Then added adsense and infolink comment tag exclusions to mod_pagespeed. I posted this here so others might find it helpful if they run into the same sort of issue. I try to avoid modifying php code when I can... I'm proficient with php but I hate going back and redoing modifications when a new version of vb, a plug in or tool like vbseo has an upgrade.

    About the user name change, should I put in a support ticket for that?

  4. #4
    vBSEO Staff Array Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,859
    Liked
    567 times
    Blog Entries
    2
    Awesome, Ken!

    Thank you for sharing your feedback!

    Quote Originally Posted by ford-trucks.com View Post
    About the user name change, should I put in a support ticket for that?
    Sure.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


Similar Threads

  1. My comment for VBSEo
    By hg_snake in forum Off-Topic & Chit Chat
    Replies: 5
    Last Post: 11-15-2010, 05:33 AM
  2. Comment activer les H1 ?
    By kameleon62123 in forum Français
    Replies: 2
    Last Post: 07-27-2007, 02:40 AM
  3. Please comment
    By dodjer420 in forum Critique Please
    Replies: 2
    Last Post: 03-05-2007, 10:06 PM

Posting Permissions

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