test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • pixelzombie Friend
    #157761

    If your’e like me and want to add cryptic virtuemart URL’s to the MegaMenu that should not be indexed, you can follow this short tutorial on how to add a Parameter to enable rel=”nowfollow” to any menu item.

    Here we go :laugh:

    plugins/system/jat3/core/params/params.xml

    add the following parameter:


    <param name="mega_nofollow" type="radio" default="0" label="Set nofollow" description="Sets a rel=nofollow on the link">
    <option value="0">No</option>
    <option value="1">Yes</option>
    </param>

    plugins/system/jat3/core/menu/base.class.php

    1. Add this block arround line 343


    //Add nofollow
    $nofollow = "";
    $val = $tmp->megaparams->get('nofollow');
    if ($val == 1 ) {
    $nofollow = "rel="nofollow"";
    }

    2. Seek and replace the following lines (from top to bottom):

    Seek


    $data = '<a href="#" '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';

    replace with


    $data = '<a rel="nofollow" href="#" '.$active.' '.$id.' '.$title.' '.$nofollow.'>'.$txt.'</a>';

    Seek


    $data = '<a href="'.$tmp->url.'" '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';

    replace with


    $data = '<a href="'.$tmp->url.'" '.$active.' '.$id.' '.$title.' '.$nofollow.'>'.$txt.'</a>';

    Seek


    $data = '<a href="'.$tmp->url.'" target="_blank" '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';

    replace with


    $data = '<a href="'.$tmp->url.'" target="_blank" '.$active.' '.$id.' '.$title.' '.$nofollow.'>'.$txt.'</a>';

    Seek


    $data = '<a href="'.$link.'" onclick="window.open(this.href,'targetWindow',''.$attribs.'');return false;" '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';

    replace with


    $data = '<a href="'.$link.'" onclick="window.open(this.href,'targetWindow',''.$attribs.'');return false;" '.$active.' '.$id.' '.$title.''.$nofollow.'>'.$txt.'</a>';

    Seek


    $data = '<a '.$active.' '.$id.' '.$title.'>'.$txt.'</a>';

    replace with


    $data = '<a '.$active.' '.$id.' '.$title.' '.$nofollow.'>'.$txt.'</a>';

    Note: since this is a hack you have to apply it every time you update the t3 plugin. Or maybe the guys from joomlart turn this hack into a feature :p

    I hope I could help a little with this 😉

    Cheers

    pmetz Friend
    #384977

    Hi and thanks for this clear tutorial. I did from top to bottom and got Set Nofollow option in the Parameters (JA Extended).

    I went and selected no follow to all items i needed to have nofollow enabled but still when i do View Source from FF and search for nofollow, there is 0 results. Does it work as it is or there are some other adjustments that need to e done.
    Also, is there any other way to add nofollow to the mega menu links/items?

    Thanks

    pixelzombie Friend
    #387634

    Hey pmetz,

    the tutorial works as it is but the ja-t3 plugin changed in the meantime so there may be changes in the sourcecode that prevents the hack to work. I’ll have a look into this when I’ve got time to spare on this. Maybe you can provide your t3 plugin version and a link to your site?

    Cheers

    pixelzombie Friend
    #464588

    Hey shimiread,

    unfortunately I’ve got barely time writing up some tutorials, doing a video is not possible at the moment. I’m glad you’re happy with the html version 😉

    Cheers

    Frank

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  pixelzombie 12 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum