Common Wagn patterns

Some common patterns that Wagneers have found useful:

 

 

Discussion cards

 

Comment interface
Successful community websites make it very easy to have conversations. We often do this on Wagns by putting comment boxes at the bottom of various cards. See a basic introduction to Wagn's comment feature.

 

Those docs talk about using "+discussion" cards for adding comment cards to other cards. That's becoming a regular pattern, and we often add "+discussion" to type forms by including this:

{{+discussion|open}}

Even if you don't want the discussion to be visible in your card itself, it's accessible in the community subtab of the Related tab.

 

 

Commonly used searches

 

When you want the cards in a set you can't just use something like RichText+*type or discussion+*right, because you'll get all of the interface associated with sets. However, you don't have to add a new search card, you can just append one of the built-in sorting cards, e.g., RichText+*type+by name or discussion+*right+by update. All new Wagns have had these (and "by create") built in for a while but if your Wagn lacks them, you can copy them from here:

 

 

Blogging

 

Create a "Blog entry" cardtype, with a form of whatever elements you want in each blog entry. The simplest way to then display a blog of your entries is to create a Search card with this CQL:

{"type": "Blog entry",

 "sort":"create",

 "dir":"desc"

}

This returns all Blog entries, in the order created, starting with the most recent. Each entry will be closed but you can adjust that view if you like. To make a nicer presentation, include the Search in another card and add whatever you like before/after the Search. Two examples here on wagn.org — we've included a card with links to our blog entries in the sidebar: Wagn News; and we have a card that shows the full text of each entry: Wagn News page.

 

If you want to be able to draft blog entries privately before publishing them, set "Blog entry+*type+*structure" permissions so that viewing is restricted, and when you're ready to publish the entry, change it's permission to be viewable by Anyone.

 

To enable commenting, set permission on "Blog entry+*type+*structure" so that it can be commented on by Anyone (or Anyone Signed In if you want to require that). Or, include a discussion card as described above.

 

You can customize the appearance of your blog extensively using CSS. For two examples, see Ariel Millennium Thornton's journal, and John Abbe's blog.

 

Wherever you want a link to add new entries, just add add a blog entry. If you want to restrict who can post blog entries (by default anyone with an account will be able to, or anyone at all if your Wagn is open-edit), read up on permissions and create a role for people you want to let blog, then go to the Options tab of your "Blog entry card" and set it so that only people with that role can create Blog entry cards.

 

RSS

 

Every Search in Wagn automatically has an RSS feed, so the Search card returning your blog entries will show up in your browser as having a feed. If you include the Search card elsewhere, you may want to add a visible RSS icon, see Wagn News for an example of this.

 

 

Tagging

 

Tagging is a way for individuals to label things to make them easier to find information later, and for a community to discover or create a common vocabulary of their interests. Delicious made tagging popular for bookmarks, Flickr for photos, and Technorati's standard for tagging blog posts is now in wide use. Tagging was the inspiration for Wagn's compound names; they turned out to be far more powerful than tagging, so of course it's easy to implement tagging in Wagn in some very cool ways. Here's one way we've found that is certainly useful:

 

We want to include a plus card associated with each thing we're going to tag, that can hold as many tags as we like. We usually give it cardtype Pointer, and call it +tags. You could do this one by one for every card you want to tag, but typically you want to be able to tag a whole category of things — e.g. people, events, projects. So it's easier to create a types for each such category, and include +tags on the form for that cardtype. For an example, see Peer+*type+*structure, open below.

 

Once cards have tags, then you can use Search and virtual cards to show which cards, or even which cards of a certain cardtype, have that tag.

 

You can tag something with cards that don't exist yet. When you save you'll see offers to add cards for those tags.

(more to write on this...)

 

 

 


 

 

For talking about Common Wagn patterns:


Putting images on User cards (and/or just build in by default?)

  --John Abbe.....Tue Apr 14 17:52:15 -0700 2009


Help in sidebar: open/close icon, link to full docs, request questions and permission comments on

  --John Abbe.....Tue Apr 14 23:15:36 -0700 2009


Generalize tagging pattern to Pointer/Search pattern (with tagging as example?)

  --John Abbe.....Tue Apr 14 23:16:11 -0700 2009


name                                               type              content
-------                                              -------           -----------
MyType                                            Cardtype  
MyType+*type+*content                   Basic             {{+category}}
Category                                          Cardtype
Category+*right+*default                 Pointer
Category+*options                            Search         {"type":"Category"}
Category+*type+*content                 Basic            {{+Cards in Category}}
Cards in Category+*right+*content    Search         {"plus":["category",{"refer_to","_self"}]}


preface with something about wiki patterns generally? (or do that wherever in the documentation points here) http://wikipatterns.com/

  --John Abbe.....Wed Apr 15 10:46:19 -0700 2009


an uncommon pattern might be that if you change Role forms, you probably want to put that info in the related tab

  --John Abbe.....Tue Apr 21 09:39:22 -0700 2009


system message hack - putting a card like http://connectipedia.org/wagn/message_js2 in *sidebar

  --John Abbe.....Mon Jun 01 12:26:29 -0700 2009


Using CSS (and replacing p's with divs :-P) to inline

  --John Abbe.....Fri Jul 03 19:28:59 -0700 2009


Please add the pattern "user groups".

  --Philipp.....Thu May 31 18:35:40 +0000 2012


... and put classes and ids in those div tags

.. get skin.js and theme.css to share a table:

 

id => attribute_classes per each skin_name -> theme_name

 

I don't know how it all works together until i'm in it.. bear with me. I'm new :)

  --cquin.....2013-02-26 06:34:28 +0000