From: Mitra <mi...@ea...> - 2003-05-22 05:35:13
|
I think most of what Norbert is saying below makes sense. My prefered architecture for discussions would have been to put Discussions in slices, with a certain structure (e.g. a Discussion Template) and then put the code to make a discussion slice work with one or more regular slices into APC-AA. This is NOT trivial, but its probably easier than what happened, AND would have the advantage - as in Norbert's suggestion - of being able to use all the regular slice tools, such as multiple views etc. Similarly .... Constants should probably have been done that way - I usually find I need to use a slice INSTEAD of a constant group because I need something extra - like an introductory text to put at a change of Category. Now .... how we get there from here is a different question, much harder .... - Mitra P.S. Anyone wonder now why I suggest that major architecture changes / additions be discussed here BEFORE implementing, we've seen problems with integration each time a change is made quickly without discussion. At 10:34 AM +0200 21/5/03, Norbert Brazda wrote: >From: "Mitra" <mi...@ea...> >> >I think that the best way would be to move disucssions to a separate >> >slice/module, but it might be a lot of work. >> >> I'm not sure about this .... the only weird stuff with Discussions >> was how it *was* integrated into slice.php3, so that instead of beign >> explicitly coded as a view, it was just a flag. Now - as a view - it >> makes more sense, but the code still makes some assumptions that only >> work when its incorporated into slice.php3. > >If discussions are standard slice/module, you can use all >functionality of views, customize fields or add discussion items by >email. > >Now it is quite hard (in fact, I do not know how to do it) to show >recently added discussion comments (i.e. to show which news articles >are being discussed right now) or to show discussion with fulltext >comments instead of standard list of discussion comment titles with >buttons (show all, show selected, add comment). > > > >> The best solution - in my opinion - would be to drip slice.php3 >> entirely, (except for some backward compatability stuff) and make >> view.php3 do everything we want.! > >This might solve some problems, but I am afraid of backward compatibility... > > >> >> I'd like to add the ability to do a Category list in Views, but I'm >> >> unlikely to get to that. >> > >> >what do you mean by "Category list"? >> >> I want to be able to put a short menu at the top of a List View, that >> allows selecting a subset of the view based on the category. The key >> is that the list must ONLY show categories that actually have items >> in them. Not all the categories that can be entered in the add-item >> screen. > >We solved this by separate view that generates select box from >"category........" field from actual (e.g. news) slice. The problem >is only if categories use different "title" and "value" (stored in >database). Again - if the categories were standard slice/module, >there is no problem so show other field (e.g. title instead of id)... > > >Just an example how we use categories for menu navigation. It is a >simple website with almost complete content control given to user. >Might be usefull for someone. > > >We use three slices/modules: menu, articles, site > > === slice "menu": > title (textbox) > description (rich text textarea) > parent category id (selectbox pointing to the same slice, >showing item titles, storing item ids) > === > > === slice "articles": > title (textbox) > description (text textarea) > fulltext (rich text textarea) > category id (selectbox pointing to the slice "menu", showing >item titles, storing item ids) > ... other fields... > === > >Then there is simple site module that inclues views and shows menu >in left column of the page and articles in right column: > > === module "site" structure: > Header > === > <!DOCTYPE html public "-/W3C/DTD HTML 4.0 Transitional/EN"> > <html><head><title>Simple AA site</title></head> > <body bgcolor="#FFFFFF" link="#0000FF" vlink="#000080" >alink="#800000"> > === > Top > === > <h1>Title: Simple AA site</h1> > <table><tr><td> > === > Menu (cat) > - SubMenu cat=.+ > === SubMenu: > <dl><dd>{view.php3?vid=504&cmd[504]=i-504-{cat}} > <br><br>{view.php3?vid=503&cmd[503]=c-1-{cat}} > <br></dd></dl> > === > - MainMenu > === MainMenu: > <dl><dd>{view.php3?vid=503&cmd[503]=c-1-rootcatgegoryid} > <br></dd></dl> > === > Main (x,cat) > === > </td><td> > === > - Article x=[0-9] > === Fulltext of article: > {view.php3?vid=507&cmd[507]=x-507-{x}} > === > - List > === Category description and list of articles: > >{switch({cat}).+:{view.php3?vid=505&cmd[505]=i-505-{cat}}:Welcome >to...} > <br>. . . . . . . . . . . . . . . . . .<br><br> > >{view.php3?vid=506&cmd[506]=c-1-{cat}&set[506]=listlen-10,page-{page}} > === > Footer > === > </td></tr></table> > </body></html> > === > === > > >View 503 shows submenu items >View 504 show parent categories (path like "top > europe > >slovakia > bratislava" in this case) >View 505 show fulltext description of menu item >View 506 show list of articles (date, title, description) >View 507 show fulltext of article (title, description, fulltext, etc.) > > === menu view No. 503 definition > <a class="menu" href="?cat=_#ITEM_ID_">_#HEADLINE</a><br> > [Condition 1 in this view is set "Parent category", "=", >parameter is left empty] > === > === menu view No. 504 definition > {view.php3?vid=504&cmd[504]=i-504-{_#CATEGORY}} > > <a class="menu" href="?cat=_#ITEM_ID_">_#HEADLINE</a> > === > > >Advantage of this setup is, that user can edit his menu and change >hierarchy hierarchy (even move whole subtree to another part of the >menu). Menu items contain rich text area field for item description, >but he/she could store there as much text as needed and easily >create special section of the site. All articles are categorized by >the menu items and displayed in proper section. > > > > >I have the feeling that there are some historical relicts in the AA >from the age before "modules" and {} commands (e.g. slice.php3; >different conditions for slices and views; how discussions are >stored in database; categories) and they mix with new features. It >is really hard for new developers (sometimes also for me) to decide >which feature/option to use and how. > > > > > Norbert Brazda > > CHANGENET.SK > Mlynske nivy 41, 821 09 Bratislava > tel/fax: 02-55560026, 0905-729359 > > > SPAJAME LUDI, KTORI MENIA SVET > ________________________________________________________________ > Prinasame pohlad na svet ocami aktivnych obcanov. Vytvarame >nezavisly priestor > pre kriticke nazory a reflexiu diania okolo nas. Poskytujeme >nekomercne internetove > sluzby pre neziskove organizacie a samospravy. > > > > > > > > > >------------------------------------------------------- >This SF.net email is sponsored by: ObjectStore. >If flattening out C++ or Java code to make your application fit in a >relational database is painful, don't do it! Check out ObjectStore. >Now part of Progress Software. http://www.objectstore.net/sourceforge >_______________________________________________ >Apc-aa-coders mailing list >Apc...@li... >https://lists.sourceforge.net/lists/listinfo/apc-aa-coders -- Mitra Technology Consulting - www.mitra.biz - mi...@mi... 02-6684-8096 or 0414-648-722 Life is a Mystery to be Lived, not a Problem to be Solved |