|
Post by Jerry Muelver on Jun 11, 2008 15:56:31 GMT -5
Well, live and loin! That's definitely going into my "stuff you gotta know to avoid the 'gotchas' " file. Turns out, changing to flat-file storage for this particular application was a good move. It opens up a number of production options that would have been locked out by SQLite. However, I can use that hard-learned lesson for my runwiki upgrade, so I'll dig out my early experiments and do some more RVA (random variable assignment) programming. You can never have too many apps in progress!
|
|
|
Post by mikeukmid on Jun 12, 2008 11:02:48 GMT -5
Jerry said, I'm not sure what problem you had or even if I am on the wrong track, but I got external links to work in the following way. Add the code below to function parsetag$() case ".link" parsing$="<a href="+q$+word$(parsing$,1)+q$+" target=_new>"+word$(parsing$,2)+"</a>"
then add .link www.google.com Google to the .cms file. Clicking the 'Google' link opens Google in a new page. Is that the functionality you were seeking? Mike.
|
|
|
Post by Jerry Muelver on Jun 12, 2008 12:47:18 GMT -5
Thanks, Mike. External links are no problem. Links to another .cms file are no problem. The problem is using <a name="mark"> on a page, then trying to call the location with <a href="#mark> in an HTML link. RB wants to take over the link syntax and rewrite it, then it doesn't work. Maybe I should play round with the syntax and character-escaping a bit, and generate a set of specific examples.
|
|
|
Post by mikeukmid on Jun 12, 2008 13:42:28 GMT -5
OK,
Putting this at the top of the page .anchor Up .link #Down Down
and this at the bottom of the page .link #top Up .anchor Down
and incorporating the change suggested to function parsetag$()
case ".link" parsing$="<a href="+q$+word$(parsing$,1)+q$+">"+word$(parsing$,2)+"</a>"
works for me with IE7. I can flip between the top and bottom of the page.
|
|
|
Post by StefanPendl on Jun 12, 2008 15:16:11 GMT -5
I had some problems with SQLite, getting some munged text when coming out of textarea editor to SQLite and back. On a search page for a database I use frequently it says: Seems there are not much characters to take care of.
|
|
|
Post by Jerry Muelver on Jun 12, 2008 16:56:20 GMT -5
Thanks, Mike. I'll go play with it. Stefan, I'll revisit SQLite for the enhanced wiki and put some juice into learning all the tricks. I'll be baaaack!
|
|
|
Post by Jerry Muelver on Jun 12, 2008 20:32:17 GMT -5
AARRGHHH! The reason I couldn't get bookmarks working was because I misspelled "parsing$" in parseTags() as "parshing$"!!! Got it working, now. Use .anchor top for the anchor, and [#top|To the TOP] for the link, same link syntax as usual, so you can put it after bullets, or in a horizontal menu line, etc. Now I can do the Markup Syntax page, and get everything on one page for reference printing. In the meantime, here's the CASE for parseTags: case ".anchor" parsing$ = "<a name=" + q$ + parsing$ +q$ + "></a>"
and the parseURL section between "html phead$" and "parsing$ = ptail$" html phead$ if instr(purl$,"#") = 0 and instr(upper(purl$),"HTTP:") = 0 then if si > totpages AND instr(upper$(purl$),".CMS") = 0 then desc$ = "?" + desc$ link #jump, desc$, linker #jump setkey(purl$) else html "<a href=" + q$ + purl$ + q$ + ">" + desc$ + "</a>" end if parsing$ = ptail$
(Note to self: Some day, write a code editor that flags undeclared variables to help misspellers rite coad.)
|
|
|
Post by mikeukmid on Jun 13, 2008 3:32:48 GMT -5
I spotted the mispelling but thought it was my typo Never thought to check the original source! Anyway, you got there in the end. Nice project I'm following with interest. Mike. EDIT: You may like to know of typos in the same function relating to Heading levels 4 and 5, which are missing one '='
|
|
|
Post by Jerry Muelver on Jun 13, 2008 6:02:32 GMT -5
Thanks, Mike. I'm a text guy, not math, and I count like, "one, two, many...." so errors like that crop up all the time. It really helps to have someone else look at my code!
|
|
|
Post by mikeukmid on Jun 14, 2008 9:55:34 GMT -5
Jerry, Thanks for sharing rbCMS. I never used wikiwriter but I'm enthralled by this project. Look for a PM relating to a mod you may find interesting (that is if you have not already incorporated it ) Mike.
|
|
|
Post by Jerry Muelver on Jun 15, 2008 10:39:19 GMT -5
You might like this, then -- I just taught rbCMS how to display a textarea, fill it with content, and retrieve user input from it. I'll play with this one a bit, and then see about incorporating some of the other RB controls. Generated (or embedded) images would be nice....
|
|
|
Post by Carl Gundel - admin on Jun 15, 2008 13:17:06 GMT -5
You might like this, then -- I just taught rbCMS how to display a textarea, fill it with content, and retrieve user input from it. I'll play with this one a bit, and then see about incorporating some of the other RB controls. Generated (or embedded) images would be nice.... Maybe we could extend the Tiny BASIC in RB and add that to rbCMS as a scripting language? Or better, maybe Brent has a version of his scripting language that could be made to compile under RB. -Carl
|
|
|
Post by Jerry Muelver on Jun 16, 2008 5:36:02 GMT -5
Scripting is A Good Thing. The language I've outlined is a minimal data-handling thing based on an associative array and using the same syntax structural philosophy rbCMS does.... .prog set $pie apple set $color green if $pie not apple print "Not my favorite" endif if $pie is apple print $color $pie " is the right choice!" endif /prog
It gets data from controls, saves and retrieves data set (hash), sets control content, basic arithmetic, does links based on conditions, has simple looping construct -- loop, exitif, endloop -- and that's about it. Gotta keep it simple, so folks like me can use it. It could make rbCMS (likely to be renamed "Arby") into a kind of Smalltalkish thinking/working/realtime environment.
|
|
|
Post by StefanPendl on Jul 28, 2012 0:44:50 GMT -5
Attached is the project archive, since the link no longer works. Reposted by permission of Jerry Muelver. Attachments:
|
|