Convert Forum to Mail List

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

Re: Convert Forum to Mail List

Pedro
I think that it would be better if you erase the menu_edit_post macro.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
Pedro <Nabble> wrote
I think that it would be better if you erase the menu_edit_post macro.
Thanks Pedro that does it, but now I realise I want to make it conditional. I would like those in the Administrator's group to retain the ability to edit posts. Can you suggest the code to use, please. (I have the option "Edit _all" enabled so Administrators can edit any post.)
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

Mencey Melgar
Hi greg

In "menu_edit_post" at line 8:

 <else>
            <n.set_local_node.this_node/>
            <n.if.visitor.is_site_admin>
                <then>
                    NabbleDropdown.show('editPost<n.local_node.id/>');
                </then>
            </n.if.visitor.is_site_admin>
        </else>
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

Pedro
That's fine. Thanks Louk.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
Clearly, I'm not doing it right!

I assumed you meant I should delete the existing line 8 and replace it with the entire block you've posted - but that doesn't work (I get the usual "Saving... Please wait" message that hangs when you have made an error).

I also tried adding it after Line 8.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

Hugo <Nabble>
Maybe a simpler solution is to edit the "can_edit" macro:
<override_macro name="can_edit" requires="user" dot_parameter="node_attr">
    <n.is_site_admin/>
</macro>
I haven't tested it, but it should work. Please confirm that this works (if you ever try it).
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
In reply to this post by GregChapman
It gets worse!

I've now got the usual complete loss of all my customisations because of my error editing the macro. And this time I cannot find the usual "Delete this override" option.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

Hugo <Nabble>
I looked at your NAML code and fixed the problem. There were six overrides of the "menu_edit_post". I commented that code out and added my change:
<override_macro name="can_edit" requires="user" dot_parameter="node_attr">
    <n.is_site_admin/>
</override_macro>
(my previous post had an issue -- the closing tag should be </override_macro> instead of </macro>)

Please test the forum and let me know if it works as expected.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
It may be working - but I've still lost all my CSS customisations.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
I'm still seeing this message:

Error Found
An error was found in the NAML code of this application – Hide Details | Go to NAML Editor
macro 'menu_edit_post - custom_tweak:menu_edit_post' conflicts with 'menu_edit_post - nabble:dropdown.naml'
  in (custom_tweak:menu_edit_post:145) - <macro name="menu_edit_post" requires="node"> 
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

Hugo <Nabble>
I've fixed it, please try again. We have probably changed the NAML at the same, so this created inconsistent code. It should work now.
Reply | Threaded
Open this post in threaded view
|

Re: Convert Forum to Mail List

GregChapman
Thanks Hugo!

I think it is all working.

I did notice that this post:
http://npopuk-forum.986084.n3.nabble.com/Re-Forum-or-Mail-List-Archive-tp4022790p4022793.html
seemed to get through without stripping the list identifier but a further test seems to suggest that happened while the code was corrupt.

Will report further tomorrow. (It's late here!)
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
12