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:
HTML Code:<a href="/search?q={param}">#{param}</a>
Alternative solution is to use Javascript.
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>
Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Bottom
- 1 like
-
hi i am thinking to test on vb5
is there any guide where to put this code
thanksvoyger.: In Almighty God I trust, everyone else has to provide evidence."
- Top
- Bottom
Comment
-
AdminCP > Custom BB Codes > Add New BB Code. The code above goes to Replacement field.Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Bottom
- 1 like
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
- Bottom
- 1 like
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?
Code:<a href="/search?q={param}">#{param}</a>
Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- 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
- 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.Helpful? Donate. Thanks!
Fast VPS Host for vBulletin:
A2 Hosting & IONOS
- Top
- Bottom
- 1 like
Comment
-
- Top
- Bottom
Comment
Latest Topics
Collapse
-
by nettraptorNeed some help with vbull and cloudflare ... lets ses those posts08-04-2022, 05:58 AM
Comment