• Resolved cybeardjm

    (@didierjm)


    Hi,

    Just updated to the latest version, and enjoyed seeing the new shortcodes (Template Tags), as it would allow me to fully customize the output (theoritically).

    In the Settings, I use the “Custom” post content and “WordPress Post-Format” for the Activity-Object-Type (tried with the “Note (default)” and result’s the same).

    <p>🎶</img>🎶</img> <strong>[ap_title]</strong></p>
    
    <p>🔗</img> [ap_permalink type="URL"]?mtm_campaign=TrackingMSTDN&mtm_kwd=DirectAMF&mtm_source=MastodonAP</p>
    
    📨</img> [ap_excerpt]
    
    <p>#️⃣</img> [ap_hashcats] - [ap_hashtags]</p>
    
    [ap_image]

    When publishing a new post, the only one working is ap_image. All others don’t render their supposed content, but the emojis and Matomo data appear well.

    Tried to empty the site’s cache, tested twice… same result…

    What am I missing?

    Sincerely

    DJM

    PS: the /img that appear in the code section above are generated by this form on ww.wp.xz.cn, and are not in my original code…

    • This topic was modified 3 years, 3 months ago by cybeardjm.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Matthias Pfefferle

    (@pfefferle)

    the first thing: you have to write “URL” lowercase: [ap_permalink type="url"]!

    do you have a link, where I can check the output?

    Thread Starter cybeardjm

    (@didierjm)

    Hi Matthias, link to?

    If you want to check via Mastodon, it’s cybeardjm [@] amf.didiermary.fr or here https://amf.didiermary.fr/wp-json/activitypub/1.0/users/1/outbox

    Sincerely

    DJM

    Plugin Author Matthias Pfefferle

    (@pfefferle)

    Fixed in 0.16.1! I am sorry for the hassle!

    Thread Starter cybeardjm

    (@didierjm)

    Thx Matthias, did more tests and it works as expected.

    One last remark: I tried both types for [ap_permalink] with my added parameters (?mtm_campaign=…)
    url: it’s fine, but not a clickable URL
    html: the permalink is clickable, but the parameters are outside the link, as text.

    For comparison, I use another plugin to send updated posts to Mastodon (“Mastodon Autopost“) and the customized message handles both the permalink and the parameters in the resulting toot as one full URL.

    [permalink]?mtm_campaign=TrackingMSTDN&mtm_kwd=DirectAMF&mtm_source=Mastodon

    Is there a way to fix this?
    I tried to add more HMTL (a, /a) besides p, strong… But it seems it is sanitized when the settings are saved.

    Sincerely
    DJM

    Thread Starter cybeardjm

    (@didierjm)

    Thx for the latest update!

    Sincerely
    DJM

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Shortcodes empty when post published’ is closed to new replies.