Commit 1aaea2d5 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Rename 'My Tags' sideblock to 'Tags' to avoid confusion with 'My Tags' page

parent 1debfc9b
...@@ -2086,7 +2086,7 @@ function get_my_tags($limit=null, $cloud=true, $sort='freq') { ...@@ -2086,7 +2086,7 @@ function get_my_tags($limit=null, $cloud=true, $sort='freq') {
return $tagrecords; return $tagrecords;
} }
function mytags_sideblock() { function tags_sideblock() {
$maxtags = 20; $maxtags = 20;
if ($tagrecords = get_my_tags($maxtags)) { if ($tagrecords = get_my_tags($maxtags)) {
return array('tags' => $tagrecords); return array('tags' => $tagrecords);
......
...@@ -436,10 +436,10 @@ EOF; ...@@ -436,10 +436,10 @@ EOF;
'data' => array(), 'data' => array(),
); );
$SIDEBLOCKS[] = array( $SIDEBLOCKS[] = array(
'name' => 'mytags', 'name' => 'tags',
'id' => 'sb-mytags', 'id' => 'sb-tags',
'weight' => 0, 'weight' => 0,
'data' => mytags_sideblock(), 'data' => tags_sideblock(),
); );
} }
......
...@@ -185,7 +185,7 @@ addLoadEvent(function() { ...@@ -185,7 +185,7 @@ addLoadEvent(function() {
mytags_container = getFirstElementByTagAndClassName(null, 'mytags', 'main-column-container'); mytags_container = getFirstElementByTagAndClassName(null, 'mytags', 'main-column-container');
p = {$data->pagination_js} p = {$data->pagination_js}
forEach(getElementsByTagAndClassName('a', 'tag', mytags_container), function (elem) {rewriteTagLink(elem, [], 'tag')}); forEach(getElementsByTagAndClassName('a', 'tag', mytags_container), function (elem) {rewriteTagLink(elem, [], 'tag')});
forEach(getElementsByTagAndClassName('a', 'tag', 'sb-mytags'), function (elem) {rewriteTagLink(elem, [], 'tag')}); forEach(getElementsByTagAndClassName('a', 'tag', 'sb-tags'), function (elem) {rewriteTagLink(elem, [], 'tag')});
forEach(getElementsByTagAndClassName('a', 'tag', 'results'), function (elem) {rewriteTagLink(elem, [], 'tag')}); forEach(getElementsByTagAndClassName('a', 'tag', 'results'), function (elem) {rewriteTagLink(elem, [], 'tag')});
forEach(getElementsByTagAndClassName('a', null, 'results_sort'), function (elem) {rewriteTagLink(elem, ['tag', 'type'], 'sort')}); forEach(getElementsByTagAndClassName('a', null, 'results_sort'), function (elem) {rewriteTagLink(elem, ['tag', 'type'], 'sort')});
forEach(getElementsByTagAndClassName('a', null, 'results_filter'), function (elem) {rewriteTagLink(elem, ['tag', 'sort'], 'type')}); forEach(getElementsByTagAndClassName('a', null, 'results_filter'), function (elem) {rewriteTagLink(elem, ['tag', 'sort'], 'type')});
......
...@@ -828,13 +828,14 @@ div.sideblock #friendscontrol label { ...@@ -828,13 +828,14 @@ div.sideblock #friendscontrol label {
font-size: 1em; font-size: 1em;
} }
.sidebar-content.mytags { .sidebar-content.tags {
text-align: center; text-align: center;
padding: 0; padding: 0;
} }
.mytags { .mytags {
padding: .5em 0; padding: .5em 0;
} }
.sidebar-content.tags .tag,
.mytags .tag { .mytags .tag {
padding: 0 5px; padding: 0 5px;
vertical-align: middle; vertical-align: middle;
......
<h3>{str tag="mytags"}</h3> <h3>{str tag="tags"}</h3>
<div class="sidebar-content mytags"> <div class="sidebar-content tags">
{if $data.tags} {if $data.tags}
{foreach from=$data.tags item=tag} {foreach from=$data.tags item=tag}
<a class="tag" style="font-size: {$tag->size}em;" href="{$WWWROOT}tags.php?tag={$tag->tag|urlencode}" title="{str tag=numitems arg1=$tag->count}">{$tag->tag|escape}</a> <a class="tag" style="font-size: {$tag->size}em;" href="{$WWWROOT}tags.php?tag={$tag->tag|urlencode}" title="{str tag=numitems arg1=$tag->count}">{$tag->tag|escape}</a>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment