[Liam W.] Post Macros

[Liam W.] Post Macros 5.2.1 Fix 4

No permission to download
@Liam W
Instaled latest beta version, but I can not see icon for post macros in post editor (I manually add icon via BBcode button manager in ACP.




In chrome console I can see this:

core-compiled.js?_v=0f1c7722:76 Uncaught Error: Method _afterSubmit already exists on object. Aliases must be unique.
    at Object.XF.activate.XF.extend (core-compiled.js?_v=0f1c7722:76)
    at b.extend (core-compiled.js?_v=0f1c7722:88)
    at Object.extend (core-compiled.js?_v=0f1c7722:144)
    at postmacros.min.js?_v=0f1c7722:8
    at postmacros.min.js?_v=0f1c7722:8
XF.activate.XF.extend @ core-compiled.js?_v=0f1c7722:76
extend @ core-compiled.js?_v=0f1c7722:88
extend @ core-compiled.js?_v=0f1c7722:144
(anonymous) @ postmacros.min.js?_v=0f1c7722:8
(anonymous) @ postmacros.min.js?_v=0f1c7722:8

Yeah, that makes sense. The issue is that both add-ons are extending the quick-reply element handler, mapping the parent afterSubmit method to the same alias (_afterSubmit).

I've fixed it in beta 3 by prefixing the alias with the add-on ID.

(@Xon - you may want to look into doing the same :))

(To be fair, the example given in the HYS for 2.0 does show the same aliasing scheme.)
is it already possible to use placeholder "type" like:
  • upload images/files
  • multiple choice menu
  • dropdown menu
Liam W updated Post Macros with a new update entry:
Checked the upgrade, now appears to work partly. It doesn't auto-close and auto-stick threads anymore (except when it's configured to do so), but it also does not assign the correct prefix anymore.

Also I'd like to suggest adding the ability to sort global macros.

About not assigning the correct prefix: It seems to have lost the configured prefix altogether, so I had to re-do them. Might be related to macros I edited before the upgrade or with the latest version... who knows. Now it works :D
Last edited:
Found other errors preventing me from opening the inline post editing (clicking "edit" on a post in a thread) when inside a node where using macros is not allowed:
postmacros.min.js?_v=e0d16616:3 Uncaught TypeError: LiamW.PostMacros.macroInserter.macros.forEach is not a function

Also the Chrome error console always shows upon opening thread (and even when in forum list):
GET https://domain.com/js/liamw/postmacros/second.min.js?_v=e0d16616 net::ERR_ABORTED 404
Would a macro be able to move a topic into a predetermined forum I the future? (That's the only feature preventing me from buying this add-on!)
Would a macro be able to move a topic into a predetermined forum I the future? (That's the only feature preventing me from buying this add-on!)

That's the intention of the planned 'Moderation macros' feature, which I was planning to add to this version, but had to postpone due to personal reasons.

I intend to add it in for the next second point release, but I can't give any estimates as to when that'll be released :)

Just to be clear before buying, with this add-on I'll be able to insert predefined text? If so, can some macros be limited to certain usergroups (permissions)?
Top Bottom