diff --git a/gpluspost/gpluspost.php b/gpluspost/gpluspost.php
index db240aa3e..352784959 100644
--- a/gpluspost/gpluspost.php
+++ b/gpluspost/gpluspost.php
@@ -51,6 +51,9 @@ function gpluspost_settings(&$a,&$s) {
$noloop_enabled = get_pconfig(local_user(),'gpluspost','no_loop_prevention');
$noloop_checked = (($noloop_enabled) ? ' checked="checked" ' : '');
+ $skip_enabled = get_pconfig(local_user(),'gpluspost','skip_without_link');
+ $skip_checked = (($skip_enabled) ? ' checked="checked" ' : '');
+
$s .= '
';
$s .= '
' . t('Google+ Post Settings') . '
';
$s .= '
';
@@ -68,6 +71,11 @@ function gpluspost_settings(&$a,&$s) {
$s .= '';
$s .= '
';
+ $s .= '
';
+ $s .= '';
+ $s .= '';
+ $s .= '
';
+
/* provide a submit button */
$s .= '
';
@@ -81,6 +89,7 @@ function gpluspost_settings_post(&$a,&$b) {
set_pconfig(local_user(),'gpluspost','post',intval($_POST['gpluspost']));
set_pconfig(local_user(),'gpluspost','post_by_default',intval($_POST['gpluspost_bydefault']));
set_pconfig(local_user(),'gpluspost','no_loop_prevention',intval($_POST['gpluspost_noloopprevention']));
+ set_pconfig(local_user(),'gpluspost','skip_without_link',intval($_POST['gpluspost_skipwithoutlink']));
}
}
@@ -286,7 +295,7 @@ function gpluspost_feeditem($pid, $uid) {
require_once('include/bbcode.php');
require_once("include/html2plain.php");
- $max_char = 140;
+ $skipwithoutlink = get_pconfig($uid,'gpluspost','skip_without_link');
$items = q("SELECT `uri`, `plink`, `author-link`, `author-name`, `created`, `edited`, `id`, `title`, `body` from `item` WHERE id=%d", intval($pid));
foreach ($items AS $item) {
@@ -349,7 +358,9 @@ function gpluspost_feeditem($pid, $uid) {
else if ($image != "")
$msglink = $image;
- if ($msglink == "")
+ if (($msglink == "") AND $skipwithoutlink)
+ continue;
+ else if ($msglink == "")
$msglink = $item["plink"];
// Fetching the title - or the first line