diff -urp c:/ac/activitystream.css ./activitystream.css
--- c:/ac/activitystream.css 2008-03-25 19:46:11.000000000 -0500
+++ ./activitystream.css 2008-04-12 19:05:22.000000000 -0500
@@ -1,26 +1,26 @@
-/*
- $Id: activitystream.css,v 1.1 2008/03/26 00:46:11 akalsey Exp $
-*/
-
-.activitystream-item ul {
- list-style-type: none;
- padding: 0; margin: 0;
-}
-
-.activitystream-item li {
- list-style-type: none !important;
- padding: 5px 0 !important;
- margin: 0 !important;
-}
-
-#activitystream h3.datehead {
- margin-top: 1em;
- border-bottom: 1px solid #ccc;
- color: #999;
- font-size: 0.9em;
-}
-
-.activitystream-created, #activitystream a.permalink {
- color: #999;
- font-size: 0.9em;
-}
+/*
+ $Id$
+*/
+
+.activitystream-item ul {
+ list-style-type: none;
+ padding: 0; margin: 0;
+}
+
+.activitystream-item li {
+ list-style-type: none !important;
+ padding: 5px 0 !important;
+ margin: 0 !important;
+}
+
+#activitystream h3.datehead {
+ margin-top: 1em;
+ border-bottom: 1px solid #ccc;
+ color: #999;
+ font-size: 0.9em;
+}
+
+.activitystream-created, #activitystream a.permalink {
+ color: #999;
+ font-size: 0.9em;
+}
diff -urp c:/ac/activitystream.info ./activitystream.info
--- c:/ac/activitystream.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream.info 2008-04-12 19:45:16.000000000 -0500
@@ -1,12 +1,8 @@
-; $Id: activitystream.info,v 1.1.2.1 2008/04/09 05:30:40 akalsey Exp $
+; $Id$
name = Activity Stream Core
description = Core API module for Activity Streams
package = Activity Stream
-dependencies = profile
-
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
+dependencies[] = profile
+core = 6.x
diff -urp c:/ac/activitystream.install ./activitystream.install
--- c:/ac/activitystream.install 2008-04-09 00:30:40.000000000 -0500
+++ ./activitystream.install 2008-04-12 19:04:54.000000000 -0500
@@ -1,5 +1,5 @@
array(
+ 'nid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
+ 'module' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'guid' => array('type' => 'varchar', 'length' => '32', 'not null' => TRUE),
+ 'link' => array('type' => 'varchar', 'length' => '255'),
+ 'data' => array('type' => 'text')),
+ 'primary key' => array('guid'),
+ );
+
+ $schema['activitystream_accounts'] = array(
+ 'fields' => array(
+ 'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
+ 'module' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'userid' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'password' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'feed' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
+ 'lastfetch' => array('type' => 'datetime', 'not null' => TRUE)),
+ );
+
+ return $schema;
}
+
+/**
+* Implementation of hook_uninstall().
+*/
function activitystream_uninstall() {
- if (db_table_exists('activityfeed')) {
- db_query("DROP TABLE {activityfeed}");
- }
- if (db_table_exists('activitystream_accounts')) {
- db_query("DROP TABLE {activitystream_accounts}");
- }
+ //remove tables
+ drupal_uninstall_schema('activitystream');
$variables = db_query("SELECT name FROM {variable} WHERE name LIKE 'activityfeed%%'");
while ($variable = db_fetch_object($variables)) {
variable_del($variable->name);
}
-}
\ No newline at end of file
+}
+
diff -urp c:/ac/activitystream.module ./activitystream.module
--- c:/ac/activitystream.module 2008-04-10 10:37:23.000000000 -0500
+++ ./activitystream.module 2008-04-18 20:21:51.000000000 -0500
@@ -1,5 +1,5 @@
'admin/settings/activitystream',
- 'title' => t('Activity Stream'),
- 'description' => t('Administer settings for activity feeds'),
- 'callback' => 'drupal_get_form',
- 'callback arguments' => 'activitystream_settings',
- 'access' => user_access('access administration pages'),
+ $items['admin/settings/activitystream'] = array(
+ 'title' => 'Activity Stream',
+ 'description' => 'Administer settings for activity feeds',
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('activitystream_settings'),
+ 'access arguments' => array('access administration pages'),
'type' => MENU_NORMAL_ITEM,
);
- $items[] = array('path' => 'stream',
- 'title' => t('Activity Stream'),
- 'callback' => 'activitystream_page',
- 'access' => user_access('access content'),
- 'type' => MENU_CALLBACK
+ $items['stream'] = array(
+ 'title' => 'Activity Stream',
+ 'page callback' => 'activitystream_page',
+ 'access arguments' => array('access content'),
+ 'type' => MENU_CALLBACK
);
return $items;
@@ -95,14 +94,13 @@ function activitystream_form(&$node) {
'#default_value' => $node->title,
'#weight' => -5
);
- $form['body_filter']['body'] = array(
+ $form['body_field'] = array(
'#type' => 'textarea',
'#title' => check_plain($type->body_label),
'#default_value' => $node->body,
'#required' => FALSE
);
- $form['body_filter']['filter'] = filter_form($node->format);
-
+
return $form;
}
@@ -110,7 +108,7 @@ function activitystream_form(&$node) {
* Calls an API hook that allows activitystream modules to add admin form
* items to the Activity Stream settings page.
*/
-function activitystream_form_alter($form_id, &$form) {
+function activitystream_form_alter(&$form, &$form_state, $form_id) {
unset($form['Activity Stream']);
if ($form_id == 'activitystream_settings') {
foreach (module_implements('activitystream_admin') as $name) {
@@ -127,7 +125,7 @@ function activitystream_form_alter($form
* Implementation of hook_user()
*/
function activitystream_user($op, &$edit, &$account, $category = NULL) {
- switch ($op) {
+ switch ($op) {
case 'form':
if ($category == 'Activity Stream') {
foreach (module_implements('activitystream_settings') as $name) {
@@ -155,13 +153,15 @@ function activitystream_user($op, &$edit
activitystream_save_account($name, $account, $arrDetails);
}
break;
- case 'view':
+ case 'view':
$items = _activitystream_get_activity($account);
$title = variable_get('activitystream_title', 'Activity Stream');
- $output = theme('activitystream',$items);
- if (!empty($output)) {
- return array($title => array(array('value' => $output, 'class' => 'user')));
- }
+ $account->content['summary']['activitystream'] = array(
+ '#type' => 'user_profile_item',
+ '#title' => t($title),
+ '#value' => theme('activitystream',$items),
+ '#attributes' => array('class' => 'user'),
+ );
break;
}
}
@@ -184,9 +184,9 @@ function activitystream_page($uid = 0) {
//$output = theme('item_list',$items);
if ($page) {
// Breadcrumb navigation
- $breadcrumb[] = array('path' => 'stream', 'title' => t($title));
- $breadcrumb[] = array('path' => 'node/'. $node->nid);
- menu_set_location($breadcrumb);
+ $breadcrumb[] = l(t($title), 'stream');
+ $breadcrumb[] = l($node->nid, 'node/');
+ drupal_set_breadcrumb($breadcrumb);
}
$pager = theme('pager', NULL, 15, 0);
if (!empty($pager)) {
@@ -202,7 +202,6 @@ function activitystream_page($uid = 0) {
function activitystream_view($node, $teaser = FALSE, $page = FALSE) {
$user = user_load(array('uid' => $node->uid));
$title = variable_get('activitystream_title', 'Activity Stream');
-
$node->body = check_markup($node->body, $node->format, FALSE);
$result = db_query('SELECT s.module, s.link, s.data, s.nid FROM {activitystream} s WHERE s.nid=%d LIMIT 1', $node->nid);
@@ -216,10 +215,10 @@ function activitystream_view($node, $tea
if ($page) {
// Breadcrumb navigation
- $breadcrumb[] = array('path' => 'stream', 'title' => t($title));
- $breadcrumb[] = array('path' => 'stream/'.$user->name, 'title' => check_plain($user->name) .'\'s ' . $title);
- $breadcrumb[] = array('path' => 'node/'. $node->nid);
- menu_set_location($breadcrumb);
+ $breadcrumb[] = l(t($title), 'stream');
+ $breadcrumb[] = l($user->name .'\'s ' . $title, 'stream/'.$user->name);
+ $breadcrumb[] = l($node->nid, 'node/');
+ drupal_set_breadcrumb($breadcrumb);
}
return $node;
}
@@ -265,6 +264,7 @@ function _activitystream_get_activity($u
else {
$theme_function = 'activitystream_item';
}
+
$items[] = theme($theme_function,$action);
}
return $items;
@@ -311,6 +311,7 @@ function theme_activitystream_view($acti
function activitystream_cron() {
+ module_load_include('inc', 'node', 'node.pages');
$result = db_query('SELECT uid, userid, password, feed, module from {activitystream_accounts}');
while ($user = db_fetch_object($result)) {
activitystream_invoke_streamapi($user);
@@ -322,6 +323,7 @@ function activitystream_cron() {
* Implementation of hook_settings()
*/
function activitystream_settings() {
+
$form['activitystream_title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
@@ -386,11 +388,74 @@ function _activitystream_save($activity,
}
if ($new) {
node_object_prepare($node);
+ $node->created = $activity['timestamp'];
+ $node->uid = $user->uid;
node_save($node);
+
$actions = db_query('INSERT into {activitystream} (nid,module, guid, link, data) VALUES (%d,"%s", "%s","%s","%s")',$node->nid,$name,$activity['guid'],$activity['link'],$activity['data']);
} else {
node_save($node);
}
- watchdog('activitystream', t('Added %title from %name', array('%title' => $node->title, '%name' => $name)));
+ watchdog('activitystream', 'Added %title from %name', array('%title' => $node->title, '%name' => $name));
return $node->nid;
-}
\ No newline at end of file
+}
+
+function activitystream_theme() {
+ return array(
+ 'activitystream_item' => array(
+ 'arguments' => array('action' => NULL),
+ ),
+ 'activitystream' => array(
+ 'arguments' => array('items' => NULL),
+ ),
+ 'activitystream_date' => array(
+ 'arguments' => array('date' => NULL),
+ ),
+ 'activitystream_username' => array(
+ 'arguments' => array('user' => NULL),
+ ),
+ 'activitystream_view' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
+}
+
+/**
+ * Implementation of hook_block().
+ */
+
+function activitystream_block($op = 'list', $delta = 0) {
+ if ($op == 'list') {
+ $blocks[0]['info'] = t('Activitystream: block');
+
+ return $blocks;
+ }
+ else if ($op == 'view') {
+ $block = array();
+ switch ($delta) {
+ case 0:
+ $title = variable_get('activitystream_title', 'Activity Stream');
+ $block['subject'] = t($title);
+ $block['content'] = block_activitystream_content(0);
+ break;
+
+ }
+ return $block;
+ }
+}
+
+/**
+ * A block content function.
+ */
+
+function block_activitystream_content($which_block) {
+ global $user;
+
+ switch ($which_block) {
+ case 0:
+ $items = _activitystream_get_activity($user);
+
+ return theme('activitystream',$items);
+
+ }
+}
Only in ./: activitystream_6.x.patch
diff -urp c:/ac/activitystream_delicious/activitystream_delicious.info ./activitystream_delicious/activitystream_delicious.info
--- c:/ac/activitystream_delicious/activitystream_delicious.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_delicious/activitystream_delicious.info 2008-04-12 19:09:50.000000000 -0500
@@ -1,11 +1,9 @@
-; $Id: activitystream_delicious.info,v 1.1.2.1 2008/04/09 05:30:40 akalsey Exp $
+; $Id$
name = Delicious Bookmarks
description = Your links on Delicious
-dependencies = activitystream activitystream_feed
+dependencies[] = activitystream
+dependencies[] = activitystream_feed
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
+core = 6.x
diff -urp c:/ac/activitystream_delicious/activitystream_delicious.module ./activitystream_delicious/activitystream_delicious.module
--- c:/ac/activitystream_delicious/activitystream_delicious.module 2008-04-09 01:47:26.000000000 -0500
+++ ./activitystream_delicious/activitystream_delicious.module 2008-04-12 19:10:01.000000000 -0500
@@ -1,5 +1,5 @@
created);
$user = user_load(array('uid' => $node->uid));
$name = theme('activitystream_username',$user);
- return '' . theme('activitystream_delicious_icon') . " $name linked to " . l($node->title, $action->link) . " $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
+ return '' . theme('activitystream_delicious_icon') . " $name linked to " . l($node->title, $action->link) . " $date" . l('#', 'node/' . $node->nid, array('attributes' => array('class' => 'permalink'))) . '';
+}
+
+function activitystream_delicious_theme() {
+ return array(
+ 'activitystream_delicious_icon' => array(
+ 'arguments' => array(),
+ ),
+ 'activitystream_delicious_item' => array(
+ 'arguments' => array('action' => NULL),
+ ),
+ );
}
\ No newline at end of file
diff -urp c:/ac/activitystream_digg/activitystream_digg.info ./activitystream_digg/activitystream_digg.info
--- c:/ac/activitystream_digg/activitystream_digg.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_digg/activitystream_digg.info 2008-04-12 19:09:24.000000000 -0500
@@ -1,11 +1,8 @@
-; $Id: activitystream_digg.info,v 1.1.2.1 2008/04/09 05:30:41 akalsey Exp $
+; $Id$
name = Digg
description = What's been Dugg
-dependencies = activitystream activitystream_feed
+dependencies[] = activitystream
+dependencies[] = activitystream_feed
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
-
+core = 6.x
diff -urp c:/ac/activitystream_digg/activitystream_digg.module ./activitystream_digg/activitystream_digg.module
--- c:/ac/activitystream_digg/activitystream_digg.module 2008-03-25 19:46:11.000000000 -0500
+++ ./activitystream_digg/activitystream_digg.module 2008-04-12 19:09:36.000000000 -0500
@@ -1,5 +1,5 @@
$node->uid));
$name = theme('activitystream_username',$user);
return '' . theme('activitystream_digg_icon') . " $name dugg " . l($node->title, $activity->link) . " $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
-}
\ No newline at end of file
+}
+
+function activitystream_digg_theme() {
+ return array(
+ 'activitystream_digg_icon' => array(
+ 'arguments' => array(),
+ ),
+ 'activitystream_digg_item' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
+}
+
diff -urp c:/ac/activitystream_feed/activitystream_feed.info ./activitystream_feed/activitystream_feed.info
--- c:/ac/activitystream_feed/activitystream_feed.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_feed/activitystream_feed.info 2008-04-12 19:08:48.000000000 -0500
@@ -1,11 +1,7 @@
-; $Id: activitystream_feed.info,v 1.1.2.1 2008/04/09 05:30:41 akalsey Exp $
+; $Id$
name = Feed stream
description = Pull in updates from any feed, includes the favicon
-dependencies = activitystream
+dependencies[] = activitystream
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
-
+core = 6.x
\ No newline at end of file
diff -urp c:/ac/activitystream_feed/activitystream_feed.module ./activitystream_feed/activitystream_feed.module
--- c:/ac/activitystream_feed/activitystream_feed.module 2008-04-10 10:37:23.000000000 -0500
+++ ./activitystream_feed/activitystream_feed.module 2008-04-19 14:40:23.000000000 -0500
@@ -1,5 +1,5 @@
'fieldset',
- '#title' => t('Feed settings'));
+ '#type' => 'fieldset',
+ '#title' => t('Feed settings'));
$form['activitystream_feed']['activitystream_feed_feed'] = array(
'#type' => 'textarea',
'#title' => t('Feed URL'),
- '#rows' => 15,
+ '#rows' => 15,
'#default_value' => $edit['activitystream_feed_feed'],
'#description' => t('URL of the feeds to import as an activity stream. Multiple feeds are allowed; place each on a seperate line.'));
return $form;
@@ -74,10 +64,10 @@ function theme_activitystream_feed_icon(
$params = unserialize($params);
// Return the favicon if we have it. Otherwise return a default feed icon.
if ($params['favicon']) {
- return '
';
+ return '
';
}
else {
- return theme_image(drupal_get_path('module', 'activitystream_feed') . '/feed-icon-16x16.png');
+ return theme('image',drupal_get_path('module', 'activitystream_feed') . '/feed-icon-16x16.png',$params['feedtitle'],$params['feedtitle']);
}
}
@@ -87,4 +77,15 @@ function theme_activitystream_feed_item(
$user = user_load(array('uid' => $node->uid));
$name = theme('activitystream_username',$user);
return '' . theme('activitystream_feed_icon',$activity->data) . " $name posted " . l($node->title, $activity->link) . " $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . ''."\n";
+}
+
+function activitystream_feed_theme() {
+ return array(
+ 'activitystream_feed_icon' => array(
+ 'arguments' => array('params' => NULL),
+ ),
+ 'activitystream_feed_item' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
}
\ No newline at end of file
Only in ./activitystream_feed: cache
diff -urp c:/ac/activitystream_flickr/activitystream_flickr.info ./activitystream_flickr/activitystream_flickr.info
--- c:/ac/activitystream_flickr/activitystream_flickr.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_flickr/activitystream_flickr.info 2008-04-12 19:08:01.000000000 -0500
@@ -1,11 +1,8 @@
-; $Id: activitystream_flickr.info,v 1.1.2.1 2008/04/09 05:30:41 akalsey Exp $
+; $Id$
name = Flickr Stream
description = Your activity on Flickr
-dependencies = activitystream
+dependencies[] = activitystream
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
+core = 6.x
diff -urp c:/ac/activitystream_flickr/activitystream_flickr.module ./activitystream_flickr/activitystream_flickr.module
--- c:/ac/activitystream_flickr/activitystream_flickr.module 2008-03-25 19:46:11.000000000 -0500
+++ ./activitystream_flickr/activitystream_flickr.module 2008-04-12 19:08:14.000000000 -0500
@@ -1,5 +1,5 @@
'fieldset',
'#title' => t('Flickr settings'));
@@ -89,7 +89,6 @@ function activitystream_flickr_activitys
return $form;
}
-
/*
* Return an image used to identify the activity. Most themes expect this is a 16x16 image
* so you should stick with that. Return the full
tag for the image.
@@ -104,4 +103,16 @@ function theme_activitystream_flickr_ite
$user = user_load(array('uid' => $node->uid));
$name = theme('activitystream_username',$user);
return '' . theme('activitystream_flickr_icon') . " $name posted " . l($node->title, $action->link) . " $date " . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
-}
\ No newline at end of file
+}
+
+
+function activitystream_flickr_theme() {
+ return array(
+ 'activitystream_flickr_icon' => array(
+ 'arguments' => array(),
+ ),
+ 'activitystream_flickr_item' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
+}
diff -urp c:/ac/activitystream_lastfm/activitystream_lastfm.info ./activitystream_lastfm/activitystream_lastfm.info
--- c:/ac/activitystream_lastfm/activitystream_lastfm.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_lastfm/activitystream_lastfm.info 2008-04-12 19:07:32.000000000 -0500
@@ -1,11 +1,9 @@
-; $Id: activitystream_lastfm.info,v 1.1.2.1 2008/04/09 05:30:41 akalsey Exp $
+; $Id$
name = Last.fm
description = What you're listening to
-dependencies = activitystream activitystream_feed
+dependencies[] = activitystream
+dependencies[] = activitystream_feed
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
+core = 6.x
diff -urp c:/ac/activitystream_lastfm/activitystream_lastfm.module ./activitystream_lastfm/activitystream_lastfm.module
--- c:/ac/activitystream_lastfm/activitystream_lastfm.module 2008-03-25 19:46:12.000000000 -0500
+++ ./activitystream_lastfm/activitystream_lastfm.module 2008-04-12 19:07:45.000000000 -0500
@@ -1,5 +1,5 @@
$node->uid));
$name = theme('activitystream_username',$user);
return '' . theme('activitystream_lastfm_icon') . " $name listened to " . l($node->title, $activity->link) . " $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
+}
+
+function activitystream_lastfm_theme() {
+ return array(
+ 'activitystream_lastfm_icon' => array(
+ 'arguments' => array(),
+ ),
+ 'activitystream_lastfm_item' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
}
\ No newline at end of file
diff -urp c:/ac/activitystream_twitter/activitystream_twitter.info ./activitystream_twitter/activitystream_twitter.info
--- c:/ac/activitystream_twitter/activitystream_twitter.info 2008-04-10 10:45:02.000000000 -0500
+++ ./activitystream_twitter/activitystream_twitter.info 2008-04-12 19:07:08.000000000 -0500
@@ -1,11 +1,8 @@
-; $Id: activitystream_twitter.info,v 1.1.2.1 2008/04/09 05:30:41 akalsey Exp $
-
+; $Id$
name = Twitter
description = Public Twitter tweets
-dependencies = activitystream activitystream_feed
+dependencies[] = activitystream
+dependencies[] = activitystream_feed
package = Activity Stream
-; Information added by drupal.org packaging script on 2008-04-10
-version = "5.x-1.0-beta3"
-project = "activitystream"
-datestamp = "1207842302"
+core = 6.x
diff -urp c:/ac/activitystream_twitter/activitystream_twitter.module ./activitystream_twitter/activitystream_twitter.module
--- c:/ac/activitystream_twitter/activitystream_twitter.module 2008-04-10 10:37:23.000000000 -0500
+++ ./activitystream_twitter/activitystream_twitter.module 2008-04-12 19:07:18.000000000 -0500
@@ -1,5 +1,5 @@
userid . ':';
$tweet['title'] = preg_replace('/^'.$userid.' /', '', $tweet['title']);
- $tweet['body'] = activitystream_twitter_makelinks($tweet['body']);
+ $tweet['body'] = activitystream_twitter_makelinks($tweet['body']);
$newitems[] = $tweet;
}
return $newitems;
}
-
/*
* Implement a user settings form hook. Modules should build a form
* using an array that mirrors the Drupal form API. activitystream.module
@@ -42,6 +41,7 @@ function activitystream_twitter_streamap
* The values of the form fields, used for setting defaults
*
*/
+
function activitystream_twitter_activitystream_settings(&$edit) {
$form['activitystream_twitter'] = array(
'#type' => 'fieldset',
@@ -62,11 +62,10 @@ function theme_activitystream_twitter_it
$node = node_load($activity->nid);
$date = theme('activitystream_date',$node->created);
$user = user_load(array('uid' => $node->uid));
- $title = activitystream_twitter_makelinks($node->title);
+ $title = activitystream_twitter_makelinks($node->title);
$name = theme('activitystream_username',$user);
- return '' . theme('activitystream_twitter_icon') . " $name " . l('tweeted', $activity->link) . " \"" . $title . "\" $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
+ return '' . theme('activitystream_twitter_icon') . " $name " . l('tweeted', $activity->link) . " \"" . $title . "\" $date" . l('#', 'node/' . $node->nid, array('class' => 'permalink')) . '';
}
-
function activitystream_twitter_makelinks($text) {
// autolink URLS
$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1', $text);
@@ -78,3 +77,13 @@ function activitystream_twitter_makelink
return $text;
}
+function activitystream_twitter_theme() {
+ return array(
+ 'activitystream_twitter_icon' => array(
+ 'arguments' => array(),
+ ),
+ 'activitystream_twitter_item' => array(
+ 'arguments' => array('activity' => NULL),
+ ),
+ );
+}