From: <be...@us...> - 2012-05-22 11:13:52
|
Revision: 9572 http://xoops.svn.sourceforge.net/xoops/?rev=9572&view=rev Author: beckmi Date: 2012-05-22 11:13:40 +0000 (Tue, 22 May 2012) Log Message: ----------- fixing minor bugs as reported by Cesag Modified Paths: -------------- XoopsModules/news/branches/mamba/news/admin/groupperms.php XoopsModules/news/branches/mamba/news/admin/index.php XoopsModules/news/branches/mamba/news/archive.php XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php XoopsModules/news/branches/mamba/news/class/class.newsstory.php XoopsModules/news/branches/mamba/news/include/install_function.php XoopsModules/news/branches/mamba/news/include/storyform.inc.php XoopsModules/news/branches/mamba/news/include/storyform.original.php XoopsModules/news/branches/mamba/news/language/english/admin.php XoopsModules/news/branches/mamba/news/language/english/modinfo.php XoopsModules/news/branches/mamba/news/language/english/newsletter.php XoopsModules/news/branches/mamba/news/submit.php XoopsModules/news/branches/mamba/news/xoops_version.php Modified: XoopsModules/news/branches/mamba/news/admin/groupperms.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/groupperms.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/admin/groupperms.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -66,18 +66,7 @@ foreach ($alltopics as $topic_id => $topic) { $permform->addItem($topic_id, $topic['title'], $topic['pid']); } -//echo $permform->render(); -//echo "<br /><br /><br /><br />\n"; - -//check if topics exist before rendering the form -$result_view = $xoopsDB->query("SELECT topic_id, topic_title FROM " . $xoopsDB->prefix("topics") . " "); -if ($xoopsDB->getRowsNum($result_view)) { - echo $permform->render(); -} else { - //echo _AM_XFAQ_NOPERMSSET; -redirect_header("index.php?op=topicsmanager", 5, _AM_NEWS_NOPERMSSET, false); -} - - +echo $permform->render(); +echo "<br /><br /><br /><br />\n"; unset($permform); include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/admin/index.php =================================================================== --- XoopsModules/news/branches/mamba/news/admin/index.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/admin/index.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -440,7 +440,7 @@ } $tbltopics = array(); $exportedstories = $story->NewsExport($timestamp1, $timestamp2, $topiclist, 0, $tbltopics); - $newsfile = XOOPS_ROOT_PATH.'/uploads/newsletter.txt'; + $newsfile = XOOPS_ROOT_PATH.'/uploads/news/letter.txt'; if(count($exportedstories)) { $fp = fopen($newsfile,'w'); if(!$fp) { @@ -466,7 +466,7 @@ fwrite($fp, $footer); } fclose($fp); - $newsfile=XOOPS_URL.'/uploads/newsletter.txt'; + $newsfile=XOOPS_URL.'/uploads/news/newsletter.txt'; printf(_AM_NEWS_NEWSLETTER_READY,$newsfile,XOOPS_URL.'/modules/news/admin/index.php?op=deletefile&type=newsletter'); } else { printf(_AM_NEWS_NOTHING); @@ -548,7 +548,7 @@ $tbltopics=array(); $exportedstories=$story->NewsExport($timestamp1, $timestamp2, $topiclist, $topicsexport, $tbltopics); if(count($exportedstories)) { - $xmlfile=XOOPS_ROOT_PATH.'/uploads/stories.xml'; + $xmlfile=XOOPS_ROOT_PATH.'/uploads/news/stories.xml'; $fp=fopen($xmlfile,'w'); if(!$fp) { redirect_header('index.php',4,sprintf(_AM_NEWS_EXPORT_ERROR,$xmlfile)); @@ -606,7 +606,7 @@ } fwrite($fp,news_utf8_encode("</news_stories>\n")); fclose($fp); - $xmlfile=XOOPS_URL.'/uploads/stories.xml'; + $xmlfile=XOOPS_URL.'/uploads/news/stories.xml'; printf(_AM_NEWS_EXPORT_READY,$xmlfile,XOOPS_URL.'/modules/news/admin/index.php?op=deletefile&type=xml'); } else { printf(_AM_NEWS_EXPORT_NOTHING); @@ -1381,7 +1381,7 @@ case 'deletefile': xoops_cp_header(); if($_GET['type']=='newsletter') { - $newsfile=XOOPS_ROOT_PATH.'/uploads/newsletter.txt'; + $newsfile=XOOPS_ROOT_PATH.'/uploads/news/newsletter.txt'; if(unlink($newsfile)) { redirect_header('index.php', 2, _AM_NEWS_DELETED_OK); } else { @@ -1389,7 +1389,7 @@ } } else { if($_GET['type']=='xml') { - $xmlfile=XOOPS_ROOT_PATH.'/uploads/stories.xml'; + $xmlfile=XOOPS_ROOT_PATH.'/uploads/news/stories.xml'; if(unlink($xmlfile)) { redirect_header( 'index.php', 2, _AM_NEWS_DELETED_OK ); } else { Modified: XoopsModules/news/branches/mamba/news/archive.php =================================================================== --- XoopsModules/news/branches/mamba/news/archive.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/archive.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -83,7 +83,6 @@ include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; $lastyear = 0; $lastmonth = 0; -$this_year = 0; $months_arr = array(1 => _CAL_JANUARY, 2 => _CAL_FEBRUARY, 3 => _CAL_MARCH, 4 => _CAL_APRIL, 5 => _CAL_MAY, 6 => _CAL_JUNE, 7 => _CAL_JULY, 8 => _CAL_AUGUST, 9 => _CAL_SEPTEMBER, 10 => _CAL_OCTOBER, 11 => _CAL_NOVEMBER, 12 => _CAL_DECEMBER); Modified: XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php =================================================================== --- XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/blocks/news_block_tag.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -28,6 +28,8 @@ die('XOOPS root path not defined'); } +if(file_exists(XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php')) { + function news_tag_block_cloud_show($options) { require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; @@ -57,4 +59,5 @@ require_once XOOPS_ROOT_PATH.'/modules/tag/blocks/block.php'; return tag_block_top_edit($options); } +} ?> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/class/class.newsstory.php =================================================================== --- XoopsModules/news/branches/mamba/news/class/class.newsstory.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/class/class.newsstory.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -42,8 +42,8 @@ public $picture; public $topic_imgurl; public $topic_title; -// public $subtitle; -// public $pictureinfo; + public $subtitle; + public $pictureinfo; /** Modified: XoopsModules/news/branches/mamba/news/include/install_function.php =================================================================== --- XoopsModules/news/branches/mamba/news/include/install_function.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/include/install_function.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -59,24 +59,24 @@ $dir = XOOPS_ROOT_PATH."/uploads/news"; if(!is_dir($dir)) - mkdir($dir, 0777); + mkdir($dir, 0777); chmod($dir, 0777); $dir = XOOPS_ROOT_PATH."/uploads/news/file"; if(!is_dir($dir)) - mkdir($dir, 0777); + mkdir($dir, 0777); chmod($dir, 0777); $dir = XOOPS_ROOT_PATH."/uploads/news/image"; if(!is_dir($dir)) - mkdir($dir, 0777); + mkdir($dir, 0777); chmod($dir, 0777); // Copy index.html files on uploads folders $indexFile = XOOPS_ROOT_PATH."/modules/news/include/index.html"; copy($indexFile, XOOPS_ROOT_PATH."/uploads/news/index.html"); - copy($indexFile, XOOPS_ROOT_PATH."/uploads/extgallery/file/index.html"); - copy($indexFile, XOOPS_ROOT_PATH."/uploads/extgallery/image/index.html"); + copy($indexFile, XOOPS_ROOT_PATH."/uploads/news/file/index.html"); + copy($indexFile, XOOPS_ROOT_PATH."/uploads/news/image/index.html"); return true; } Modified: XoopsModules/news/branches/mamba/news/include/storyform.inc.php =================================================================== --- XoopsModules/news/branches/mamba/news/include/storyform.inc.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/include/storyform.inc.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -164,6 +164,7 @@ $sform->addElement($pictureTray); } } + $pictureinfo = ''; $sform->addElement(new XoopsFormFile(_NW_SELECT_IMAGE, 'attachedimage', $xoopsModuleConfig['maxuploadsize']), false); $sform->addElement(new XoopsFormText(_NW_SELECT_IMAGE_DESC, 'pictureinfo', 50, 255, $pictureinfo), false); } Modified: XoopsModules/news/branches/mamba/news/include/storyform.original.php =================================================================== --- XoopsModules/news/branches/mamba/news/include/storyform.original.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/include/storyform.original.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -37,6 +37,9 @@ include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php'; include_once XOOPS_ROOT_PATH.'/modules/news/config.php'; +if (!isset($subtitle)) $subtitle=''; +if (!isset($pictureinfo)) $pictureinfo=''; + $sform = new XoopsThemeForm(_NW_SUBMITNEWS, "storyform", XOOPS_URL.'/modules/'.$xoopsModule->getVar('dirname').'/submit.php'); $sform->setExtra('enctype="multipart/form-data"'); $sform->addElement(new XoopsFormText(_NW_TITLE, 'title', 50, 255, $title), true); @@ -154,7 +157,7 @@ } } $sform->addElement(new XoopsFormFile(_NW_SELECT_IMAGE, 'attachedimage', $xoopsModuleConfig['maxuploadsize']), false); - $sform->addElement(new XoopsFormText(_NW_SELECT_IMAGE_DESC, 'pictureinfo', 50, 255, $pictureinfo), false); + $sform->addElement(new XoopsFormText(_NW_SELECT_IMAGE_DESC, 'pictureinfo', 50, 255, $pictureinfo), false); } Modified: XoopsModules/news/branches/mamba/news/language/english/admin.php =================================================================== --- XoopsModules/news/branches/mamba/news/language/english/admin.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/language/english/admin.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -175,7 +175,7 @@ // Added in 1.3 RC2 define('_AM_NEWS_PLEASE_UPGRADE',"<a href='upgrade.php'><font color='#FF0000'>Please upgrade the module !</font></a>"); -// Added in version 1.50 +// Added in verisn 1.50 define('_AM_NEWS_NEWSLETTER_HEADER', "Header"); define('_AM_NEWS_NEWSLETTER_FOOTER', "Footer"); define('_AM_NEWS_NEWSLETTER_HTML_TAGS', "Remove html tags ?"); @@ -192,7 +192,7 @@ define('_AM_NEWS_META_KEYWORDS_FREQ1',"Words frequency's order"); define('_AM_NEWS_META_KEYWORDS_FREQ2',"Reverse order of words frequency"); -// Added in version 1.67 +// Added in verisn 1.67 // About.php define('_AM_NEWS_ABOUT_RELEASEDATE', "Released: "); define('_AM_NEWS_ABOUT_UPDATEDATE', "Updated: "); @@ -215,15 +215,12 @@ define ("_AM_NEWS_STATISTICS", "Statistics News"); define ("_AM_NEWS_THEREARE_STORIES", "There are <span class='red bold'>%s</span> News in the database"); define ("_AM_NEWS_THEREARE_STORIES_ONLINE", "There are <span class='red bold'>%s</span> News Online"); -define ("_AM_NEWS_THEREARE_STORIES_FILES", "There are <span class='red bold'>%s</span> Stories in the database"); -define ("_AM_NEWS_THEREARE_STORIES_FILES_ONLINE", "There are <span class='red bold'>%s</span> Stories online"); +define ("_AM_NEWS_THEREARE_STORIES_FILES", "There are <span class='red bold'>%s</span> Stories_files in the database"); +define ("_AM_NEWS_THEREARE_STORIES_FILES_ONLINE", "There are <span class='red bold'>%s</span> Stories_files online"); define ("_AM_NEWS_THEREARE_TOPICS", "There are <span class='red bold'>%s</span> Categories in the database"); define ("_AM_NEWS_THEREARE_TOPICS_ONLINE", "There are <span class='red bold'>%s</span> Categories Online"); define ("_AM_NEWS_THEREARE_STORIES_VOTEDATA", "There are <span class='red bold'>%s</span> Stories Viewed"); define ("_AM_NEWS_THEREARE_STORIES_IMPORTED", "There are <span class='red bold'>%s</span> Imported Stories"); define ("_AM_NEWS_THEREARE_STORIES_EXPORTED", "There are <span class='red bold'>%s</span> Stories exported"); -define("_AM_NEWS_NOPERMSSET","Permission cannot be set: There are no Topics created yet! Please create a Topic first."); - - ?> \ No newline at end of file Modified: XoopsModules/news/branches/mamba/news/language/english/modinfo.php =================================================================== --- XoopsModules/news/branches/mamba/news/language/english/modinfo.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/language/english/modinfo.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -187,14 +187,14 @@ define("_MI_NEWS_ABOUT", "About"); define("_MI_NEWS_HOME", "Home"); define("_MI_NEWS_UPGRADE", "Upgrade"); -define("_MI_NEWS_DESCRIPTION", "With this Xoops module, you can create an unlimited number of news articles on your site. </br></br> -You can create all articles you want and organize them in topics.</br></br> -With a very powerfull permissions management, you can create groups authorized to submit articles and a group authorized to approve them and decide who can see what."); +define("_MI_NEWS_DESCRIPTION", "With this Xoops module, you can create an unlimited number of news articles on your site. <br /><br /> +You can create all articles you want and organize them in topics.<br /><br /> +With a very powerful permissions management, you can create groups authorized to submit articles and a group authorized to approve them and decide who can see what."); -define("_MI_NEWS_SHARE_ME","Display share icons ?"); +define("_MI_NEWS_SHARE_ME","Display share icons?"); define("_MI_NEWS_SHARE_ME_DSC","Share icons to facebook ,twitter , google buzz"); -define("_MI_NEWS_SHOWICONS","Display item icons ?"); -define("_MI_NEWS_SHOWICONS_DSC","Display print , PDF and email icons in buttom of each article"); +define("_MI_NEWS_SHOWICONS","Display item icons?"); +define("_MI_NEWS_SHOWICONS_DSC","Display icons for Print, PDF and Email at the bottom of each article"); //1.67 define("_MI_NEWS_FACEBOOKCOMMENTS","Use Facebook Comments ?"); define("_MI_NEWS_FACEBOOKCOMMENTS_DSC","Let your users use Facebook to add comments to your articles"); Modified: XoopsModules/news/branches/mamba/news/language/english/newsletter.php =================================================================== --- XoopsModules/news/branches/mamba/news/language/english/newsletter.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/language/english/newsletter.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -1,5 +1,6 @@ <?php $newslettertemplate=<<<contentend + Title : %title% Topic : %topic_title% Publisher : %publisher% Modified: XoopsModules/news/branches/mamba/news/submit.php =================================================================== --- XoopsModules/news/branches/mamba/news/submit.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/submit.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -160,7 +160,7 @@ $topicid = $story->topicid(); $notifypub = $story->notifypub(); $picture = $story->picture(); - $pictureinfo = $story->pictureinfo('Edit'); + $pictureinfo = $story->pictureinfo; $approve = 0; $published = $story->published(); if (isset($published) && $published > 0) { Modified: XoopsModules/news/branches/mamba/news/xoops_version.php =================================================================== --- XoopsModules/news/branches/mamba/news/xoops_version.php 2012-05-21 19:31:22 UTC (rev 9571) +++ XoopsModules/news/branches/mamba/news/xoops_version.php 2012-05-22 11:13:40 UTC (rev 9572) @@ -68,8 +68,8 @@ $modversion['tables'][3] = 'stories_votedata'; // Scripts to run upon installation or update -$modversion['onInstall']['file'] = "include/install_function.php"; -$modversion['onInstall']['func'] = "xoops_module_install_news"; +//$modversion['onInstall']['file'] = "include/install_function.php"; +//$modversion['onInstall']['func'] = "xoops_module_install_news"; //$modversion['onUpdate'] = "include/update.php"; // Admin things This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |