Forum OpenACS Q&A: ADP versus HTML
- To be able to collect comments on .html pages you'll have to sync
with Postgres, right?
This is beautiful and allows you to add links/comments on .html
no "add a link/comment" will be offered on .adp pages unless you:
- stick to the same non-dynamic syntax in your .adp as you would use in .html ("/BODY" being the tag determining where to insert the comment stuff, see /tcl/ad-html.tcl)
ad_footerfor example. And I rather not call some "add_comments_here" procedure manually on every page if there are thousands. Any suggestions on how to best modify ad-html.tcl to enable comments on .adp's that are not using "/BODY" but
- Also, Don, I read your posting where you said that the (much
longed-for) site-wide-search implementation would probably be an
out-of-db one. Thats great I
suppose, because that would mean I can edit the procedure:
ad_check_file_for_syncin /admin/static/static-syncer-ns-set.tcl so that it's not inserting copies of the static pages into the table
static_pages. Gosh! I'm relieved (and I'm sure your superb backup script is too now that there's no need for keeping a copy of each page in the db for full-text indexing. Still, are there any disadvantages with the "out-of-db" search approach compared to PLS and the like?
- Can Alta Vista and the others index .adp pages? (I guess the
answer is yes...)
- Pros/cons regarding .html/.adp. Thoughts?
I changed ad-html.tcl to parse adp pages before stuffing them in the DB, so that it would find the regular body tags and insert the comments and links. That's how our site is running. However, those changes did not make in the CVS tree because we didn't want to branch off from aD's tree. I can make a patch and post it here, but it'll have to wait until tomorrow or saturday.
2) That's Don area
3) Yes, search engines acn index ADPs. They only have problems with pages with ? and &, because they think they are CGI scripts or something. Go to Yahoo and search for "free linux" and our site will come up in first.
4) I use ADPs 99% of the time. They are much wore flexible and save me typing (which is a healthy thing).
Thanks for the offering of posting your changes. Take your time though. There's no hurry since I'm only half-done with my peronal site, and I haven't got an Internet connection yet.
Oh yes, good of you to remind me of the registered ADP tags. They
enhance flexibility and should make future design changes a piece of cake.
By the way Roberto, I want to say that you guys are really good at making documentation crystal clear so that rookies like myself can get going in no time!
Regardless of wheter or not the search index is stored in the database, can I just skip stuffing copies of the content pages in the db? Or is that depending on what concept of doing searches is chosen?
I am interested in the changes you made to add comments to adp pages. I am working on creating my site will all adp pages right now.
I was going to convert all the tcl pages to adp, but that will probably not happen before OpenACS 4.0 is available.
<%= [mab_page_header "<title>Page Title</title>"] %>...where mab_page_header is some function you've written that strips out the title tags. I hear you gagging, but it does the job. As long as the stuffer sees <title> somewhere, it doesn't care too much about the context.
And of course you can always make your footer function DTRT for General Comments/Links. I agree it would be better to have it all done for you by ad_serve_html_page.
There's also an abstract URL issue here, which I asked about a while ago on the mailing list. I'll reproduce it here:
Another problem in this mess is that the process of stuffing static content into the database includes the extension. Will it be hard to make this play with abstract URLs? My worry is that if an adp is invoked abstractly (without the .adp extension) and it calls gc_insert_comments_here or whatever, that proc won't have a means of determining the actual file name that it's running under (as distinct from the URL), and that as a result it won't find its comments, because they are indexed under the file name, not the abstract URL.I use abstract URLs for everything, so I would much rather that commments/links were indexed in the database by abstract URL. But I don't really know for sure whether this is broken or not.