Home> blogging > Scuttleの不満

Scuttleの不満

  • January 29, 2007 2:19 AM
  • blogging

いつぞや取り上げたリネーム機能のことで、Shishimushiの中の人が反応してくれておりました。
最近リファラチェックしてないので、フィード購読してなかったら気付けなかったろうな。

Shishimushi - Scuttle あれこれ - 今日知ったこと

タグのリネーム

早速導入して適当にリネーム実行してみたら、
Fatal error: Call to undefined function: createurl() in tagrename.php on line 49

とか怒られたけど、リネーム自体はちゃんと反映されている模様。やったね。
https://kawatarou.info/note/software/scuttle_tagreplace_mp3.htm

うーん、ウチは出てないんですけどね。
さくらとの相性...?

タグの大文字が反映されない。

Opera と入力しても opera となっていたり。データベースの方を弄ったらなんちゃって反映はされるが、一つ一つの記事に対して行わなければならず、僕はそこまで神経質ではないので無理。いや、こういう事に引っかかるのを神経質だと人は言うのだろう。
https://kawatarou.info/note/software/scuttle_tagreplace_mp3.htm

これは確かに私もどうにかして欲しいと思います。
個人的にはlowerCamelなファイル名を付ける癖があるので、タグも同じように入力したい。
確実に需要があると思うんだけどなぁ。

同じ文字でキャメルケースだけ違うタグがあったら警告するとか、そういうインテリジェントな感じになると嬉しいかも(いや鬱陶しいかも)。

因みにウチのタグリネームスクリプトは、ブックマーク追加インタフェースからコードを移植してタグ入力支援できるようにしてます。

<?php
$this->includeTemplate($GLOBALS['top_include']);
?>
<script type="text/javascript">
window.onload = function() {
document.getElementById("new").focus();
}
</script>
<form action="<?= $formaction ?>" method="post">
<table>
<tr>
<th align="left"><?php echo T_('Old'); ?></th>
<td><input type="text" name="old" id="tags" value="<?= $old ?>" /></td>
<td>&larr; <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left"><?php echo T_('New'); ?></th>
<td><input type="text" name="new" id="new" value="" /></td>
<td>&larr; <?php echo T_('Required'); ?></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="confirm" value="<?php echo T_('Rename'); ?>" />
<input type="submit" name="cancel" value="<?php echo T_('Cancel'); ?>" />
</td>
<td></td>
</tr>
</table>
</p>
<?php if (isset($referrer)): ?>
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
<?php endif; ?>
</form>
<?php
$tagservice = & ServiceFactory :: getServiceInstance('TagService');
$userservice = & ServiceFactory :: getServiceInstance('UserService');
$logged_on_userid = $userservice->getCurrentUserId();
$userPopularTags =& $tagservice->getPopularTags($logged_on_userid, 1024, $logged_on_userid);
$userPopularTagsCloud =& $tagservice->tagCloud($userPopularTags, 5, 108, 175, 'alphabet_asc');
$userPopularTagsCount = count($userPopularTags);
if ($userPopularTagsCount > 0) {
?>
<script type="text/javascript">
Array.prototype.contains = function (ele) {
for (var i = 0; i < this.length; i++) {
if (this[i] == ele) {
return true;
}
}
return false;
};
Array.prototype.remove = function (ele) {
var arr = new Array();
var count = 0;
for (var i = 0; i < this.length; i++) {
if (this[i] != ele) {
arr[count] = this[i];
count++;
}
}
return arr;
};
function addonload(addition) {
var existing = window.onload;
window.onload = function () {
existing();
addition();
}
}
addonload(
function () {
var taglist = document.getElementById('tags');
var tags = taglist.value.split(', ');
var populartags = document.getElementById('popularTags').getElementsByTagName('span');
for (var i = 0; i < populartags.length; i++) {
if (tags.contains(populartags[i].innerHTML)) {
populartags[i].className = 'selected';
}
}
}
);
function addTag(ele) {
var thisTag = ele.innerHTML;
var taglist = document.getElementById('tags');
var tags = taglist.value.split(', ');
// If tag is already listed, remove it
if (tags.contains(thisTag)) {
tags = tags.remove(thisTag);
ele.className = 'unselected';
// Otherwise add it
} else {
tags.shift();
tags.splice(0, 0, thisTag);
ele.className = 'unselected';
}
taglist.value = tags.join('');
document.getElementById('tags').focus();
}
document.write('<div class="collapsible">');
document.write('<h3><?php echo T_('Popular Tags'); ?><\/h3>');
document.write('<p id="popularTags" class="tags">');
<?php
$taglist = '';
foreach(array_keys($userPopularTagsCloud) as $key) {
$row =& $userPopularTagsCloud[$key];
$entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
$taglist .= '<span title="'. $row['bCount'] .' '. $entries .'" style="font-size:'. $row['size'] .'" onclick="addTag(this)">'. filter($row['tag']) .'<\/span> ';
}
?>
document.write('<?php echo $taglist ?>');
document.write('<\/p>');
document.write('<\/div>');
</script>
<?php
}
$this->includeTemplate($GLOBALS['bottom_include']);
?>

タグの表示数が多いので、若干モッサリしますが。
まぁそれほど頻繁に呼び出す機能でもないので割り切ったりまたイライラしたり。

ウチのScuttleはこんな感じ
(サムネイルはしょぼいながらも自前サービスのアレ)

Index of all entries

Home> blogging > Scuttleの不満

Categories
Archives
Syndication

Return to page top