Login  Register

Re: Can Permalink be disabled or winked out?

Posted by harkawy on Dec 30, 2016; 10:12pm
URL: https://support.nabble.com/Can-Permalink-be-disabled-or-winked-out-tp7597600p7597620.html

Greg,

I recreated the site and using the coding provided in the Nabble Support by Pedro (Nabble) at
http://support.nabble.com/Hide-quot-Edit-Page-quot-td7589661.html#a7589794
His code is...

Let's try another approach.
1- Delete your js_page override.
2 - Delete the hidding_powered_and_naml macro.
3 - Add this two overrides to your code:
<override_macro name="macro_viewer_page_link">
    <a style="display:none;" href="[n.macro_viewer_page_path/]" rel="nofollow">Edit this page
    <n.visible_for_admins selector="td.footer-right a" />
</override_macro>
<override_macro name="nabble_homepage_link" dot_parameter="text" parameters="class">
    <a href="[n.nabble_homepage/]" class="[n.class/]" target="_top"><n.default. to="Nabble"><n.text/></n.default.>
    <script> $(document).ready(function() { $("td.footer-left").css("display","none"); }); </script></override_macro>

The above override removes the Nabble wording on the lower left side and permits only admins to see the 'Edit this page'.

I saved the code and opened a different tab so that I still had access to the code page.
I then opened my website which had the embedded code to the forum to see if everything looked right.
It did.

I again clicked on the Edit this page button.
I clicked on the tool button and chose "Search macros"
In the search field I entered "Header" and the "Macro source contains" and
clicked on the Search button.
When the listing came up, I chose the js_header_functions.
When the window opened I clicked on the "Edit this override"
I scrolled down to line 58 and at the beginning of the code "Nabble.siteHeader = function()",  I added a "<" "!" "--"  (
no spaces or quotes)
I then scrolled down to line 75 and added a --> behind the " };"
I then saved the code and once again went to my site to display the forum.

The "Refresh Permalink Login Register" links are gone.
But.... We would really like to see the Login & Register links.  We don't need the Refresh or the Permalink links.

So, how can we do this..... safely....