Signatures Permission Group

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

Re: Signatures Permission Group

Harvey
If it's working like that it is right.

I couldn't tell if it was working either - I wasn't sure it if was a cache issue.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Harvey
I just tried to test it and I removed someone from members and the signature went away and then I added it back but the signature didn't come back.

The caching thing makes it hard to really know anything.

Please save your code somewhere.

If I see problems I may delete the override but this is a feature I really want.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Pedro
In order to avoid cache problems, I've tested this feature in this way:
1- Created  a signature in my user with link.
2 - Posted in your forum and no signatures.
3 - Put me in the Members group and replied the previous post ( to post again is a good way to refresh the cache ) and the simple signature was showed.
4 - Put me also in the Signature group and replied the previous post, and my signature was showed with its link.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Harvey

I do think it is working correctly thank you!

(via mobile)

On Dec 12, 2012 7:53 AM, "Pedro &lt;Nabble&gt; [via Nabble Support]" <[hidden email]> wrote:
In order to avoid cache problems, I've tested this feature in this way:
1- Created  a signature in my user with link.
2 - Posted in your forum and no signatures.
3 - Put me in the Members group and replied the previous post ( to post again is a good way to refresh the cache ) and the simple signature was showed.
4 - Put me also in the Signature group and replied the previous post, and my signature was showed with its link.


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/Signatures-Permission-Group-tp7582239p7582312.html
To unsubscribe from Signatures Permission Group, click here.
NAML
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Harvey
LOL just realized a flaw in my idea.  If consciously left myself OUT of the members group. But now I have no signature.  Anyway to give me a signature, without putting me into the members group?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Mencey Melgar
Hi Harvey. I think, I think it will work if you modify your message_with_signature like this:

<override_macro name="message_with_signature" requires="node">  
    <n.node_message_as_html />  
    <n.if.owner.is_in_group group="Members" >  
        <then>    
            <n.if.both condition1="[n.owner.has_signature/]" condition2="[n.owner.is_active/]">  
                <then>              
                    <div class="signature weak-color">  
                        <n.owner.signature_as_html/>  
                    </div>  
                </then>  
            </n.if.both>  
        </then>
        <else>
            <n.if.owner.is_in_group group="Administrators" >    
                <then>    
            <n.if.both condition1="[n.owner.has_signature/]" condition2="[n.owner.is_active/]">  
                <then>              
                    <div class="signature weak-color">  
                        <n.owner.signature_as_html/>  
                    </div>  
                </then>  
            </n.if.both>
                </then>
                </n.if.owner.is_in_group>
            </else>
    </n.if.owner.is_in_group>  
</override_macro>
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Harvey
Would it be possible just to change line 3 in the original macro to say:

Members, Administrators

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

Re: Signatures Permission Group

Mencey Melgar
I tried with
<n.if.both condition1="[n.owner.is_in_group group='Members'/]" condition2="[n.owner.is_in_group group='Members'/]" > 
but I think it doesn't work
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Harvey
It would have to be an "OR" not a both.

I think it may be possible?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Signatures Permission Group

Pedro
In reply to this post by Harvey
You can be in many groups in the same time. I think the best option for you is get in the members group and Administrators.
Please, let me know if you really want me to add this admin condition in your code, it wouldn't be an issue.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Harvey
It's only me.  I just want a signature, but don't want to be in member group.

On Mon, Dec 17, 2012 at 7:22 AM, Pedro <Nabble> [via Nabble Support]
<[hidden email]> wrote:

> If there aren't many names to be changed, I can do it for you without any
> naml improvements. Is it possible for you to give me the user and the new
> name do you want for him?
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://support.nabble.com/Name-changing-tp7582163p7582384.html
> To unsubscribe from Name changing, click here.
> NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: 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: Name changing

Pedro
Do you mind to be also in the Signature group?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Harvey
Signature group is fine is that all it takes?

On Mon, Dec 17, 2012 at 7:44 AM, Pedro <Nabble> [via Nabble Support]
<[hidden email]> wrote:
> Do you mind to be also in the Signature group?
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://support.nabble.com/Signatures-Permission-Group-tp7582239p7582387.html
> To unsubscribe from Signatures Permission Group, click here.
> NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: 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: Signatures

Harvey
I added myself in to the Signatures group but that doesn't seem to be doing it. I'm assuming you need to make some kind of change.  Sorry for posting in the wrong thread.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Pedro
In reply to this post by Harvey
I've changed your macro. Now is like this:
<override_macro name="message_with_signature" requires="node">  
    <n.node_message_as_html />  
    <n.if>   
        <condition>
            <n.either>
                <condition1.owner.is_in_group group="Members" />  
                <condition2.owner.is_site_admin/>
            </n.either>
        </condition>
        <then>    
            <n.if.both condition1="[n.owner.has_signature/]" condition2="[n.owner.is_active/]">  
                <then>              
                    <div class="signature weak-color">  
                        <n.owner.signature_as_html/>  
                    </div>  
                </then>  
            </n.if.both>  
        </then>              
    </n.if>  
</override_macro>
It's a mix of yours and Louk's suggestions.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Harvey
Thank you.

On Mon, Dec 17, 2012 at 9:35 AM, Pedro <Nabble> [via Nabble Support]
<[hidden email]> wrote:

> I've changed your macro. Now is like this:
>
> <override_macro name="message_with_signature" requires="node">
>     <n.node_message_as_html />
>     <n.if>
>         <condition>
>             <n.either>
>                 <condition1.owner.is_in_group group="Members" />
>                 <condition2.owner.is_site_admin/>
>             </n.either>
>         </condition>
>         <then>
>             <n.if.both condition1="[n.owner.has_signature/]"
> condition2="[n.owner.is_active/]">
>                 <then>
>                     <div class="signature weak-color">
>                         <n.owner.signature_as_html/>
>                     </div>
>                 </then>
>             </n.if.both>
>         </then>
>     </n.if>
> </override_macro>
>
> It's a mix of yours and Louk's suggestions.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://support.nabble.com/Signatures-Permission-Group-tp7582239p7582395.html
> To unsubscribe from Signatures Permission Group, click here.
> NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: 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: Name changing

Harvey
I'd like to have two levels of signature permission

 By default no signature

Level one signature allowed

Level 2 linking signature

 Right now everyone gets a signature on those with permission can have working links.

Let me know your ideas.  Thank you.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Pedro
I think we have done something like it. What your "Signature" group does?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Harvey
Currently everyone can have a signature. Those in the SIGNATURE group can have a linked signature.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: Name changing

Pedro
I created two groups: signature and signatureHtml. The first is for those who can have a simple signature, the second is for those who can use html in their signatures. Everybody in the second group should also be in the first one.
Then, override/merge these codes to your macros:
Here, we are removing the "Edit signature" option for those who are not in signature group:
<override_macro name="profile_options">
    <n.put_in_head.>
        <style type="text/css">
            table.profile {
                border-collapse:collapse;
                width:100%;
                margin-top:.5em;
            }
            table.profile td {
                padding:.7em .3em;
            }
            table.profile td.title-row {
                background: transparent;
                padding:.2em .4em;
                border-bottom-width:2px;
                border-bottom-style:solid;
                font-weight:bold;
            }
        </style>
    </n.put_in_head.>
    <table class="profile">
        <n.profile_table_header.>
            <t>Account Settings</t>
        </n.profile_table_header.>

        <n.profile_option>
            <link><a href="[n.visitor.edit_profile_path/]"><t>Edit Personal Information</t></a></link>
            <hint><t>Change your registered email address, password, and your user name.</t></hint>
        </n.profile_option>

        <n.if.visitor.is_in_group group="signature" >
            <then>
                <n.profile_option>
                    <link><a href="[n.visitor.edit_signature_path/]"><t>Edit Your Signature</t></a></link>
                    <hint><t>Change the signature text that is displayed at the bottom of your posts.</t></hint>
                </n.profile_option>
            </then>
        </n.if.visitor.is_in_group>

        <n.profile_option>
            <link><a href="[n.visitor.change_avatar_path/]"><t>Change Your Picture</t></a></link>
            <hint><t>Change or remove your avatar image.</t></hint>
        </n.profile_option>

        <n.profile_option>
            <link><a href="[n.visitor.advanced_settings_path/]"><t>Advanced Settings</t></a></link>
            <hint><t>Change viewing preferences and other settings.</t></hint>
        </n.profile_option>

        <n.profile_option>
            <link><a href="[n.visitor.remove_account_path/]"><t>Remove Your Account</t></a></link>
            <hint><t>Remove your account and all your posts from <t.subject><n.root_node.subject/></t.subject>.</t></hint>
        </n.profile_option>
    </table>
</override_macro>

Here, we are removing the "Signature in Html" check box from the Edit signature page for those who are not in signatureHtml group:
<override_macro name="edit_signature" requires="servlet">
    <n.visitor.as_user_page.>
        <n.if.not.page_user.is_registered>
            <then>
                <n.login.><t>You must login to view this page.</t></n.login.>
            </then>
        </n.if.not.page_user.is_registered>
        <n.if.is_submitted_form>
            <then>
                <n.catch_exception. id="save-signature">
                    <n.edit_page_user.>
                        <n.set_signature signature="[n.signature_field.value/]" is_html="[n.html_format_field.value/]"/>
                        <n.save_user/>
                    </n.edit_page_user.>
                    <n.redirect_to.page_user.user_profile_path/>
                </n.catch_exception.>
            </then>
            <else.if.page_user.has_signature>
                <then>
                    <n.html_format_field.set_value value="[n.page_user.signature.is_html_format/]" />
                    <n.signature_field.set_value value="[n.page_user.signature.as_editable/]" />
                </then>
            </else.if.page_user.has_signature>
        </n.if.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Edit Signature</t></n.title.>
            </head>
            <body>
                <h1><t>Edit Signature</t></h1>

                <n.show_edit_signature_error/>

                <n.if.page_user.has_signature>
                    <then.show_current_signature/>
                </n.if.page_user.has_signature>

                <n.form.>
                    
                    <n.if.page_user.is_in_group group="signatureHtml" >
                        <then>
                            <n.html_format_field.checkbox />
                            <label for="[n.html_format_field.name/]"><t>Signature is in HTML format</t></label><br/>
                        </then>
                    </n.if.page_user.is_in_group>                    
   
                    <n.signature_field.textarea wrap="SOFT" tabindex="2" style="width:35em;height:7em;" />

                    <div style="margin-top:1.4em">
                        <input type="submit" value="[t]Save Signature[/t]" />
                        <t>or</t> <a href="[n.page_user.user_profile_path/]"><t>Cancel</t></a>
                    </div>
                </n.form.>
            </body>
        </n.html>
    </n.visitor.as_user_page.>
</override_macro>

Remember to backup your naml code always before edit something. Create the two groups adding users to them. You can name them as you want.
My test forum.
123