| 1 |
<?php |
<?php |
| 2 |
/* $Id: aggregator2.module,v 1.31.2.2 2006/02/03 10:02:15 ahwayakchih Exp $ */ |
/* $Id: aggregator2.module,v 1.31.2.3 2006/07/20 11:16:44 ahwayakchih Exp $ */ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 575 |
$output .= form_checkbox(t('Show link to feed with each item'), 'aggregator2_show_feed_link', 1, variable_get('aggregator2_show_feed_link', 0), t('If enabled, aggragator2 will show "source" link with each item. It will point to item\'s feed node.')); |
$output .= form_checkbox(t('Show link to feed with each item'), 'aggregator2_show_feed_link', 1, variable_get('aggregator2_show_feed_link', 0), t('If enabled, aggragator2 will show "source" link with each item. It will point to item\'s feed node.')); |
| 576 |
$output .= form_checkbox(t('Show link to items with each feed'), 'aggregator2_show_item_link', 1, variable_get('aggregator2_show_item_link', 0), t('If enabled, aggragator2 will show "items" link with each feed. It will point to feed node list of all items.')); |
$output .= form_checkbox(t('Show link to items with each feed'), 'aggregator2_show_item_link', 1, variable_get('aggregator2_show_item_link', 0), t('If enabled, aggragator2 will show "items" link with each feed. It will point to feed node list of all items.')); |
| 577 |
$output .= form_checkbox(t('Use link to item source whenever possible'), 'agg2_original_links', 1, variable_get('agg2_original_links', 0), t('If enabled, aggragator2 will use data from "source" tags instead of "link" tags. That will make "full article" link point to site which first published article, instead to site from which article was aggregated. Unfortunetly many sites do not use "source" tags, so often links will still point to site from which feeed was aggregated.')); |
$output .= form_checkbox(t('Use link to item source whenever possible'), 'agg2_original_links', 1, variable_get('agg2_original_links', 0), t('If enabled, aggragator2 will use data from "source" tags instead of "link" tags. That will make "full article" link point to site which first published article, instead to site from which article was aggregated. Unfortunetly many sites do not use "source" tags, so often links will still point to site from which feeed was aggregated.')); |
| 578 |
|
$output .= form_checkbox(t('Use javascript redirect when manually refreshing items'), 'agg2_js_redirect', 1, variable_get('agg2_js_redirect', 1), t('If enabled, aggragator2 output temporary page after refresh items is called. After refresh is done it will outpus javascript code and links to redirect browser after short time.')); |
| 579 |
|
|
| 580 |
$output .= form_checkbox(t('Ignore RSS/ATOM teasers'), 'aggregator2_ignore_teasers', 1, variable_get('aggregator2_ignore_teasers', 0), t('If enabled, aggragator2 will ignore teasers set by RSS/ATOM data, and let Drupal auto-generate teasers.')); |
$output .= form_checkbox(t('Ignore RSS/ATOM teasers'), 'aggregator2_ignore_teasers', 1, variable_get('aggregator2_ignore_teasers', 0), t('If enabled, aggragator2 will ignore teasers set by RSS/ATOM data, and let Drupal auto-generate teasers.')); |
| 581 |
|
|
| 882 |
} |
} |
| 883 |
|
|
| 884 |
|
|
| 885 |
echo '<html><head></head><body>'; |
if (variable_get('agg2_js_redirect', 1)) { |
| 886 |
echo 'refreshing items...<br />'; |
echo '<html><head></head><body>'; |
| 887 |
|
echo 'refreshing items...<br />'; |
| 888 |
|
} |
| 889 |
|
|
| 890 |
aggregator2_refresh($feed); |
aggregator2_refresh($feed); |
| 891 |
|
|
| 892 |
echo 'checking for too old items...<br />'; |
if (variable_get('agg2_js_redirect', 1)) { |
| 893 |
|
echo 'checking for too old items...<br />'; |
| 894 |
|
} |
| 895 |
|
|
| 896 |
aggregator2_remove_old_items($feed->nid, $feed->clear_items, $feed->item_delete_mode); |
aggregator2_remove_old_items($feed->nid, $feed->clear_items, $feed->item_delete_mode); |
| 897 |
|
|
| 900 |
$user = $old_user; |
$user = $old_user; |
| 901 |
} |
} |
| 902 |
|
|
| 903 |
echo 'done.<br />'; |
if (variable_get('agg2_js_redirect', 1)) { |
| 904 |
echo 'You can go to <a href="/node/'. $nid .'">feed node</a> or <a href="/admin/aggregator2">admin/aggregator2</a>.<br />'; |
echo 'done.<br />'; |
| 905 |
echo '<script type="text/javascript">document.write(\'You will be redirected to feed node page in 10 seconds\'); setTimeout("document.location=\'/node/'. $nid .'\'", 10000);</script>'; |
echo 'You can go to <a href="/node/'. $nid .'">feed node</a> or <a href="/admin/aggregator2">admin/aggregator2</a>.<br />'; |
| 906 |
echo '</body></html>'; |
echo '<script type="text/javascript">document.write(\'You will be redirected to feed node page in 10 seconds\'); setTimeout("document.location=\'/node/'. $nid .'\'", 10000);</script>'; |
| 907 |
exit(); |
echo '</body></html>'; |
| 908 |
|
return; |
| 909 |
|
} |
| 910 |
|
|
| 911 |
drupal_goto('node/'. $nid); |
drupal_goto('node/'. $nid); |
| 912 |
} |
} |