[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aaron is gonna kill me




I figured I'd wait too see what you did before I say anything, because I
was really confused.  Anyways, now that you've done your major commit, I
figured I'd try to figure it out... keep reading.

On Mon, 9 Aug 1999, Jason Pincin wrote:

> Aaron!  Buddy!
> 
> Just wanted to run something by you... remember the o=, p=, type=
> thingy for URL's? OK - now this is not as bad as you think... cuz

Yes.

> unlike times in the past what I'm going to say doesn't affect that -
> it just gives you an option :).  If you want to keep using type=, p=
> to determine uniqueness you CAN!  OK - so thats cool... I'm not
> breaking ANYTHING.

Uh huh.  Sure ya are. :)

> All I wanted to let you know is that in the o=1.3.4.6 string type
> thing, the last number in that is unique.

Unique to what???  The category or the article or both?  It looks like
both.

> Yeh... so if you'd rather use that... go ahead :).  Just let me know
> which method you're going to use.

Not sure yet.

> Basicly, if 6 on the end of that string is article 10, 6 will always
> be article 10 and there will be no other ObjectID's that point to
> article 10.  

So you're embeding the article ID (which was "p") in "o"?

> Nice eh?  So - you can do your URL ignoring the p= if
> you'd like.  You can even ignore type= too... cuz all external links
> and articles are livin under /kb/doc.

But how will I determine what is an internal article, or a mirrored
document???  Still type= right?

> So - it's entirely up to you, and I haven't broken anything.  :)  I'm
> still a nice guy right?

Actually I think you did break it, but I can fix it.  :) Let's see if I
can figure this out (let me know if I mess up):

/render.php3?o=0.1&p=1&type=1  
is the KB-Root, the home page.  Type=1 denotes the root.

/kb/render.php3?o=0.1.a.b.c.d&p=d&type=3  
is a category list.  The last digit in "o" == "p" which is the actual
category you're looking at.  Type=3 denotes a category listing

/kb/doc/alist.php3?o=0.1.a.b.c.d.e&p=e&type=3 
is an article list because it starts with /kb/doc/alist.php3.  The type is
either meaningless or it means "list".  Again the last digit in "o" == "p"
which is the category you're looking at.

/kb/doc/render.php3?o=0.1.a.b.c.d.e.Z&p=1&type=6 
is an article of some type because it starts with /kb/doc/render.php3 and
it lives in category "e".  type=6 denotes an internal article.  Z is the
global unique article # (this is what Dean will use to do his magic).  p
is completely meaningless for some reason.

So basically this is what I have to do:

Grab the value for "o".  Split it on the periods and generate an array of
the values of o.  Then get rid of the last digit, then reconstruct o with
the remainder.  Too easy in perl.  Then pass:

restrict="/kb/doc/render.php3?o=<new_value_of_o>" 

to htsearch.  Since the type still tells me if it is a internal or
external doc, I can also pass:

exclude="&type=6"

to only show external documents or:

exclude="&type=7"

to only show internal documents.

As you see, at this point I haven't used p=.  But, wait!  I could instead
set:

restrict="&p=X"

where X is a value of a category.  Now we can search by
category/subcategory.  Of course a subcat could be an "application",
assuming you can generate an appropriate list for me.  It would be nice
though if the /kb/doc/render.php3 URL's had a meaningful value of p
(namely the current category).

Jason, my guess is that it would probably be easier for Dean if the
Article ID had it's own param.  If you could put the value of Z in a
variable like "id" so we'd have:

/kb/doc/render.php3?o=0.1.a.b.c.d.Z&p=1&type=6&id=Z

It would be appreciated.  Notice that you can still have your unique
article ID (Z) in the o, but just duplicate it in id.

Well amazingly this wasn't so bad after all!  :)

--
Aaron Turner, Core Developer       http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization  http://linuxkb.org/
Because world domination requires quality open documentation.