I saw this post over at vB.org and I was wondering what Search JSON I can use to get this working for vB5?
Announcement
Collapse
No announcement yet.
#Hashtag BBCode
Collapse
X
-
Try:
But for tags with spaces, special characters (e.g. & or %) or accents, that might not work as the 'q' parameter value needs to be URL-encoded.HTML Code:<a href="/search?q={param}">#{param}</a>
Alternative solution is to use Javascript.
Note that this code is untested.HTML Code:<span data-p="{param}"></span> <script> (function() { var me = document.currentScript || (function() { var s= document.getElementsByTagName( 'script' ); return s[s.length - 1]; })(); if (me) { var span = me.previousElementSibling; var param = span.getAttribute('data-p'); span.innerHTML = '<a href="' + pageData.baseurl + '/search?q=' + encodeURIComponent(param) + '">#' + param + '</a>'; } })(); </script>

My Amazon Affiliate Link
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
- Likes 1
-
AdminCP > Custom BB Codes > Add New BB Code. The code above goes to Replacement field.
My Amazon Affiliate Link
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
- Likes 1
Comment
-
Originally posted by glennrocksvbDid you test search keywords with spaces, special characters (?, & and %) and accents? Try in different browsers.- When entering multiple keywords, it only shows results for the first keyword
- Special characters are working
- Accents will give the message that your criteria is not restrictive enough
- Top
- Translate
- Bottom
- Likes 1
Comment
-
So you're adding this HTML code in the Replacement field for the custom BBCode you are creating and you got an error when saving it?
Can you post the exact error or a screenshot of the error?Code:<a href="/search?q={param}">#{param}</a>
My Amazon Affiliate Link
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
-
Creating another reply because this is front-end discussion ..
At the front end, it does not work
When I add a hashtag to a post, it does show #item with a link on it but the link shows http://www.site.com/search?q=
No parameters. It should rather show http://www.site.com/search?q=item
Please advise. Thanks!
- Top
- Translate
- Bottom
Comment
-
It ultimately does not work as the double quotes are in the wrong places. Keep the original code and just click the Continue button when the error message appears and see what happens.
My Amazon Affiliate Link
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
- Likes 1
Comment
-
Glad to be helpful!

My Amazon Affiliate Link
Fast vBulletin VPS Host:
This site is hosted by IONOS
- Top
- Translate
- Bottom
Comment
Latest Posts
Collapse
-
Reply to some ideas for new modsin Chit Chatby desmomax
I finally created a mod that allows you to add an icon to each post with options for sharing on other platforms. I honestly thought it was absurd that...
Today, 03:59 AM -
by flohseHi Glenn, what do you think about adding "Like Counts" similar to "Like Counts on Postbit and Profile" (when this mod is in use) in...Yesterday, 11:28 PM
-
Reply to push notification prompt?by desmomaxhy glenn
have you thought about this?Yesterday, 05:44 AM


Comment