Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Defining stories <--> objects associations New Code
By sleeper22 , Section Code []
Posted on Sun Sep 08, 2002 at 12:00:00 PM PST
A mechanism for establishing many-to-many relationships betweeen stories and other records in the database.

I. motivation
I'd like to see more features in scoop that support integration with a well-structured set of data, around which discussion can focus.

Phantros' site 4literature.net is a good example -- there are all those texts that are being reviewed, so strong ties between stories and non-story data is important. Other uses include bookstore/library, a store or other catalog, or the tying of files (photos,sound,documents,diagrams), wikis, anything that can be considered an object.

Once this mechanism is implemented, there are plenty of fun possibilities, such as search enhancements, cross-referencing, and new types of stories...

For example, a story in the 'photos' section could automatically
display a thumbnail in the story_summary area, with a link to the photo that would be more reliable than a hypertext link.... i.e. you could change your site's directories around and the links would change automatically because they're not hard-coded in the story's text.

II. interface
With this feature installed, the submitstory page includes input fields for identifiers of objects that should be tied to a story.

III. db changes

A. a new table:
story_ties
----------
tie_id = auto increment primary key
sid
class  = the name of a table like "books" or "wiki"
field  = the name of field of that table
value  = the value of the field for the record being tied to.

unique index on (sid,class,field,value)

<table>.<field> should be a key field, so that class+field+value identifies one and only one record in the scoop database.

tie_id is used to keep track of the order of insertion, so that you can list ties in order of relevance/strength.

B. a new block
story_ties_types block that is arranged table style (one record per line, values separated by commas), with fields:
----------------
class = name of the tied table
field = name of a key field in that table
label = what to call this object class being tied to
perm  = name of scoop perm allowing creation of this tie type
max_ties = max number of ties of this type, per story

if this block doesn't exist, the patch to AdminStories.pm will have no noticeable effect.

C. perms
one or more perm(s) must be created that allow a submitter to enter story ties on the submit story page. One perm can be used for more than one tie type; i.e if you wanted you could have a perm "tie_stories" that controls the use all types of story types.

for each perm mentioned in story_ties_types block:

  1. add the perm name(s) to the "perms" block
  2. grant some group(s) the perm in the Groups admin tool
sample block contents
book,isbn,ISBN #,write_reviews,3
recipe,recipe_id,Recipe Number,1
patch,patchid,Scoop code patch,3

IV. TODO

  • methods for displaying tied objects. currently you'd have to write your own box.
  • search enhancements
  • make the data entry more flexible, such as by addint a field to story_ties_types that controls input type (text field; select from list)
V. CODE
If anyone wants a diff now, that's cool. otherwise i'd like to do more testing and hear your ideas about this design.

VI. Using this feature for scoop.k5
Too bad we don't yet have wikis or some other form of versioned document objects on this site... wouldn't it be so useful to upload a piece code that you can continue to update? yet have it remain associated with a story that introduces it and maintains running commentary from all users? and be able to browse back and forward thru time -- from one draft to the next? and possibly allow other users to edit it, marked with different colors?

Using story_ties, we could not only tie this shared document that is held in the site's db, but also tie a link to the webCVS page. Then you can make diffs between any two versions of the cvs file and the discussed file... but i guess that's another sstory!

< GuppyLog.Com - For all you Guppy people! | Scooping the Macintosh Performa 6116CD >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Poll
useful feature?
· yes for me 100%
· maybe for someone 0%
· no 0%
· isn't it thirsty around here? 0%

Votes: 2
Results | Other Polls

Related Links
· Scoop
· More on New Code
· Also by sleeper22

Story Views
  34 Scoop users have viewed this story.

Display: Sort:
Defining stories <--> objects associations | 8 comments (8 topical, 0 hidden)
Whoah, way cool. (none / 0) (#1)
by LukeyBoy on Wed Sep 11, 2002 at 07:52:29 PM PST

Very nice, this will push Scoop closer to a full-scale content management system.



very interesting (none / 0) (#2)
by Phantros on Tue Sep 17, 2002 at 03:28:07 PM PST

Quite an interesting idea. I'm looking forward to seeing how this ends up.

As an aside, being a bit less experienced and a bit more lazy, I loosely linked the stories being reviewed with the section of the story. For example, the text might be in /Stephen_Crane/Red_Badge_of_Courage and the section might be /section/Red_Badge_of_Courage with a parent section of /section/Stephen_Crane so I got the parent section then stripped the two, recombined, and got the URL to point to the book. I then added a link to the book in the sections_title_subsections box. Example here.

Your solution is a bit more complete and elegant though. ;)

You mentioned wikis...I've been kinda wanting a wiki system to be built into scoop. I'd use it to have a page where users (perhaps trusted users and higher?) could write a biography for each author.

4Literature - Read, write, and discuss your favorite books.



edu (none / 0) (#3)
by Baker on Wed Jan 27, 2016 at 02:40:12 AM PST

This story and tale is very fascinating and interesting. The skills are ascertained and objectivity is liked. The appreciation is also of the highest order. The researchpaperservicesreviews.com is promoted and injected.



design (none / 0) (#4)
by scalett on Sat Mar 12, 2016 at 01:20:35 AM PST

Created in 1952, Ray Ban has become one of abounding top architecture houses on earth. Originally Cheap Ray Ban accepted as Ray Ban bros, the aggregation was centered alone in Italy with Mario Ray Ban on the helm, but over time the address has advance throughout the world. Today, the aggregation is accepted for abounding top actualization items which includes Ray Ban sunglasses.Alexe Barne is a actualization enthusiast and sunglasses collector. Turn her addiction to actualization to business and blogging. She is now managing a website area she shares all about boutique Ray Ban stuff. For a website absolutely adherent to Sunglasses appointment Cheap Ray Ban Sunglasses Website Sunglasses Explained and acquisition out about Sun glasses as able-bodied as Decree Sunglasses and more, including Gucci Sunglasses, LV Sunglasses, Oakley Sunglasses, Prada Sunglasses, Ray Ban Sunglasses and more.



Fashion Trend (none / 0) (#5)
by Gabrielly on Fri Aug 05, 2016 at 01:38:38 AM PST

Chanel's handbag lookbooks are always fun; they usually contain 35 to 45 bags, ranging from casual looks like denim or canvas to eye-popping exotics and pieces that feature heavy beading or embroidery, all of which give Chanel fans a very good idea of the longchamp outlet full lines they'll find in stores. For Pre-Collection Fall 2016, Chanel has been even more generous: its just-launched lookbook features 64 brand new bags. In this replica handbags uk collection, there aren't any heavy pop cultural influences, as has been common in seasonal Chanel collections of the recent past. Instead, Karl Lagerfeld and his accessories team went back to basics, with rich ray ban outlet tweeds, quilted leather and embellished python. Every couple of years, it's nice to have a Chanel collection whose only theme is Chanel. Take a cheap monster beats look at the bags and their prices below; this collection is currently available in Chanel boutiques worldwide.



Self Improvement (none / 0) (#6)
by davidqq on Sun Dec 10, 2017 at 10:24:06 AM PST

Self Improvement The biggest benefit of self-improvement is that it always results to internal jealous people, personal development and improvement, personality progress and your success. it comes from self-assurance, self-admiration and self-respect.



check cashing spring-valley (none / 0) (#7)
by Pervez on Sun Apr 08, 2018 at 02:03:13 PM PST

Regards a tremendous amount! Surely crammed data plus functional specifics. My spouse and I found your problem's substitute starting off well over on this page. At this stage follow-up check cashing spring-valley While I to some degree ally his/her models by using this important informative simple fact.



best construction company City of Yonkers (none / 0) (#8)
by Pervez on Sun Mar 24, 2019 at 01:15:04 PM PST

This can be an excellent suggestion particularly in order to individuals a new comer to the actual biosphere. Short however really exact info. Many thanks with regard to discussing that one. Have more info click best construction company City of Yonkers Essential studies publish!



Defining stories <--> objects associations | 8 comments (8 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search