[ewiki] Re: Use of EWIKI_DB_F_APPENDONLY

  • From: "Mario Salzer" <mario@xxxxxxxxxxxxx>
  • To: ewiki@xxxxxxxxxxxxx
  • Date: Sat, 1 Nov 2003 00:20:06 +0100

Hey,

The _F_APPENDONLY was meant to be something like the _F_READONLY, so while
this is yet not implemented I would say you shouldn't use it  for the thread 
plugin.

> Can I use EWIKI_DB_F_APPENDONLY to flag 'thread pages' for my forum plugin?
> Some other flag?  In operation thread pages should only allow for the
> addition of posts--which are on separate pages.  If I try to distinguish
> threads based on page names I need a regex to separate them from their posts
> and I can't put the flag in ['meta'] because it is not returned by search.

If your issue was about preventing thread pages to get clicked independent from
the pages they're attached to I would rather recommend using _F_DISABLED
or _F_BINARY eventually even _F_SYSTEM or unsetting _F_TEXT.

But for the distinguishing purpose, you're right, there should be a better 
solution.
If it wasn't sometimes that large I'd say we could let SEARCH and GETALL return
the {meta} besides the {flags}. Eventually we should even add support for
SEARCHing in multiple database fields (but that's complicated and far away...)

Right now I could only suggest using the $dbquery_result->get("_ALL") trick to
fetch the whole database entry together with the SEARCH results.

If you think the regex doesn't distinct the thread pages not exactly enough from
other stuff in the database, so this was important enough, you could of course
invent your own EWIKI_DB_F_CONSTANT. We then only needed to negotiate on
the bit range (I hereby reserve all prime number bits for myself ;)
I don't think "user flag values" is the best thing to do here, but as temporary
workaround it would be ok?

Greets,
mario


-- 
Alkohol eignet sich auch gut als Lösungsmittel für Probleme aller Art.

______________________________________________________________________________
Zwei Mal Platz 1 mit dem jeweils besten Testergebnis! WEB.DE FreeMail
und WEB.DE Club bei Stiftung Warentest! http://f.web.de/?mc=021183


Other related posts: