Libronix tags
tcblack - December 5, 2006 - 17:11
| Project: | Scripture Filter |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (code needs work) |
Description
Is it possible to enable the Libronix tagging so that a second link to open the scripture reference in Libronix is available?

#1
I'm not familiar with Libronix. Could you include more information?
If you're able to make the code changes (or know someone who can), I'll be happy to incorporate it into the module.
#2
I'm no coder but adding the tags is as simple as creating a regular html link.
here is the complete Information page: http://logos.com/support/lbs/weblinking.
The format of the link is like the following:
<a href="libronixdls:keylink|ref=[en]bible:Genesis%201%3A1"><img border="0" src="LibronixLink.gif"></a>Basically what I'd like to accomplish with the Libronix links in Scripture Filter would be to create the links you already create but simply add the attached link.gif with a jump to the Libronix/Logos software as below:
<a target="_blank" href="http://bible.gospelcom.net/bible?passage=Genesis%201%3A1&language=english">Genesis 1:1</a><a title="Jump to Passage in Logos Bible Software Series X" href="libronixdls:keylink|ref=[en]bible:Genesis%201%3A1"><img border="0" src="LibronixLink.gif"></a>This results in: Genesis 1:1
#3
oops, the final tag should have resulted in the libronixlink.gif added at the end as a link. But image tags are disabled.
Genesis 1:1|LibronixLink.gif
#4
I finally managed to put together a working patch.
You can see it working at my site, http://www.stilltruth.com
As it stands the Libronix link is not optional meaning that it is always appended to the link at the end. You may want to consider making it optional, but I just don't know how to do that. This little patch already took more PHP than I knew. :-)
Keep in mind that you have to download the libronix link image (http://logos.com/images/Corporate/LibronixLink.gif) and place it in the scripturefilter module directory.
<?php/*
* begin section for inserting Libronix Links (tcblack)
* Locate the scripturefilter module path
* so that we can call the LibronixLink.gif from it in the following link
*/
// $libroniximgpath = drupal_get_path('module','scripturefilter');
$libroniximgpath = base_path() . drupal_get_path('module','scripturefilter') .'/';
/*
* Define the Libronix link variable to add to the primary link
* Libronix is a bible software program by Logos Bible Research (<a href="http://www.logos.com" title="www.logos.com" rel="nofollow">www.logos.com</a>)
* The proper link format is libronixdls:keylink|ref=[en]bible:$reference
* more details on Libronix linking may be found at <a href="http://logos.com/support/lbs/weblinking
" title="http://logos.com/support/lbs/weblinking
" rel="nofollow">http://logos.com/support/lbs/weblinking
</a> */
$libronixlink = 'libronixdls:keylink|ref=[en]bible:';
$title = sprintf ('Open %s in Libronix (Logos Bible Software)',$reference);
$libroniximage = sprintf ('<img "border="0" src="%sLibronixLink.gif" />',$libroniximgpath);
$libronixlink = sprintf('<a href="%s%s" title="%s">%s</a>',$libronixlink,trim("$volume $book $verse"),$title,$libroniximage);
// end section for inserting Libronix Links
// now add the Libronix Link to the end of the final link.
$link = "$link $libronixlink ";
return $link;
?>
#5
Hmm, it looks like this would only work for people with Logos installed, and everyone else would get an error if they clicked on the image...
Have a look at #10323: Per-User Bible Preference. Do you think you could set it up so that a user could turn on whether or not these links show up? That way, if they have Logos installed, they can check a box, and all of their scripture links will show up with the Libronix link, while for everyone else, they'll get just the normal link.
#6
You are correct Steve, that's how it would work. I've left a note on #1023 Unfortunately I just don't have a clue how to accomplish that. I already used more PHP than I knew to add this much :-) Basically I very carefully looked through the existing code and replicated and changed it to match.
Any takers want to help?