diff options
author | Greg Froese <greg.froese@gmail.com> | 2009-08-04 14:15:23 +0000 |
---|---|---|
committer | Greg Froese <greg.froese@gmail.com> | 2009-08-04 14:15:23 +0000 |
commit | 8b25b9c804013af2d0a7eb87fc9606279f7cc775 (patch) | |
tree | 9d8b1309a193d980cf3adfd50faa0b1b703eb0cd | |
parent | 9686e8d077d01924776a42526fec5f1379f8ef3a (diff) | |
download | elgg-8b25b9c804013af2d0a7eb87fc9606279f7cc775.tar.gz elgg-8b25b9c804013af2d0a7eb87fc9606279f7cc775.tar.bz2 |
recently commented support
-rw-r--r-- | languages/en.php | 1 | ||||
-rw-r--r-- | start.php | 12 | ||||
-rw-r--r-- | views/default/tidypics/forms/admin.php | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/languages/en.php b/languages/en.php index de8a22db2..7aef34094 100644 --- a/languages/en.php +++ b/languages/en.php @@ -36,6 +36,7 @@ 'tidypics:mostviewedlastmonth' => 'Most viewed last month',
'tidypics:mostviewedtoday' => 'Most viewed today',
'tidypics:recentlyviewed' => 'Recently viewed images',
+ 'tidypics:recentlycommented' => 'Recently commented images',
'tidypics:mostrecent' => 'Most recent images',
'tidypics:yourmostviewed' => 'Your most viewed images',
'tidypics:yourmostrecent' => 'Your most recent images',
@@ -175,6 +175,9 @@ $CONFIG->wwwroot . 'pg/photos/recentlyviewed',
'tidypics-z');
}
+ add_submenu_item( elgg_echo('tidypics:recentlycommented'),
+ $CONFIG->wwwroot . 'pg/photos/recentlycommented',
+ 'tidypics-z');
}
@@ -195,6 +198,7 @@ add_submenu_item(elgg_echo('tidypics:mostcommented'), $CONFIG->url . "mod/tidypics/mostcommentedimages.php");
add_submenu_item(elgg_echo('tidypics:mostcommentedthismonth'), $CONFIG->url . "mod/tidypics/mostcommentedimagesthismonth.php");
add_submenu_item(elgg_echo('tidypics:mostcommentedtoday'), $CONFIG->url . "mod/tidypics/mostcommentedimagestoday.php");
+ add_submenu_item(elgg_echo('tidypics:recentlycommented'), $CONFIG->wwwroot . 'pg/photos/recentlycommented');
}
/**
* Sets up tidypics admin menu. Triggered on pagesetup.
@@ -309,6 +313,11 @@ include($CONFIG->pluginspath . "tidypics/recentlyviewed.php");
break;
+ case "recentlycommented":
+ if (isset($page[1])) set_input('guid',$page[1]);
+ include($CONFIG->pluginspath . "tidypics/recentlycommented.php");
+ break;
+
case "highestrated":
if (isset($page[1])) set_input('guid',$page[1]);
include($CONFIG->pluginspath . "tidypics/highestrated.php");
@@ -387,6 +396,9 @@ return $CONFIG->url . "pg/photos/album/" . $entity->getGUID() . "/" . $title;
}
+ function tp_mostrecentimages($max = 8, $pagination = true) {
+ return list_entities("object", "image", 0, $max, false, false, $pagination);
+ }
// Make sure tidypics_init is called on initialisation
register_elgg_event_handler('init','system','tidypics_init');
diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php index 74d3d992e..c3b366521 100644 --- a/views/default/tidypics/forms/admin.php +++ b/views/default/tidypics/forms/admin.php @@ -67,11 +67,11 @@ $view_count = $plugin->view_count;
if(!$view_count) $view_count = "enabled";
$form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
-/*
+ // Watermark Text
$form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
$form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
-*/
+ // Max Image Size
$maxfilesize = $plugin->maxfilesize;
if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
@@ -141,4 +141,4 @@ $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
- echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
\ No newline at end of file + echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); |