From: Gabriel Dunne
+use clmpr (/klum-per/) to save urls
+
+
+
to use:
beginTransaction();
$q = null;
$tag = null;
+
try {
if ($params['user']) {
$user = get_users($dbh, array('user' => $params['user'] ));
if ($user) {
-
$q = $dbh->prepare("SELECT *, clumps.id as clump_id
FROM clumps
JOIN users
@@ -117,6 +117,14 @@ function deleteClump( id, elem ) {
cancel
diff --git a/put.php b/put.php
index 3c6340e..2cad1eb 100644
--- a/put.php
+++ b/put.php
@@ -7,6 +7,10 @@ $params['title'] = isset($_POST['title']) ? $_POST['title'] : null;
$params['url'] = isset($_POST['url']) ? $_POST['url'] : null;
$params['tags'] = isset($_POST['tags']) ? $_POST['tags'] : null;
$params['description'] = isset($_POST['description']) ? $_POST['description'] : null;
+$params['private'] = isset($_POST['private']) ? true : false;
+
+//print_r($_POST);
+//exit;
include 'head.html';
@@ -32,11 +36,11 @@ try {
# insert clump
$q = $dbh->prepare("INSERT INTO `clumps`
( `user_id`, `title`, `url`,
- `tags`, `description`, `date` )
- VALUES ( ?, ?, ?, ?, ?, NOW() ) ");
+ `tags`, `description`, `date`, `private` )
+ VALUES ( ?, ?, ?, ?, ?, NOW(), ? ) ");
$insert = $q->execute( array(
$user['id'], $params['title'], $params['url'],
- $params['tags'], $params['description']));
+ $params['tags'], $params['description'], $params['private']));
echo "clumped.
";
echo 'ok';
diff --git a/style.css b/style.css
index bde5b28..64d666c 100644
--- a/style.css
+++ b/style.css
@@ -6,9 +6,10 @@ body {
}
a {
}
-a:hover {
+a:hover, .private a:hover {
color: #00e !important;
text-decoration:none;
+ border-color:#00e;
}
a.mute {
color:#444;
@@ -60,7 +61,9 @@ ul.links li {
margin-bottom:2em;
}
ul.links li span.url a {
+ font-weight:bold;
display:inline-block;
+ margin-bottom:4px;
}
ul.links li span.url a {
color:#000;
@@ -87,6 +90,10 @@ ul.links li .tags:hover a:hover {
color:#00e !important;
text-decoration:underline;
}
+.private a {
+ background:#eee !important;
+ color:#aaa !important;
+}
.meta {
color:#bbb;