1
CoolPops
Enhancing the built in editor
  • 2003/4/9 1:32

  • CoolPops

  • Just popping in

  • Posts: 65

  • Since: 2003/4/9 1


Greetings.

Xoop is just what I am looking for, however, I need one additional feature that probably no one else would want, or need. I am setting up a Christian web site and will be make a few custom modules, but the area of need that I am concerned about is the editor area.

I would like to be able to add in a few custom tags, the major one being filling in text from the Bible. For instance, {John 3:16} would include print the verse instead of the text entered. Then something like {ASV:John 3:16} would print the verse from the American Standard Version.

The parsing, retrieving, and storing of that information is no problem (is working in my bare bones not really functional home brew CMS). The question I have is, what would be the best way of accomplishing such a task in the least obtrusive way in XOOP? I would hate to create a maintance headache with each upgrade (although I realize it would be some).

I guess I am just looking for any comments, hints, tips, suggestions, etc...

Oh, also, is the same code used throughout the system for editing comments and such?

Thanks!

Jeremy

2
regen_r8
Re: Enhancing the built in editor
  • 2003/4/9 1:42

  • regen_r8

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/5/23


Would you be surprised if you were not the only one interested in a bible module or hack for Xoops...

Come and check out The Regenerate Web

I would be happy to collaborate on this kind of a function, either as an extension of the editor, or through some other technique.


3
SirTanksAlot
Re: Enhancing the built in editor

Just wanted to chime in that I'd be very interested in the final result and would be willing to help as much as I can...

Just a thought, I know that Catzwolf has done a good deal of work to integrate a WYSIWYG editor into his WFSections module.. he might be a good reference point to start w/ for something like this.

4
ndial
Re: Enhancing the built in editor
  • 2003/4/11 3:13

  • ndial

  • Just popping in

  • Posts: 29

  • Since: 2003/3/3 1


I think the same code is used for all XOOPS comments, it's handled in one object that does all the html stripping and converts the [square-brackets] tags to their equivalent html. Adding the things you're wanting would only be a matter of a few regexp's and some database hits, and it would be a really cool for a church site or another Christian Community-type site. (getting it to do red letters, now that would be tougher.)

I wrote a function a while back that would take arguments of book, chapter, and verse, and hit a database and return the KJV text of the verse. I was pondering at the time the idea of doing the same thing you're wanting, but it was just one of those Saturday morning "I wonder if I can do this?" kind of hacks and I got distracted with other things and never finished it out.

I just spent a while looking around for my code, and I fear I might have deleted it in one of my system upgrade rampages. I did find the MySQL dump of the KJV Bible if it would help. Hey, if nothing comes up this Saturday I could probably code the thing, but I can't make any promises about that. I also have the KJV in XML and some other Bible markup language. (I don't think the KJV is the "one true translation" or anything, it just seems to be the one most frequently located in such hackable data formats. ) Just lemme know if any of those interest you, I would just spam you with them but they're a good few MB apiece.

5
CoolPops
Re: Enhancing the built in editor
  • 2003/4/11 17:19

  • CoolPops

  • Just popping in

  • Posts: 65

  • Since: 2003/4/9 1


I have quite a few translations in SQL format, as well as a few other formats. In my times past, I have written a Bible study system, so I have all sorts of stuff like that laying around.

Thanks though.

Jeremy

6
ndial
Bible in SQL
  • 2003/4/11 17:30

  • ndial

  • Just popping in

  • Posts: 29

  • Since: 2003/3/3 1


Really? Where'd you get them? Every time I search for "SQL Bible" all I get are some lame programming books.

7
CoolPops
Re: Bible in SQL
  • 2003/4/11 17:46

  • CoolPops

  • Just popping in

  • Posts: 65

  • Since: 2003/4/9 1


The hard way. Text files of different formats, even quite a bit of HTML parsing. I'll bet I have over 100 hours easy in the files I have.

--
Jeremy

8
ndial
Re: Bible in SQL
  • 2003/4/11 17:52

  • ndial

  • Just popping in

  • Posts: 29

  • Since: 2003/3/3 1


Woah. Well, it sounds to me like you could use an "offsite backup" of the results of all that work ...

9
ndial
Re: Bible in SQL
  • 2003/4/13 19:09

  • ndial

  • Just popping in

  • Posts: 29

  • Since: 2003/3/3 1


Thanks to some babysitting and company coming over, it took longer than Saturday morning to get this far, but I have something at a point where I can put up an "interesting" preview athttp://www.nathandial.com/bible.php . Enter some text in there and some Bible references, with no particular markup. For example just write "Matthew 5:20 is a powerful challenge from Jesus" or "Prov 3:5-7 is one of my favorite passages" or whatever.

As per the beginning of this discussion, I think it would be nice if there was an extension API for modified text display that could be extended by modules. I thought it was really cool that the userinfo.php page automatically used each module's search functionality to make the page. I think that it would be good if the MyTextSanitizer did the same thing (or does it?) and look for modules that had a "text_modification" function that you pass the text of a post and it processes it. I can think of a few cases where this would be useful:

* a "Glossary" that highlighted certain terms and linked them to definitions
* a Wiki that picked out WikiNames in ordinary comments and stories and automatically html-ified them
* a Bible-verse thing such as I'm working on.
* extra pseudo-bbcode tags.

That's just what 0 minutes' thinking brings up. I'm sure there are a lot of things that some modules would like to do. Oh, I just thought of another, you know how Yahoo news takes keywords like "Iraq" and turns them into "Iraq (news - web sites)" I think that's annoying, but it would be something else that a module could provide.

Or is this already setup somehow and I missed it? If it is, somebody point it out please!

10
CoolPops
Re: Bible in SQL
  • 2003/4/14 2:34

  • CoolPops

  • Just popping in

  • Posts: 65

  • Since: 2003/4/9 1


I like your Bible reference, and I also really like the idea about the MyTextSanitizer.

What's the chances of that happening XOOPS developers? What if I were to develop it and submit a patch? Is it something of intrest?

Jeremy

Login

Who's Online

154 user(s) are online (111 user(s) are browsing Support Forums)


Members: 0


Guests: 154


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits