require_once 'httpauth.inc.php';
require_once '../header.inc.php';
+// set user as logged in so private bookmarks are exported
+$loggedon = true;
+
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
} else {
$taglist = 'system:unfiled';
}
+ // The privacy setting in scuttle is to set bStatus to 2 in the database.
+ if(trim($row['bStatus']) == '2') {
+ $shared = "no";
+ } else {
+ $shared = "yes";
+ }
- echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+ echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" shared="' . $shared . '" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) . ($row['bStatus'] ? '" shared="no' : '') .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
}
echo '</posts>';
} else {
$taglist = 'system:unfiled';
}
+ // The privacy setting in scuttle is to set bStatus to 2 in database.
+ if(trim($row['bStatus']) == '2') {
+ $shared = "no";
+ } else {
+ $shared = "yes";
+ }
- echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" others="'. $bookmarkservice->countOthers($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+ echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" shared="' . $shared . '" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" others="'. $bookmarkservice->countOthers($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
}
echo '</posts>';
+
<?php
// Implements the del.icio.us API request for a user's recent posts, optionally filtered by
// tag and/or number of posts (default 15, max 100, just like del.icio.us).
} else {
$taglist = 'system:unfiled';
}
+ // The privacy setting in scuttle is to set bStatus to 2 in the database.
+ if(trim($row['bStatus']) == '2') {
+ $shared = "no";
+ } else {
+ $shared = "yes";
+ }
- echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+ echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" shared="' . $shared . '" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
}
echo '</posts>';
# be considered recent.
# defaultOrderBy: The default order in which bookmarks will appear.
# Possible values are:
-# date_desc - By date of entry descending.
-# Latest entry first. (Default)
-# date_asc - By date of entry ascending.
-# Earliest entry first.
-# title_desc - By title, descending alphabetically.
-# title_asc - By title, ascending alphabetically.
-# url_desc - By URL, descending alphabetically.
-# url_asc - By URL, ascending alphabetically.
+# date_desc - By date of entry descending.
+# Latest entry first. (Default)
+# date_asc - By date of entry ascending.
+# Earliest entry first.
+# mod_date_desc - By modification date descending.
+# Latest modified entry first.
+# mod_date_asc - By modification date ascending.
+# Earliest modified entry first.
+# title_desc - By title, descending alphabetically.
+# title_asc - By title, ascending alphabetically.
+# url_desc - By URL, descending alphabetically.
+# url_asc - By URL, ascending alphabetically.
# TEMPLATES_DIR: The directory where the template files should be
# loaded from (the *.tpl.php files)
# root : Set to NULL to autodetect the root url of the website
case 'TIME':
$bDatetime = $attrVal;
break;
+ case 'PRIVATE':
+ $bStatus = (strcasecmp('yes', $attrVal) == 0) ? 2 : $status ;
+ break;
case 'TAG':
$tags = strtolower($attrVal);
break;
$bDatetime = gmdate('Y-m-d H:i:s');
}
- if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, $status, $tags, $bDatetime, true, true))
+ if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, $bStatus, $tags, $bDatetime, true, true))
$tplVars['msg'] = T_('Bookmark imported.');
else
$tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.');
{
if (@mysql_select_db($this->dbname))
{
+ #Set utf-8
+ mysql_query('SET CHARACTER SET utf8', $this->db_connect_id);
return $this->db_connect_id;
}
}
-Scuttle 0.9.0
+Scuttle (Development Snapshot)
http://scuttle.org/
Copyright (C) 2004 - 2010 Marcus Campbell
+Copyright (C) 2011 Thomas Niepraschk
+Copyright (C) 2011 Benjamin Mako Hill
Available under the GNU General Public License
============
* Edit config.inc.php.example and save the changes as a new config.inc.php file in the same directory.
-* Set the CHMOD permissions on the /cache/ subdirectory to 777
\ No newline at end of file
+* Set the CHMOD permissions on the /cache/ subdirectory to 777
div.meta span {
color: #F00;
}
+/* bookmark date fields: updated and created */
+div.meta span#date-updated {
+ color: #285;
+}
+div.meta span#date-original {
+ background: #eee;
+ color: #aaa;
+}
li.xfolkentry {
border-bottom: 1px solid #DDD;
margin-bottom: 0;
case 'date_asc':
$query_5 = ' ORDER BY B.bDatetime ASC ';
break;
+ case 'mod_date_desc':
+ $query_5 = ' ORDER BY B.bModified DESC ';
+ break;
+ case 'mod_date_asc':
+ $query_5 = ' ORDER BY B.bModified ASC ';
+ break;
case 'title_desc':
$query_5 = ' ORDER BY B.bTitle DESC ';
break;
`bModified` datetime NOT NULL default '0000-00-00 00:00:00',
`bTitle` varchar(255) NOT NULL default '',
`bAddress` text NOT NULL,
- `bDescription` varchar(255) default NULL,
+ `bDescription` varchar(1000) default NULL,
`bHash` varchar(32) NOT NULL default '',
PRIMARY KEY (`bId`),
KEY `sc_bookmarks_usd` (`uId`,`bStatus`,`bDatetime`),
`watched` int(11) NOT NULL default '0',
PRIMARY KEY (`wId`),
KEY `sc_watched_uId` (`uId`)
-);
\ No newline at end of file
+);
if ($row['bDescription'] != '') {
echo '<div class="description">'. filter($row['bDescription']) ."</div>\n";
}
- echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+ if ($row['bDatetime'] == $row['bModified']) {
+ echo '<div class="meta">'. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . $cats . $copy . $edit ."</div>\n";
+ } else {
+ echo '<div class="meta"><span id="date-updated">updated: '. date($GLOBALS['shortdate'], strtotime($row['bModified'])) . '</span>, <span id="date-original">original: '. date($GLOBALS['shortdate'], strtotime($row['bDatetime'])) . "</span>" . $cats . $copy . $edit ."</div>\n";
+ }
echo "</li>\n";
}
?>
</tr>
<tr>
<th align="left"><?php echo T_('Description'); ?></th>
- <td><input type="text" name="description" size="75" maxlength="255" value="<?php echo filter($row['bDescription'], 'xml'); ?>" /></td>
+ <td><textarea name="description" cols="74" rows="5" maxlength="1000"><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
<td></td>
</tr>
<tr>
</form>
<script type="text/javascript">
$(function() {
- $("#address").focus();
+ $("#tags").focus();
});
</script>
<?php
}
$this->includeTemplate($GLOBALS['bottom_include']);
-?>
\ No newline at end of file
+?>
<li><a href="<?php echo createURL('watchlist', $cUsername); ?>"><?php echo T_('Watchlist'); ?></a></li>
<li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
<li class="access"><a href="<?php echo $GLOBALS['root']; ?>?action=logout"><?php echo T_('Log Out'); ?></a></li>
+ <li class="access"><a href="<?php echo createURL('profile', $cUsername); ?>"><?php echo $cUsername; ?></a></li>
</ul>
<?php
<?php
if (isset($subtitle)) {
- echo '<h2>'. $subtitle ."</h2>\n";
+ echo '<h2>'. $subtitle;
+ if (isset($total)) {
+ echo " (" . $total . ")";
+ }
+ echo "</h2>\n";
}
if (isset($error)) {
echo '<p class="error">'. $error ."</p>\n";