|
Posted by Rik on 06/06/07 18:12
On Wed, 06 Jun 2007 19:46:40 +0200, Matt <guitarromantic@gmail.com> wrot=
e:
> Hi there,
>
> I'm working with a bit of a messy query but I'm not looking for tips
> on improving it (it's been a headache enough, haha).
>
> Basically, my site posts articles written by multiple authors. In the
> past we'd associate these articles with a user_id referring to the
> "Multiple" author, but now writers want their own writing within an
> article to be linked with them.
>
> This led to me splitting the article table in two: we have
> review_index which has all the generic/global data for the article
> (band name, record label, etc), and review_pages which has a (non-
> unique) field review_id which links to the id row in the review_index
> table. With me so far?
Not really, no.
Are reviews the same as articles?
> The form I wrote for admins to post multiple author reviews works like=
> this:
>
> - asks them for global variables and inserts them
> - asks them to add a review and select username for an author
> - upon submitting this, offers them to post another (still associated
> with the original globals) or lets them close the job.
Or you could have a usual form:
Review for:
- (radio) existing data (automatically selects last entered 'article=
')
- (radio) new data -> formfields for data required for this
Review:
- content
- author
So, you still will save an article with the content provided to you by a=
=
particular author at the same time (well, fractions of a second apart).
Possibly you could add a radio list/selectbox at the bottom about what =
they want to do after adding it:
a: add another review by another author for this article.
b: add another review for another article.
c: stop adding stuff at all
> It's done in this way because in order to associate the review_id with=
> the id field, I have to KNOW what the id field in the review_index is
> going to be. I can't just +1 to the most recent one, since this'll
> cause issues if we delete reviews etc.
>
> So what this means is, when a user clicks onto an article while we're
> in the process of posting it, they may load a page with all the
> globals in place, but none of the actual content. I'm trying to echo a=
> simple "Please reload the page in a few minutes" message, but can't
> get a working result. I've tried variations on:
>
> if ($review_text =3D null) {
> echo "come back soon!";
> }
>
> if (empty($review_text)) {
> echo "come back soon!";
> }
>
> if (!$query_result) {
> echo "come back soon!";
> }
>
> but none of these display. Is there a solution here? It's a trivial
> issue really since it's essentially catering to people who click on an=
> article within a 1 minute or so period, but still.
Normally, when adding something requires several steps, one could also a=
dd =
a 'publish' boolean field, which is checked on displaying =
lists/navigation/articles etc. Set to 0 for the duration, set to 1 if =
finished, don't display anything that has 0 as a publish value.
-- =
Rik Wasmus
[Back to original message]
|