Notes |
(0000053)
hallomarkus (reporter)
2008-05-09 02:49
|
geeklog 1 |
|
(0000194)
dhaun (administrator)
2008-06-29 05:24
|
Seems simple enough. Quick'n'dirty version:
if ($_CONF['backend'] == 1) {
$tid = $story->displayElements('tid');
$result = DB_query("SELECT filename, title FROM {$_TABLES['syndication']} WHERE type = 'geeklog' AND topic = '$tid' AND is_enabled = 1");
$feeds = DB_numRows($result);
for ($i = 0; $i < $feeds; $i++) {
list($filename, $title) = DB_fetchArray($result);
$feedUrl = SYND_getFeedUrl($filename);
$feedTitle = "Subscribe to '" . $title . "'";
$story_options[] = COM_createLink($feedTitle, $feedUrl);
}
}
(to go into article.php in 1.5.0, after the "if ($_CONF['pdf_enabled'] == 1) ..." block) |
|
(0000215)
dhaun (administrator)
2008-07-04 03:49
|
The link should probably have a type attribute, e.g. type="application/rss+xml", just like the feed links in the site header. |
|
(0000231)
dhaun (administrator)
2008-07-26 12:26
|
Implemented in CVS. |
|
(0001020)
hallomarkus (reporter)
2009-10-09 08:55
|
Could this be reopened again? Meant was the possibility to subscribe topics by email.
Maybe there should be such a nice sign on the top of the topics like in the forum plugin "subscribe this forum / thread" -> subscribe this topic. |
|
(0001021)
lwc (reporter)
2009-10-09 12:42
edited on: 2009-10-09 13:12
|
To make such a common link possible, the second part of this request must be to put COM_emailUserTopics() by default in lib-custom.php's function CUSTOM_runScheduledTask() and put an on/off option in the GUI:
function CUSTOM_runScheduledTask() {
global $_CONF;
if ($_CONF['emailUserTopics'])
COM_emailUserTopics();
}
Then again, I assume many would want a much less frequent interval for sending e-mail than the general one. Therefore, it might be better to add a unique scheduler for this in lib-common.php:
// Check and see if there are any new stories to send
if ($_CONF['emailUserTopics_schedule_interval'] > 0) { // 0 means off and > 0 should probably be measured in days
if ((DB_getItem($_TABLES['vars'], 'value', "name='emailUserTopics_scheduled_run'")
+ $_CONF['emailUserTopics_schedule_interval']) <= time()) {
DB_query("UPDATE {$_TABLES['vars']} SET value=UNIX_TIMESTAMP() WHERE name='emailUserTopics_scheduled_run'");
COM_emailUserTopics();
}
}
The latter solution would also not force admins to manually update their lib-custom.php file.
And let's not forget to fix the entire function in the first place: http://project.geeklog.net/tracking/view.php?id=997
|
|