version 2.2 - Guardian of Ice - (tba)
* email import
- * code cleanups
* using mysql transactions if needed
* pagination
* authentication with an extra url now (index.php?m=auth)
* small stats overview
* links can now be deleted
* awaiting moderation links can new be moderated
- * Fixed an error in create sql file
* clean up the local storage via stats page (if authenticated)
+ * Updated documentation
+ * Fixed an error in create sql file
+ * Fixed info when a tag or category has no links
+ * Fixed code cleanups
version 2.1alpha - Guardian of Fire - (2019-09-29)
absolute-link|multiple,category,strings|multiple,tag,strings\n
new-absolute-link|multiple,category,strings|multiple,tag,strings\n
+
+Create a cronjob to execute the email-import.php file.
\ No newline at end of file
Insipid is a web-based bookmark manager similar to the Delicious service.
-It lets you manage and host your own bookmarks. No talking to other servervices or agencies.
+It lets you manage and host your own bookmarks. No talking to other services or agencies.
Your data is your data.
Bookmarks are put into categories and should have tags.
Unpack the archive
4.
-Modify webroot/config.default.php and copy it to webroot/config.php
+Create your config file.
+Copy webroot/config.default.php to webroot/config.php
+
+Modify at least the following settings in this file:
+- define('DB_HOST','127.0.0.1');
+- define('DB_USERNAME','user');
+- define('DB_PASSWORD','test');
+- define('FRONTEND_USERNAME','luke');
+- define('FRONTEND_PASSWORD','father');
+- define('ABSOLUTE_PATH', '/path/to/insipid/webroot');
5.
Copy and modify documentation/insipid-edit-me.sql and replace the placeholder.
search for: `#REPLACE_ME#
replace with: `tableprefix
-The value tableprefix has to match with the value for DB_PREFIX in config.php
+The value tableprefix has to match with the value for DB_PREFIX in your config.php file
6.
Create a table if needed.
-Import the sql file into your MySQL database
+Import the edited from step 5 sql file into your MySQL database.
7.
Edit the robots.txt file to your needs.
-Apache (2 and up) with PHP extension (+imap if you us the email importer)
-PHP (7 and up) with MySQL extension -> mysqli; curl enabled
+Apache (2.4 and up) with PHP extension enabled
+PHP (7 and up) with MySQL extension -> mysqli; curl enabled; (+imap +ssl if you us the email importer)
MySQL database 5.6.x and up
+- DB user rights has to include create, alter a view
http(s)://your.domain.tld/path/to/insipid/index.php?m=auth
If successful you can now manage your items. Edit buttons are visible now.
+
+HowToAdd a new link:
+
+There is no special "add a new link" option. Just paste the link into the search bar.
+If the link is already in your database the edit option will be shown.
+If not the add field will be shown and the possibility to safe the new link.
\ No newline at end of file
$phpmailer->setFrom(EMAIL_REPLY_BACK_ADDRESS);
$phpmailer->Subject = EMAIL_REPLY_BACK_SUBJECT;
$phpmailer->Timeout = 3;
+
+ if(DEBUG === true) $phpmailer->SMTPDebug = SMTP::DEBUG_SERVER;
+
+ $phpmailer->SMTPOptions = array(
+ 'ssl' => [
+ 'verify_peer' => false,
+ 'verify_peer_name' => false,
+ 'allow_self_signed' => true
+ ],
+ );
}
$DB = false;
if(DEBUG === true) $EmailReader->mailboxStatus();
}
catch (Exception $e) {
- error_log('Email server connection failed: '.var_export($e->getMessage(),true));
+ error_log('ERROR Email server connection failed: '.var_export($e->getMessage(),true));
exit();
}
$emails = $EmailReader->messageWithValidSubject(EMAIL_MARKER);
}
catch (Exception $e) {
- error_log('Can not process email messages: '.var_export($e->getMessage(),true));
+ error_log('ERROR Can not process email messages: '.var_export($e->getMessage(),true));
exit();
}
$newdata['link'] = Summoner::addSchemeToURL($newdata['link']);
if (!filter_var($newdata['link'], FILTER_VALIDATE_URL)) {
- error_log("Invalid URL: ".var_export($newdata['link'],true));
+ error_log("ERROR Invalid URL: ".var_export($newdata['link'],true));
if(DEBUG === true) var_dump($newdata['link']);
continue;
}
}
}
else {
- error_log("No valid title for link found: ".var_export($newdata,true));
- if(DEBUG === true) var_dump("No valid title for link found: ".var_export($newdata,true));
+ error_log("WARN No valid title for link found: ".var_export($newdata,true));
+ if(DEBUG === true) var_dump("WARN No valid title for link found: ".var_export($newdata,true));
array_push($invalidProcessedEmails, $emailData);
continue;
}
), true);
}
catch (Exception $e) {
- $_m = "Can not create new link into DB. Duplicate? ".$e->getMessage();
+ $_m = "WARN Can not create new link into DB. Duplicate? ".$e->getMessage();
error_log($_m);
$emailData['importmessage'] = $_m;
array_push($invalidProcessedEmails,$emailData);
$DB->commit();
- error_log("Link successfully added: ".$newdata['link']);
+ error_log("INFO Link successfully added: ".$newdata['link']);
array_push($validProcessedEmails,$emailData);
}
else {
$DB->rollback();
- error_log("Link could not be added. SQL problem: ".$newdata['link']);
+ error_log("ERROR Link could not be added. SQL problem: ".$newdata['link']);
$emailData['importmessage'] = "Link could not be added";
array_push($invalidProcessedEmails,$emailData);
}
# if we have invalid import mails, ignore them, just log em
# if EMAIL_REPORT_BACK is true then report back with errors if EMAIL_REPLY_BACK_VALID
if(!empty($invalidProcessedEmails)) {
- error_log("We have invalid import messages.");
+ error_log("INFO We have invalid import messages.");
foreach ($invalidProcessedEmails as $invalidMail) {
if(EmailImportHelper::canSendReplyTo($invalidMail['header_rfc822']->reply_toaddress)
&& !EmailImportHelper::isAutoReplyMessage($invalidMail['header_array'])) {
$phpmailer->Body .= $invalidMail['body'];
$phpmailer->addAddress($_address[0]['address']);
$phpmailer->send();
- error_log("Report back email to: ".$_address[0]['address']);
+ error_log("INFO Report back email to: ".$_address[0]['address']);
}
else {
- error_log("Invalid message: ".$invalidMail['header_rfc822']->subject);
+ error_log("WARN Invalid message: ".$invalidMail['header_rfc822']->subject);
}
}
}
# move them to the processed / archive folder
#$EmailReader->move()
if(!empty($validProcessedEmails)) {
- error_log("We have valid import messages.");
+ error_log("INFO We have valid import messages.");
foreach ($validProcessedEmails as $validMail) {
}
}
if($this->_connection !== false) {
$status = imap_status($this->_connection, $this->_connectionstring.$this->_mailbox, SA_ALL);
- var_dump("messages ".$status->messages);
- var_dump("recent ".$status->recent);
- var_dump("unseen ".$status->unseen);
- var_dump("uidnext ".$status->uidnext);
- var_dump("uidvalidity ".$status->uidvalidity);
+ if(DEBUG === true) {
+ var_dump("messages " . $status->messages);
+ var_dump("recent " . $status->recent);
+ var_dump("unseen " . $status->unseen);
+ var_dump("uidnext " . $status->uidnext);
+ var_dump("uidvalidity " . $status->uidvalidity);
+ }
$list = imap_getmailboxes($this->_connection, $this->_connectionstring, "*");
if (is_array($list)) {
echo $val->attributes . "<br />\n";
}
} else {
- error_log("imap_getmailboxes failed: ".var_export(imap_last_error()));
+ error_log("ERROR imap_getmailboxes failed: ".var_export(imap_last_error()));
}
}
}
switch($_requestMode) {
case 'tag':
if(!empty($_id)) {
+ $tagObj = new Tag($DB);
+ $tagObj->initbyid($_id);
+ $tagname = $tagObj->getData('name');
+ $subHeadline = $tagname.' <i class="ion-md-pricetag"></i>';
+
$linkCollection = $Management->linksByTag($_id,false,RESULTS_PER_PAGE, (RESULTS_PER_PAGE * ($_curPage-1)));
- if(!empty($linkCollection['results'])) {
- $tagObj = new Tag($DB);
- $tagObj->initbyid($_id);
- $tagname = $tagObj->getData('name');
- $subHeadline = $tagname.' <i class="ion-md-pricetag"></i>';
- }
}
else {
# show all the tags we have
break;
case 'category':
if(!empty($_id)) {
+ $catObj = new Category($DB);
+ $catObj->initbyid($_id);
+ $catname = $catObj->getData('name');
+ $subHeadline = $catname.' <i class="ion-md-filing"></i>';
$linkCollection = $Management->linksByCategory($_id,false,RESULTS_PER_PAGE, (RESULTS_PER_PAGE * ($_curPage-1)));
- if(!empty($linkCollection['results'])) {
- $catObj = new Category($DB);
- $catObj->initbyid($_id);
- $catname = $catObj->getData('name');
- $subHeadline = $catname.' <i class="ion-md-filing"></i>';
- }
}
else {
# show all the categories we have