Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Pages: 1 2 3 [4]

Author Topic: Restructuring the articles table  (Read 21188 times)

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: Restructuring the articles table
« Reply #45 on: March 18, 2008, 06:43:16 AM »

1. Two text area in Article create/edit form.
  - The first part named as: 'The Begining part of article'.
  - The second part named as: 'The Rest of article (if you want to split it for Continue reading)'
Article can't be submited if first text area is empty. This way, the summary table  field is ALWAYS not empty.

Edit: Also, maybe a blogger want entire article on first page (I saw this on many blogs) so, you cant limit $summary to a fixed number of characters. And this is another reason why summary cant be empty. Look at Drupal CMS.

2.Why join them? you just echo($summary) on home page. For article page, echo(summary) and echo(restOfText) , you can even avoid testing if restOfText (I don't remember how you named the second field...) is empty, because if empty not echo anything.

This way, break is history.

EDIT: Also a good rss feed, with more options (title, short or entire article, no verification is needed)

3.I dont know how to search but I think it does not matter much if search function is a little bit slow... not every visitor use it as much as viewing articles.
« Last Edit: March 18, 2008, 07:24:54 AM by funlw65 »
Logged

jackp

  • Newbie
  • *
  • Karma: 2
  • Posts: 32
  • But you said "Stick it there!!"
    • Tim Chard - myEmote
Re: Restructuring the articles table
« Reply #46 on: March 26, 2008, 02:01:28 AM »

As a complete newbie please don't thrash me if I get this wrong, I know nothing of what is best method for machine load.

I have been thinking about this for awhile, because I would like to implement some sort of "easy" mod/s to improving both rss feeds and article summaries in one go.

First I thought split panel in admin to write summary and article

Second I thought you could just select first x (200) characters of articles

Now I am thinking after reading your discussion maybe a new set of tags [summary] [/summary] can be used in text editor. This way you can use them anywhere in article and the text inside the tag could be used for the rss feed also.

No extra fields in db need be created, only 20 bytes extra to store the summary tags. I don't know whether it would be difficult to add code to parse for extra tags or not. The [break] tag just isn't quite enough for me.

Jackp
Logged

Joost

  • Guest
Re: Restructuring the articles table
« Reply #47 on: March 26, 2008, 02:07:12 AM »

As a general remark: Why not use the meta description instead?
Logged
Pages: 1 2 3 [4]