Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Anyone able to help with phpbible?
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 17, 2005
- Posts: 8
I've installed phpbible and it mostly works but I can't get references (e.g. John 3:16) to work. It looks like something went wrong when the reference index was built. Anyone using phpbible able to give me a hand? Thanks. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 17, 2005
- Posts: 8
Thanks,
I don't recall anything failing when I installed but when I try and look up by reference I get
Passage not found in one or more requested documents.
Looking at the SQL query that's generated I suspect that the index that is built when you add a Bible text is incomplete. For example typing 'John 3:16' gives
Code
SELECT nuke_pb_doc_KJV.chr_start, nuke_pb_doc_KJV.chr_end, nuke_pb_doc_KJV.id, nuke_pb_doc_KJV.titles FROM nuke_pb_doc_KJV WHERE 1 AND ( nuke_pb_doc_KJV.ref LIKE 'John.3.16.%' OR nuke_pb_doc_KJV.ref LIKE 'John.3.16' )
So the reference has been coverted to the OSIS format (John.3.16) but if I look in the nuke_pd_doc_KJV table I can only see an entry with ref='John', there are no entries with chapters and verses.
If this makes sense to you could you query your database and tell me if there are records for chapter and verse. Could you also tell me where you downloaded your OSIS texts, maybe mine are not completely compatible with phpbible. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 17, 2005
- Posts: 8
Well, after some investigation I've found the problem. The XML parser in phpbible is very intolerant of variations in the OSIS documents that are out there.
- 1. It won't cope with verses defined as
Code
<verse ... />
- Changing them to
Code
<verse ...> ... </verse>
- fixes that.
- 2. It doesn't cope with multiple verses on one line
- 3. It can't handle the quotation scheme
Code
</q ...>
With a bit of fiddling via a perl script I've managed to transform one text into a form that seems to work. Shame that this project is not actively being maintained. If these niggles were fixed then it would be a pretty good module. -
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Apr 02, 2010
- Posts: 1208
I get the following error when I try to access the module, right after initializing and activating phpbible:
Code
Fatal error: Cannot redeclare _smarty_sort_length() (previously declared in /home/sco/public_html/modules/phpbible/library/utils/smarty/pbSmarty_Compiler.class.php:1835) in /home/sco/public_html/includes/classes/Smarty/Smarty_Compiler.class.php on line 2290
Any help is greatly appreciated. :) -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
I actually just recently tore open this code in an effort to better integrate it with postnuke and remove it's smartification (which is were the redeclaring error comes from, my home system doesnt' call it a "fatal" error but it does show in the apache error logs).
I believe that the parsing errors might come from the fact that the file class.xmlparse.php is missing the closing "?>"
Try adding one and see, it works for me.
And as a prop to the origional code... other than this oversite and the Smarty error, the 091 release works "out of the box" for 076rc4a.
--
Under Construction! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 17, 2005
- Posts: 8
Topiatic
I actually just recently tore open this code in an effort to better integrate it with postnuke and remove it's smartification
I'd be interested in sorting this module out too, although I'm a PHP virgin. I can see where some of the weakness of the code are, I'll probably prototype something up in perl and see if I can then re-write it in PHP. What does the Smarty bit do for you? What will you replace it with? -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
I was going to just replace the internal Smarty with pnrender calls instead. Figured I'd rebuild it from the outside in and just keep the functionality asis for now. We'll see how it works out, it's just a hobby for me 8).
--
Under Construction! -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Awsome, just might have a functioning unit in a reasonable amount of time heh.
personaly I only get one Smarty error ever and it's just writen to log, something about not being allowed to redeclare the length twice and that it's being ignored. As for the error mentioned above I've just likely not had the same set up as Wendell, but I have seen the code that asks for the non existant "utils" folder and it's likely you just have to change the path. I'll have another gander for it too.
And did you try adding the closingin the class.xmlparse.php file to address the formating/searching issues?Code
?>
Now back to trying to figure out were that dot is supposed to be...
--
Under Construction! -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
@Wendel
The declaration function is (as your error report erronously reported) on line 1829 of the file /modules/phpbible/smarty/pbSmarty_Compiler.class.php.
Code
I have successfully commented out the function and tested all I could think of with no noticable repercutions.
The false path comes fromline 267 in /modules/phpbible/phpbible.postnuke.php
Code
/**
* Get Smarty Templating Engine object
*/
function getSmarty()
{
if (empty($this->smarty_dir)) {
require_once "utils/smarty/Smarty.class.php";
} else {
require "$this->smarty_dir/Smarty.class.php";
}
// create smarty object
$smarty = new Smarty();
// configure Smarty variables
$smarty->template_dir = "$this->lib_dir/templates";
$smarty->compile_dir = "$this->lib_dir/utils/smarty/templates_c";
$smarty->config_dir = "$this->lib_dir/langs/$this->userlang";
$smarty->use_sub_dirs = false;
return $smarty;
} // getSmarty
I have not commented out the line since it is obviosly called by something somewere. But, I can't imagine it would hurt to change what it reads since it obviously never uses it being as it does not exist (I have serached every package AND the cvs at sourceforge back to the origional pnBible release).
I am finding this module to be incredibly conveluted with little more than translation proccesses to enable it in any CMS and that's cousing occasional problems... i can't wait to get rid of the padding.
Hope that was helpfull.
--
Under Construction! -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 17, 2005
- Posts: 8
I've re-written the main OSIS parser to use xml_parse rather than the jumble of RE matches. This is standalone PHP code, it should be straightforward to integrate it. There may need to changes in the XML translation to HTML end of things, I'm less certain of this code. I'll plough on with it, it's interesting learning another language this way. -
- Rank: Expert
- Registered: Nov 23, 2003
- Last visit: Dec 13, 2009
- Posts: 1487
Nice! My own schedule hasn't allowed me to do much lately other than work that pays, but I'd be interested in seeing what you've done once your done. This is all a foriegn language to me heh.
--
Under Construction!
- Moderated by:
- Support
