Skip to content

Commit

Permalink
Item954: initial commit of TagsPlugin
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/TagsPlugin@2289 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Feb 2, 2009
0 parents commit 9ed00db
Show file tree
Hide file tree
Showing 26 changed files with 1,467 additions and 0 deletions.
79 changes: 79 additions & 0 deletions data/System/TagsPlugin.txt
@@ -0,0 +1,79 @@
%META:TOPICINFO{author="BaseUserMapping_333" date="1211031581" format="1.1" version="1.6"}%
---+!! !TagsPlugin
<!--
One line description, required for extensions repository catalog.
* Set SHORTDESCRIPTION = Full strength Tagging system
-->
%SHORTDESCRIPTION%

%TOC%

---++ Usage
TagsPlugin allows users to tag resources of differing types - and so the TML used to access the
tags specifies this information too.

TagsPluginViews defines the common Tag widgets that can be re-used via Sectional includes.

---++ Tag Filters
step 1: add ?tagfilter=Tag,More+Tags will thus use that filter instead of the web as a context??


There are session settable 'Filters' that will reduce the set of topics in a similar way
to 'Webs' - they are _session_ based - at least
until I can work out howto save a filter to a Name, that can be used as a Pseudo-Web.

---+++ =TAGLIST=
Lists the tags for the requested resource
---+++ =TAGENTRY=
allows users to add, remove and manipulate tags for a resource
---+++ =TAGCLOUD=
WebTwoyGoodness.
---+++ SEARCHing
To search for topics that are tagged with (or not tagged with), use a %SYSTEMWEB%.QuerySearch
with the =taggedwith(tagname)= operator



---++ Examples
---+++ list of all user's tags on the current topic
%TAGLIST{show="user"}%
---+++ edit (the current user's) the tags on the current topic
%TAGENTRY%
---+++ tag cloud of all user's tags on the current topic
%TAGCLOUD%

---++ Installation Instructions

*To initialise the tag database* and to tag each topic with the webname it is in, goto
%SCRIPTURL{rest}%/TagsPlugin/initialiseDatabase

If you want to preload the tags database with Country Names, you need to install Geo::GeoNames and click
%SCRIPTURL{rest}%/TagsPlugin/updateGeoTags
* uses the CC licenced http://www.geonames.org


%$INSTALL_INSTRUCTIONS%

---++ Plugin Info
This Plugin uses DbiContrib to store the tagmap in a database for fast querying.

Schema & design inspired from [[http://forge.mysql.com/wiki/TagSchema][MySQL Forge]],
but treating Tags as Items, so that you can tag a tag (creating a heirarchy of tags)


| Plugin Author(s): | Foswiki:Main.SvenDowideit |
| Copyright: | � SvenDowideit@home.org.au |
| License: | [[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] |
| Plugin Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order --> |
| Dependencies: | %$DEPENDENCIES% |
| Plugin Home: | http://foswiki.org/Extensions/TagsPlugin |


__Related Topics:__ %SYSTEMWEB%.FoswikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.SitePreferences

<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the feedback topic on foswiki.org instead. -->

* [[%ATTACHURL%/tagging_folksonomy.pdf][tagging_folksonomy.pdf]]: mysql slide presentation

%META:FILEATTACHMENT{name="tagging_folksonomy.pdf" attachment="tagging_folksonomy.pdf" attr="" comment="mysql slide presentation" date="1211023942" path="tagging_folksonomy.pdf" size="905979" stream="tagging_folksonomy.pdf" tmpFilename="/var/tmp/CGItemp63078" user="BaseUserMapping_333" version="1"}%
43 changes: 43 additions & 0 deletions data/System/TagsPluginViews.txt
@@ -0,0 +1,43 @@
---+++ list of everyone's tags on the current topic
%TAGLIST{item="%BASEWEB%.%BASETOPIC%" }%
---+++ list of %NOP%%WIKINAME%'s tags on the current topic
%TAGLIST{item="%BASEWEB%.%BASETOPIC%" show="user"}%

---+++ tag cloud of everyone's tags
%TAGCLOUD{}%

---+++ tag cloud of everyone's tags on ?tag=%URLPARAM{"tag" default="undef"}%

%TAGCLOUD{item="%URLPARAM{tag}%"}%



---+++ tag cloud of Tags tagged with %URLPARAM{tag}% (inverse tag lookup)

%TAGCLOUD{
type="tag"
tag="%URLPARAM{tag}%"
format="[[$tagurl][$tag]]"
separator=" "
}%

---+++ List of topics tagged with %URLPARAM{tag}% (inverse tag lookup)

%TAGCLOUD{
type="topic"
tag="%URLPARAM{tag}%"
format=" $tag"
separator=" "
}%


---+++ topics tagged with ?tag=%URLPARAM{"tag" default="undef"}%
* =%<nop>SEARCH{"%URLPARAM{tag}%" type="tag"}%=
* TODO: add $count, $relatedTags etc.
%SEARCH{"%URLPARAM{tag}%" type="tag" web="all" nonoise="on" format="| $web.$topic | $summary | $percntTAGLIST{item=$quot$web.$topic$quot format=$quot[[$tagurl][$tag]]$quot}$percnt |"}%

----
need to be able to
1 rename a tag
2 delete a tag
3 change a tag's location in the tag graph - note that it _is_ a rgaph, not a tree - unless I wrote code to make sure it is a tree.
49 changes: 49 additions & 0 deletions data/System/WebSearch.txt
@@ -0,0 +1,49 @@
%META:TOPICINFO{author="ProjectContributor" date="1167874036" format="1.0" version="19"}%
%META:TOPICPARENT{name="WebHome"}%
---+ %MAKETEXT{"Web Search"}%

%IF{"defined search" then='%ICON{feed}% <a href="%SCRIPTURL{"view"}%/%BASEWEB%/WebRss?search=%URLPARAM{search}%;type=%URLPARAM{"type" default="word"}%;excludetopic=%BASETOPIC%,WebHome,WebStatistics;web=%URLPARAM{"web" default="%BASEWEB%"}%;limit=%URLPARAM{"limit" default="all"}%;scope=%URLPARAM{"scope" deafult="text"}%;casesensitive=%URLPARAM{"casesensitive" default="off"}%">%MAKETEXT{"Get notified on changes on this search"}%</a>'}%

%SEARCH{
"%URLPARAM{search}%"
type="%URLPARAM{"type" default="word"}%"
scope="%URLPARAM{scope}%"
web="%URLPARAM{web}%"
nosearch="%URLPARAM{nosearch}%"
zeroresults="%IF{ "defined search" then="on" else="off" }%"
}%

<a name="twikiSearchForm"></a>
<noautolink>
<div class="twikiPageForm">
<form id="twikiWebSearchForm" action="%SCRIPTURLPATH{view}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%">
<table id="twikiSearchTable" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="twikiFirstRow">
<input type="text" class="twikiInputField" name="search" value="%URLPARAM{ "search" encode="entity" }%" size="40" />
<input type="submit" class="twikiSubmit" value='%MAKETEXT{"Search"}%' /><span class="twikiSmall">&nbsp;&nbsp;<a href='%SCRIPTURL{view}%/%INCLUDINGWEB%/WebSearchAdvanced?search=%URLPARAM{search}%;type=%URLPARAM{"type" default="word"}%;scope=%URLPARAM{scope}%;web=%URLPARAM{web}%;nosearch=%URLPARAM{nosearch}%'>%MAKETEXT{"Advanced search"}%</a> | [[%SYSTEMWEB%.SearchHelp][%MAKETEXT{"Help"}%]]</span>
<div class="twikiSmall" style="padding:1em 0 0 0;">%MAKETEXT{"TIP: to search for all topics that contain =\"SOAP\"=, =\"WSDL\"=, a literal =\"web service\"=, but not =\"shampoo\"=, write:"}% <code>soap wsdl "web service" -shampoo</code></div>
</td>
</tr>
<tr>
<th class="twikiLast">%MAKETEXT{"Search where:"}%</th>
<td class="twikiLast">
<input type="radio" class="twikiRadioButton" id="textbody" name="scope" value="text" %IF{" '%URLPARAM{"scope"}%' = 'text' " then="checked=\"checked\"" else=""}% /><label for="textbody"> %MAKETEXT{"Text body"}%</label>&nbsp;&nbsp;&nbsp;<input type="radio" class="twikiRadioButton" id="topictitle" name="scope" value="topic" %IF{" '%URLPARAM{scope}%' = 'topic' " then="checked=\"checked\"" else=""}% /><label for="topictitle"> %MAKETEXT{"Topic title"}%</label>&nbsp;&nbsp;&nbsp;<input type="radio" class="twikiRadioButton" id="both" name="scope" value="all" %IF{" '%URLPARAM{"scope" default="all"}%' = 'all' " then="checked=\"checked\"" else=""}% /><label for="both"> %MAKETEXT{"Both body and title"}%</label>
<input type="radio" class="twikiRadioButton" id="tags" name="scope" value="tag" %IF{" '%URLPARAM{"scope"}%' = 'tag' " then="checked=\"checked\"" else=""}% /><label for="tags"> %MAKETEXT{"Tags"}%</label>
<hr />
<input type="checkbox" class="twikiCheckbox" id="web" name="web" %IF{" '%URLPARAM{web}%' = 'all'" then="checked=\"checked\"" else=""}% /><label for="web"> %MAKETEXT{"All public webs"}%</label> <span class="twikiSmall">%MAKETEXT{"(otherwise search [_1] Web only)" args="<nop>%INCLUDINGWEB%"}%</span>
</td>
</tr>
</table>
</form>
</div>
</noautolink>

<div class="twikiHelp">
*%MAKETEXT{"Other search options:"}%*
* %ICON{"arrowright"}% %MAKETEXT{"If you already know the name of the topic, enter the name of the topic into the ~[~[[_1]~]~[Jump box~]~] at the top" args="%SYSTEMWEB%.GoBox"}%
* %ICON{"indexlist"}% <a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&regex=on&search=\.*">%MAKETEXT{"List all topics in the [_1] web in alphabetical order" args="<nop>%INCLUDINGWEB%"}%</a>
* %ICON{"filter"}% %MAKETEXT{"List topics that start with the letter:"}% <a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ea">A</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eb">B</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ec">C</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ed">D</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ee">E</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ef">F</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eg">G</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eh">H</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ei">I</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ej">J</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ek">K</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5El">L</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Em">M</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5En">N</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eo">O</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ep">P</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eq">Q</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Er">R</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Es">S</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Et">T</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Eu">U</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ev">V</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ew">W</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ex">X</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ey">Y</a><span class="twikiSeparator"> | </span><a href="%SCRIPTURLPATH{"search"}%/%INCLUDINGWEB%/?scope=topic&amp;regex=on&amp;search=%5Ez">Z</a>
* %ICON{"recentchanges"}% [[%INCLUDINGWEB%.WebChanges][%MAKETEXT{"Recently changed topics"}%]]
</div>

0 comments on commit 9ed00db

Please sign in to comment.