Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item1918: added TAGGROUPS and ISTAGADMIN, css
git-svn-id: http://svn.foswiki.org/trunk/TagsPlugin@4722 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
OliverKrueger
authored and
OliverKrueger
committed
Aug 28, 2009
1 parent
12c5ec4
commit 574d15e
Showing
9 changed files
with
177 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
%META:TOPICINFO{author="BaseUserMapping_333" date="1251408056" format="1.1" version="1.1"}% | ||
%TMPL:INCLUDE{view}% | ||
|
||
%TMPL:DEF{"tagsplugin:header"}%%TMPL:END% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
%META:TOPICINFO{author="BaseUserMapping_333" date="1251421038" format="1.1" reprev="1.6" version="1.6"}% | ||
%TAGCLOUD{ | ||
terms="$percntTAGSEARCH{ query=\"tag\" format=\"$tag:1:$web:$topic:$user\" sep=\",\" web=\"$percntTAGWEB$percnt\" user=\"$percntTAGUSER$percnt\" }$percnt" | ||
header="<div style=\"text-align:center; padding:15px;line-height:180%\">" | ||
format="<span style='font-size:$weightpx;line-height:90%;text-decoration:none' title='$5' url='$percntSCRIPTURL{rest}$percnt/TagsPlugin/' class='tagsplugin_tagcloud_tag' item='$3.$4' topic='$4' web='$3' tag='$term' user='$5'>$term</span>" | ||
footer="</div>" | ||
warn="off" | ||
}% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
%META:TOPICINFO{author="BaseUserMapping_333" date="1251232495" format="1.1" version="1.2"}% | ||
<noautolink> | ||
%META:TOPICINFO{author="BaseUserMapping_333" date="1251400275" format="1.1" version="1.3"}% | ||
%TAGSEARCH{ | ||
query="tag" | ||
web="%URLPARAM{"tagweb" default="%SYSTEMWEB%"}%" | ||
topic="%URLPARAM{"tagtopic" default="SomeTHiNg_verY-unLIKelY" }%" | ||
format=" <span class='tagsplugin_tag $untaggable' tag='$tag' topic='$item' user='$user'>$tag</span>$n" | ||
web="%URLPARAM{"tagweb" default="%BASEWEB%"}%" | ||
topic="%URLPARAM{"tagtopic" default="%BASETOPIC%" }%" | ||
format=" <span class='tagsplugin_tag $untaggable' tag='$tag' topic='$item' user='$user'><a class='tagsplugin_tag' href='%SCRIPTURL{view}%/%SYSTEMWEB%/TagsPluginTagDetails?tag=$tag'>$tag</a></span>" | ||
sep=" " | ||
}% | ||
</noautolink> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This script Copyright | ||
# (c) 2009 Oliver Krueger, (wiki-one.net) | ||
# and distributed under the GPL (see below) | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details, published at | ||
# http://www.gnu.org/copyleft/gpl.html | ||
# | ||
# Author(s): Oliver Krueger | ||
|
||
package Foswiki::Plugins::TagsPlugin::TAGGROUPS; | ||
|
||
use strict; | ||
use warnings; | ||
use Error qw(:try); | ||
|
||
=begin TML | ||
---++ do( $session, $params, $topic, $web ) | ||
Taghandler for TAGGROUPS. | ||
Return: | ||
Formatted list of current users groups. | ||
=cut | ||
|
||
sub do { | ||
my ( $session, $params, $topic, $web ) = @_; | ||
|
||
my $theHeader = $params->{header} || ''; | ||
my $theSep = $params->{separator} || $params->{sep} || ','; | ||
my $theFooter = $params->{footer} || ''; | ||
my $theFormat = $params->{format} || '$group'; | ||
|
||
my $output = ''; | ||
my @groups = (); | ||
|
||
# get the groups and rotate through it | ||
my $it = Foswiki::Func::eachGroup(); | ||
while ($it->hasNext()) { | ||
my $group = $it->next(); | ||
if ( !Foswiki::Func::isGroupMember( $group ) ) { next; }; | ||
my $entry = $theFormat; | ||
|
||
$entry =~ s/\$group/$group/g; | ||
|
||
# insert seperator only if needed | ||
if ( $output ne '' ) { | ||
$output .= $theSep . $entry; | ||
} else { | ||
$output = $entry; | ||
} | ||
} | ||
|
||
$output = $theHeader . $output . $theFooter if ($output); | ||
|
||
# expand standard escapes | ||
$output =~ s/\$n/\n/g; | ||
$output =~ s/\$percnt/\%/g; | ||
$output =~ s/\$quot/"/g; | ||
$output =~ s/\$dollar/\$/g; | ||
|
||
return $output; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.tagsplugin_container { | ||
border-style:dashed; | ||
border-width:thin; | ||
padding: 10px; | ||
} | ||
.tagsplugin_web { | ||
background-color:#EEEEEE; | ||
display:inline; | ||
margin:2px; | ||
padding:2px; | ||
text-decoration:none; | ||
color:black; | ||
cursor:pointer; | ||
} | ||
.tagsplugin_web_active { | ||
background-color:#B9DAFF; | ||
} | ||
.tagsplugin_tag { | ||
background-color:#EEEEEE; | ||
display:inline; | ||
margin:2px; | ||
padding:2px; | ||
text-decoration:none; | ||
color:black; | ||
} | ||
.tagsplugin_tagcloud { | ||
} | ||
.tagsplugin_tagcloud_tag { | ||
cursor:pointer; | ||
} | ||
.tagsplugin_tagcloud_tag_tagged { | ||
background-color:#B9DAFF; | ||
} | ||
.tagsplugin_tag_remove { | ||
color:red; | ||
cursor:pointer; | ||
padding-left:5px; | ||
} | ||
.tagsplugin_clickable { | ||
cursor:pointer; | ||
} | ||
.tagsplugin_hidden { | ||
display:none; | ||
} |