Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Target Blank for Bootstrap 2.5.1
UKguy
✭
Hi, got 2 vanilla forums and i am using a target blank plugin but i can not seem to be able to use target blank, please advise the easiest and best way to fix the issue.
https://vanillaforums.org/addon/bootstrap-theme
I appreciate your help a lot and hope i can find a fix from this amazing forum!
Thanks guys!
EDIT: should of mentioned the forums: https://seocompanys.xyz/ https://lowpricehosts.com/
Tagged:
0
Comments
Have you tested using the default theme ? Can you post a link that has target="_blank" on it but will not open in a new window ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Hi, thanks for the reply, yes works on the default theme but not when using the bootstrap theme, is their any code i can add to config.php to fix the issue? Using target blank plugin also on both sites, the bootstrap theme looks so nice and modern really want to keep the theme but the makers would prob take weeks to reply.
Bootstrap uses different class and Id names of elements. The TargetBlank plugin uses only javascript to add the target blank part. But the name and class of the element must be included in the script
Here is the code for the target blank plugin:
You need to use a web inspector to find out the class or Id for the elements you are using the plugin on
for example
$('#Menu li:first > a').attr('target', '_blank');
That may not work on Bootstrap Because
#Menu
is called.navbar
You must replace the ones that do not apply to the theme with the ones that do.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I would also replace
$(document).ready(function() {
with this in order to avoid potential js errors
jQuery(document).ready(function($) {
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I did this as quoted above
Hi, thanks again for your help, the other bit mentioned sounds quite tricky, i got it working on lowpricehosts.com but the new forum seocompanies.xyz seems to not be working in the same way as lowpricehosts, using another theme maybe the only option in my case. Though i will keep trying and will ask some friends to see if they can have a look over it too and refer to your very helpful replies
It is really not that complicated, you simply add the link class to the list
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you