follow / no follow links

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

follow / no follow links

Harvey
Is there a simple way for me to make specific links that I (alone) post do follow links?

I believe that by default all links posted in Nabble forums are no follow (is this correct?)
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Pedro
Harvey44 wrote
I believe that by default all links posted in Nabble forums are no follow (is this correct?)
Yes, they are "no follow" by default.
Harvey44 wrote
Is there a simple way for me to make specific links that I (alone) post do follow links?
We can make all links that an user group post to be "follow".
Edit "node_message_as_html" macro, adding the line 12. Here we are saving the author of the message:
<override_macro name="node_message_as_html" requires="node">
    <n.if.is_post>
        <then>
            <n.harvey_post_block.>
                <n.global_set_var name="harvey_post_author" value="[n.owner/]" />
                <n.regex_replace_all. pattern="[n.trim_regex/]" replacement="[n.lt/]br/[n.gt/]">
                    <n.node_message_block.message.message_as_html />
                </n.regex_replace_all.>
            </n.harvey_post_block.>
        </then>
        <else>
            <n.global_set_var name="harvey_post_author" value="[n.owner/]" /> 
            <n.node_message_block.message.message_as_html />
        </else>
    </n.if.is_post>
</override_macro> 
Create a user group called, for example, "follow" and add yourself, or the user that can post "follow" links, in this group.
Then, edit "process_message_html" macro. Here you have to check if the author of the message is not in the "follow" group, so we will add the "no follow" attribute in these cases:
<override_macro name="process_message_html" requires="html_list">
    <n.process_raw_tags/>
    <n.process_embed regex="[n.embed_regex/]" />
    <n.process_file_tags/>
    <n.apply_message_security/>
    <n.process_quotes wrote="[t][n.author/] wrote[/t]"/>
    <n.process_email/>
    <n.set_target_to_top/>
    <n.set_local_user.global_var name="harvey_post_author" />
    <n.if.not.local_user.is_in_group group="follow">
        <then.add_nofollow/>
    </n.if.not.local_user.is_in_group>    
    <n.process_smilies/>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
That is pretty cool, but I only want to post maybe 20 links a year that are follow, so I'd spend a lot of time adding rel="nofollow" to all my links.

I want my signature to have follow links and a few others.

Can we create a follow class that only I can use?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Pedro
What do you think of create another user, for example "Harvey2", and add only this user to the "follow" group? So, when you ewant to post a "follow" link you would use Harvey2.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
I don't think that would work.  I'm Harvey!  :)

My forum members would not understand, and the last thing I want to do is get into a discussion of follow/nofollow links. That has to be behind the scenes.

On Mon, Jun 25, 2012 at 9:18 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
What do you think of create another user, for example "Harvey2", and add only this user to the "follow" group? So, when you ewant to post a "follow" link you would use Harvey2.


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/follow-no-follow-links-tp7580477p7580493.html
To unsubscribe from follow / no follow links, click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: www.NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Pedro
We are going to think in a better solution.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
OK thanks.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Hugo <Nabble>
Harvey, I made this change for you. Now you should be able to post rel="follow" links like this:
<a href="..." rel="follow">...</a>
The rel attribute should be preserved. Please note:
1) This only works on your forum (we can copy the NAML to the mag/dir if you want);
2) Only admins can do that (links from other users will always be nofollow)

Please try that and let me know if you see issues.
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
That sounds great, I will test asap!  Thx

On Thu, Jun 28, 2012 at 3:25 PM, Hugo <Nabble> [via Nabble Support] <[hidden email]> wrote:
Harvey, I made this change for you. Now you should be able to post rel="follow" links like this:
<a href="..." rel="follow">...</a>
The rel attribute should be preserved. Please note:
1) This only works on your forum (we can copy the NAML to the mag/dir if you want);
2) Only admins can do that (links from other users will always be nofollow)

Please try that and let me know if you see issues.
Official Nabble Administrator - we never ask for passwords.



If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/follow-no-follow-links-tp7580477p7580537.html
To unsubscribe from follow / no follow links, click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: www.NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
That seems to work quite nicely.  I'd like to peek at the code if you can name the macro for me.

Thank you!
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Hugo <Nabble>
The main macro is the "process_message_html" (see the accept_rel_follow attribute in the add_nofollow command). But to make it work, we also changed the "node_message_as_html" macro in order to save the post author in a variable.
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Harvey
Do you think you could make this change in my other apps?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: follow / no follow links

Hugo <Nabble>
I changed the NAML code of your magazine and directory to also allow rel=follow attributes for admins. You can test it and let us know if you have issues.