
terrill
User
Aug 11, 2002, 11:19 AM
Post #1 of 12
(8756 views)
Shortcut
|
|
Subcat NEXT/PREV/Search Fix (and more?)
|
Can't Post
|
|
UPDATED 19-Aug-02: Files attached to this post are now obsolete. If you haven't already placed these files in use (and you want subcategories, Please see further down this thread for newest version!!! Last week we heard Terrill say, "But, using this Subcategory work-a-round breaks the More Headlines, Next, Prev and Search stuff." Pretty bad, huh? But, I warned ya! Since my site will have over forty subcategories (for different products our team supports), I ***REALLY*** need subcategories. At whatever it takes. SO, here's the fix to not only the aforementioned problems, but the code in sfront.cgi COULD easily be modified to act as an SSI for Interactives' Search.cgi engine (another topic on which I've seen several post in various forums). But, I digress... There are three atachements to this message: cats.txt (documentation on implementing) cats.cgi (perl script) sfront.cgi (yet another perl script) IF you've already installed the cats.cgi script, there are "cosmetic-only" changes in this attached version. While you don't have to download it (copy it, whatever) and re-change the places indicated, I'd suggest it, since I moved all the things you change to the top of the script. Makes life easier on YOU if you ever move your site or Artman, OR if you get another customer and you want to implement this on THEIR site. sfront.cgi is a front-end to Interactives' nifty search.cgi. Since their search engine does NOT process SSI exec's (or includes), sfront.cgi DOES! It actually calls search.cgi, captures search.cgi's output via a pipe, and then looks for the SSI exec and executes the program YOU wanted executed (in this case, it's cats.cgi). Note however that, they way I choose to implement this, it only executes the FIRST #exec it finds. You could change it so it executes ANY exec, if you wanted. Change it more, and include includes that search.cgi doesn't. I don't relish the idea of being a front-end to other peoples programs over which I have no control. The only reason I've gone this far is because I *NEED* it. It's done. It works. I'm finished. Read the documentation. It's 3-times bigger than either of the programs because I want you to UNDERSTAND what it does. Nothing hidden. Nothing secret. It attempts to give you a clear indication of what the programs do. The code itself is *heavily* documented (over half of each program are comments!) so even non-programmers should be able to get the idea of what it does, why and more important, how. Even if you're not going to use it, you still may find it to be an interesting insight of what CAN be done. Ninety-percent of the process is knowing I can or can not do something. Nine percent is finding someone else's code that almost does what you want. One percent is modifying that code to do what you want it to do. Feel free to use my code, and make it yours. Enjoy! -- Terrill -- [quote] "Evaporating expectations of quality: 1980's paradigm: If it's worth implementing once, it's worth implementing twice. 1990's paradigm: Ship the prototype! 2000's paradigm: Ship the idea!" ---Larry Rosler: http://www.perl.com/pub/a/2000/06/rosler.html [/quote]
(This post was edited by terrill on Aug 19, 2002, 5:31 PM)
|