Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Integrating Bible Super Search with vBulletin Details »»
Integrating Bible Super Search with vBulletin
Version: 1.00, by PGAmerica PGAmerica is offline
Developer Last Online: Apr 2015 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.7.x Rating:
Released: 05-29-2008 Last Update: 05-30-2008 Installs: 23
Template Edits
Additional Files  
No support by the author.

This will add a Bible Super Search to your forums. This is not so much a modification
or hack as it is a tutorial. It does not require you to edit any files or templates. It
does require you to create 1 php file and 1 template.

If you don't want to create the php file or the template, I have added them to this post.

Credits: The Bible Super Search program I used is from biblesupersearch.com and is
free for all. I used the instructions by Gary King entitled "How to create your own
vBulletin-powered page!" alongside a script at the Dynamic Drive site to make this
work. Thanks goes to Digital Jedi for sending me the links for this.
------------------------------
NOTES:
This document assumes that you have installed the Bible Super Search program. If
you have not, please go to www.biblesupersearch.com, download it and get it
running on your site. Once that is done, go to Step 1 in this document.

This document also assumes that you have placed the "Bible Super Search" program
in the "forums/bible/BibleSuperSearch" folder. If you have not, just change every
reference to "bible/BibleSuperSearch/" to the path of your program.

Demo

INSTALLATION INSTRUCTIONS
Step 1: Make a new template named "Bible_SuperSearch" and put the following in it.
Note: You can alse cut and paste from the "Bible_SuperSearch_template.txt" file that I have made available in this post.
Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
<script type="text/javascript">

/***********************************************
* IFrame SSI script II- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["Bible_SuperSearch"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 500 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
    <td class="tcat">World English (WEB) Bible</td>
</tr>
<tr>
    <td class="alt1"><iframe id="Bible_SuperSearch" src="bible/BibleSuperSearch/bible_supersearch.php?interface=user_friendly1" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe></td>
</tr>
</table>

$footer
</body>
</html>

Note on above template code:
This code is designed the use the "Friendly1"
interface. You can use the interface of your choice by replacing "user_friendly1" with
any of the interfaces that came with the Bible Super Search program. The current
available choices are: advanced, classic, compact_book_browsing, compact_simple,
parallel, parallel2, user_friendly1 & user_friendly2. The program even allows you to
create your own interface. If you do this, just put in the name of the file (minus the .php) you created.

Step 2: Create a file named "Bible_SuperSearch_vb.php" and place the following into it:
Note: You can also just use the "Bible_SuperSearch_vb.php" file that I have made available in this post.
Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'Bible_SuperSearch'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(
    
);

// pre-cache templates used by all actions
$globaltemplates = array(
    'Bible_SuperSearch',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'Bible Super Search';

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('print_output("' . fetch_template('Bible_SuperSearch') . '");');

?>


Step 4:
Upload the newly created file into your forum root folder.
Step 5: Edit the "navbar" template

Search for:
Code:
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
And add this after it:
Code:
<td class="vbmenu_control"><a href="Bible_SuperSearch_vb.php">Bible Super Search</a></td>
That's it. Let me know if you need help.
--------------------------------------------------
Addon:
I have used this exact same code to put html Bibles from ebible.org on my site. Here are some instructions to help you do that.
  1. Go to ebible.org and get the bible of your choice.
  2. Make it work
  3. Create the template I mentioned in Step 1 above
    Note: Change the name of the template to reflect the bible version you are adding.
  4. Change all references in the template that says "Bible_SuperSearch" to "Bible_Insert the Version Here" (I used "Bible_KJV" for my KJV bible and "Bible_Web" for my World English bible)
  5. Modify the iframe statement in the template to point to the php file you are about to create.
  6. Create the file I mentioned in Step 2 above
    Note: Change the filename to reflect your bible version (I used "Bible_KJV_vb.php" for my KJV bible and "Bible_WEB_vb.php" for my World English bible.
  7. Modify all references to 'Bible Super Search' to 'Bible Insert the Version Name Here'
  8. Modify all references to Bible_SuperSearch to the name of the template you just created.
  9. Now follows steps 4 & 5 above
    Note: Make sure to modify your link to point to the newly created php file.
That should about cover it.

You can get additional bibles at: gregwolf.com and ebible.org. I am sure there are many other sites as well. Here is just a few free html bibles I found online. Many of these will require you to edit the html code so that they behave and look the way you wish them too.

English
ASV (American Standard Version) Bible
Catholic Douay Rheims Bible 1899
Catholic Douay Rheims Bible 1899 (Large Print)
Easton's 1897 Bible Dictionary
KJV (King James Version) Bible from edible.org or gregwolf.com
KJV (King James Bible: Large Print)
Matthew Henry's Complete Commentary
WEB (World English Bible) Bible
WEB:ME (World English Bible: Messianic Edition)

French
1910 Louis Segond Version de la Bible Sacr?e
1910 Louis Segond Version de la Bible Sacr?e (Large Print)

Portuguese
B?blia Sagrada
B?blia Sagrada (Large Print)

Spanish
LA BIBLIA Versi?n Reina-Valera de 1909
LA BIBLIA Versi?n Reina-Valera de 1909 (Large Print)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 07-28-2008, 05:06 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by revmitchell View Post
Maybe I have done this wrong. I made a new template via vba cmps. How do you make a new template?
Yeah, that likely won't work. vBa only makes templates for use with vBa. Any template you make with it, no matter what you name it, will have the prefix adv_portal_ tacked onto the name. Your PHP file will be looking for a template with the exact name Bible_SuperSearch, but your template is probably called adv_portal_Bible_SuperSearch, so your template isn't being found.

Create your template using the Style Manager.

Admin CP >>> Styles & Templates >>> Style Manger

Click the drop down menu beside one of your styles and select Add New Template and create your template there. You'll need to add that template to each one of your styles, provided you use more then one and you don't use child styles.
Reply With Quote
  #23  
Old 07-28-2008, 11:18 AM
revmitchell revmitchell is offline
 
Join Date: Dec 2006
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright I got that fixed. Now I have a different problem I dont know how to explain it take a look:


http://www.pastors-source.com/vb/Bib...rSearch_vb.php
Reply With Quote
  #24  
Old 07-28-2008, 01:22 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not finding the bible/BibleSuperSearch/bible_supersearch.php file that came with Bible Super Search. The tutorial presumes you have it in that specific directory, and relative to your forum directory. Which directory did you put Super Search in when you first installed it?
Reply With Quote
  #25  
Old 07-28-2008, 05:33 PM
revmitchell revmitchell is offline
 
Join Date: Dec 2006
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.pastors-source.com/bibles...rSearch_vb.php

This creates this error:

Quote:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/httpd/vhosts/pastors-source.com/httpdocs/biblesupersearch/Bible_SuperSearch_vb.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/httpd/vhosts/pastors-source.com/httpdocs/biblesupersearch/Bible_SuperSearch_vb.php on line 2
What have I done wrong?
Reply With Quote
  #26  
Old 07-28-2008, 11:04 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like you may have deleted a ' when you edited your PHP file. Can we take a look your PHP and template code?
Reply With Quote
  #27  
Old 08-01-2008, 03:24 AM
revmitchell revmitchell is offline
 
Join Date: Dec 2006
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have attached the php file here is the temp file:


Quote:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
<script type="text/javascript">

/***********************************************
* IFrame SSI script II- ? Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["Bible_SuperSearch"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigat or.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 500 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextr aHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>
</head>
<body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">World English (WEB) Bible</td>
</tr>
<tr>
<td class="alt1"><iframe id="Bible_SuperSearch" src="bible/BibleSuperSearch/bible_supersearch.php?interface=user_friendly1" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe></td>
</tr>
</table>

$footer
</body>
</html>
Reply With Quote
  #28  
Old 08-01-2008, 04:22 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Woah, something completely garbled your PHP file. I know some HTML editors do that after viewing them and saving. You'll definitly need to download it again and replace it.
Reply With Quote
  #29  
Old 08-01-2008, 04:31 AM
revmitchell revmitchell is offline
 
Join Date: Dec 2006
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
Woah, something completely garbled your PHP file. I know some HTML editors do that after viewing them and saving. You'll definitly need to download it again and replace it.

I have downloaded it three (3) times. After I delete all the old files. And I get the same results every time. And I make no changes or even attempt to make no changes to the php file.
Reply With Quote
  #30  
Old 08-01-2008, 05:19 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you use any download acceleration software?
Reply With Quote
  #31  
Old 08-01-2008, 05:23 AM
revmitchell revmitchell is offline
 
Join Date: Dec 2006
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
Do you use any download acceleration software?

No not at all. I do use 7zip to open it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05310 seconds
  • Memory Usage 2,339KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete