Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Blog Post Linking Plug-in
Avatar
sorlac vasquez
Member
Free Members
sp_UserOfflineSmall Offline
Oct 1, 2015 - 8:38 pm

Hello.

Using this plugin, I have the "Join the forum discussion on this post" link showing up on new posts. How can I specify this link to open in a new tab in the browser, so the reader does not leave my front page?

Effectively, I want a target="_blank" appended to the link.

 

Thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 1, 2015 - 9:50 pm

hmmm... doesnt appear you can...  normally exposed in template tag, but this one is automatic, no option for the tag...

I had at least hoped for an filter on the item so it could be modified but it doesnt have that...

I can open a ticket for an improvement, but afraid it would be quite complex until then...

Avatar
sorlac vasquez
Member
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2015 - 3:51 pm

Yes, please submit the feature for future development.

Is there a brute-force solution I can implement in the meantime? I am not opposed to some code diving, if it is necessary.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 3, 2015 - 5:07 pm

I made the change earlier this morning... If I can finish testing today or tomorrow, may be able to release it this weekend...

Avatar
sorlac vasquez
Member
Free Members
sp_UserOfflineSmall Offline
Oct 4, 2015 - 4:16 pm

I see that there is an update for the plug-in today. Is the feature now included?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Oct 4, 2015 - 4:50 pm

Looks like it, of course you can always check in the Latest News and Developments forum for more info.. wink

Avatar
sorlac vasquez
Member
Free Members
sp_UserOfflineSmall Offline
Oct 4, 2015 - 5:16 pm

How do I utilize the new feature?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 4, 2015 - 6:26 pm

its a standard wp filter... so something like:

add_filter('sph_blog_link_label', 'my_link_function');
function my_link_function($out) {
    $out = str_replace('<a ', '<a target="_blank" ', $out);
    return $out;
}

added the spFunctions.php file of your sp theme...  as always, we urge you to create a child theme or a custom theme before making the edits...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
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: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625