Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Parsing Shortcodes in Links
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 16, 2015 - 1:46 pm

That title may sound a bit vague, but it's rather specific, and I wonder if anyone else might benefit from fixing this. I'm happy to consider this a rather low priority, but I just wanted to bring it up and see if there's any way I might be able to address the issue. Let me explain...

We run a WP multisite network and use an Anti-Splog plugin that changes the signup url every 24 hours to thwart spambot registrations. Anywhere on the site, I can use the shortcode [ ust_wpsignup_url ] to render the current link. I vaguely remember this working in the forums by pasting the code in the URL field, when inserting a link. (I forget when or which SP version, but it's been a while.)

Recently, I discovered three issues.

1. When entering the shortcode in the Link field, it does render. The resulting signup URL, however just gets appended to the full URL of the topic page, like this:

/forums/technical-support/disregard-this-topic/page-2/problem-with-post-edit-buttonttp://tripawds.com/signup-ba0/

2. If just using the shortcode in a post, and not assigning it to a linked phrase, the URL renders, but it does not become a link.

3. If adding the shortcode into a link in a Private Message, the signup page does not render. Instead the full shortcode gets appended to the link.

I presume both instances result from the "link" not beginning with http://... when the post is saved.

See attached screenshots for clarification. Note how the shortcode rendered URL is not a link, and the second one is appended to the topic link.

I do have SP options currently set to allow all shortcodes.

Obviously not a show-stopper here, but thanks in advance for any feedback!

ust-shortcode.pngImage Enlargerust-link.pngImage Enlarger

ust-pm.pngImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 16, 2015 - 10:14 pm

I would be very surprised if wp (tinymce) processed a short code in the link field...  and that insert link is really all wp (and tinymce)... simple press does not interact...

 if this worked before, not sure what wp or tinymce changed...  a couple versions ago, wp did switch to a complete rewrite of tinymce, so its possible you shortcode plugin needs to be updated to be compatible with the new tinymce (version 4.x)...

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 16, 2015 - 11:48 pm

Thanks for the feedback!

But placing the shortcode in the link field when adding it in a blog post or page does render the URL properly. It only appends the topic URL when attempting to do the same in a forum post... confused

linkworks.pngImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 17, 2015 - 7:38 am

So do I read from this that it is achieved with a TinyMCE add-on button? If this is the case then it is still possible that while it works on the WP write post/page it will not work on the forum page. Many authors who write add-ons for the WP TinyMCE make the false assumption that it can only be used on the back-end admin side of the site. This is not the case but is an easy mistake to make. If this problem first occurred when WP updated to TinyMCE V4 then this could be the issue.

Another possibility - although less likely - would be that you need to set the shortcode in the forum options > Content Settings. Less likely because, if it IS a TinyMCE add-on, then the transition from shortcode to url would almost certainly be carried out prior to the SP filters kicking in to the post content. Another good reason to suspect the add-on in fact.

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 17, 2015 - 12:01 pm

Yellow Swordfish said
So do I read from this that it is achieved with a TinyMCE add-on button?

Nope, no add on, no TinyMCE button.

The Anti-Splog plugin, renders the current signup URL via the shortcode.

If I enter the shortcode in the URL field when assigning a link in a blog post or page like "sign up here", the highlighted text will be properly assigned the correct signup page link, even when it changes daily.

If I attempt to do the same thing in a forum post, the URL renders, but it gets appended to the topic URL. If I use the shortcode by itself in a forum post, the URL renders but it does not become a link.

I'll try filtering codes in the SP Admin and allow this one, but that would mean adding all the shortcodes I may want to use in the forums. I'll report back on the results.

I know this is a very specific issue. I don't expect you to expend too many brain cycles on it, but I do appreciate the feedback!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 17, 2015 - 12:41 pm

FYI: Filtering shortcodes in the SP Admin and adding the code to the allowed list made no difference.

Placing the shortcode in a forum post on a line by itself renders the proper URL, but it is not an active link.

Pasting it into the URL field when adding a link in a post still just appends the topic URL, as I described previously.

I'm sure you have more important things to run down, so I appreciate your thoughts but don't expect any magic fix for this. Just thought I'd inform you of the issue.

I can continue using my workaround of directing users to a different page than the random signup URL.

Thanks again!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 18, 2015 - 11:17 am

Let's step back again.

What is the plugin that deals wit this shortcode? Is it freely available for people to try?

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 18, 2015 - 1:14 pm

OK, thanks. But please don't feel the need to spend a lot of time on this rather specific issue. I'd be interested in hearing if others face this particular problem, with this or other plugins. But if you're up for the challenge...

Anti-Splog is a premium plugin from WPMU Dev. It is not free, but I doubt they would mind sending along a copy for testing purposes, if you like.

The plugin is specifically for multisite installs. It has an option that rotates the wp-signup URL with a random address every 24 hours, which helps eliminate spam blog registrations. It comes with a shortcode and template tag that can be used to insert the link in posts, pages, or theme files.

This is clearly no show-stopper, but rather a nuisance. Thanks again for your thoughts! If you'd like the plugin file, I can email it. But I do feel bad asking you to put effort into this, when I'm certain you have other fires to put out.

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 18, 2015 - 10:04 pm

go ahead and send it along to support at simple-press dot com...  we can look as time permits...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625