Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

standards updates, change order of service icons, add rss icon to add…

…ons feed
  • Loading branch information...
commit 0432faf8aa434e8d72053c7e1bad253f1e52ebcf 1 parent 6a379d0
@haraldpdl haraldpdl authored
View
7 catalog/admin/includes/languages/english/modules/index/latest_addons.php
@@ -10,8 +10,9 @@
Released under the GNU General Public License
*/
-define('ADMIN_INDEX_ADDONS_TITLE', 'Latest osCommerce Addons');
-define('ADMIN_INDEX_ADDONS_DATE', 'Updated Date');
-define('ADMIN_INDEX_ADDONS_FEED_ERROR', 'Could not connect to the addons feed. Please try later');
+define('ADMIN_INDEX_ADDONS_TITLE', 'Latest osCommerce Add-Ons');
+define('ADMIN_INDEX_ADDONS_DATE', 'Date');
+define('ADMIN_INDEX_ADDONS_FEED_ERROR', 'Could not connect to the add-ons feed. The next attempt will be performed within 24 hours.');
+define('ADMIN_INDEX_ADDONS_RSS', 'Subscribe to the osCommerce Add-Ons RSS Feed');
?>
View
15 catalog/admin/includes/languages/english/modules/index/latest_news.php
@@ -10,13 +10,12 @@
Released under the GNU General Public License
*/
-define('ADMIN_INDEX_NEWS_TITLE', 'Latest osCommerce News');
-define('ADMIN_INDEX_NEWS_DATE', 'Published Date');
-define('ADMIN_INDEX_NEWS_FEED_ERROR', 'Could not load news feed');
-
-define('ADMIN_INDEX_NEWS_FACEBOOK', 'View the osCommerce Facebook Fan Page');
-define('ADMIN_INDEX_NEWS_TWITTER', 'View the osCommerce Twitter Feed');
-define('ADMIN_INDEX_NEWS_RSS', 'View the osCommerce News RSS Feed');
-define('ADMIN_INDEX_NEWS_NEWSLETTER', 'Signup for the osCommerce Newsletter');
+define('ADMIN_INDEX_NEWS_TITLE', 'Latest osCommerce News and Blogs');
+define('ADMIN_INDEX_NEWS_DATE', 'Date');
+define('ADMIN_INDEX_NEWS_FEED_ERROR', 'Could not connect to the news feed. The next attempt will be performed within 24 hours.');
+define('ADMIN_INDEX_NEWS_FACEBOOK', 'Become a Fan on Facebook');
+define('ADMIN_INDEX_NEWS_TWITTER', 'Follow osCommerce on Twitter');
+define('ADMIN_INDEX_NEWS_RSS', 'Subscribe to the osCommerce News and Blogs RSS Feed');
+define('ADMIN_INDEX_NEWS_NEWSLETTER', 'Sign Up to the osCommerce Newsletter');
?>
View
34 catalog/admin/includes/modules/index/latest_addons.php
@@ -10,13 +10,15 @@
Released under the GNU General Public License
*/
-include_once(DIR_WS_CLASSES . 'rss.php');
+ if (!class_exists('lastRSS')) {
+ include(DIR_WS_CLASSES . 'rss.php');
+ }
-$rss = new lastRSS;
-$rss->items_limit = 6;
-$rss->cache_dir = DIR_FS_CACHE;
-$rss->cache_time = 86400;
-$feed = $rss->get('http://www.oscommerce.com/oscommerce_contributions.rdf');
+ $rss = new lastRSS;
+ $rss->items_limit = 5;
+ $rss->cache_dir = DIR_FS_CACHE;
+ $rss->cache_time = 86400;
+ $feed = $rss->get('http://www.oscommerce.com/oscommerce_contributions.rdf');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="4">
@@ -25,17 +27,21 @@
<td class="dataTableHeadingContent" align="right"><?php echo ADMIN_INDEX_ADDONS_DATE; ?></td>
</tr>
<?php
-if ($feed) {
- foreach ($feed['items'] as $item) {
- echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
- ' <td class="dataTableContent" align="left"><a href="' . $item['link'] . '" target="_blank">' . $item['title'] . '</a></td>' .
- ' <td class="dataTableContent" align="right">' . date("F j, Y", strtotime($item['pubDate'])) . '</td>' .
+ if (is_array($feed) && !empty($feed)) {
+ foreach ($feed['items'] as $item) {
+ echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
+ ' <td class="dataTableContent"><a href="' . $item['link'] . '" target="_blank">' . $item['title'] . '</a></td>' .
+ ' <td class="dataTableContent" align="right" style="white-space: nowrap;">' . date("F j, Y", strtotime($item['pubDate'])) . '</td>' .
+ ' </tr>';
+ }
+ } else {
+ echo ' <tr class="dataTableRow">' .
+ ' <td class="dataTableContent" colspan="2">' . ADMIN_INDEX_ADDONS_FEED_ERROR . '</td>' .
' </tr>';
}
-} else {
+
echo ' <tr class="dataTableRow">' .
- ' <td class="dataTableContent" align="left" colspan="2">' . ADMIN_INDEX_ADDONS_FEED_ERROR . '</td>' .
+ ' <td class="dataTableContent" align="right" colspan="2"><a href="http://www.oscommerce.com/oscommerce_contributions.rdf" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_rss.png', ADMIN_INDEX_ADDONS_RSS) . '</a></td>' .
' </tr>';
-}
?>
</table>
View
38 catalog/admin/includes/modules/index/latest_news.php
@@ -10,13 +10,15 @@
Released under the GNU General Public License
*/
-include_once(DIR_WS_CLASSES . 'rss.php');
+ if (!class_exists('lastRSS')) {
+ include(DIR_WS_CLASSES . 'rss.php');
+ }
-$rss = new lastRSS;
-$rss->items_limit = 5;
-$rss->cache_dir = DIR_FS_CACHE;
-$rss->cache_time = 86400;
-$feed = $rss->get('http://www.oscommerce.com/rss/news_and_blogs.rss');
+ $rss = new lastRSS;
+ $rss->items_limit = 5;
+ $rss->cache_dir = DIR_FS_CACHE;
+ $rss->cache_time = 86400;
+ $feed = $rss->get('http://www.oscommerce.com/rss/news_and_blogs.rss');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="4">
@@ -25,23 +27,21 @@
<td class="dataTableHeadingContent" align="right"><?php echo ADMIN_INDEX_NEWS_DATE; ?></td>
</tr>
<?php
-
-// load some RSS file
-if ($feed) {
- foreach ($feed['items'] as $item) {
- echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
- ' <td class="dataTableContent" align="left"><a href="' . $item['link'] . '" target="_blank">' . $item['title'] . '</a></td>' .
- ' <td class="dataTableContent" align="right">' . date("F j, Y", strtotime($item['pubDate'])) . '</td>' .
+ if (is_array($feed) && !empty($feed)) {
+ foreach ($feed['items'] as $item) {
+ echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
+ ' <td class="dataTableContent"><a href="' . $item['link'] . '" target="_blank">' . $item['title'] . '</a></td>' .
+ ' <td class="dataTableContent" align="right" style="white-space: nowrap;">' . date("F j, Y", strtotime($item['pubDate'])) . '</td>' .
+ ' </tr>';
+ }
+ } else {
+ echo ' <tr class="dataTableRow">' .
+ ' <td class="dataTableContent" colspan="2">' . ADMIN_INDEX_NEWS_FEED_ERROR . '</td>' .
' </tr>';
}
-} else {
- echo ' <tr class="dataTableRow">' .
- ' <td class="dataTableContent" align="left" colspan="2">' . ADMIN_INDEX_NEWS_FEED_ERROR . '</td>' .
- ' </tr>';
-}
echo ' <tr class="dataTableRow">' .
- ' <td class="dataTableContent" align="right" colspan="2"><a href="http://www.facebook.com/pages/osCommerce/33387373079" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_facebook.png', ADMIN_INDEX_NEWS_FACEBOOK) . '</a>&nbsp;<a href="http://twitter.com/osCommerce" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_twitter.png', ADMIN_INDEX_NEWS_TWITTER) . '</a>&nbsp;<a href="http://www.oscommerce.com/rss/news_and_blogs.rss" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_rss.png', ADMIN_INDEX_NEWS_RSS) . '</a>&nbsp;<a href="http://www.oscommerce.com/newsletter/subscribe" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_newsletter.png', ADMIN_INDEX_NEWS_NEWSLETTER) . '</a></td>' .
+ ' <td class="dataTableContent" align="right" colspan="2"><a href="http://www.oscommerce.com/newsletter/subscribe" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_newsletter.png', ADMIN_INDEX_NEWS_NEWSLETTER) . '</a>&nbsp;<a href="http://www.facebook.com/pages/osCommerce/33387373079" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_facebook.png', ADMIN_INDEX_NEWS_FACEBOOK) . '</a>&nbsp;<a href="http://twitter.com/osCommerce" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_twitter.png', ADMIN_INDEX_NEWS_TWITTER) . '</a>&nbsp;<a href="http://www.oscommerce.com/rss/news_and_blogs.rss" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icon_rss.png', ADMIN_INDEX_NEWS_RSS) . '</a></td>' .
' </tr>';
?>
Please sign in to comment.
Something went wrong with that request. Please try again.