[Liam W.] Post Macros

[Liam W.] Post Macros 5.2.2 Fix 8

No permission to download
In fact, this is because rebluid is not finished, it is probably in line with what has been said:
I think this might be depending on the amount of groups or users inside those groups. My best guess would be that the rebuild upon saving takes a longer time the more users you have and hence XF queues this as a rebuild job?
 
Hello,

As I said, if the js in question is loaded, it means that the editor is loaded, but the editor doesn't come from me but from xenforo. so I can't do anything and it won't change anything at all lol.

Regards, CRUEL-MODZ

You can have permission to use the editor, but not permission to use a macro.

Unless I'm mistaken, the JS for macro's is loaded even if you do not have permission to use them.

You could carry out a permission check and not load the JS if there is no permission.
 
You can have permission to use the editor, but not permission to use a macro.

Unless I'm mistaken, the JS for macro's is loaded even if you do not have permission to use them.

You could carry out a permission check and not load the JS if there is no permission.
Hello,

As I said before, if the JS loads it's who has to load, for the simple reason that it loads with the editor.
If I delete this JS file it could cause a problem, then it's up to you to change it if it pleases you ;)

Edit this template modification : editor/liamw_postmacros_editor

And replace the code in replace with : (http://prntscr.com/wldvfq)
HTML:
<xf:if is="$xf.visitor.hasPermission('liamw_postmacros', 'use')">
    <xf:js src="liamw/postmacros/postmacros.js" addon="LiamW/PostMacros"/>
    <!--[LiamW/PostMacros:post_macros_js:extend]-->
    <script class="js-lwPostMacros-macros" type="application/json">
        {$postMacros|json|raw}
    </script>
</xf:if>

Regards, CRUEL-MODZ
 
Hello,

As I said before, if the JS loads it's who has to load, for the simple reason that it loads with the editor.
If I delete this JS file it could cause a problem, then it's up to you to change it if it pleases you ;)

Edit this template modification : editor/liamw_postmacros_editor

And replace the code in replace with : (http://prntscr.com/wldvfq)
HTML:
<xf:if is="$xf.visitor.hasPermission('liamw_postmacros', 'use')">
    <xf:js src="liamw/postmacros/postmacros.js" addon="LiamW/PostMacros"/>
    <!--[LiamW/PostMacros:post_macros_js:extend]-->
    <script class="js-lwPostMacros-macros" type="application/json">
        {$postMacros|json|raw}
    </script>
</xf:if>

Regards, CRUEL-MODZ
I don't understand how it could create a problem. If the user doesn't have the permission to use a macro, they don't need the macro JS. This makes the addon more efficient.
 
Hello,

Because it is not a JS file that will make your site take longer to load.

And obviously it's not only my addon that does this, the proof is on your site.

It's not an argument for or against, it's just that if you want to do it you do it, it's not a JS file that's going to be a problem to load.

Regards, CRUEL-MODZ
 
Because it is not a JS file that will make your site take longer to load.
What is the technique you're using so the JS file gets sent to the users browser without it taking longer to load? Even if it is "part" of the editors JS, it will increase the file size and thus take longer to load, wouldn't it?

And obviously it's not only my addon that does this, the proof is on your site.
That's whataboutism and not part of the initial request. The initial request is about improving site performance by reducing the loaded JS file size of your add-on, not of other add-ons.

I'm not trying to place blame or start some kind of fight. It's just that loading times can be improved for your add-on by excluding the required JS files (or file additions) if it's not gonna be used by the user, that is visiting the site or loading the editor, anyway. Even if this improvement is negligible with the JS file only being 4 KB in size.

indeed, this will be fixed in the next update.
Still looking forward to the fixed version, though :) Thanks for your work and efforts in keeping this add-on maintained!
 
Last edited:
Still looking forward to the fixed version, though :) Thanks for your work and efforts in keeping this add-on maintained!
I'm taking it out today, I've been waiting to solve this problem:
I regularly open the Rebuild Caches page to find that the Global Macro Enrolment process has not completed.
I see a message saying that some processes need completing and when I click to continue I see the message saying that it's processing Global Macro Enrolment.
Where is this process being run from? The addon (5.2.0 fix 1) is currently disabled and I see nothing relevant in the Cron jobs page.
But obviously I don't understand where this problem can come from.
 
Hello,

Because it is not a JS file that will make your site take longer to load.

And obviously it's not only my addon that does this, the proof is on your site.

It's not an argument for or against, it's just that if you want to do it you do it, it's not a JS file that's going to be a problem to load.

Regards, CRUEL-MODZ
Other addon authors should be more conscientious of efficiency too. "Others do it so I can too" isn't a great attitude to have.

4KB isn't a massive saving, no. But 4KB loaded 1,000,000 times a month is a significant saving.

If other addon authors also applied permission checks before including files, the savings could be massive again.
 
@XenSoluce I'm also having the same issue as @Faust where as I'm having difficulty getting the macro button added to the text editor toolbar.

I've given admin permissions to use macros, I've enrolled into the global macro and have added the "insert macro" button into the large, medium, and small toolbars, however the button never shows up in the preview nor is it there when I go over to the forum and try to use the macro the button - is not there.
 
Last edited:
Hello,

@XenSoluce I'm also having the same issue as @Faust where as I'm having difficulty getting the macro button added to the text editor toolbar.

I've given admin permissions to use macros, I've enrolled into the global macro and have added the "insert macro" button into the large, medium, and small toolbars, however the button never shows up in the preview nor is it there when I go over to the forum and try to use the macro the button - is not there.

You need to check this: https://prnt.sc/wnitr8 in Node/Forum

Regards, CRUEL-MODZ
 
Hello,



You need to check this: https://prnt.sc/wnitr8 in Node/Forum

Regards, CRUEL-MODZ
I just installed this add-on today and have spot checked several of my forums and they all have that option enabled already - so I'm assuming that's a default setting that come enabled (as it was in my case).

At any rate, the macro button doesn't show in the preview nor the actual forum text editor:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
I just installed this add-on today and have spot checked several of my forums and they all have that option enabled already - so I'm assuming that's a default setting that come enabled (as it was in my case).

At any rate, the macro button doesn't show in the preview nor the actual forum text editor:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
Ok I thinks to know why, it misses the js, you can take the JS which it finds in the update: 5.2.0 Fix 1 I will make an update to put back the JS sorry

PS : I'll probably update it this weekend.
 
Ok I thinks to know why, it misses the js, you can take the JS which it finds in the update: 5.2.0 Fix 1 I will make an update to put back the JS sorry

PS : I'll probably update it this weekend.

I don't have that fix. Where I can get it ?
 
Top Bottom