$title = trim($b['title']);
- //if ($title != '')
- // $title = "<h4>".$title."</h4>";
-
$content = bbcode($b['body'], false, false, 4);
// Enhance the way, videos are displayed
$success = $client->CallAPI($url, 'POST', $params, array('FailOnAccessError'=>true, 'RequestContentType'=>'application/json'), $user);
if($success) {
+
+ if ($user->generator->displayName)
+ set_pconfig($b["uid"], "pumpio", "application_name", $user->generator->displayName);
+
$post_id = $user->object->id;
logger('pumpio_send '.$username.': success '.$post_id);
if($post_id AND $iscomment) {
$hostname = get_pconfig($uid, 'pumpio','host');
$username = get_pconfig($uid, "pumpio", "user");
- $application_name = get_config('pumpio', 'application_name');
-
+ // get the application name for the pump.io app
+ // 1st try personal config, then system config and fallback to the
+ // hostname of the node if neither one is set.
+ $application_name = get_pconfig( $uid, 'pumpio', 'application_name');
+ if ($application_name == "")
+ $application_name = get_config('pumpio', 'application_name');
if ($application_name == "")
$application_name = $a->get_hostname();
if ($receiver->id == "http://activityschema.org/collection/public")
$public = true;
- if ($public AND !strstr($post->generator->displayName, $application_name)) {
+ if ($public AND !stristr($post->generator->displayName, $application_name)) {
require_once('include/html2bbcode.php');
$_SESSION["authenticated"] = true;
$public = true;
$postarray = array();
+ $postarray['network'] = NETWORK_PUMPIO;
$postarray['gravity'] = 0;
$postarray['uid'] = $uid;
$postarray['wall'] = 0;