Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 5

Author Topic: Categories and pages  (Read 27604 times)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #15 on: October 01, 2007, 07:47:03 PM »

Sorry guys to post this subject in MU, but it was just because I'm using it, so I asked here.
Perhaps this thread could be moved somewhere else, somewhere where more users will see it.

Good idea... topic moved. Good discussion as well... keep it going. This may well be the foundation for version 1.7.
« Last Edit: October 01, 2007, 07:49:20 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #16 on: October 01, 2007, 09:29:04 PM »

Doh ... Fred beat me to that section word ;)
In short, for now it's what I have found out as feature requested by customers ;) May be Yours want something different.
Ok, so not for technical reasons, that is. But don't get me wrong, Codetwist. I don't care whether content is positioned 1 or 3. The only reason we know that, because we lpeak into the database once in a while ;). Basically I only concerned with functionality.
What my customers want? Categories that start with a full page, not an index (point 2 in my previous post)

2 Displaying an article-menu on the page itself and in the articles (no category index). That would make the site look less blog-like, which is sometimes preferable.

And of course, they want subcategories as well.
Positions ... what positions? In current setup editor works with pages, categories, articles and extras. If option is added to constrain category to page editor gets another obvious option (in other words page as section) how to organize simple site structure; it's usability IMHO. And establishing such constraint doesn't require complicated nor a lot of code modifications.

As for category index - when it's filtered according to section - then it's just another form of decent context menu or submenu. Why that should be considered as something blog-related? And what should be displayed in category page itself - again I'd prefer simple selection when dealing with category definitions - should the default list of article briefs shown or should the category text be treated same way as for articles or it might be even both.

As for true subcategories ... if they are needed then they should be designed as such without any smart workarounds IMHO. There are already some modding activities reported in this forum AFAIK.
Logged

Joost

  • Guest
Re: Categories and pages
« Reply #17 on: October 02, 2007, 08:00:30 AM »

Positions ... what positions?
position 1 = article, position 2 = extra, position 3 = page That how sNews works ;)
In current setup editor works with pages, categories, articles and extras. If option is added to constrain category to page editor gets another obvious option (in other words page as section) how to organize simple site structure; it's usability IMHO. And establishing such constraint doesn't require complicated nor a lot of code modifications.

As for category index - when it's filtered according to section - then it's just another form of decent context menu or submenu. Why that should be considered as something blog-related? And what should be displayed in category page itself - again I'd prefer simple selection when dealing with category definitions - should the default list of article briefs shown or should the category text be treated same way as for articles or it might be even both.

As for true subcategories ... if they are needed then they should be designed as such without any smart workarounds IMHO. There are already some modding activities reported in this forum AFAIK.
When entering a full article, you have to go back to category-index to go to the next article and you cannot see which other articles the category contains.  That's what I associate with typical blogstyle. I find it annoying in most cases. I like a flat site structure on every level. Therefore I like a main category page, with a general introduction of what to expect and a menu with articles  shown on each page in the category.The section page would be the same as my category page, only mine would have an article menu that skips page(s) with the 'read more' snippets.

With any approach, subcategories will be only one step away. If you can assign a category to a page, why can't a category be assigned to an article within that category?
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #18 on: October 02, 2007, 09:06:31 AM »

position 1 = article, position 2 = extra, position 3 = page That how sNews works ;)
Ughhh ... defining requirements in terms of technical implementation details will not help me. Haven't yet met editor who cares if some hidden field is 1,2,3 or 101 :P
When entering a full article, you have to go back to category-index to go to the next article and you cannot see which other articles the category contains.  That's what I associate with typical blogstyle. I find it annoying in most cases. I like a flat site structure on every level. Therefore I like a main category page, with a general introduction of what to expect and a menu with articles  shown on each page in the category.The section page would be the same as my category page, only mine would have an article menu that skips page(s) with the 'read more' snippets.
I can see what else is in category. That's what context specific list of links to articles is for. Not in default sNews? Doh, it's only couple of code lines away from already included article list function.
With any approach, subcategories will be only one step away. If you can assign a category to a page, why can't a category be assigned to an article within that category?
You can. However, implementation and maintenance (and this includes adding features) will be far from simple IMHO.

P.S.
Anyway, Joost, Your idea is doable for sure. I only wonders what are going to be implementation implications for that; but luckily that's not for me to worry ;) When it will be available for evaluation I'll gladly look at it.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Categories and pages
« Reply #19 on: October 02, 2007, 12:17:10 PM »

Quote from: Joost
position 1 = article, position 2 = extra, position 3 = page That how sNews works

Yes, Joost, and it's a pretty clear illustration of the problem as I see it. But the "problem" with site structure runs deeper than that. The Page function was added late in the game – in version 1.5 if memory serves me– so there was already a structure in place when it came into play. Articles, Categories, Extra. Then Pages.

Regardless if we plan a construction top-down or bottom-up, it usually ends up with this:
Home;
   News, About, Work, Play, Archive, Contact, (Site Map);
       |     static      |        |          |        1 page         |
   articles            samples      lists                      lists

Or, on one line: Pages, Content. Categories are (normally) content tied. Comments are always tied to articles. Pulling on this thread some more, we can see that 1) Home is a Page. Home is not a category even when there are no categories at all, it is a landing page -- generally speaking. If you want it to have an id, it would be 0. Pages are generally speaking an extension of the Home page, landing pages with specific subjects or for specific reasons, like Contact or My Page. Pages would have the id 1. On a page you can have articles (id=2) with or without comments, Category listings (id=3) and content modules–Extra boxes–(id=4). The id's are only semantic markers to identify an imagined order, in real code they could have any id and thereby appear to be in any order. But the working order would be: Top level=Pages (site sections); Second level=Categories of articles and the articles themselves; Third level=Other, extra, content.

Maybe categories should be handled differently than my limited imagination does, and maybe this isn't the optimal structure... Categories should certainly be possible to view through a list that is present on all articles, just as there should be a way to make related articles topic-tagged and through that create a link to "next article on this topic", or a simple way to split articles over many pages (I'm talking in general terms here and not about any existing or planned mods), however, that seems like the next step in this evolution. In my mind it is necessary to find a better overall structure first and then burrow into details (even if details like category presentation should be considered as the structure is planned, naturally).

Have I mentioned that my mind is kind of warped, before my third cup of coffee anyway... ;D
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Categories and pages
« Reply #20 on: October 02, 2007, 02:53:21 PM »

Might be good to make clear distinction between following two aspects: Site Structure vs. Content Structure.

IMHO Extras are part of Content Structure in contrast to Home, Pages, Articles and Built-ins ;)

As I see current default structure - it's extremely flat (more like 1.5 levels out of the box without getting into tricks ;D ) :
Index (actually, this is Home)
   - Home
      - Articles (Home/Site Categories)
   - Homepage (IMHO no articles here)
   - Custom Pages
   - Built-ins
   - Site Categories (IMHO they are here)
      - Site Category Articles

What I'd like to have :
Index (actually, this is Home)
   - Home/Homepage (own description or link/brief mash-ups from descendants or both)
      - Articles (from Home/Homepage/Site/Sections as needed/promoted)
   - Section Pages (own description or link/brief mash-ups from descendants or both)
      - Section Categories (own description or link/brief mash-ups from descendants or both)
         - Section Category Articles
   - Custom Pages (own description)
   - Built-ins
   - Site Categories (own description or link/brief mash-ups from descendants or both)
      - Site Category Articles

So, if implemented then :
   - Sections->Categories->Articles gives 3 distinct levels which is enough for most cases
   - own description or link/brief mash-ups from descendants or both gives ability to fight blog-ness if and as needed

P.S. Probably, it's worth to describe Content Structure as well to be sure that all loose ends are covered during dreaming.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #21 on: October 02, 2007, 04:00:56 PM »

It is becoming apparent that the "Dudes" need to discuss the matter of setting up task or project-specific development teams, what tasks or projects should be incorporated into the next version (1.7 or 2.0 or whatever) and seek members willing to work on each project in teams of 2 or 3. That discussion will take place elsewhere.  ;D
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Elessar

  • Newbie
  • *
  • Karma: 1
  • Posts: 43
Re: Categories and pages
« Reply #22 on: October 02, 2007, 09:49:03 PM »

Holy *** I didn't expect that, when I asked this question I did not know it will become such a discuss  :o .

I can't really help you but my point a view for the structure was.

- Home (with some articles like 'welcome' and 'news')
    -Articles
- Pages
    - Categories
        - Articles
- Categories (this is how it is now)
    - Articles
...etc...

With why not a drop-down menu when we click on 'Pages' to see the categories that are in.

Well thanks for being so 'involved' (don't know if it is the right word) in this topic.
Logged
I'm a french guy, so if I made some mistakes in my post, just tell me. ;)

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #23 on: October 02, 2007, 10:57:08 PM »

@ Elissar... No problem... the discussion is good because it serves as 'fertilizer' to get the seeds of evolution growing... if you know what I mean.  ;)
I can say... at this point... that the Forum "Bosses" have already started on a Work Plan for version 1.7. There is no telling when 1.7 will eventually be released... it could be 3 to 6 months down the road... but this discussion will definitely be taken into consideration. Care will be taken to ensure all existing 1.6 mods continue to function with the next version... where possible.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
Re: Categories and pages
« Reply #24 on: October 03, 2007, 06:32:36 PM »

Quote from: Joost
position 1 = article, position 2 = extra, position 3 = page That how sNews works

Yes, Joost, and it's a pretty clear illustration of the problem as I see it. But the "problem" with site structure runs deeper than that. The Page function was added late in the game – in version 1.5 if memory serves me– so there was already a structure in place when it came into play. Articles, Categories, Extra. Then Pages.


Pages was in the engine back in 1.3 days as I recall...
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #25 on: October 03, 2007, 11:12:18 PM »

No... just checked... no pages in 1.3.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
Re: Categories and pages
« Reply #26 on: October 04, 2007, 01:14:11 AM »

Pages = Position 3?

From 1.3
Quote
//DISPLAY MENU ITEMS
function menu_items() {
   echo "<a href='index.php?action=archives'>" .l('archives'). "</a>";
    $db = mysql_connect(s('dbhost'),s('dbuname'),s('dbpass'));
   mysql_select_db(s('dbname')) or die(s('dberror'));
   $query = "SELECT * FROM " .s('prefix'). "articles WHERE position = 3 ORDER BY id ASC";
   $result = mysql_query($query);
   while ($r = mysql_fetch_array($result)) {
   echo "<a href=\"index.php?id=" .$r['id']. "\">" .$r['title']. "</a>"; }
.......
}

From 1.6
Quote
// DISPLAY PAGES
function pages() {
   $categorySEF = get_id('category'); $pageSEF = get_id('article'); $home = l('home_sef');
   $class = (empty($categorySEF) || $categorySEF == $home && empty($pageSEF)) ? ' class="current"' : '';
   echo '<li><a'.$class.' href="'.db('website').'" title="'.l('home').'">'.l('home').'</a></li>';
   $class = ($categorySEF == 'archive') ? ' class="current"' : '';
   echo '<li><a'.$class.' href="'.db('website').'archive/" title="'.l('archive').'">'.l('archive').'</a></li>';
   $query = "SELECT * FROM ".db('prefix')."articles WHERE position = 3 ORDER BY id";
   $result = mysql_query($query);
   while ($r = mysql_fetch_array($result)) {
      $title = $r['title'];
      $class = ($pageSEF == $r['seftitle'])? ' class="current"' : '';
      if ($r['id'] != s('display_page')) {echo '<li><a'.$class.' href="'.db('website').l('home_sef').'/'.$r['seftitle'].'/" title="'.$title.'">'.$title.'</a></li>';}
   }
.............


From 1.3
Quote
//NEW ARTICLE
//*************
function new_article() { ?>
   <h2><? echo l('new_article'); ?></h2>
     <form name="post-text" method="post" action="index.php?action=process&task=new">
........
       <p><br /><? echo l('position'); ?>:</p>
      <p><input type="radio" value="3" name="position"> <? echo l('display_menu_item'); ?></p>
...............

Just because it wasn't prominent, doesn't mean it wasn't there.

Extra (if Joost's positions are correct) was in 1.3 too.. Postion 2  was occupied by Right
Keys' position 5 was occupied by Left, so you had your two extras already...

1.3/1.4 wasn't that far ago...
« Last Edit: October 04, 2007, 02:00:20 PM by Keyrocks »
Logged

Joost

  • Guest
Re: Categories and pages
« Reply #27 on: October 04, 2007, 02:03:49 AM »

According to Mika's Developers Edition functions left() and right() are replaced by function extra (), position 2.
« Last Edit: October 04, 2007, 02:05:52 AM by Joost »
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Categories and pages
« Reply #28 on: October 04, 2007, 02:04:29 PM »

Pages = Position 3?
My apology EQ... right on... It slipped my mind... my search was quick, only to find references in snews.php (1.3) to "pages"... in the comment functions.  :P
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

centered

  • Guest
Re: Categories and pages
« Reply #29 on: October 04, 2007, 05:09:43 PM »

According to Mika's Developers Edition functions left() and right() are replaced by function extra (), position 2.

I know, I forget what replaces Position 5 in 1.5/1.6?
Logged
Pages: 1 [2] 3 4 5