diff --git a/html/modules/bulletin/images/friend.gif b/html/modules/bulletin/images/friend.gif deleted file mode 100644 index c42323b..0000000 Binary files a/html/modules/bulletin/images/friend.gif and /dev/null differ diff --git a/html/modules/bulletin/images/module_icon.svg b/html/modules/bulletin/images/module_icon.svg new file mode 100644 index 0000000..e63a04c --- /dev/null +++ b/html/modules/bulletin/images/module_icon.svg @@ -0,0 +1,7 @@ + + + +Blog + + diff --git a/html/modules/bulletin/images/print.gif b/html/modules/bulletin/images/print.gif deleted file mode 100644 index b883c38..0000000 Binary files a/html/modules/bulletin/images/print.gif and /dev/null differ diff --git a/html/modules/bulletin/images/topics/impresscms.gif b/html/modules/bulletin/images/topics/impresscms.gif deleted file mode 100644 index 7c81320..0000000 Binary files a/html/modules/bulletin/images/topics/impresscms.gif and /dev/null differ diff --git a/html/modules/bulletin/images/topics/xoops.gif b/html/modules/bulletin/images/topics/xoops.gif deleted file mode 100644 index dde9ca5..0000000 Binary files a/html/modules/bulletin/images/topics/xoops.gif and /dev/null differ diff --git a/xoops_trust_path/modules/bulletin/admin.php b/xoops_trust_path/modules/bulletin/admin.php index c0813cc..7dd24f4 100644 --- a/xoops_trust_path/modules/bulletin/admin.php +++ b/xoops_trust_path/modules/bulletin/admin.php @@ -21,7 +21,7 @@ $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ; if( ! file_exists( $langmanpath ) ) die( 'install the latest altsys' ) ; require_once( $langmanpath ) ; -$langman =& D3LanguageManager::getInstance() ; +$langman = D3LanguageManager::getInstance() ; if( ! empty( $_GET['lib'] ) ) { diff --git a/xoops_trust_path/modules/bulletin/admin/admin_menu.php b/xoops_trust_path/modules/bulletin/admin/admin_menu.php deleted file mode 100644 index b31d882..0000000 --- a/xoops_trust_path/modules/bulletin/admin/admin_menu.php +++ /dev/null @@ -1,47 +0,0 @@ - constant( $constpref.'_ADMENU_CONTENTSADMIN' ) , - 'link' => 'admin/index.php?page=contents' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_CATEGORYACCESS' ) , - 'link' => 'admin/index.php?page=category_access' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_IMPORT' ) , - 'link' => 'admin/index.php?page=import' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_TAGS' ) , - 'link' => 'admin/index.php?page=tags' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_EXTRAS' ) , - 'link' => 'admin/index.php?page=extras' , - ) , -) ; - -$adminmenu4altsys = array( - array( - 'title' => constant( $constpref.'_ADMENU_MYLANGADMIN' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_MYTPLSADMIN' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_MYBLOCKSADMIN' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_MYPREFERENCES' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' , - ) , -) ; - -?> \ No newline at end of file diff --git a/xoops_trust_path/modules/bulletin/admin/category_access.php b/xoops_trust_path/modules/bulletin/admin/category_access.php index 41d852b..3f20e6c 100644 --- a/xoops_trust_path/modules/bulletin/admin/category_access.php +++ b/xoops_trust_path/modules/bulletin/admin/category_access.php @@ -3,8 +3,8 @@ require_once dirname(dirname(__FILE__)).'/include/common_functions.php' ; require_once dirname(dirname(__FILE__)).'/include/gtickets.php' ; require_once dirname(dirname(__FILE__)).'/class/bulletinTopic.php' ; -$db =& Database::getInstance() ; - +//$db =& Database::getInstance() ; +$db = &XoopsDatabaseFactory::getDatabaseConnection(); /* * topic_access table clean up 2012-2-1 by Yoshis */ @@ -28,7 +28,7 @@ $sql = "SELECT MIN(topic_id) FROM ".$db->prefix($mydirname."_topics"); list( $topic_id ) = $db->fetchRow( $db->query( $sql ) ); if( empty( $topic_id ) ) { - redirect_header( XOOPS_URL."/modules/$mydirname/index.php?page=makecategory" , 5 , _MD_A_bulletin_ERR_CREATECATEGORYFIRST ) ; + redirect_header( XOOPS_URL."/modules/$mydirname/index.php?page=makecategory" , 5 , _MD_A_BULLETIN_ERR_CREATECATEGORYFIRST ) ; exit ; } else { header( "Location: ".XOOPS_URL."/modules/$mydirname/admin/index.php?page=category_access&topic_id=$topic_id" ) ; @@ -144,11 +144,11 @@ $group_trs .= " ".$group->getVar('name')." - - - - - + + + + + \n" ; } @@ -168,11 +168,11 @@ $uid $uname4disp - - - - - + + + + + \n" ; } @@ -182,13 +182,13 @@ for( $i = 0 ; $i < 5 ; $i ++ ) { $newuser_trs .= " - - - - - - - + + + + + + + \n" ; } @@ -217,5 +217,5 @@ 'topicselbox' => $topicselbox , ) ) ; $tpl->display( 'db:'.$mydirname.'_admin_category_access.html' ) ; + xoops_cp_footer(); -?> diff --git a/xoops_trust_path/modules/bulletin/admin/index.php b/xoops_trust_path/modules/bulletin/admin/index.php index a7ed4b7..3beee49 100644 --- a/xoops_trust_path/modules/bulletin/admin/index.php +++ b/xoops_trust_path/modules/bulletin/admin/index.php @@ -1,530 +1,529 @@ -BTtopicExists() ){ - redirect_header('index.php?op=topicsmanager', 3, _AM_NO_TOPICS); - exit; - } -} - -switch ( $op ){ - -case 'default': -case 'list': -default: - - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $template = 'bulletin_list.html'; - - $asssigns = array( - 'submissions' => newSubmissions('newSubmissions'), - 'autostories' => newSubmissions('autoStories'), - 'published' => newSubmissions('Published', 10), - 'expired' => newSubmissions('Expired') - ); - - break; - -case 'listall': - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $template = 'bulletin_listall.html'; - - $limit = isset( $_GET['limit'] ) ? intval( $_GET['limit'] ) : 20 ; - $start = isset( $_GET['start'] ) ? intval( $_GET['start'] ) : 0 ; - $statu = isset( $_GET['statu'] ) ? trim( $_GET['statu'] ) : 'Published' ; - - switch( $statu ){ - case 'newsubmission': - - $total = Bulletin::countSubmitted( $mydirname ); - $story_list = newSubmissions('newSubmissions', $limit, $start); - $table_title = _AM_WAITING_ARTICLES; - $mode = 'newsubmission'; - break; - - case 'autostory': - - $total = Bulletin::countAutoStory( $mydirname ); - $story_list = newSubmissions('autoStories', $limit, $start); - $table_title = _AM_AUTOARTICLES; - $mode = 'autostory'; - break; - - case 'expstory': - - $total = Bulletin::countExpired( $mydirname ); - $story_list = newSubmissions('Expired', $limit, $start); - $table_title = _AM_EXPARTS; - $mode = ''; - break; - - default: - - $total = Bulletin::countPublished( $mydirname ); - $story_list = newSubmissions('Published', $limit, $start); - $table_title = _AM_PUB_ARTICLES; - $mode = ''; - break; - - } - - $navi = ''; - if ( $total > $limit ) { - $pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'op=listall&statu='.$statu); - $navi = $pagenav->renderNav(); - } - - $asssigns = array( - 'table_title' => $table_title, - 'stories' => $story_list, - 'mode' => $mode, - 'navi' => $navi - ); - - break; - -//Allow each group configuration screen post -case 'permition': - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $template = 'bulletin_permition.html'; - - $module_id = $xoopsModule->getVar('mid'); - - $form = new XoopsGroupPermForm('', $module_id, 'bulletin_permit', ''); - $form->addItem(1, _AM_RIGHT_TO_POST); - $form->addItem(2, _AM_RIGHT_TO_APPROVE); - $form->addItem(3, _AM_RIGHT_TO_CHOSE_DATE); - $form->addItem(4, _AM_RIGHT_HTML); -// $form->addItem(5, _AM_RIGHT_XCODE); -// $form->addItem(6, _AM_RIGHT_SMILEY); - $form->addItem(7, _AM_RIGHT_RELATION); - - $asssigns = array( - 'form' => $form->render() - ); - break; - -case 'topicsmanager': - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $template = 'bulletin_topicsmanager.html'; - - $BTopic = new BulletinTopic( $mydirname ); - $topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] ); - $images = array(); - foreach($topics_array as $v) { - $images[]['image'] = htmlspecialchars($v); - } - $topics_exists = ( $BTopic->BTtopicExists() ) ? 1 : 0 ; - //ob_start(); - //$BTopic->makeTopicSelBox( 1, 0, 'topic_pid' ); - //$topicselbox = ob_get_contents(); - //ob_end_clean(); - //ob_start(); - //$BTopic->makeTopicSelBox(); - //$topicselbox2 = ob_get_contents(); - //ob_end_clean(); - $topicselbox = $BTopic->makeTopicSelBox( true , 0 , 'topic_pid' ) ; - $topicselbox2 = $BTopic->makeTopicSelBox() ; - - $asssigns = array( - 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , - 'images' => $images, - 'topics_exists' => $topics_exists, - 'topicselbox' => $topicselbox, - 'topicselbox2' => $topicselbox2 - ); - $tpl->assign( $asssigns ) ; - //$tpl->display( 'db:'.$mydirname.'_admin_category.html' ) ; - - break; - -case 'modTopic': - $template = 'bulletin_modtopic.html'; - - $BTopic = new BulletinTopic( $mydirname , $_GET['topic_id'] ) ; - $topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] ); - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $images = array(); - - foreach($topics_array as $v){ - $images[] = array('image' => htmlspecialchars($v), 'option' => $BTopic->topic_imgurl() ? 'selected="selected"' : ''); - } - - //ob_start(); - //$BTopic->makeTopicSelBox( 1, $BTopic->topic_pid(), 'topic_pid' ); - //$topicselbox = ob_get_contents(); - //ob_end_clean(); - $topicselbox = $BTopic->makeTopicSelBox( true , $BTopic->topic_pid() , 'topic_pid' ) ; - $asssigns = array( - 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , - 'images' => $images, - 'topic_id' => $BTopic->topic_id(), - 'topic_pid' => $BTopic->topic_pid(), - 'topic_title' => $BTopic->topic_title('E'), - 'topic_imgurl' => $BTopic->topic_imgurl(), - 'topic_imgdir' => str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path']), - 'topicselbox' => $topicselbox - ); - break; - -case 'addTopic': -//ver3.0 - if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { - redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); - } - - $BTopic = new BulletinTopic( $mydirname ); - - $BTopic->setTopicPid( $_POST['topic_pid'] ); - - if( empty( $_POST['topic_title'] ) ){ - redirect_header( "index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME ); - } - - $BTopic->setTopicTitle( $_POST['topic_title'] ); - - if( isset( $_POST['topic_imgurl'] ) && $_POST['topic_imgurl'] != "" ){ - $BTopic -> setTopicImgurl( $_POST['topic_imgurl'] ); - } - - $BTopic->store(); - - $notification_handler = & xoops_gethandler( 'notification' ); - - $tags = array(); - $tags['TOPIC_NAME'] = $_POST['topic_title']; - - // Was created when a new topic, event notification - $notification_handler->triggerEvent( 'global', 0, 'new_category', $tags ); - - redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); - - break; - -case 'delTopic': - - if( empty($_POST['ok']) ){ - - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - $template = 'bulletin_deltopic.html'; - - $BTopic = new BulletinTopic( $mydirname , $_GET['topic_id'] ); -//ver3.0 - if (empty($BTopic)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - if (empty($BTopic->topic_id)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - // Get the all subtopics - $topic_arr = $BTopic->getAllChildTopics(); - - // Get the topic remains - $remain_topics = $BTopic->getTopicsList(); - - array_push( $topic_arr, $BTopic ); - - foreach( $topic_arr as $eachtopic ){ - $topics[] = array( - 'title' => $eachtopic->topic_title(), - 'id' => $eachtopic->topic_id() - ); - unset($remain_topics[$eachtopic->topic_id()]); - } - - $asssigns = array( - 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , - 'topics' => $topics, - 'remain_topics' => $remain_topics, - 'topicid' => intval($_GET['topic_id']) - ); - - }else{ -//ver3.0 - if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { - redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); - } - - $BTopic = new BulletinTopic( $mydirname , intval($_POST['topic_id']) ); - if (empty($BTopic)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - if (empty($BTopic->topic_id)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - - // Get the all subtopics - $topic_arr = $BTopic->getAllChildTopics(); - - // Leave an article topic -//ver3.0 - if (!is_array($_POST['topics'])){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - }else{ - $move_topics = array_map( 'intval' , $_POST['topics'] ) ; - } - $gperm =& BulletinGP::getInstance($mydirname) ; - - array_push( $topic_arr, $BTopic ); - - foreach( $topic_arr as $eachtopic ){ - - if( $move_topics[$eachtopic->topic_id()] == 0 ){ - - // Gets all articles - $story_arr = Bulletin::getAllByTopic( $mydirname , $eachtopic->topic_id() ); - foreach( $story_arr as $eachstory ){ - if ( false != $eachstory->delete() ){ - //Delete Comment - xoops_comment_delete( $xoopsModule->getVar( 'mid' ), $eachstory->getVar('storyid') ); - //Delete an event notification - xoops_notification_deletebyitem( $xoopsModule->getVar( 'mid' ), 'story', $eachstory->getVar('storyid') ); - } - } - - }else{ - - // Gets all articles - $story_arr = Bulletin::getAllByTopic( $mydirname , $eachtopic->topic_id() ); - foreach( $story_arr as $eachstory ){ - $eachstory->setVar('topicid', $move_topics[$eachtopic->topic_id()]); - $eachstory->store(); - } - } - - // Delete the topic - $eachtopic->delete(); - //ver3.0 - $gperm->delete_topic_access($eachtopic->topic_id()); - - xoops_notification_deletebyitem( $xoopsModule->getVar( 'mid' ), 'category', $eachtopic->topic_id ); - } - - redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); - - } - - break; - -case 'modTopicS': - -//ver3.0 - if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { - redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); - } - - $BTopic = new BulletinTopic( $mydirname , $_POST['topic_id'] ) ; - if (empty($BTopic)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - if (empty($BTopic->topic_id)){ - redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); - } - - if ( $_POST['topic_pid'] == $_POST['topic_id'] ) - { - echo "ERROR: Cannot select this topic for parent topic!"; - exit(); // TODO check parent tree or not - } - $BTopic -> setTopicPid( $_POST['topic_pid'] ); - if ( empty( $_POST['topic_title'] ) ) - { - redirect_header( "index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME ); - } - $BTopic -> setTopicTitle( $_POST['topic_title'] ); - $BTopic -> setTopicImgurl( @$_POST['topic_imgurl'] ); - $BTopic -> store(); - redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); - - break; - -case 'convert': - xoops_cp_header(); - include dirname(__FILE__).'/mymenu.php' ; - - if( empty($_POST['ok']) ){ - - xoops_confirm( array( 'op' => 'convert', 'ok' => 1 ), 'index.php', _AM_DO_YOU_CONVERT ); - - }else{ - - // Topic Convert - $sql = "SELECT * FROM ".$xoopsDB->prefix('topics')." ORDER BY topic_id"; - $result =$xoopsDB->query($sql); - - while( $topic = $xoopsDB->fetchArray($result)){ - - $sql = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title, topic_created, topic_modified) VALUES (%u, %u, %s, %s, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())", $xoopsDB->prefix("{$mydirname}_topics"), $topic['topic_id'], $topic['topic_pid'], $xoopsDB->quoteString($topic['topic_imgurl']), $xoopsDB->quoteString($topic['topic_title'])); - - if($xoopsDB->query($sql)){ - echo '
Topic "'.htmlspecialchars($topic['topic_title']).'" was successfully converted.'; - }else{ - echo '
Topic "'.htmlspecialchars($topic['topic_title']).'" Erorr : '.$xoopsDB->error().''; - } - - } - - // Convert of the article - $sql = "SELECT * FROM ".$xoopsDB->prefix('stories')." ORDER BY published"; - $result =$xoopsDB->query($sql); - - while( $story = $xoopsDB->fetchArray($result)){ - - $html = ($story['nohtml'] == 0) ? 1 : 0; - $smiley = ($story['nosmiley'] == 0) ? 1 : 0; - $ihome = ($story['ihome'] == 0) ? 1 : 0; - $type = ($story['story_type'] == 1 && $story['published'] == 0) ? 0 : 1; - if( $story['topicalign'] == 'R' ) $topicimg = 1; - else if( $story['topicalign'] == 'L' ) $topicimg = 2; - else $topicimg = 0; - - $new_story = new Bulletin( $mydirname ); - $new_story->setVar('uid', $story['uid']); - $new_story->setVar('title', $story['title']); - $new_story->setVar('created', $story['created']); - $new_story->setVar('published', $story['published']); - $new_story->setVar('expired', $story['expired']); - $new_story->setVar('hostname', $story['hostname']); - $new_story->setVar('html', $html); - $new_story->setVar('br', 1); - $new_story->setVar('smiley',$smiley); - $new_story->setVar('xcode', 1); - $new_story->setVar('hometext', $story['hometext']); - $new_story->setVar('bodytext', $story['bodytext']); - $new_story->setVar('counter', $story['counter']); - $new_story->setVar('topicid', $story['topicid']); - $new_story->setVar('ihome', $ihome); - $new_story->setVar('type', $type); - $new_story->setVar('topicimg', $topicimg); - $new_story->setVar('comments', $story['comments']); - if($new_story->store()) { - echo '
Story "'.htmlspecialchars($story['title']).'" was successfully converted : '.$new_story->getVar('storyid'); - }else{ - echo '
Failed to convert : '.htmlspecialchars($story['title']).''; - } - - } - - echo '
'._BACK.''; - } - - break; - -} -$credit = _AM_CREDIT; -$translater = _AM_TRANSLATER; - -$assing_global = array( - 'ADMENU7' => constant( $constpref.'_ADMENU7'), - 'ADMENU2' => constant( $constpref.'_ADMENU2'), - 'ADMENU4' => constant( $constpref.'_ADMENU4'), - 'ADMENU5' => constant( $constpref.'_ADMENU5'), - 'imagelocation' => sprintf( _AM_IMGNAEXLOC,str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path']) ), - 'imagebase' => basename(str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path'])), - 'imagedirname' => dirname(str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path'])), - 'credit' => $myts->previewTarea($credit,0,1,0,0,0), - 'translater' => $myts->previewTarea($translater,0,1,0,0,0), - 'admin_title' => sprintf(_AM_CONFIG, $xoopsModule->name()), - 'xoops_url' => XOOPS_URL, - 'template_path' => $mytrustdirpath."/admin/templates", - 'mydirurl' => $mydirurl -); - -$tpl->assign($assing_global); -if(!empty( $asssigns )) $tpl->assign($asssigns); -if(!empty( $template )) $tpl->display("file:".$mytrustdirpath."/admin/templates/".$template); -xoops_cp_footer(); -exit; - - -function newSubmissions($action, $limit=5, $start=0){ - global $mydirname ; - - switch($action){ - case 'newSubmissions': - $articles = Bulletin::getAllSubmitted( $mydirname ); - break; - case 'autoStories': - $articles = Bulletin::getAllAutoStory( $mydirname ); - break; - case 'Published': - $articles = Bulletin::getAllPublished( $mydirname , $limit, $start, 0, 0 ); - break; - case 'Expired': - $articles = Bulletin::getAllExpired( $mydirname , $limit, $start, 0, 0 ); - break; - } - $ret = array(); - if ( count( $articles ) > 0 ){ - $i = 0; - foreach( $articles as $article ){ - $ret[$i]['storyid'] = $article->getVar('storyid'); - $ret[$i]['title'] = RENDER_NEWS_TITLE($article); - $ret[$i]['topic'] = $article->topic_title(); - $ret[$i]['uid'] = $article->getVar('uid'); - $ret[$i]['uname'] = $article->getUname(); - $ret[$i]['created'] = formatTimestamp( $article->getVar('created') ); - $ret[$i]['published'] = formatTimestamp( $article->getVar('published') ); - $ret[$i]['expired'] = ( $article->getVar('expired') > 0 ) ? formatTimestamp( $article->getVar('expired') ) : '---' ; - $i++; - } - } - return $ret; -} -function RENDER_NEWS_TITLE(&$obj){ - global $xoopsModule; - $ret=""; - if($obj->getVar('type') != 0 && $obj->getVar('published')getVar('published') != 0 && ($obj->getVar('expired') == 0 || $obj->getVar('expired') > time() ) ){ - if( $obj->getVar('title') == '' ){ - $obj->setVar('title', _AM_NOSUBJECT); - } - $ret = @sprintf("%s", - XOOPS_URL."/modules/".$xoopsModule->dirname()."/index.php?page=article&storyid=".$obj->getVar('storyid'), - $obj->getVar('title') ); - }else{ - if( $obj->getVar('title') == '' ){ - $obj->setVar('title', _AM_NOSUBJECT); - } - $ret = $obj->getVar('title'); - } - return $ret; -} -?> \ No newline at end of file +BTtopicExists() ){ + redirect_header('index.php?op=topicsmanager', 3, _AM_NO_TOPICS); + exit; + } +} + +switch ( $op ){ + +case 'default': +case 'list': +default: + + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $template = 'bulletin_list.html'; + + $asssigns = array( + 'submissions' => newSubmissions('newSubmissions'), + 'autostories' => newSubmissions('autoStories'), + 'published' => newSubmissions('Published', 10), + 'expired' => newSubmissions('Expired') + ); + + break; + +case 'listall': + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $template = 'bulletin_listall.html'; + + $limit = isset( $_GET['limit'] ) ? intval( $_GET['limit'] ) : 20 ; + $start = isset( $_GET['start'] ) ? intval( $_GET['start'] ) : 0 ; + $statu = isset( $_GET['statu'] ) ? trim( $_GET['statu'] ) : 'Published' ; + + switch( $statu ){ + case 'newsubmission': + + $total = Bulletin::countSubmitted( $mydirname ); + $story_list = newSubmissions('newSubmissions', $limit, $start); + $table_title = _AM_WAITING_ARTICLES; + $mode = 'newsubmission'; + break; + + case 'autostory': + + $total = Bulletin::countAutoStory( $mydirname ); + $story_list = newSubmissions('autoStories', $limit, $start); + $table_title = _AM_AUTOARTICLES; + $mode = 'autostory'; + break; + + case 'expstory': + + $total = Bulletin::countExpired( $mydirname ); + $story_list = newSubmissions('Expired', $limit, $start); + $table_title = _AM_EXPARTS; + $mode = ''; + break; + + default: + + $total = Bulletin::countPublished( $mydirname ); + $story_list = newSubmissions('Published', $limit, $start); + $table_title = _AM_PUB_ARTICLES; + $mode = ''; + break; + + } + + $navi = ''; + if ( $total > $limit ) { + $pagenav = new XoopsPageNav($total, $limit, $start, 'start', 'op=listall&statu='.$statu); + $navi = $pagenav->renderNav(); + } + + $asssigns = array( + 'table_title' => $table_title, + 'stories' => $story_list, + 'mode' => $mode, + 'navi' => $navi + ); + + break; + +//Allow each group configuration screen post +case 'permition': + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $template = 'bulletin_permition.html'; + + $module_id = $xoopsModule->getVar('mid'); + + $form = new XoopsGroupPermForm('', $module_id, 'bulletin_permit', ''); + $form->addItem(1, _AM_RIGHT_TO_POST); + $form->addItem(2, _AM_RIGHT_TO_APPROVE); + $form->addItem(3, _AM_RIGHT_TO_CHOSE_DATE); + $form->addItem(4, _AM_RIGHT_HTML); +// $form->addItem(5, _AM_RIGHT_XCODE); +// $form->addItem(6, _AM_RIGHT_SMILEY); + $form->addItem(7, _AM_RIGHT_RELATION); + + $asssigns = array( + 'form' => $form->render() + ); + break; + +case 'topicsmanager': + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $template = 'bulletin_topicsmanager.html'; + + $BTopic = new BulletinTopic( $mydirname ); + $topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] ); + $images = array(); + foreach($topics_array as $v) { + $images[]['image'] = htmlspecialchars($v); + } + $topics_exists = ( $BTopic->BTtopicExists() ) ? 1 : 0 ; + //ob_start(); + //$BTopic->makeTopicSelBox( 1, 0, 'topic_pid' ); + //$topicselbox = ob_get_contents(); + //ob_end_clean(); + //ob_start(); + //$BTopic->makeTopicSelBox(); + //$topicselbox2 = ob_get_contents(); + //ob_end_clean(); + $topicselbox = $BTopic->makeTopicSelBox( true , 0 , 'topic_pid' ) ; + $topicselbox2 = $BTopic->makeTopicSelBox() ; + + $asssigns = array( + 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , + 'images' => $images, + 'topics_exists' => $topics_exists, + 'topicselbox' => $topicselbox, + 'topicselbox2' => $topicselbox2 + ); + $tpl->assign( $asssigns ) ; + //$tpl->display( 'db:'.$mydirname.'_admin_category.html' ) ; + + break; + +case 'modTopic': + $template = 'bulletin_modtopic.html'; + + $BTopic = new BulletinTopic( $mydirname , $_GET['topic_id'] ) ; + $topics_array = XoopsLists :: getImgListAsArray( $xoopsModuleConfig['topicon_path'] ); + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $images = array(); + + foreach($topics_array as $v){ + $images[] = array('image' => htmlspecialchars($v), 'option' => $BTopic->topic_imgurl() ? 'selected="selected"' : ''); + } + + //ob_start(); + //$BTopic->makeTopicSelBox( 1, $BTopic->topic_pid(), 'topic_pid' ); + //$topicselbox = ob_get_contents(); + //ob_end_clean(); + $topicselbox = $BTopic->makeTopicSelBox( true , $BTopic->topic_pid() , 'topic_pid' ) ; + $asssigns = array( + 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , + 'images' => $images, + 'topic_id' => $BTopic->topic_id(), + 'topic_pid' => $BTopic->topic_pid(), + 'topic_title' => $BTopic->topic_title('E'), + 'topic_imgurl' => $BTopic->topic_imgurl(), + 'topic_imgdir' => str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path']), + 'topicselbox' => $topicselbox + ); + break; + +case 'addTopic': +//ver3.0 + if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + } + + $BTopic = new BulletinTopic( $mydirname ); + + $BTopic->setTopicPid( $_POST['topic_pid'] ); + + if( empty( $_POST['topic_title'] ) ){ + redirect_header( "index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME ); + } + + $BTopic->setTopicTitle( $_POST['topic_title'] ); + + if( isset( $_POST['topic_imgurl'] ) && $_POST['topic_imgurl'] != "" ){ + $BTopic -> setTopicImgurl( $_POST['topic_imgurl'] ); + } + + $BTopic->store(); + + $notification_handler = & xoops_gethandler( 'notification' ); + + $tags = array(); + $tags['TOPIC_NAME'] = $_POST['topic_title']; + + // Was created when a new topic, event notification + $notification_handler->triggerEvent( 'global', 0, 'new_category', $tags ); + + redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); + + break; + +case 'delTopic': + + if( empty($_POST['ok']) ){ + + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + $template = 'bulletin_deltopic.html'; + + $BTopic = new BulletinTopic( $mydirname , $_GET['topic_id'] ); +//ver3.0 + if (empty($BTopic)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + if (empty($BTopic->topic_id)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + // Get the all subtopics + $topic_arr = $BTopic->getAllChildTopics(); + + // Get the topic remains + $remain_topics = $BTopic->getTopicsList(); + + array_push( $topic_arr, $BTopic ); + + foreach( $topic_arr as $eachtopic ){ + $topics[] = array( + 'title' => $eachtopic->topic_title(), + 'id' => $eachtopic->topic_id() + ); + unset($remain_topics[$eachtopic->topic_id()]); + } + + $asssigns = array( + 'gticket_hidden' => $xoopsGTicket->getTicketHtml( __LINE__ , 1800 , 'bulletin_admin') , + 'topics' => $topics, + 'remain_topics' => $remain_topics, + 'topicid' => intval($_GET['topic_id']) + ); + + }else{ +//ver3.0 + if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + } + + $BTopic = new BulletinTopic( $mydirname , intval($_POST['topic_id']) ); + if (empty($BTopic)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + if (empty($BTopic->topic_id)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + + // Get the all subtopics + $topic_arr = $BTopic->getAllChildTopics(); + + // Leave an article topic +//ver3.0 + if (!is_array($_POST['topics'])){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + }else{ + $move_topics = array_map( 'intval' , $_POST['topics'] ) ; + } + $gperm =& BulletinGP::getInstance($mydirname) ; + + array_push( $topic_arr, $BTopic ); + + foreach( $topic_arr as $eachtopic ){ + + if( $move_topics[$eachtopic->topic_id()] == 0 ){ + + // Gets all articles + $story_arr = Bulletin::getAllByTopic( $mydirname , $eachtopic->topic_id() ); + foreach( $story_arr as $eachstory ){ + if ( false != $eachstory->delete() ){ + //Delete Comment + xoops_comment_delete( $xoopsModule->getVar( 'mid' ), $eachstory->getVar('storyid') ); + //Delete an event notification + xoops_notification_deletebyitem( $xoopsModule->getVar( 'mid' ), 'story', $eachstory->getVar('storyid') ); + } + } + + }else{ + + // Gets all articles + $story_arr = Bulletin::getAllByTopic( $mydirname , $eachtopic->topic_id() ); + foreach( $story_arr as $eachstory ){ + $eachstory->setVar('topicid', $move_topics[$eachtopic->topic_id()]); + $eachstory->store(); + } + } + + // Delete the topic + $eachtopic->delete(); + //ver3.0 + $gperm->delete_topic_access($eachtopic->topic_id()); + + xoops_notification_deletebyitem( $xoopsModule->getVar( 'mid' ), 'category', $eachtopic->topic_id ); + } + + redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); + + } + + break; + +case 'modTopicS': + +//ver3.0 + if ( ! $xoopsGTicket->check( true , 'bulletin_admin' ) ) { + redirect_header(XOOPS_URL.'/',3,$xoopsGTicket->getErrors()); + } + + $BTopic = new BulletinTopic( $mydirname , $_POST['topic_id'] ) ; + if (empty($BTopic)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + if (empty($BTopic->topic_id)){ + redirect_header( 'index.php?op=topicsmanager', 1, _TAKINGBACK ); + } + + if ( $_POST['topic_pid'] == $_POST['topic_id'] ) + { + echo "ERROR: Cannot select this topic for parent topic!"; + exit(); // TODO check parent tree or not + } + $BTopic -> setTopicPid( $_POST['topic_pid'] ); + if ( empty( $_POST['topic_title'] ) ) + { + redirect_header( "index.php?op=topicsmanager", 2, _AM_ERRORTOPICNAME ); + } + $BTopic -> setTopicTitle( $_POST['topic_title'] ); + $BTopic -> setTopicImgurl( @$_POST['topic_imgurl'] ); + $BTopic -> store(); + redirect_header( 'index.php?op=topicsmanager', 1, _AM_DBUPDATED ); + + break; + +case 'convert': + xoops_cp_header(); + include dirname(__FILE__).'/mymenu.php' ; + + if( empty($_POST['ok']) ){ + + xoops_confirm( array( 'op' => 'convert', 'ok' => 1 ), 'index.php', _AM_DO_YOU_CONVERT ); + + }else{ + + // Topic Convert + $sql = "SELECT * FROM ".$xoopsDB->prefix('topics')." ORDER BY topic_id"; + $result =$xoopsDB->query($sql); + + while( $topic = $xoopsDB->fetchArray($result)){ + + $sql = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title, topic_created, topic_modified) VALUES (%u, %u, %s, %s, UNIX_TIMESTAMP(), UNIX_TIMESTAMP())", $xoopsDB->prefix("{$mydirname}_topics"), $topic['topic_id'], $topic['topic_pid'], $xoopsDB->quoteString($topic['topic_imgurl']), $xoopsDB->quoteString($topic['topic_title'])); + + if($xoopsDB->query($sql)){ + echo '
Topic "'.htmlspecialchars($topic['topic_title']).'" was successfully converted.'; + }else{ + echo '
Topic "'.htmlspecialchars($topic['topic_title']).'" Erorr : '.$xoopsDB->error().''; + } + + } + + // Convert of the article + $sql = "SELECT * FROM ".$xoopsDB->prefix('stories')." ORDER BY published"; + $result =$xoopsDB->query($sql); + + while( $story = $xoopsDB->fetchArray($result)){ + + $html = ($story['nohtml'] == 0) ? 1 : 0; + $smiley = ($story['nosmiley'] == 0) ? 1 : 0; + $ihome = ($story['ihome'] == 0) ? 1 : 0; + $type = ($story['story_type'] == 1 && $story['published'] == 0) ? 0 : 1; + if( $story['topicalign'] == 'R' ) $topicimg = 1; + else if( $story['topicalign'] == 'L' ) $topicimg = 2; + else $topicimg = 0; + + $new_story = new Bulletin( $mydirname ); + $new_story->setVar('uid', $story['uid']); + $new_story->setVar('title', $story['title']); + $new_story->setVar('created', $story['created']); + $new_story->setVar('published', $story['published']); + $new_story->setVar('expired', $story['expired']); + $new_story->setVar('hostname', $story['hostname']); + $new_story->setVar('html', $html); + $new_story->setVar('br', 1); + $new_story->setVar('smiley',$smiley); + $new_story->setVar('xcode', 1); + $new_story->setVar('hometext', $story['hometext']); + $new_story->setVar('bodytext', $story['bodytext']); + $new_story->setVar('counter', $story['counter']); + $new_story->setVar('topicid', $story['topicid']); + $new_story->setVar('ihome', $ihome); + $new_story->setVar('type', $type); + $new_story->setVar('topicimg', $topicimg); + $new_story->setVar('comments', $story['comments']); + if($new_story->store()) { + echo '
Story "'.htmlspecialchars($story['title']).'" was successfully converted : '.$new_story->getVar('storyid'); + }else{ + echo '
Failed to convert : '.htmlspecialchars($story['title']).''; + } + + } + + echo '
'._BACK.''; + } + + break; + +} +$credit = _AM_CREDIT; +$translater = _AM_TRANSLATER; + +$assing_global = array( + 'ADMENU7' => constant( $constpref.'_ADMENU7'), + 'ADMENU2' => constant( $constpref.'_ADMENU2'), + 'ADMENU4' => constant( $constpref.'_ADMENU4'), + 'ADMENU5' => constant( $constpref.'_ADMENU5'), + 'imagelocation' => sprintf( _AM_IMGNAEXLOC,str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path']) ), + 'imagebase' => basename(str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path'])), + 'imagedirname' => dirname(str_replace(XOOPS_ROOT_PATH,XOOPS_URL,$xoopsModuleConfig['topicon_path'])), + 'credit' => $myts->previewTarea($credit,0,1,0,0,0), + 'translater' => $myts->previewTarea($translater,0,1,0,0,0), + 'admin_title' => sprintf(_AM_CONFIG, $xoopsModule->name()), + 'xoops_url' => XOOPS_URL, + 'template_path' => $mytrustdirpath."/admin/templates", + 'mydirurl' => $mydirurl +); + +$tpl->assign($assing_global); +if(!empty( $asssigns )) $tpl->assign($asssigns); +if(!empty( $template )) $tpl->display("file:".$mytrustdirpath."/admin/templates/".$template); +xoops_cp_footer(); +exit; + + +function newSubmissions($action, $limit=5, $start=0){ + global $mydirname ; + + switch($action){ + case 'newSubmissions': + $articles = Bulletin::getAllSubmitted( $mydirname ); + break; + case 'autoStories': + $articles = Bulletin::getAllAutoStory( $mydirname ); + break; + case 'Published': + $articles = Bulletin::getAllPublished( $mydirname , $limit, $start, 0, 0 ); + break; + case 'Expired': + $articles = Bulletin::getAllExpired( $mydirname , $limit, $start, 0, 0 ); + break; + } + $ret = array(); + if ( count( $articles ) > 0 ){ + $i = 0; + foreach( $articles as $article ){ + $ret[$i]['storyid'] = $article->getVar('storyid'); + $ret[$i]['title'] = RENDER_NEWS_TITLE($article); + $ret[$i]['topic'] = $article->topic_title(); + $ret[$i]['uid'] = $article->getVar('uid'); + $ret[$i]['uname'] = $article->getUname(); + $ret[$i]['created'] = formatTimestamp( $article->getVar('created') ); + $ret[$i]['published'] = formatTimestamp( $article->getVar('published') ); + $ret[$i]['expired'] = ( $article->getVar('expired') > 0 ) ? formatTimestamp( $article->getVar('expired') ) : '---' ; + $i++; + } + } + return $ret; +} +function RENDER_NEWS_TITLE(&$obj){ + global $xoopsModule; + $ret=""; + if($obj->getVar('type') != 0 && $obj->getVar('published')getVar('published') != 0 && ($obj->getVar('expired') == 0 || $obj->getVar('expired') > time() ) ){ + if( $obj->getVar('title') == '' ){ + $obj->setVar('title', _AM_NOSUBJECT); + } + $ret = @sprintf("%s", + XOOPS_URL."/modules/".$xoopsModule->dirname()."/index.php?page=article&storyid=".$obj->getVar('storyid'), + $obj->getVar('title') ); + }else{ + if( $obj->getVar('title') == '' ){ + $obj->setVar('title', _AM_NOSUBJECT); + } + $ret = $obj->getVar('title'); + } + return $ret; +} diff --git a/xoops_trust_path/modules/bulletin/admin/mymenu.php b/xoops_trust_path/modules/bulletin/admin/mymenu.php index f4f2843..a8904d1 100644 --- a/xoops_trust_path/modules/bulletin/admin/mymenu.php +++ b/xoops_trust_path/modules/bulletin/admin/mymenu.php @@ -1,65 +1,95 @@ -=0.5 ********/ - -// Deny direct access -if( preg_replace( '/[^a-zA-Z0-9_-]/' , '' , @$_GET['page'] ) == 'mymenu' ) exit ; - -// Skip for ORETEKI XOOPS -if( defined( 'XOOPS_ORETEKI' ) ) return ; - -global $xoopsModule ; -if( ! is_object( $xoopsModule ) ) die( '$xoopsModule is not set' ) ; - - -// language files (modinfo.php) -$langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ; -if( ! file_exists( $langmanpath ) ) die( 'install the latest altsys' ) ; -require_once( $langmanpath ) ; -$langman =& D3LanguageManager::getInstance() ; -$langman->read( 'modinfo.php' , $mydirname , $mytrustdirname ) ; - -include dirname(dirname(__FILE__)).'/admin_menu.php' ; - -$adminmenu = array_merge( $adminmenu , $adminmenu4altsys ) ; - -$mymenu_uri = empty( $mymenu_fake_uri ) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri ; -$mymenu_link = substr( strstr( $mymenu_uri , '/admin/' ) , 1 ) ; - - -// highlight -foreach( array_keys( $adminmenu ) as $i ) { - if( $mymenu_link == $adminmenu[$i]['link'] ) { - $adminmenu[$i]['selected'] = true ; - $adminmenu_hilighted = true ; - $GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ; - } else { - $adminmenu[$i]['selected'] = false ; - } -} -if( empty( $adminmenu_hilighted ) ) { - foreach( array_keys( $adminmenu ) as $i ) { - if( stristr( $mymenu_uri , $adminmenu[$i]['link'] ) ) { - $adminmenu[$i]['selected'] = true ; - $GLOBALS['altsysAdminPageTitle'] = $adminmenu[$i]['title'] ; - break ; - } - } -} - -// link conversion from relative to absolute -foreach( array_keys( $adminmenu ) as $i ) { - if( stristr( $adminmenu[$i]['link'] , XOOPS_URL ) === false ) { - $adminmenu[$i]['link'] = XOOPS_URL."/modules/$mydirname/" . $adminmenu[$i]['link'] ; - } -} - -// display -require_once XOOPS_TRUST_PATH.'/libs/altsys/class/D3Tpl.class.php' ; -$tpl = new D3Tpl() ; -$tpl->assign( array( - 'adminmenu' => $adminmenu , -) ) ; -$tpl->display( 'db:altsys_inc_mymenu.html' ) ; - -?> \ No newline at end of file +read( 'modinfo.php', $mydirname, $mytrustdirname ); + +include dirname( __DIR__ ) . '/admin_menu.php'; + +// Block Admin +if ( file_exists( XOOPS_TRUST_PATH . '/libs/altsys/myblocksadmin.php' ) ) { + $title = defined( '_MD_A_MYMENU_MYBLOCKSADMIN' ) ? _MD_A_MYMENU_MYBLOCKSADMIN : 'blocksadmin'; + $adminmenu[] = [ 'title' => $title, 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' ]; +} + +// Preferences +$config_handler =& xoops_gethandler( 'config' ); +if ( count( $config_handler->getConfigs( new Criteria( 'conf_modid', $xoopsModule->mid() ) ) ) > 0 ) { + $adminmenu[] = [ + 'title' => _PREFERENCES, + 'link' => XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $xoopsModule->mid() + ]; +} + +$adminmenu = array_merge( $adminmenu, $adminmenu4altsys ); + +$mymenu_uri = empty( $mymenu_fake_uri ) ? $_SERVER['REQUEST_URI'] : $mymenu_fake_uri; +$mymenu_link = substr( strstr( $mymenu_uri, '/admin/' ), 1 ); + + +// highlight +foreach ( array_keys( $adminmenu ) as $i ) { + if ( $mymenu_link === $adminmenu[ $i ]['link'] ) { + $adminmenu[ $i ]['selected'] = true; + $adminmenu_hilighted = true; + $GLOBALS['altsysAdminPageTitle'] = $adminmenu[ $i ]['title']; + } else { + $adminmenu[ $i ]['selected'] = false; + } +} +if ( empty( $adminmenu_hilighted ) ) { + foreach ( array_keys( $adminmenu ) as $i ) { + if ( stripos( $mymenu_uri, $adminmenu[ $i ]['link'] ) !== false ) { + $adminmenu[ $i ]['selected'] = true; + $GLOBALS['altsysAdminPageTitle'] = $adminmenu[ $i ]['title']; + break; + } + } +} + +// link conversion from relative to absolute +foreach ( array_keys( $adminmenu ) as $i ) { + if ( stripos( $adminmenu[ $i ]['link'], XOOPS_URL ) === false ) { + $adminmenu[ $i ]['link'] = XOOPS_URL . "/modules/$mydirname/" . $adminmenu[ $i ]['link']; + } +} + +// Returns module dir name with the first character capitalized +// Assign to template for Admin Breadcrumbs +$dirname = ucfirst( $mydirname ); + +// display +require_once XOOPS_TRUST_PATH . '/libs/altsys/class/D3Tpl.class.php'; + +$tpl = new D3Tpl(); + +$tpl->assign( + [ + 'adminmenu' => $adminmenu, + 'dirname' => $dirname, + ] +); + +$tpl->display( 'db:altsys_inc_menu.html' ); diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_deltopic.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_deltopic.html index 1808986..be4792f 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_deltopic.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_deltopic.html @@ -1,46 +1,50 @@ -<{strip}> -
- - - - - - - - <{foreach item=i from=$topics}> - "> - - - - - <{/foreach}> - - - - -
<{$smarty.const._AM_TOPICID}><{$smarty.const._AM_TOPICNAME}>(<{$smarty.const._AM_FOLLOW_TOPICS_IS_DELETED}>)<{$smarty.const._AM_DESTINATION_OF_STORIES}>
<{$i.id}><{$i.title}> - -
-
- <{$smarty.const._AM_WAYSYWTDTTAL}>
-
- <{$gticket_hidden}> -   -
- -
- - - - - -
- -<{include file="$template_path/bulletin_footer.html"}> - -<{/strip}> \ No newline at end of file +<{strip}> +
+ + + + + + + + + + <{foreach item=i from=$topics}> + "> + + + + + <{/foreach}> + + + + + + +
<{$smarty.const._AM_TOPICID}><{$smarty.const._AM_TOPICNAME}>(<{$smarty.const._AM_FOLLOW_TOPICS_IS_DELETED}>)<{$smarty.const._AM_DESTINATION_OF_STORIES}>
<{$i.id}><{$i.title}> + +
+
+ <{$smarty.const._AM_WAYSYWTDTTAL}>
+
+ <{$gticket_hidden}> +   +
+
+ + + + + +
+ +<{include file="$template_path/bulletin_footer.html"}> + +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_footer.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_footer.html index 30d6feb..e4f15c6 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_footer.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_footer.html @@ -1,8 +1,8 @@ <{strip}>
-<{$credit}>
-<{$translater}> +<{* $credit *}>
+<{* $translater *}>
-<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_list.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_list.html index ad626a1..06a484f 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_list.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_list.html @@ -1,142 +1,225 @@ <{strip}> + <{if $submissions}> -

- <{$smarty.const._AM_WAITING_ARTICLES}> -   <{$smarty.const._AM_DISP_CONTENUE}> -

- - - - - - - - - - - <{foreach item=i from=$submissions}> - "> - - - - <{if $i.uid}> - - <{else}> - - <{/if}> - - - +
+
+

<{$smarty.const._AM_WAITING_ARTICLES}>

+
+ +
+ +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_POSTED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.created}><{$i.expired}><{$smarty.const._EDIT}> -  <{$smarty.const._DELETE}>
+ + + + + + + + + + + + + <{foreach item=i from=$submissions}> + "> + + + + <{if $i.uid}> + + <{else}> + + <{/if}> + + + - <{/foreach}> + <{/foreach}> +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_POSTED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.created}><{$i.expired}> + + <{$smarty.const._EDIT}> <{$smarty.const._EDIT}> +   + <{$smarty.const._DELETE}> <{$smarty.const._DELETE}> +
<{/if}> + + <{if $autostories}> -

- <{$smarty.const._AM_AUTOARTICLES}> -   <{$smarty.const._AM_DISP_CONTENUE}> -

- - - - - - - - - - - - <{foreach item=i from=$autostories}> - "> - - - - <{if $i.uid}> - - <{else}> - - <{/if}> - - - +
+ +
+
+

<{$smarty.const._AM_AUTOARTICLES}>

+
+ +
+ +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PROGRAMMED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}><{$smarty.const._EDIT}> -  <{$smarty.const._DELETE}>
+ + + + + + + + + + + + + <{foreach item=i from=$autostories}> + "> + + + + <{if $i.uid}> + + <{else}> + + <{/if}> + + + + + <{foreachelse}> + + - <{foreachelse}> - - <{/foreach}> + <{/foreach}> +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PROGRAMMED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}> + + <{$smarty.const._EDIT}> <{$smarty.const._EDIT}> +   + <{$smarty.const._DELETE}> <{$smarty.const._DELETE}> +
<{$smarty.const._AM_NO_ARTICLES}>
<{$smarty.const._AM_NO_ARTICLES}>
<{/if}> -

- <{$smarty.const._AM_PUB_ARTICLES}> -   <{$smarty.const._AM_DISP_CONTENUE}> -

- - - - - - - - - - - - <{foreach item=i from=$published}> - "> - - - - <{if $i.uid}> - - <{else}> - - <{/if}> - - - +
+ +
+
+

<{$smarty.const._AM_PUB_ARTICLES}>

+
+ +
+ +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PUBLISHED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}><{$smarty.const._EDIT}> -  <{$smarty.const._DELETE}>
+ + + + + + + + + - <{/foreach}> + + + <{foreach item=i from=$published}> + "> + + + + <{if $i.uid}> + + <{else}> + + <{/if}> + + + + + <{/foreach}> +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PUBLISHED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}> + + <{$smarty.const._EDIT}> <{$smarty.const._EDIT}> +   + <{$smarty.const._DELETE}> <{$smarty.const._DELETE}> +
+ <{if $expired}> -

- <{$smarty.const._AM_EXPARTS}> -   <{$smarty.const._AM_DISP_CONTENUE}> -

- - - - - - - - - - - - <{foreach item=i from=$expired}> - "> - - - - <{if $i.uid}> - - <{else}> - - <{/if}> - - - +
+ +
+
+

<{$smarty.const._AM_EXPARTS}>

+
+ +
+ +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PUBLISHED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}><{$smarty.const._EDIT}> -  <{$smarty.const._DELETE}>
+ + + + + + + + + - <{/foreach}> + + + <{foreach item=i from=$expired}> + "> + + + + <{if $i.uid}> + + <{else}> + + <{/if}> + + + + + <{/foreach}> +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}><{$smarty.const._AM_PUBLISHED}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$i.published}><{$i.expired}> + <{$smarty.const._EDIT}> <{$smarty.const._EDIT}> +   + <{$smarty.const._DELETE}> <{$smarty.const._DELETE}> +
<{/if}> + <{include file="$template_path/bulletin_footer.html"}> -<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_listall.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_listall.html index 7f943d4..2dec1a9 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_listall.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_listall.html @@ -1,50 +1,73 @@ <{strip}> +
<{$smarty.template}>
-

<{$navi}>

+
+
+

<{$smarty.const._AM_WAITING_ARTICLES}>

+
+
+
<{$navi}>
+ <{$smarty.const._AM_DISP_CONTENUE}> + +
+
- - - - - - -
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}> - <{if $mode == 'newsubmission'}> - <{$smarty.const._AM_POSTED}> - <{elseif $mode == 'autostory'}> - <{$smarty.const._AM_PROGRAMMED}> + + + + + + + + + + + + + + <{foreach item=i from=$stories}> + "> + + + + <{if $i.uid}> + <{else}> - <{$smarty.const._AM_PUBLISHED}> + <{/if}> - - - - - <{foreach item=i from=$stories}> - "> - - - - <{if $i.uid}> - - <{else}> - - <{/if}> - - - + + + - <{/foreach}> + <{/foreach}> +
<{$smarty.const._AM_STORYID}><{$smarty.const._AM_TITLE}><{$smarty.const._AM_TOPIC}><{$smarty.const._AM_POSTER}> + <{if $mode == 'newsubmission'}> + <{$smarty.const._AM_POSTED}> + <{elseif $mode == 'autostory'}> + <{$smarty.const._AM_PROGRAMMED}> + <{else}> + <{$smarty.const._AM_PUBLISHED}> + <{/if}> + <{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}><{$smarty.const._AM_EXPIRED}><{$smarty.const._AM_ACTION}>
<{$i.storyid}><{$i.title}><{$i.topic}><{$i.uname}><{$i.uname}> - <{if $mode == 'newsubmission'}> - <{$i.created}> - <{else}> - <{$i.published}> - <{/if}> - <{$i.expired}><{$smarty.const._EDIT}> -  <{$smarty.const._DELETE}> + <{if $mode == 'newsubmission'}> + <{$i.created}> + <{else}> + <{$i.published}> + <{/if}> + <{$i.expired}> + + <{$smarty.const._EDIT}> <{$smarty.const._EDIT}> +   + <{$smarty.const._DELETE}> <{$smarty.const._DELETE}> +

<{$navi}>

+ <{include file="$template_path/bulletin_footer.html"}> -<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_modtopic.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_modtopic.html index 6a76566..68483f2 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_modtopic.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_modtopic.html @@ -1,50 +1,56 @@ -<{strip}> - -
- - - - - - - - - - - - - - - - - - - - - - -
<{$smarty.const._AM_MODIFYTOPIC}>
<{$smarty.const._AM_TOPICNAME}> <{$smarty.const._AM_MAX40CHAR}>
<{$smarty.const._AM_PARENTTOPIC}><{$topicselbox}>
<{$smarty.const._AM_TOPICIMG}> - <{if $topic_imgurl}> -
- <{/if}> -
-
- <{$imagelocation}> -
- <{$gticket_hidden}> - - - -   -   -
-
- -<{include file="$template_path/bulletin_footer.html"}> - -<{/strip}> \ No newline at end of file +<{strip}> + +

<{$smarty.const._AM_MODIFYTOPIC}>

+ +
+ + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AM_TOPICNAME}> + + <{$smarty.const._AM_MAX40CHAR}> +
<{$smarty.const._AM_PARENTTOPIC}><{$topicselbox}>
<{$smarty.const._AM_TOPICIMG}> + <{if $topic_imgurl}> +
+ <{/if}> +
+ +
+ <{$imagelocation}> +
+ <{$gticket_hidden}> + + + +   +   +
+
+ +<{include file="$template_path/bulletin_footer.html"}> + +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_topicsmanager.html b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_topicsmanager.html index c1b84b2..b50afac 100644 --- a/xoops_trust_path/modules/bulletin/admin/templates/bulletin_topicsmanager.html +++ b/xoops_trust_path/modules/bulletin/admin/templates/bulletin_topicsmanager.html @@ -1,70 +1,89 @@ -<{strip}> - -
- - - - - - - - - - - - - - - - - - - - - - -
<{$smarty.const._AM_ADDMTOPIC}>
<{$smarty.const._AM_TOPICNAME}> <{$smarty.const._AM_MAX40CHAR}>
<{$smarty.const._AM_PARENTTOPIC}><{$topicselbox}>
<{$smarty.const._AM_TOPICIMG}> -
- -
- <{$imagelocation}> -
- <{$gticket_hidden}> - - -
-
- -
- -<{if $topics_exists}> -
- - - - - - - - - - - - -
<{$smarty.const._AM_MODIFYTOPIC}>
<{$smarty.const._AM_TOPIC}><{$topicselbox2}>
- <{$gticket_hidden}> - - - -
-
-<{/if}> - -<{include file="$template_path/bulletin_footer.html"}> - -<{/strip}> \ No newline at end of file +<{strip}> + +
+
+

<{$smarty.const._AM_ADDMTOPIC}>

+
+
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AM_TOPICNAME}> + + <{$smarty.const._AM_MAX40CHAR}> +
<{$smarty.const._AM_PARENTTOPIC}><{$topicselbox}>
<{$smarty.const._AM_TOPICIMG}> + +
+ +
+ <{$imagelocation}> +
+ <{$gticket_hidden}> + + +
+
+ +
+ +<{if $topics_exists}> + +

<{$smarty.const._AM_MODIFYTOPIC}>

+ +
+ + + + + + + + + + + + +
<{$smarty.const._AM_TOPIC}><{$topicselbox2}>
+ <{$gticket_hidden}> + + + +
+
+<{/if}> + +<{include file="$template_path/bulletin_footer.html"}> + +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/admin_menu.php b/xoops_trust_path/modules/bulletin/admin_menu.php index 15199c1..c1c553c 100644 --- a/xoops_trust_path/modules/bulletin/admin_menu.php +++ b/xoops_trust_path/modules/bulletin/admin_menu.php @@ -2,45 +2,43 @@ $constpref = '_MI_' . strtoupper( $mydirname ) ; $adminmenu = array( - array( + [ 'title' => constant( $constpref.'_ADMENU5' ) , 'link' => 'admin/index.php?op=list' , - ) , - array( + ], + [ 'title' => constant( $constpref.'_ADMENU2' ) , 'link' => 'admin/index.php?op=topicsmanager' , - ) , - array( + ], + [ 'title' => constant( $constpref.'_ADMENU_CATEGORYACCESS' ) , 'link' => 'admin/index.php?page=category_access' , - ) , - array( + ], + [ 'title' => constant( $constpref.'_ADMENU4' ) , 'link' => 'admin/index.php?op=permition' , - ) , - array( + ], + [ 'title' => constant( $constpref.'_ADMENU7' ) , 'link' => 'admin/index.php?op=convert' , - ) , + ], ) ; $adminmenu4altsys = array( - array( + [ 'title' => constant( $constpref.'_ADMENU_MYLANGADMIN' ) , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mylangadmin' , - ) , - array( + ], + [ 'title' => constant( $constpref.'_ADMENU_MYTPLSADMIN' ) , 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mytplsadmin' , - ) , - array( - 'title' => constant( $constpref.'_ADMENU_MYBLOCKSADMIN' ) , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' , - ) , - array( - 'title' => _PREFERENCES , - 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' , - ) , + ], +// [ +// 'title' => constant( $constpref.'_ADMENU_MYBLOCKSADMIN' ) , +// 'link' => 'admin/index.php?mode=admin&lib=altsys&page=myblocksadmin' , +// ], +// [ +// 'title' => _PREFERENCES , +// 'link' => 'admin/index.php?mode=admin&lib=altsys&page=mypreferences' , +// ], ) ; - -?> \ No newline at end of file diff --git a/xoops_trust_path/modules/bulletin/blocks/bulletin_category_new.php b/xoops_trust_path/modules/bulletin/blocks/bulletin_category_new.php index 97e6ed6..0e769cf 100644 --- a/xoops_trust_path/modules/bulletin/blocks/bulletin_category_new.php +++ b/xoops_trust_path/modules/bulletin/blocks/bulletin_category_new.php @@ -22,7 +22,7 @@ function b_bulletin_category_new_show($options) { if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; $selected_order = empty( $options[1] ) || ! in_array( $options[1] , b_bulletin_category_new_allowed_order() ) ? 'published DESC' : $options[1] ; $display_count = empty($options[2]) ? 0 :intval($options[2]);//Number display for each category - $Length_title = empty($options[3]) ? 255 :intval($options[3]);//Length of the title + $Length_title = empty($options[3]) ? 191 :intval($options[3]);//Length of the title $categories = empty($options[4]) ? 0 : array_map( 'intval' , explode( ',' , $options[4] ) ) ;//(0=show all) $show_body = empty($options[5]) ? 0 :intval($options[5]);//Number of articles showing body for each category $show_category_icon = empty($options[6]) ? 0 :intval($options[6]);//(yes or no) ,Display category icon diff --git a/xoops_trust_path/modules/bulletin/blocks/bulletin_new.php b/xoops_trust_path/modules/bulletin/blocks/bulletin_new.php index 49cac01..9998ecf 100644 --- a/xoops_trust_path/modules/bulletin/blocks/bulletin_new.php +++ b/xoops_trust_path/modules/bulletin/blocks/bulletin_new.php @@ -22,7 +22,7 @@ function b_bulletin_new_show($options) { if( preg_match( '/[^0-9a-zA-Z_-]/' , $mydirname ) ) die( 'Invalid mydirname' ) ; $selected_order = empty( $options[1] ) || ! in_array( $options[1] , b_bulletin_new_allowed_order() ) ? 'published DESC' : $options[1] ; $display_count = empty($options[2]) ? 0 :intval($options[2]);//Number display for each category - $Length_title = empty($options[3]) ? 255 :intval($options[3]);//Length of the title + $Length_title = empty($options[3]) ? 191 :intval($options[3]);//Length of the title $show_body = empty($options[4]) ? 0 :intval($options[4]);//Number of articles showing body for each category if (!isset($options[5])){ $options[5] = 0 ;//(0=show all for d3pipes) diff --git a/xoops_trust_path/modules/bulletin/class/BulletinD3commentStory.class.php b/xoops_trust_path/modules/bulletin/class/BulletinD3commentStory.class.php index 73b381f..d125d1f 100644 --- a/xoops_trust_path/modules/bulletin/class/BulletinD3commentStory.class.php +++ b/xoops_trust_path/modules/bulletin/class/BulletinD3commentStory.class.php @@ -9,7 +9,8 @@ class BulletinD3commentStory extends D3commentAbstract { function fetchSummary( $external_link_id ) { - $db =& Database::getInstance() ; + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextsanitizer::getInstance() ; $module_handler =& xoops_gethandler( 'module' ) ; @@ -31,7 +32,7 @@ function fetchSummary( $external_link_id ) if( function_exists( 'easiestml' ) ) { $summary = easiestml( $summary ) ; } - $summary4assign = htmlspecialchars( xoops_substr( $this->unhtmlspecialchars( strip_tags( $summary ) ) , 0 , 255 ) , ENT_QUOTES ) ; + $summary4assign = htmlspecialchars( xoops_substr( $this->unhtmlspecialchars( strip_tags( $summary ) ) , 0 , 191 ) , ENT_QUOTES ) ; } else { @@ -69,8 +70,8 @@ function getSubjectRaw( $params ) //ver3.0 add function onUpdate( $mode , $link_id , $forum_id , $topic_id , $post_id = 0 ) { - $db =& Database::getInstance() ; - + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $sql1 = 'SELECT COUNT(*) FROM '; $sql1 .= $db->prefix( $this->d3forum_dirname.'_posts' ) .' p '; $sql1 .= ' LEFT JOIN '; diff --git a/xoops_trust_path/modules/bulletin/class/bulletin.php b/xoops_trust_path/modules/bulletin/class/bulletin.php index 6c5028b..2b7be2d 100644 --- a/xoops_trust_path/modules/bulletin/class/bulletin.php +++ b/xoops_trust_path/modules/bulletin/class/bulletin.php @@ -15,8 +15,10 @@ class Bulletin extends XoopsObject{ var $pagebreakRegex = '#(?:\[pagebreak\]|]+?style[^>]+?\bpage-break-after\b.+?|(?:<(?:p|br\b[^>]*)>)?(?:<(?:/p|br\b[^>]*)>)?)#'; // Constructor - function Bulletin( $mydirname , $id=null ) + function __construct($mydirname , $id=null ) { + parent::__construct(); + $this->db =& Database::getInstance(); $this->mydirname = $mydirname ; $this->topic_table = $this->db->prefix( "{$mydirname}_topics" ) ; @@ -24,7 +26,7 @@ function Bulletin( $mydirname , $id=null ) $this->initVar("storyid", XOBJ_DTYPE_INT, null, false); $this->initVar("uid", XOBJ_DTYPE_INT, null, false); - $this->initVar("title", XOBJ_DTYPE_TXTBOX, null, false, 255); + $this->initVar("title", XOBJ_DTYPE_TXTBOX, null, false, 191); $this->initVar("created", XOBJ_DTYPE_INT, null, false); $this->initVar("published", XOBJ_DTYPE_INT, null, false); $this->initVar("expired", XOBJ_DTYPE_INT, null, false); @@ -144,7 +146,8 @@ function delete() // Basic Processing public static function &getAll( $mydirname , $criteria=array() , $asobject=true, $orderby="published DESC", $limit=0, $start=0) { - $db =& Database::getInstance(); + //$db =& Database::getInstance(); + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $ret = array(); $where_query = ""; if ( is_array($criteria) && count($criteria) > 0 ) { @@ -176,7 +179,8 @@ public static function &getAll( $mydirname , $criteria=array() , $asobject=true, // Basic Processing public static function &countAll( $mydirname , $criteria=array()) { - $db =& Database::getInstance(); + //$db =& Database::getInstance(); + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $where_query = ""; if ( is_array($criteria) && count($criteria) > 0 ) { $where_query = " WHERE"; @@ -479,7 +483,8 @@ public static function isPublishedExists( $mydirname , $storyid=0) return false; } - $db =& Database::getInstance(); + //$db =& Database::getInstance(); + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $gperm =& BulletinGP::getInstance($mydirname) ; //ver2.0$sql = "SELECT COUNT(*) FROM ".$db->prefix($mydirname.'_stories')." WHERE type > 0 AND published > 0 AND published <= ".time()." AND (expired = 0 OR expired > ".time().") AND storyid =".$storyid; //ver3.0 @@ -663,7 +668,8 @@ function updateComments($total) // Returns an array with the time stamp of posts public static function getPublishedDays( $mydirname , $limit=0 , $start=0 , $gpermited=false ) { - $db =& Database::getInstance(); + //$db =& Database::getInstance(); + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $gperm =& BulletinGP::getInstance($mydirname) ; $sql = "SELECT published FROM ".$db->prefix($mydirname.'_stories'); diff --git a/xoops_trust_path/modules/bulletin/class/bulletinTopic.php b/xoops_trust_path/modules/bulletin/class/bulletinTopic.php index 2e398a9..15e59f0 100644 --- a/xoops_trust_path/modules/bulletin/class/bulletinTopic.php +++ b/xoops_trust_path/modules/bulletin/class/bulletinTopic.php @@ -5,9 +5,11 @@ class BulletinTopic extends XoopsTopic{ - function BulletinTopic( $mydirname , $topicid=0 ) + function __construct($mydirname , $topicid=0 ) { - $this->db =& Database::getInstance(); + parent::__construct(null); + //$this->db =& Database::getInstance(); + $this->db = XoopsDatabaseFactory::getDatabaseConnection(); $this->mydirname = $mydirname ; $this->table = $this->db->prefix( "{$mydirname}_topics" ); (method_exists('MyTextSanitizer', 'sGetInstance') and $this->ts =& MyTextSanitizer::sGetInstance()) || $this->ts =& MyTextSanitizer::getInstance(); @@ -36,6 +38,7 @@ function BTtopicExists($topic_id = NULL) } } + // Breadcrumbs function makePankuzu($topic_id=0, $ret = array()) { $result = ( "SELECT `topic_pid`, `topic_title` FROM ".$this->table." WHERE `topic_id` = ".intval($topic_id) ); @@ -52,6 +55,7 @@ function makePankuzu($topic_id=0, $ret = array()) } + // Breadcrumbs HTML function makePankuzuForHTML($topic_id=0) { $pankuzu = $this->makePankuzu($topic_id); @@ -255,5 +259,4 @@ function store() } } - } diff --git a/xoops_trust_path/modules/bulletin/class/relation.php b/xoops_trust_path/modules/bulletin/class/relation.php index ca9735e..0369641 100644 --- a/xoops_trust_path/modules/bulletin/class/relation.php +++ b/xoops_trust_path/modules/bulletin/class/relation.php @@ -8,9 +8,10 @@ class relation { var $linkedid = 0; var $dirname = ''; - function relation($mydirname='') + function __construct($mydirname='') { - $this->db =& Database::getInstance(); + //$this->db =& Database::getInstance(); + $this->db = &XoopsDatabaseFactory::getDatabaseConnection(); (method_exists('MyTextSanitizer', 'sGetInstance') and $this->ts =& MyTextSanitizer::sGetInstance()) || $this->ts =& MyTextSanitizer::getInstance(); $this->mydirname = $mydirname; $this->relation_table = $this->db->prefix("{$mydirname}_relation"); diff --git a/xoops_trust_path/modules/bulletin/include/common_functions.php b/xoops_trust_path/modules/bulletin/include/common_functions.php index 31e9d46..14b0f3c 100644 --- a/xoops_trust_path/modules/bulletin/include/common_functions.php +++ b/xoops_trust_path/modules/bulletin/include/common_functions.php @@ -7,7 +7,8 @@ function bulletin_get_submenu( $mydirname ) if( ! empty( $submenus_cache[$mydirname] ) ) return $submenus_cache[$mydirname] ; - $db =& Database::getInstance() ; + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance(); $categories = array( 0 => array( 'pid' => -1 , 'name' => '' , 'url' => '' , 'sub' => array() ) ) ; @@ -36,7 +37,7 @@ function bulletin_get_submenu( $mydirname ) ) ; } - // restruct categories + // restructure categories $submenus_cache[$mydirname] = array_merge( $categories[0]['sub'] , bulletin_restruct_categories( $categories , 0 ) ) ; return $submenus_cache[$mydirname] ; } diff --git a/xoops_trust_path/modules/bulletin/include/gtickets.php b/xoops_trust_path/modules/bulletin/include/gtickets.php index 1605f61..5abc314 100644 --- a/xoops_trust_path/modules/bulletin/include/gtickets.php +++ b/xoops_trust_path/modules/bulletin/include/gtickets.php @@ -103,7 +103,11 @@ function issue( $salt = '' , $timeout = 1800 , $area = '' ) } // check a ticket - function check( $post = true , $area = '' , $allow_repost = true ) + + /** + * @throws Exception + */ + function check($post = true , $area = '' , $allow_repost = true ) { global $xoopsModule ; @@ -123,7 +127,7 @@ function check( $post = true , $area = '' , $allow_repost = true ) $this->_errors[] = $this->messages['err_noticket'] ; } - // gargage collection & find a right stub + // data collection & find a right stub $stubs_tmp = $_SESSION['XOOPS_G_STUBS'] ; $_SESSION['XOOPS_G_STUBS'] = array() ; foreach( $stubs_tmp as $stub ) { diff --git a/xoops_trust_path/modules/bulletin/include/storyform.inc.php b/xoops_trust_path/modules/bulletin/include/storyform.inc.php index 2c7de53..4a03238 100644 --- a/xoops_trust_path/modules/bulletin/include/storyform.inc.php +++ b/xoops_trust_path/modules/bulletin/include/storyform.inc.php @@ -17,7 +17,7 @@ $form->addElement(new XoopsFormLabel(_MD_POSTEDBY, XoopsUser::getUnameFromId($my_uid) )); } -$form->addElement(new XoopsFormText(_MD_TITLE, 'title', 50, 255, $story->getVar('title', 'f') ), true); // GIJ +$form->addElement(new XoopsFormText(_MD_TITLE, 'title', 50, 191, $story->getVar('title', 'f') ), true); // GIJ //$topic_select = new XoopsFormSelect(_MD_TOPIC, 'topicid', $story->getVar('topicid') ); //$topic_select->addOptionArray(Bulletin::makeCategoryArrayForSelect( $mydirname )); $bt = new BulletinTopic( $mydirname ) ; // GIJ @@ -148,4 +148,6 @@ function fckeditor_exec() { $form->addElement($button_tray); $form->display(); -$xoopsTpl->assign('xoops_module_header', '' . $xoopsTpl->get_template_vars( "xoops_module_header" )); +$xoopsTpl->assign('xoops_module_header', '' + . $xoopsTpl->get_template_vars( "xoops_module_header" ) +); diff --git a/xoops_trust_path/modules/bulletin/include/storyform_templatevars.inc.php b/xoops_trust_path/modules/bulletin/include/storyform_templatevars.inc.php index 6d1fddf..e7d083c 100644 --- a/xoops_trust_path/modules/bulletin/include/storyform_templatevars.inc.php +++ b/xoops_trust_path/modules/bulletin/include/storyform_templatevars.inc.php @@ -46,7 +46,7 @@ $xoopsTpl->assign('use_relation', $use_relation); // options -// event notifaction (if mode is edit, not display.) +// event notification (if mode is edit, not display.) if ($use_notify = ($xoopsUser && $storyid == 0 && !$gperm->group_perm(2))) { $xoopsTpl->assign('notifypub', $story->getVar('notifypub')); } @@ -136,4 +136,7 @@ "; -$xoopsTpl->assign('xoops_module_header', $mod_header . '' . $xoopsTpl->get_template_vars( "xoops_module_header" )); +$xoopsTpl->assign('xoops_module_header', $mod_header + . '' + . $xoopsTpl->get_template_vars( "xoops_module_header" ) +); diff --git a/xoops_trust_path/modules/bulletin/include/waiting.plugin.php b/xoops_trust_path/modules/bulletin/include/waiting.plugin.php index 4bd210b..539ae7b 100644 --- a/xoops_trust_path/modules/bulletin/include/waiting.plugin.php +++ b/xoops_trust_path/modules/bulletin/include/waiting.plugin.php @@ -3,7 +3,8 @@ // written by starck function b_waiting_bulletin( $mydirname ) { - $db =& Database::getInstance(); + //$db =& Database::getInstance(); + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $ret = array() ; $sql = "SELECT COUNT(*) FROM ".$db->prefix($mydirname."_stories")." WHERE type=0" ; diff --git a/xoops_trust_path/modules/bulletin/include/whatsnew.inc.php b/xoops_trust_path/modules/bulletin/include/whatsnew.inc.php index 5eec00a..54874a8 100644 --- a/xoops_trust_path/modules/bulletin/include/whatsnew.inc.php +++ b/xoops_trust_path/modules/bulletin/include/whatsnew.inc.php @@ -3,13 +3,14 @@ if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ; eval( 'function '.$mydirname.'_new( $limit=0, $offset=0 ) { - return bulletin_whatsnew_base( "'.$mydirname.'", $limit, $offset, "'.$category_option.'" ) ; +return bulletin_whatsnew_base( "'.$mydirname.'", $limit, $offset, "'.$category_option.'" ) ; }' ); if ( ! function_exists('bulletin_whatsnew_base') ) { function bulletin_whatsnew_base( $mydirname, $limit=0, $offset=0, $category_option='' ) { - $db =& Database::getInstance() ; + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $categories = empty($category_option) ? 0 : array_map( 'intval' , explode( ',' , $category_option ) ) ;//(0=show all) (method_exists('MyTextSanitizer', 'sGetInstance') and $myts =& MyTextSanitizer::sGetInstance()) || $myts =& MyTextSanitizer::getInstance(); diff --git a/xoops_trust_path/modules/bulletin/include/x20_keepblockoptions.inc.php b/xoops_trust_path/modules/bulletin/include/x20_keepblockoptions.inc.php index a48d40a..6ce5213 100644 --- a/xoops_trust_path/modules/bulletin/include/x20_keepblockoptions.inc.php +++ b/xoops_trust_path/modules/bulletin/include/x20_keepblockoptions.inc.php @@ -2,56 +2,14 @@ // $Id$ // Keep Block option values when update (by nobunobu) for XOOPS 2.0.x -$db =& Database::getInstance() ; +//$db =& Database::getInstance() ; +$db = &XoopsDatabaseFactory::getDatabaseConnection(); $query = "SELECT mid FROM ".$db->prefix('modules')." WHERE dirname='".$modversion['dirname']."' "; $result = $db->query($query); $record= $db->fetcharray($result); if ($record) { $mid = $record['mid']; $count = count($modversion['blocks']); - /* $sql = "SELECT * FROM ".$db->prefix('newblocks')." WHERE mid=".$mid." AND block_type ='D'"; - $fresult = $db->query($sql); - $n_funcnum = $count; - while ($fblock = $db->fetchArray($fresult)) { - $bnum = 0; - for ($i = 1 ; $i <= $count ; $i++) { - if (($modversion['blocks'][$i]['file'] == $fblock['func_file']) and ($modversion['blocks'][$i]['show_func'] == $fblock['show_func'])) { - $bnum = $i; - break; - } - } - if($bnum) { - $n_funcnum++; - $modversion['blocks'][$n_funcnum]['file'] = $fblock['func_file']; - $modversion['blocks'][$n_funcnum]['name'] = $fblock['name']; - $modversion['blocks'][$n_funcnum]['description'] = $fblock['name']; - $modversion['blocks'][$n_funcnum]['show_func'] = $fblock['show_func']; - $modversion['blocks'][$n_funcnum]['edit_func'] = $fblock['edit_func']; - $modversion['blocks'][$n_funcnum]['template'] = $fblock['template']; - if ($fblock['options']) { - $old_vals=explode("|",$fblock['options']); - $def_vals=explode("|",$modversion['blocks'][$bnum]['options']); - if (count($old_vals) == count($def_vals)) { - // the number of parameters is not changed - $modversion['blocks'][$n_funcnum]['options'] = $fblock['options']; - $local_msgs[] = "Option's values of the cloned block ".$fblock['name']." will be kept. (value = ".$fblock['options'].")"; - } else if (count($old_vals) < count($def_vals)){ - // the number of parameters is increased - for ($j=0; $j < count($old_vals); $j++) { - $def_vals[$j] = $old_vals[$j]; - } - $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals); - $local_msgs[] = "Option's values of the cloned block ".$fblock['name']." will be kept and new options are added. (value = ".$modversion['blocks'][$fblock['func_num']]['options'].")"; - } else { - $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals); - $local_msgs[] = "Option's values of the cloned block ".$fblock['name']." will be reset to the default, because of some decrease of options. (value = ".$modversion['blocks'][$n_funcnum]['options'].")"; - } - } - $sql = "UPDATE ".$db->prefix('newblocks')." SET func_num='$n_funcnum' WHERE mid=".$mid." AND bid='".$fblock['bid']."'"; - $iret = $db->query($sql); - - } - } */ $sql = "SELECT * FROM ".$db->prefix('newblocks')." WHERE mid=".$mid." AND block_type <>'D' AND func_num > $count"; $fresult = $db->query($sql); diff --git a/xoops_trust_path/modules/bulletin/language/english/admin.php b/xoops_trust_path/modules/bulletin/language/english/admin.php index d539ac1..9e30c24 100644 --- a/xoops_trust_path/modules/bulletin/language/english/admin.php +++ b/xoops_trust_path/modules/bulletin/language/english/admin.php @@ -1,6 +1,10 @@ */ +// Altsys admin menu and breadcrumbs +define( '_MD_A_MYMENU_MYTPLSADMIN', 'Templates' ); +define( '_MD_A_MYMENU_MYBLOCKSADMIN', 'Blocks' ); +define( '_MD_A_MYMENU_MYPREFERENCES', 'Preferences' ); //%%%%%% Admin Module Name Articles %%%%% define("_AM_DBUPDATED","Database updated successfully!"); @@ -9,7 +13,7 @@ define("_AM_STORYID","ID"); define("_AM_TITLE","Subject"); define("_AM_TOPIC","Category"); -define("_AM_POSTER","Poster"); +define("_AM_POSTER","By"); define("_AM_PROGRAMMED","Scheduled time"); define("_AM_ACTION","Action"); define("_AM_POSTED","Posted date"); @@ -21,7 +25,7 @@ define("_AM_ADDMTOPIC","Create a category"); define("_AM_TOPICNAME","Category name"); -define("_AM_MAX40CHAR","(max. 255 characters)"); +define("_AM_MAX40CHAR","(max. 191 characters)"); define("_AM_TOPICIMG","Category icon"); define("_AM_IMGNAEXLOC","Image filename under %s"); @@ -35,7 +39,7 @@ // Added by SUIN -define("_AM_DISP_CONTENUE","[Show all news]"); +define("_AM_DISP_CONTENUE","Show all"); define("_AM_PUB_ARTICLES","Published news"); define("_AM_WAITING_ARTICLES","Awaiting news"); define("_AM_ARTICLE_ADMIN","News manager"); @@ -48,7 +52,7 @@ define("_AM_RIGHT_SMILEY","Allow smiley"); define('_AM_RIGHT_RELATION','Allow related articles feature'); // ver 2.00 added define("_AM_NO_TOPICS","There are no categories."); -define("_AM_DO_YOU_CONVERT","Get stories and categories data from news?"); +define("_AM_DO_YOU_CONVERT","Import and convert articles and categories data from module news?"); define("_AM_EDIT_ARTICLE","Edit news"); define("_AM_NO_ARTICLES","There are no stories."); define("_AM_CONFIG","%s configs"); @@ -69,8 +73,8 @@ // forum_access and category_access define('_MD_A_BULLETIN_LABEL_SELECTFORUM','Select a forum'); define('_MD_A_BULLETIN_LABEL_SELECTCATEGORY','Select a category'); -define('_MD_A_BULLETIN_H2_GROUPPERMS','Permissions about each groups'); -define('_MD_A_BULLETIN_H2_USERPERMS','Permissions about each users'); +define('_MD_A_BULLETIN_H2_GROUPPERMS','Group Permissions'); +define('_MD_A_BULLETIN_H2_USERPERMS','User Permissions'); define('_MD_A_BULLETIN_TH_CAN_READ','View'); define('_MD_A_BULLETIN_TH_CAN_POST','Post'); define('_MD_A_BULLETIN_TH_CAN_EDIT','Edit'); diff --git a/xoops_trust_path/modules/bulletin/language/english/help/help.html b/xoops_trust_path/modules/bulletin/language/english/help/help.html new file mode 100644 index 0000000..794fd16 --- /dev/null +++ b/xoops_trust_path/modules/bulletin/language/english/help/help.html @@ -0,0 +1,4 @@ +

Input the title here

+
Summary
+

Even if the help is poor, some information shall help users. Try writing. Take it easy.

+
">Delegate List
diff --git a/xoops_trust_path/modules/bulletin/language/english/main.php b/xoops_trust_path/modules/bulletin/language/english/main.php index 7245741..e9e57e3 100644 --- a/xoops_trust_path/modules/bulletin/language/english/main.php +++ b/xoops_trust_path/modules/bulletin/language/english/main.php @@ -3,8 +3,8 @@ /* English Translation by Marcelo Yuji Himoro */ // index.php // -define("_MD_PRINTER","Printer friendly page"); -define("_MD_SENDSTORY","Send this story to a friend"); +define("_MD_PRINTER","Print to PDF"); +define("_MD_SENDSTORY","Send to Friend"); define("_MD_READMORE","Read more..."); define("_MD_COMMENTS","0 comments"); define("_MD_ONECOMMENT","1 comment"); @@ -44,7 +44,7 @@ define("_MD_APPROVE","Approve this story"); // ver 2.00 added define("_MD_DATE_FORMAT","%d %m %y %h : %i : %s"); // ver 2.00 added define("_MD_DBPUDATED","Database updated successfully!"); // ver 2.00 added -define("_MD_POSTEDBY","Poster"); // ver 2.00 added +define("_MD_POSTEDBY","By"); // ver 2.00 added define("_MD_RELATION","Related articles"); // ver 2.00 added define("_MD_ADD_RELATION","Add related articles"); // ver 2.00 added define("_MD_CHECKED_AS_RELATION","Add as related articles"); // ver 2.00 added @@ -54,10 +54,10 @@ // archive.php // define("_MD_NEWSARCHIVES","News archive"); define("_MD_ARTICLES","News"); -define("_MD_VIEWS","hits"); +define("_MD_VIEWS","Views"); define("_MD_DATE","Date"); -define("_MD_ACTIONS",""); -define("_MD_PRINTERFRIENDLY","Printer friendly page"); +define("_MD_ACTIONS","Action"); +define("_MD_PRINTERFRIENDLY","Print to PDF"); define("_MD_THEREAREINTOTAL","There are %s story(ies) in total."); define("_MD_INTARTICLE","I have found an interesting news at %s");// %s is your site name define("_MD_INTARTFOUND","Here is the really interesting news I found at %s:"); diff --git a/xoops_trust_path/modules/bulletin/language/english/modinfo.php b/xoops_trust_path/modules/bulletin/language/english/modinfo.php index dda4dc3..793920e 100644 --- a/xoops_trust_path/modules/bulletin/language/english/modinfo.php +++ b/xoops_trust_path/modules/bulletin/language/english/modinfo.php @@ -36,14 +36,14 @@ define($constpref."_SMNAME2","Archive"); // Admin -define($constpref."_ADMENU2","Categories manager"); +define($constpref."_ADMENU2","Categories"); define($constpref."_ADMENU3","Post a new story"); -define($constpref."_ADMENU4","Posting permission manager"); -define($constpref."_ADMENU5","News manager"); -define($constpref."_ADMENU7","Import from news"); -define($constpref.'_ADMENU_MYLANGADMIN','languages'); -define($constpref.'_ADMENU_MYTPLSADMIN','templates'); -define($constpref.'_ADMENU_MYBLOCKSADMIN','blocks/permissions'); +define($constpref."_ADMENU4","Posting permission"); +define($constpref."_ADMENU5","News"); +define($constpref."_ADMENU7","Import"); +define($constpref.'_ADMENU_MYLANGADMIN','Languages'); +define($constpref.'_ADMENU_MYTPLSADMIN','Templates'); +define($constpref.'_ADMENU_MYBLOCKSADMIN','Blocks'); // Title of config items define($constpref."_CONFIG1","Number of news to display on the index page"); @@ -60,7 +60,7 @@ define($constpref."_CONFIG6_D","When a story posted from submit.php is approved, user's 'Posts' will be increased."); define($constpref."_CONFIG7","Path to category image directory"); define($constpref."_CONFIG7_D","Set the absolute path."); -define($constpref."_CONFIG8","Print friendly page image URL"); +define($constpref."_CONFIG8","Print to PDF image URL"); define($constpref."_CONFIG8_D","Set the URL for the logo image shown on print friendly page."); define($constpref."_CONFIG9","Change site name to story name"); define($constpref."_CONFIG9_D","Replaces the site name for the story subject. It's said to be effective for SEO."); @@ -69,23 +69,23 @@ // 1.01 added define($constpref."_CONFIG11","Display 'Print' icon?"); define($constpref."_CONFIG11_D",""); -define($constpref."_CONFIG12","Display 'Tell a frind' icon?"); +define($constpref."_CONFIG12","Display 'Tell a friend' icon?"); define($constpref."_CONFIG12_D",""); define($constpref."_CONFIG13","Use Tell A Friend module?"); define($constpref."_CONFIG13_D",""); define($constpref."_CONFIG14","Display RSS link?"); define($constpref."_CONFIG14_D",""); -define($constpref.'_CONFIG145','feed RSS into backend.php (only for XCL)'); +define($constpref.'_CONFIG145','RSS feed link into backend.php (only for XCL)'); define($constpref.'_CONFIG145_D', ''); // 2.00 added define($constpref."_CONFIG15","Enable related articles feature?"); define($constpref."_CONFIG15_D",""); define($constpref."_CONFIG16","Display recent stories in the same category?"); define($constpref."_CONFIG16_D","Displays a list of articles in the same category at the bottom of each story."); -define($constpref."_CONFIG17","Number of recent storeis in the same category."); +define($constpref."_CONFIG17","Number of recent articles in the same category."); define($constpref."_CONFIG17_D",""); -define($constpref."_CONFIG18","Display category bread crumb?"); -define($constpref."_CONFIG18_D","A category tree is displayed in each articles."); +define($constpref."_CONFIG18","Display category bread-crumb?"); +define($constpref."_CONFIG18_D","Article categories in a tree-like structure is displayed in each article."); define($constpref.'_CONFIG19','use common/fckeditor'); define($constpref.'_CONFIG19_D', 'Posters can use FCKeditor on XOOPS if he/she is allowed to use HTML'); @@ -96,9 +96,9 @@ define($constpref.'_COM_POSTSNUM','Max posts displayed in comment-integration'); // by yoshis -define($constpref.'_ADMENU_CATEGORYACCESS' , 'Permissions of Categories' ) ; +define($constpref.'_ADMENU_CATEGORYACCESS' , 'Permissions' ) ; define($constpref.'_IMAGES_DIR','Directory for image files'); -define($constpref.'_IMAGES_DIRDSC','relative path should be set in the module directory. default: images'); +define($constpref.'_IMAGES_DIRDSC','Relative path should be set in the module directory. default: images'); // Text for notifications define($constpref."_GLOBAL_NOTIFY","Global"); diff --git a/xoops_trust_path/modules/bulletin/language/ja_utf8/admin.php b/xoops_trust_path/modules/bulletin/language/ja_utf8/admin.php index 793e081..af58c44 100644 --- a/xoops_trust_path/modules/bulletin/language/ja_utf8/admin.php +++ b/xoops_trust_path/modules/bulletin/language/ja_utf8/admin.php @@ -1,6 +1,11 @@ ±ÜÍ÷¸¢¸Â¤ÈÅê¹Æ¸¢¸Â¤ÎξÊý¤ò³°¤»¤Ð¡¢¤½¤Î¥æ¡¼¥¶¤Ï¤³¤Î¥ê¥¹¥È¤«¤é¤â¾Ã¤¨¤Þ¤¹¡£'); -define('_MD_A_BULLETIN_ERR_CREATECATEGORYFIRST','¤Þ¤º¥«¥Æ¥´¥ê¡¼¤òºîÀ®¤·¤Æ¤¯¤À¤µ¤¤'); -define('_MD_A_BULLETIN_ERR_CREATEFORUMFIRST','¤Þ¤º¥Õ¥©¡¼¥é¥à¤òºîÀ®¤·¤Æ¤¯¤À¤µ¤¤'); - -?> \ No newline at end of file +�������¤���Ƹ��¤�ξ���ò³°¤ï¿½ï¿½Ð¡ï¿½ï¿½ï¿½ï¿½Î¥æ¡¼ï¿½ï¿½ï¿½Ï¤ï¿½ï¿½Î¥ê¥¹ï¿½È¤ï¿½ï¿½ï¿½ï¿½Ã¤ï¿½ï¿½Þ¤ï¿½ï¿½ï¿½'); +define('_MD_A_BULLETIN_ERR_CREATECATEGORYFIRST','�ޤ����ƥ��꡼��������Ƥ�������'); +define('_MD_A_BULLETIN_ERR_CREATEFORUMFIRST','�ޤ��ե�������������Ƥ�������'); + +?> diff --git a/xoops_trust_path/modules/bulletin/main.php b/xoops_trust_path/modules/bulletin/main.php index cd206d2..31b5c90 100644 --- a/xoops_trust_path/modules/bulletin/main.php +++ b/xoops_trust_path/modules/bulletin/main.php @@ -9,7 +9,7 @@ $langmanpath = XOOPS_TRUST_PATH.'/libs/altsys/class/D3LanguageManager.class.php' ; if( ! file_exists( $langmanpath ) ) die( 'install the latest altsys' ) ; require_once( $langmanpath ) ; -$langman =& D3LanguageManager::getInstance() ; +$langman = D3LanguageManager::getInstance() ; $langman->read( 'main.php' , $mydirname , $mytrustdirname ) ; @@ -22,6 +22,3 @@ } else { include "$mytrustdirpath/main/index.php" ; } - - -?> \ No newline at end of file diff --git a/xoops_trust_path/modules/bulletin/main/archive.php b/xoops_trust_path/modules/bulletin/main/archive.php index cfd487c..ffd74a1 100644 --- a/xoops_trust_path/modules/bulletin/main/archive.php +++ b/xoops_trust_path/modules/bulletin/main/archive.php @@ -43,7 +43,7 @@ $exist_arr[$this_year][$this_month] = $this_month; } -// Assing Calendar +// Assign Calendar $i = 0; $years = array(); foreach($year_arr as $caly => $calms){ @@ -92,11 +92,11 @@ $story['date'] = formatTimestamp($article[$i]->getVar('published'), $bulletin_date_format, $useroffset); $story['print_link'] = 'index.php?page=print&storyid='.$article[$i]->getVar('storyid'); - // If you are using Tell A Frined module + // If you are using Tell A Friend module if($bulletin_use_tell_a_frined){ $story['mail_link'] = XOOPS_URL.'/modules/tellafriend/index.php?target_uri='.rawurlencode( "$mydirurl/index.php?page=article&storyid=".$article[$i]->getVar('storyid') ).'&subject='.rawurlencode(sprintf(_MD_INTARTFOUND,$xoopsConfig['sitename'])) ; }else{ - // $story['mail_link'] = 'mailto:?subject='.sprintf(_MD_INTARTICLE, $xoopsConfig['sitename']).'&body='.sprintf(_MD_INTARTFOUND, $xoopsConfig['sitename']).': '.$mydirurl.'/index.php?page=article&storyid='.$article[$i]->getVar('storyid'); + $mail_subject = sprintf(_MD_INTARTICLE,$xoopsConfig['sitename']); $mail_body = sprintf(_MD_INTARTFOUND, $xoopsConfig['sitename']).': '.$mydirurl.'/index.php?page=article&storyid='.$article[$i]->getVar('storyid'); if (defined('_MD_MAILTO_ENCODING')){ @@ -128,6 +128,7 @@ array( 'name' => $xoopsModule->getVar('name') , 'url' => XOOPS_URL.'/modules/'.$mydirname.'/' ) , array( 'name' => _MD_NEWSARCHIVES ) , ) ) ; // GIJ + $xoopsTpl->assign( 'mod_config' , $xoopsModuleConfig ) ; require_once XOOPS_ROOT_PATH.'/footer.php'; diff --git a/xoops_trust_path/modules/bulletin/main/article.php b/xoops_trust_path/modules/bulletin/main/article.php index 90f90fb..523425b 100644 --- a/xoops_trust_path/modules/bulletin/main/article.php +++ b/xoops_trust_path/modules/bulletin/main/article.php @@ -167,15 +167,16 @@ $xoopsTpl->assign( 'mod_config' , $xoopsModuleConfig ) ; //meta description -$description = $myts->htmlSpecialChars(xoops_substr(strip_tags($story['text']),0,255),ENT_QUOTES); +$description = $myts->htmlSpecialChars(xoops_substr(strip_tags($story['text']),0,191),ENT_QUOTES); if (defined('LEGACY_MODULE_VERSION') && version_compare(LEGACY_MODULE_VERSION, '2.2', '>=')) { // For XCL 2.2 $xclRoot =& XCube_Root::getSingleton(); $headerScript = $xclRoot->mContext->getAttribute('headerScript'); $headerScript->addMeta('description', $description); -} elseif (isset($xoTheme) && is_object($xoTheme)) { - // For XOOPS 2.3 or higher & Impress CMS. - $xoTheme->addMeta('meta', 'description', $description); } +//elseif (isset($xoTheme) && is_object($xoTheme)) { +// // For XOOPS 2.3 or higher & Impress CMS. +// $xoTheme->addMeta('meta', 'description', $description); +//} require_once XOOPS_ROOT_PATH.'/footer.php'; diff --git a/xoops_trust_path/modules/bulletin/main/search.php b/xoops_trust_path/modules/bulletin/main/search.php index 2b0259a..7923dda 100644 --- a/xoops_trust_path/modules/bulletin/main/search.php +++ b/xoops_trust_path/modules/bulletin/main/search.php @@ -61,7 +61,7 @@ include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; // create form $search_form = new XoopsThemeForm(_SR_SEARCH, "search", "index.php", 'get'); -$search_form->addElement(new XoopsFormText(_SR_KEYWORDS, "query", 30, 255, htmlspecialchars(stripslashes(implode(" ", $queries)), ENT_QUOTES)), true); +$search_form->addElement(new XoopsFormText(_SR_KEYWORDS, "query", 30, 191, htmlspecialchars(stripslashes(implode(" ", $queries)), ENT_QUOTES)), true); $type_select = new XoopsFormSelect(_SR_TYPE, "andor", $andor); $type_select->addOptionArray(array("AND"=>_SR_ALL, "OR"=>_SR_ANY, "exact"=>_SR_EXACT)); $search_form->addElement($type_select); diff --git a/xoops_trust_path/modules/bulletin/module_icon.svg b/xoops_trust_path/modules/bulletin/module_icon.svg new file mode 100644 index 0000000..e63a04c --- /dev/null +++ b/xoops_trust_path/modules/bulletin/module_icon.svg @@ -0,0 +1,7 @@ + + + +Blog + + diff --git a/xoops_trust_path/modules/bulletin/oninstall.php b/xoops_trust_path/modules/bulletin/oninstall.php index 2c052e8..2145999 100644 --- a/xoops_trust_path/modules/bulletin/oninstall.php +++ b/xoops_trust_path/modules/bulletin/oninstall.php @@ -9,7 +9,8 @@ function bulletin_oninstall_base( $module , $mydirname ) global $ret ; - $db =& Database::getInstance() ; + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $mid = $module->getVar('mid') ; // for Cube 2.1 @@ -160,4 +161,4 @@ function bulletin_message_append_oninstall( &$module_obj , &$log ) // use mLog->addWarning() or mLog->addError() if necessary } -?> \ No newline at end of file +?> diff --git a/xoops_trust_path/modules/bulletin/onuninstall.php b/xoops_trust_path/modules/bulletin/onuninstall.php index 178432a..aa500cc 100644 --- a/xoops_trust_path/modules/bulletin/onuninstall.php +++ b/xoops_trust_path/modules/bulletin/onuninstall.php @@ -1,72 +1,59 @@ mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success' , 'bulletin_message_append_onuninstall' ) ; - $ret = array() ; - } else { - $isCube = false ; - if( ! is_array( $ret ) ) $ret = array() ; - } - - $db =& Database::getInstance() ; - $mid = $module->getVar('mid') ; - - // TABLES (loading mysql.sql) - $sql_file_path = dirname(__FILE__).'/sql/mysql.sql' ; - $prefix_mod = $db->prefix() . '_' . $mydirname ; - if( file_exists( $sql_file_path ) ) { - $ret[] = "SQL file found at ".htmlspecialchars($sql_file_path).".
Deleting tables...
"; - $sql_lines = file( $sql_file_path ) ; - foreach( $sql_lines as $sql_line ) { - if( preg_match( '/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i' , $sql_line , $regs ) ) { - $sql = 'DROP TABLE '.addslashes($prefix_mod.'_'.$regs[1]); - if (!$db->query($sql)) { - $ret[] = 'ERROR: Could not drop table '.htmlspecialchars($prefix_mod.'_'.$regs[1]).'.
'; - } else { - $ret[] = 'Table '.htmlspecialchars($prefix_mod.'_'.$regs[1]).' dropped.
'; - } - } - } - } - - // TEMPLATES (Not necessary because modulesadmin removes all templates) - /* $tplfile_handler =& xoops_gethandler( 'tplfile' ) ; - $templates =& $tplfile_handler->find( null , 'module' , $mid ) ; - $tcount = count( $templates ) ; - if( $tcount > 0 ) { - $ret[] = 'Deleting templates...' ; - for( $i = 0 ; $i < $tcount ; $i ++ ) { - if( ! $tplfile_handler->delete( $templates[$i] ) ) { - $ret[] = 'ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file','s').' from the database. Template ID: '.$templates[$i]->getVar('tpl_id','s').'
'; - } else { - $ret[] = 'Template '.$templates[$i]->getVar('tpl_file','s').' deleted from the database. Template ID: '.$templates[$i]->getVar('tpl_id','s').'
'; - } - } - } - unset($templates); */ - - - return true ; -} - -function bulletin_message_append_onuninstall( &$module_obj , &$log ) -{ - if( is_array( @$GLOBALS['ret'] ) ) { - foreach( $GLOBALS['ret'] as $message ) { - $log->add( strip_tags( $message ) ) ; - } - } - - // use mLog->addWarning() or mLog->addError() if necessary +eval( ' function xoops_module_uninstall_' . $mydirname . '( $module ) { return bulletin_onuninstall_base( $module , \'' . $mydirname . '\' ) ; } ' ); + +if ( ! function_exists( 'bulletin_onuninstall_base' ) ) { + + function bulletin_onuninstall_base( $module , $mydirname ) + { + // transactions on module uninstall + + global $ret ; + + // for Cube 2.1 + if ( defined( 'XOOPS_CUBE_LEGACY' ) ) { + $isCube = true ; + $root = &XCube_Root::getSingleton(); + $root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst( $mydirname ) . '.Success', 'bulletin_message_append_onuninstall' ); + $ret = []; + } else { + $isCube = false ; + if ( ! is_array( $ret ) ) { + $ret = []; + } + } + + $db = &XoopsDatabaseFactory::getDatabaseConnection(); + $mid = $module->getVar('mid') ; + + // TABLES (loading mysql.sql) + $sql_file_path = __DIR__ . '/sql/mysql.sql'; + $prefix_mod = $db->prefix() . '_' . $mydirname; + if ( file_exists( $sql_file_path ) ) { + $ret[] = 'SQL file found at ' . htmlspecialchars( $sql_file_path ) . '.
Deleting tables...
'; + $sql_lines = file( $sql_file_path ) ; + foreach ( $sql_lines as $sql_line ) { + if ( preg_match( '/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i', $sql_line, $regs ) ) { + $sql = 'DROP TABLE ' . $prefix_mod . '_' . $regs[1]; + if ( ! $db->query( $sql ) ) { + $ret[] = 'ERROR: Could not drop table ' . htmlspecialchars( $prefix_mod . '_' . $regs[1] ) . '.
'; + } else { + $ret[] = 'Table ' . htmlspecialchars( $prefix_mod . '_' . $regs[1] ) . ' dropped.
'; + } + } + } + } + + return true; + } + + function bulletin_message_append_onuninstall( &$module_obj , &$log ) { + if( is_array( @$GLOBALS['ret'] ) ) { + foreach( $GLOBALS['ret'] as $message ) { + $log->add( strip_tags( $message ) ) ; + } + } + + // use mLog->addWarning() or mLog->addError() if necessary + } } diff --git a/xoops_trust_path/modules/bulletin/onupdate.php b/xoops_trust_path/modules/bulletin/onupdate.php index e6caaa5..c473d45 100644 --- a/xoops_trust_path/modules/bulletin/onupdate.php +++ b/xoops_trust_path/modules/bulletin/onupdate.php @@ -17,7 +17,8 @@ function bulletin_onupdate_base( $module, $prev_version , $mydirname ) if( ! is_array( $msgs ) ) $msgs = array() ; } - $db =& Database::getInstance() ; + //$db =& Database::getInstance() ; + $db = &XoopsDatabaseFactory::getDatabaseConnection(); $mid = $module->getVar('mid') ; @@ -30,7 +31,7 @@ function bulletin_onupdate_base( $module, $prev_version , $mydirname ) $sql = sprintf("SHOW TABLES LIKE '%s'", $xoopsDB->prefix("{$mydirname}_relation") ); list($result) = $xoopsDB->fetchRow($xoopsDB->query($sql)); if( empty($result) ){ - $sql = "CREATE TABLE `".$xoopsDB->prefix("{$mydirname}_relation")."` ( `storyid` int(8) NOT NULL default '0', `linkedid` int(8) NOT NULL default '0', `dirname` varchar(25) NOT NULL default '') ENGINE=MyISAM;"; + $sql = "CREATE TABLE `".$xoopsDB->prefix("{$mydirname}_relation")."` ( `storyid` int(8) NOT NULL default '0', `linkedid` int(8) NOT NULL default '0', `dirname` varchar(25) NOT NULL default '') ENGINE=InnoDB;"; if( $xoopsDB->query($sql) ){ $msgs[] = '  Table '.htmlspecialchars($xoopsDB->prefix("{$mydirname}_relation")).' created.'; }else{ @@ -78,7 +79,7 @@ function bulletin_onupdate_base( $module, $prev_version , $mydirname ) // update table structure from 2.04 $check_rs = $db->query( "SELECT topic_created FROM ".$db->prefix($mydirname.'_topics') ) ; if( empty( $check_rs ) ) { - $db->queryF( "ALTER TABLE ".$db->prefix($mydirname.'_topics')." ADD `topic_created` int(10) unsigned NOT NULL default 0, ADD `topic_modified` int(10) unsigned NOT NULL default 0, MODIFY `topic_imgurl` varchar(255) NOT NULL default '', MODIFY `topic_title` varchar(255) NOT NULL default ''" ) ; + $db->queryF( "ALTER TABLE ".$db->prefix($mydirname.'_topics')." ADD `topic_created` int(10) unsigned NOT NULL default 0, ADD `topic_modified` int(10) unsigned NOT NULL default 0, MODIFY `topic_imgurl` varchar(191) NOT NULL default '', MODIFY `topic_title` varchar(191) NOT NULL default ''" ) ; $db->queryF( "ALTER TABLE ".$db->prefix($mydirname.'_stories')." MODIFY `uid` mediumint(8) unsigned NOT NULL default 0" ) ; $db->queryF( "ALTER TABLE ".$db->prefix($mydirname.'_relation')." ADD KEY (`storyid`), ADD PRIMARY KEY (`storyid`,`linkedid`,`dirname`)" ) ; } @@ -100,7 +101,7 @@ function bulletin_onupdate_base( $module, $prev_version , $mydirname ) KEY (uid), KEY (groupid), KEY (can_post) - ) ENGINE=MyISAM; + ) ENGINE=InnoDB; "; if( $db->query($sql) ){ $msgs[] = '  Table '.htmlspecialchars($db->prefix("{$mydirname}_topic_access")).' created.'; diff --git a/xoops_trust_path/modules/bulletin/search.php b/xoops_trust_path/modules/bulletin/search.php index 1f9dab1..984991e 100644 --- a/xoops_trust_path/modules/bulletin/search.php +++ b/xoops_trust_path/modules/bulletin/search.php @@ -1,7 +1,7 @@ prefix($mydirname."_stories")." WHERE published > 0 AND published <= ".time()." AND (expired = 0 OR expired >= ".time()." )"; }else{ diff --git a/xoops_trust_path/modules/bulletin/sql/mysql.sql b/xoops_trust_path/modules/bulletin/sql/mysql.sql index 3f9d4d1..154ddf0 100644 --- a/xoops_trust_path/modules/bulletin/sql/mysql.sql +++ b/xoops_trust_path/modules/bulletin/sql/mysql.sql @@ -1,96 +1,96 @@ -# -# Table structure for table `stories` -# - -CREATE TABLE `stories` -( - `storyid` int(8) unsigned NOT NULL auto_increment, - `uid` mediumint(8) unsigned NOT NULL default 0, - `title` varchar(255) NOT NULL default '', - `created` int(10) unsigned NOT NULL default '0', - `published` int(10) unsigned NOT NULL default '0', - `expired` int(10) unsigned NOT NULL default '0', - `hostname` varchar(39) NOT NULL default '', - `html` tinyint(1) NOT NULL default '0', - `smiley` tinyint(1) NOT NULL default '0', - `br` tinyint(1) NOT NULL default '0', - `xcode` tinyint(1) NOT NULL default '0', - `hometext` text NOT NULL, - `bodytext` text NOT NULL, - `counter` int(8) unsigned NOT NULL default '0', - `topicid` smallint(4) unsigned NOT NULL default '1', - `ihome` tinyint(1) NOT NULL default '0', - `notifypub` tinyint(1) NOT NULL default '0', - `type` tinyint(1) NOT NULL default '0', - `topicimg` tinyint(1) NOT NULL default '0', - `comments` smallint(5) unsigned NOT NULL default '0', - `block` tinyint(1) NOT NULL default '0', - PRIMARY KEY (`storyid`), - KEY `idxstoriestopic` (`topicid`), - KEY `ihome` (`ihome`), - KEY `uid` (`uid`), - KEY `published_ihome` (`published`, `ihome`), - KEY `title` (`title`), - KEY `created` (`created`) -) ENGINE = InnoDB; -# -------------------------------------------------------- - -# -# Table structure for table `topics` -# - -CREATE TABLE `topics` -( - `topic_id` smallint(4) unsigned NOT NULL auto_increment, - `topic_pid` smallint(4) unsigned NOT NULL default '0', - `topic_imgurl` varchar(255) NOT NULL default '', - `topic_title` varchar(255) NOT NULL default '', - `topic_created` int(10) unsigned NOT NULL default 0, - `topic_modified` int(10) unsigned NOT NULL default 0, - PRIMARY KEY (`topic_id`), - KEY `pid` (`topic_pid`) -) ENGINE = InnoDB; - -INSERT INTO `topics` -VALUES (1, 0, '', 'TOP', UNIX_TIMESTAMP(), 0); - -# -# Table structure for table `topic_access` -# - -CREATE TABLE topic_access -( - topic_id smallint(5) unsigned NOT NULL default 0, - uid mediumint(8) default NULL, - groupid smallint(5) default NULL, - can_post tinyint(1) NOT NULL default 0, - can_edit tinyint(1) NOT NULL default 0, - can_delete tinyint(1) NOT NULL default 0, - post_auto_approved tinyint(1) NOT NULL default 0, - UNIQUE KEY (topic_id, uid), - UNIQUE KEY (topic_id, groupid), - KEY (topic_id), - KEY (uid), - KEY (groupid), - KEY (can_post) -) ENGINE = InnoDB; - -INSERT INTO `topic_access` -VALUES (1, null, 1, 1, 1, 1, 1); -INSERT INTO `topic_access` -VALUES (1, null, 2, 1, 0, 0, 1); -INSERT INTO `topic_access` -VALUES (1, null, 3, 0, 0, 0, 0); - -# -# Table structure for table `relation` -# - -CREATE TABLE `relation` -( - `storyid` int(8) NOT NULL default '0', - `linkedid` int(8) NOT NULL default '0', - `dirname` varchar(25) NOT NULL default '', - KEY (`storyid`), - PRIMARY KEY (`storyid`, `linkedid`, `dirname`) -) ENGINE = InnoDB; +# +# Table structure for table `stories` +# + +CREATE TABLE `stories` +( + `storyid` int(8) unsigned NOT NULL auto_increment, + `uid` mediumint(8) unsigned NOT NULL default 0, + `title` varchar(191) NOT NULL default '', + `created` int(10) unsigned NOT NULL default '0', + `published` int(10) unsigned NOT NULL default '0', + `expired` int(10) unsigned NOT NULL default '0', + `hostname` varchar(39) NOT NULL default '', + `html` tinyint(1) NOT NULL default '0', + `smiley` tinyint(1) NOT NULL default '0', + `br` tinyint(1) NOT NULL default '0', + `xcode` tinyint(1) NOT NULL default '0', + `hometext` text NOT NULL, + `bodytext` text NOT NULL, + `counter` int(8) unsigned NOT NULL default '0', + `topicid` smallint(4) unsigned NOT NULL default '1', + `ihome` tinyint(1) NOT NULL default '0', + `notifypub` tinyint(1) NOT NULL default '0', + `type` tinyint(1) NOT NULL default '0', + `topicimg` tinyint(1) NOT NULL default '0', + `comments` smallint(5) unsigned NOT NULL default '0', + `block` tinyint(1) NOT NULL default '0', + PRIMARY KEY (`storyid`), + KEY `idxstoriestopic` (`topicid`), + KEY `ihome` (`ihome`), + KEY `uid` (`uid`), + KEY `published_ihome` (`published`, `ihome`), + KEY `title` (`title`), + KEY `created` (`created`) +) ENGINE = InnoDB; +# -------------------------------------------------------- + +# +# Table structure for table `topics` +# + +CREATE TABLE `topics` +( + `topic_id` smallint(4) unsigned NOT NULL auto_increment, + `topic_pid` smallint(4) unsigned NOT NULL default '0', + `topic_imgurl` varchar(191) NOT NULL default '', + `topic_title` varchar(191) NOT NULL default '', + `topic_created` int(10) unsigned NOT NULL default 0, + `topic_modified` int(10) unsigned NOT NULL default 0, + PRIMARY KEY (`topic_id`), + KEY `pid` (`topic_pid`) +) ENGINE = InnoDB; + +INSERT INTO `topics` +VALUES (1, 0, '', 'TOP', UNIX_TIMESTAMP(), 0); + +# +# Table structure for table `topic_access` +# + +CREATE TABLE topic_access +( + topic_id smallint(5) unsigned NOT NULL default 0, + uid mediumint(8) default NULL, + groupid smallint(5) default NULL, + can_post tinyint(1) NOT NULL default 0, + can_edit tinyint(1) NOT NULL default 0, + can_delete tinyint(1) NOT NULL default 0, + post_auto_approved tinyint(1) NOT NULL default 0, + UNIQUE KEY (topic_id, uid), + UNIQUE KEY (topic_id, groupid), + KEY (topic_id), + KEY (uid), + KEY (groupid), + KEY (can_post) +) ENGINE = InnoDB; + +INSERT INTO `topic_access` +VALUES (1, null, 1, 1, 1, 1, 1); +INSERT INTO `topic_access` +VALUES (1, null, 2, 1, 0, 0, 1); +INSERT INTO `topic_access` +VALUES (1, null, 3, 0, 0, 0, 0); + +# +# Table structure for table `relation` +# + +CREATE TABLE `relation` +( + `storyid` int(8) NOT NULL default '0', + `linkedid` int(8) NOT NULL default '0', + `dirname` varchar(25) NOT NULL default '', + KEY (`storyid`), + PRIMARY KEY (`storyid`, `linkedid`, `dirname`) +) ENGINE = InnoDB; diff --git a/xoops_trust_path/modules/bulletin/templates/admin_category_access.html b/xoops_trust_path/modules/bulletin/templates/admin_category_access.html index 2578097..030eb94 100644 --- a/xoops_trust_path/modules/bulletin/templates/admin_category_access.html +++ b/xoops_trust_path/modules/bulletin/templates/admin_category_access.html @@ -1,33 +1,39 @@ -

<{$mod_name}>

- - -
- - : - <{$topicselbox}> -<{* - : - -*}> - -
- -

- <{$smarty.const._MD_BULLETIN_CATEGORY}>:<{$topic_title}> - [<{$smarty.const._EDIT}>] -<{* - [<{$smarty.const._MD_BULLETIN_LINK_MAKESUBCATEGORY}>] -*}> -

+

<{$mod_name}> // <{$smarty.const._MD_BULLETIN_CATEGORY}> // <{$topic_title}>

+ +
+
+ +
+ + : + <{$topicselbox}> + <{* + : + + *}> + +
+
+ +

<{$smarty.const._MD_A_BULLETIN_H2_GROUPPERMS}>

-
+ + <{$gticket_hidden}> + + + <{$group_trs}> + + + + + +
<{$smarty.const._MD_A_BULLETIN_TH_GROUPNAME}> @@ -53,17 +59,30 @@

<{$smarty.const._MD_A_BULLETIN_H2_GROUPPERMS}>

+ +
- +

<{$smarty.const._MD_A_BULLETIN_H2_USERPERMS}>

-
+
<{$smarty.const._MD_A_BULLETIN_NOTICE_ADDUSERS}>
+ + <{$gticket_hidden}> + @@ -85,10 +104,18 @@

<{$smarty.const._MD_A_BULLETIN_H2_USERPERMS}>

+ + <{$user_trs}> <{$newuser_trs}> + + + + + +
<{$smarty.const._MD_A_BULLETIN_TH_UID}> <{$smarty.const._MD_A_BULLETIN_TH_UNAME}>
+ +
- -
- <{$smarty.const._MD_A_BULLETIN_NOTICE_ADDUSERS}> +
diff --git a/xoops_trust_path/modules/bulletin/templates/archive.html b/xoops_trust_path/modules/bulletin/templates/archive.html index 3f96512..470061c 100644 --- a/xoops_trust_path/modules/bulletin/templates/archive.html +++ b/xoops_trust_path/modules/bulletin/templates/archive.html @@ -2,65 +2,82 @@ <{include file="db:`$mydirname`_head.html"}> - - - - +

<{$smarty.const._MD_NEWSARCHIVES}>

- <{foreach item=year from=$years}> +
<{$smarty.const._MD_NEWSARCHIVES}>
+ + <{foreach item=year from=$years}> - - <{foreach item=month from=$year.months}> + + <{foreach item=month from=$year.months}> <{if $month.current}> - + <{elseif $month.link}> - + <{else}> - + <{/if}> - <{/foreach}> + <{/foreach}> - <{/foreach}> + <{/foreach}>
<{$year.string}><{$year.string}><{$month.string}><{$month.string}><{$month.string}> + <{$month.string}> + <{$month.string}><{$month.string}>
-
+ +
<{if $show_articles == true}> - +
<{$lang_storytotal}>
+ +
+ - - <{if $disp_print_icon or $disp_tell_icon}> + + <{if $disp_print_icon or $disp_tell_icon}> - <{/if}> - - + <{/if}> + + + + <{foreach item=story from=$stories}> - "> - - <{if $disp_print_icon or $disp_tell_icon}> - - <{/if}> - - + "> + + + <{if $disp_print_icon or $disp_tell_icon}> + + <{/if}> + + + <{/foreach}> + +
<{$smarty.const._MD_ARTICLES}><{$smarty.const._MD_ARTICLES}><{$smarty.const._MD_ACTIONS}><{$smarty.const._MD_VIEWS}><{$smarty.const._MD_DATE}><{$smarty.const._MD_VIEWS}><{$smarty.const._MD_DATE}>
<{$story.topic}> : <{$story.title}> - <{if $disp_print_icon}> - - <{$smarty.const._MD_PRINTERFRIENDLY}>  - <{/if}> - <{if $disp_tell_icon}> - - <{$smarty.const._MD_SENDSTORY}> - <{/if}> - <{$story.counter}><{$story.date}>
+ + <{$story.topic}> : <{$story.title}> + + <{if $disp_print_icon}> + + <{* <{$smarty.const._MD_PRINTERFRIENDLY}> *}> + <{$smarty.const._MD_PRINTERFRIENDLY}> +   + <{/if}> + + <{if $disp_tell_icon}> + + <{* <{$smarty.const._MD_SENDSTORY}> *}> + + + <{/if}> + <{$story.counter}><{$story.date}>
-
-
<{$lang_storytotal}>
<{/if}> -<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/templates/article.html b/xoops_trust_path/modules/bulletin/templates/article.html index dbb161f..e15f5b4 100644 --- a/xoops_trust_path/modules/bulletin/templates/article.html +++ b/xoops_trust_path/modules/bulletin/templates/article.html @@ -1,81 +1,55 @@ -<{strip}> +
<{$smarty.template}>
+<{* Breadcrumb - Archive & RSS *}> <{include file="db:`$mydirname`_head.html"}> -<{* PANKUZU *}> -<{if $pankuzu}> -
- <{foreach item=p from=$pankuzu name=pankuzu}> - <{if $smarty.foreach.pankuzu.last}> - <{$p.topic_title}> - <{else}> - <{$p.topic_title}> >  - <{/if}> - <{/foreach}> -
-<{/if}> +<{* Article Item *}> +<{include file="db:`$mydirname`_item.html" story=$story}> + + +<{* Pagination *}> <{if $pagenav}> -
Page <{$pagenav}>
+
Page <{$pagenav}>
<{/if}> -
-<{include file="db:`$mydirname`_item.html" story=$story}> -
- -
-<{if $pagenav}>Page <{$pagenav}><{/if}>
<{* RELATED ARTICLES *}> <{include file="db:`$mydirname`_relations.html"}> + <{* RECENT NEWS IN THIS CATEGORY *}> +
<{include file="db:`$mydirname`_category.html"}> -<{if $disp_print_icon or $disp_tell_icon}> -
- - <{if $disp_print_icon}> - - <{$smarty.const._MD_PRINTERFRIENDLY}>  - <{/if}> - - <{if $disp_tell_icon}> - - <{$smarty.const._MD_SENDSTORY}> - <{/if}> - -
-<{/if}> -
+<{* COMMENTS *}> <{if $mod_config.comment_dirname != '' && $mod_config.comment_forum_id > 0}> -<{d3comment class="BulletinD3commentStory" mydirname=$mydirname}> + <{d3comment class="BulletinD3commentStory" mydirname=$mydirname}> -<{else}> - - -
-<{$commentsnav}> -<{$lang_notice}> -
+ <{else}> -
- -<{if $comment_mode == "flat"}> -<{include file="db:system_comments_flat.html"}> -<{elseif $comment_mode == "thread"}> -<{include file="db:system_comments_thread.html"}> -<{elseif $comment_mode == "nest"}> -<{include file="db:system_comments_nest.html"}> -<{/if}> - -
- + +
+ <{$commentsnav}> + <{$lang_notice}> +
+ +
+ + <{if $comment_mode == "flat"}> + <{include file="db:system_comments_flat.html"}> + <{elseif $comment_mode == "thread"}> + <{include file="db:system_comments_thread.html"}> + <{elseif $comment_mode == "nest"}> + <{include file="db:system_comments_nest.html"}> + <{/if}> + +
+ <{/if}> +<{* NOTIFICATION *}> <{include file='db:system_notification_select.html'}> - -<{/strip}> \ No newline at end of file diff --git a/xoops_trust_path/modules/bulletin/templates/category.html b/xoops_trust_path/modules/bulletin/templates/category.html index 74ff2e3..c3f0263 100644 --- a/xoops_trust_path/modules/bulletin/templates/category.html +++ b/xoops_trust_path/modules/bulletin/templates/category.html @@ -1,7 +1,8 @@ <{strip}> +
<{$smarty.template}>
<{if $category_storeis}> -
+
@@ -23,4 +24,4 @@ <{$c.comments}> : Number of comments. *}> -<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/templates/head.html b/xoops_trust_path/modules/bulletin/templates/head.html index 38ea0a4..942ab3b 100644 --- a/xoops_trust_path/modules/bulletin/templates/head.html +++ b/xoops_trust_path/modules/bulletin/templates/head.html @@ -1,4 +1,20 @@ -<{strip}> +<{* Breadcrumbs [PANKUZU] *}> +
<{$smarty.template}>
+<{if $pankuzu}> + +<{/if}> +
<{$smarty.const._MD_ARCHIVES}> @@ -14,4 +30,4 @@  |
-<{/strip}> \ No newline at end of file + diff --git a/xoops_trust_path/modules/bulletin/templates/index.html b/xoops_trust_path/modules/bulletin/templates/index.html index 2b8d415..5fc4477 100644 --- a/xoops_trust_path/modules/bulletin/templates/index.html +++ b/xoops_trust_path/modules/bulletin/templates/index.html @@ -1,28 +1,28 @@ -<{strip}> +
<{$smarty.template}>
<{include file="db:`$mydirname`_head.html"}> <{if $displaynav == true}> -
+
- <{$topic_select}>  - <{assign var=storynum_options value=","|explode:"5,10,15,20,30"}> -   - + <{$topic_select}>  + <{assign var=storynum_options value=","|explode:"5,10,15,20,30"}> +   +
-
+
<{/if}> <{section name=i loop=$stories}> - <{include file="db:`$mydirname`_item.html" story=$stories[i]}> -
+<{include file="db:`$mydirname`_item.html" story=$stories[i]}> +
<{/section}> -
<{$pagenav}>
-<{include file='db:system_notification_select.html'}> + -<{/strip}> \ No newline at end of file +
+<{include file='db:legacy_notification_select.html'}> diff --git a/xoops_trust_path/modules/bulletin/templates/item.html b/xoops_trust_path/modules/bulletin/templates/item.html index 8890c1e..6d6bf67 100644 --- a/xoops_trust_path/modules/bulletin/templates/item.html +++ b/xoops_trust_path/modules/bulletin/templates/item.html @@ -1,76 +1,131 @@ -<{strip}> -
-
- <{if $story.type == 0}> - [*] - <{/if}> - - - <{$story.topic}> - -  :  - <{if $story.title_link}> - <{$story.title}> - <{else}> - <{$story.title}> - <{/if}> - -
-
- <{$smarty.const._MD_POSTEDBY}> :  - <{if $story.uid}> - <{$story.uname}> - <{else}> - <{$story.uname}> - <{/if}> - -  <{$smarty.const._ON}> <{$story.posttime}> (<{$story.hits}> <{$smarty.const._READS}>) -
-
- <{if $story.topic_url}> -
<{$story.topic}>
- <{/if}> -
<{$story.text}>
-
-
-
- - <{if $story.can_edit or $story.can_delete}> -  [  - <{if $story.can_edit }> - <{$smarty.const._EDIT}> - <{/if}> - <{if $story.can_edit and $story.can_delete}> -  |  - <{/if}> - <{if $story.can_delete }> - <{$smarty.const._DELETE}> - <{/if}> -  ]  - <{/if}> - - -<{if $story.readmore}> -<{$smarty.const._MD_READMORE}> | <{$story.bytes}> | -<{/if}> - -<{if $mod_config.comment_dirname != '' && $mod_config.comment_forum_id > 0}> - - <{d3comment class="BulletinD3commentStory" mydirname=$mydirname mode="count" var="comments_count"}> - - <{if $comments_count}> - <{$comments_count|string_format:$smarty.const._MD_NUMCOMMENTS}> - <{else}> - <{$smarty.const._MD_COMMENTS}> - <{/if}> - -<{else}> - <{$story.comentstotal}> -<{/if}> - -
-
-<{* -
<{iine_button dirname=bulletin id=$story.id}>
-*}> -<{/strip}> \ No newline at end of file +
<{$smarty.template}>
+ +
+ +
+ +

+ <{if $story.type == 0}> + + ✓ <{$smarty.const._MD_APPROVE}> + + <{/if}> + + <{$story.topic}> + +  :  + <{if $story.title_link}> + <{$story.title}> + <{else}> + <{$story.title}> + <{/if}> +

+ +
+
+ <{if $story.uid}> + + <{$story.uname}> + <{$smarty.const._MD_POSTEDBY}> <{$story.uname}> + <{else}> + <{$story.uname|xoops_user_avatarize}> + <{$story.uname}> + <{/if}> + date-time + <{$smarty.const._ON}> <{$story.posttime}> + view + <{$smarty.const._READS}> <{$story.hits}> +
+
+ +
+ + + + + + + + +
+ <{if $story.topic_url}> +
+ + <{$story.topic}> + +
+ <{/if}> +
<{$story.text}>
+
+ +
+ + + <{* ----- Admin controllers *}> + +
+ + + <{if $story.can_edit or $story.can_delete}> + <{if $story.can_edit}> + + edit <{$smarty.const._EDIT}> + <{/if}> + + <{if $story.can_delete}> + + delete <{$smarty.const._DELETE}> + <{/if}> + <{/if}> + + + + + + <{if $mod_config.comment_dirname != '' && $mod_config.comment_forum_id > 0}> + + <{d3comment class="BulletinD3commentStory" mydirname=$mydirname mode="count" var="comments_count"}> + + <{if $comments_count}> + <{$comments_count|string_format:$smarty.const._MD_NUMCOMMENTS}> + <{else}> + <{$smarty.const._MD_COMMENTS}> + <{/if}> + + <{else}> + + + comments <{$story.comentstotal}> + + + <{/if}> + + + <{if $disp_print_icon or $disp_tell_icon}> + + <{if $disp_print_icon}> + + print <{$smarty.const._MD_PRINTERFRIENDLY}> +   + <{/if}> + + <{if $disp_tell_icon}> + + share <{$smarty.const._MD_SENDSTORY}> + + <{/if}> + + <{/if}> + + <{if $story.readmore}> + + <{$smarty.const._MD_READMORE}> + <{/if}> + +
+ +
+ +<{* +
<{iine_button dirname=bulletin id=$story.id}>
+*}> diff --git a/xoops_trust_path/modules/bulletin/templates/relations.html b/xoops_trust_path/modules/bulletin/templates/relations.html index 1a3b6de..6d6fe3e 100644 --- a/xoops_trust_path/modules/bulletin/templates/relations.html +++ b/xoops_trust_path/modules/bulletin/templates/relations.html @@ -1,7 +1,8 @@ <{strip}> +
<{$smarty.template}>
<{if $relations}> -
+
<{$smarty.const._MD_RELATION}>
@@ -15,4 +16,4 @@ <{/if}> -<{/strip}> \ No newline at end of file +<{/strip}> diff --git a/xoops_trust_path/modules/bulletin/templates/submit.html b/xoops_trust_path/modules/bulletin/templates/submit.html index e05b537..e2e7642 100644 --- a/xoops_trust_path/modules/bulletin/templates/submit.html +++ b/xoops_trust_path/modules/bulletin/templates/submit.html @@ -1,163 +1,199 @@ +
<{$smarty.template}>
+ <{if $error}> -<{$error}> +
<{$error}>
<{/if}> + <{if $preview.title}> - - - - - -
<{$preview.title}>
<{$preview.hometext}>
-
+

<{$preview.title}>

+
<{$preview.hometext}>
<{/if}> -
- <{$gticket}> - <{if $storyid}><{/if}> - <{if $return}><{/if}> - - - - - - - - - - - - - - - - - - - - - - - <{if $can_use_date}> - - - - - - - - - <{/if}> - <{if $use_relation}> - - - - - <{/if}> - - - + + + + + + + + + + + +
<{$smarty.const._MD_SUBMITNEWS}>
<{$smarty.const._MD_POSTEDBY}><{$poster}>
<{$smarty.const._MD_TITLE}>
<{$smarty.const._MD_TOPIC}><{$topic_selbox}>
<{$smarty.const._MD_TOPIC_IMAGE}> - -
<{$smarty.const._MD_THESCOOP}> - <{if $use_fckeditor}> - - <{/if}> -
- <{if $smarty.const.LEGACY_BASE_VERSION|version_compare:'2.2':'>=' && (!$common_fck_installed || !$use_fckeditor)}> - <{if $use_html && ($html || !$text)}> - <{assign var=editor value=html}> - <{elseif $xcode}> - <{assign var=editor value=bbcode}> - <{else}> - <{assign var=editor value=none}> - <{/if}> - <{xoops_dhtmltarea class=$editor name=text cols=$bulletin_post_tray_col rows=$bulletin_post_tray_row value=$text|htmlspecialchars_decode:$smarty.const.ENT_QUOTES editor=$editor}> - <{if !$text && $editor == 'html' && $legacy_module != 'legacy'}> - <{assign var=html value=1}> - <{assign var=br value=0}> - <{assign var=xcode value=0}> - <{/if}> - <{else}> - -
- <{xoopsdhtmltarea name="text" cols=$bulletin_post_tray_col rows=$bulletin_post_tray_row value=$text pre_style="display:none;" post_style="display:none;"}> - <{/if}> -
- <{if $use_fckeditor && $common_fck_installed}> -
- - - - -
- <{/if}> -
<{$smarty.const._MULTIPAGE}>
-
<{$smarty.const._MD_PUBLISHED}> -   - <{$smarty.const._MD_SETDATETIME_DESC}>
- <{$post_date_selector}> -
<{$smarty.const._MD_EXPIRED}> -   - <{$smarty.const._MD_SETEXPDATETIME_DESC}>
- <{$expire_date_selector}> -
<{$smarty.const._MD_RELATION}> -
- <{foreach item=i from=$relations}> - - - - - <{$i.title}>
- <{/foreach}> -
- - -
<{$smarty.const._OPTIONS}> - <{if $use_notify}> -
- <{/if}> - <{if $use_html}> -
+

<{$smarty.const._MD_SUBMITNEWS}>

+ + + + <{$gticket}> + <{if $storyid}><{/if}> + <{if $return}><{/if}> + + + + + + + + + + + + + + + + + + + + + + + + + + + <{if $can_use_date}> + + + + + + + + <{/if}> -
-
-
-
-
- <{if $use_approve}> -
+ + <{if $use_relation}> + + + + <{/if}> - - - - - - -
<{$smarty.const._MD_POSTEDBY}><{$poster}>
<{$smarty.const._MD_TITLE}>
<{$smarty.const._MD_TOPIC}><{$topic_selbox}>
<{$smarty.const._MD_TOPIC_IMAGE}> + +
<{$smarty.const._MD_THESCOOP}> + <{if $use_fckeditor}> + + <{/if}> +
+ <{if $smarty.const.LEGACY_BASE_VERSION|version_compare:'2.2':'>=' && (!$common_fck_installed || + !$use_fckeditor)}> + <{if $use_html && ($html || !$text)}> + <{assign var=editor value=html}> + <{elseif $xcode}> + <{assign var=editor value=bbcode}> + <{else}> + <{assign var=editor value=none}> + <{/if}> + <{xoops_dhtmltarea class=$editor name=text cols=$bulletin_post_tray_col rows=$bulletin_post_tray_row + value=$text|htmlspecialchars_decode:$smarty.const.ENT_QUOTES editor=$editor}> + <{if !$text && $editor == 'html' && $legacy_module != 'legacy'}> + <{assign var=html value=1}> + <{assign var=br value=0}> + <{assign var=xcode value=0}> + <{/if}> + <{else}> + +
+ <{xoopsdhtmltarea name="text" cols=$bulletin_post_tray_col rows=$bulletin_post_tray_row value=$text pre_style="display:none;" post_style="display:none;"}> + <{/if}> +
+ <{if $use_fckeditor && $common_fck_installed}> +
+ + + + +
+ <{/if}> +
<{$smarty.const._MULTIPAGE}>
+
<{$smarty.const._MD_PUBLISHED}> +   + <{$smarty.const._MD_SETDATETIME_DESC}> +
+ <{$post_date_selector}> +
<{$smarty.const._MD_EXPIRED}> +   + <{$smarty.const._MD_SETEXPDATETIME_DESC}> +
+ <{$expire_date_selector}> +
<{$smarty.const._MD_RELATION}> +
+ <{foreach item=i from=$relations}> + + + + + <{$i.title}>
+ <{/foreach}> +
+ + +
  -   - -
+ +
<{$smarty.const._OPTIONS}> + <{if $use_notify}> +
+ <{/if}> + <{if $use_html}> +
+ <{/if}> +
+
+
+
+
+ <{if $use_approve}> +
+ <{/if}> +
  +   + +
- \ No newline at end of file + diff --git a/xoops_trust_path/modules/bulletin/templates/topicinfo.html b/xoops_trust_path/modules/bulletin/templates/topicinfo.html index 055f444..fc1b65f 100644 --- a/xoops_trust_path/modules/bulletin/templates/topicinfo.html +++ b/xoops_trust_path/modules/bulletin/templates/topicinfo.html @@ -6,7 +6,7 @@ <{$t.message}>  <{$t.comment}>  <{* <{$t.iine}>*}> -
+
<{/foreach}> -
\ No newline at end of file +
diff --git a/xoops_trust_path/modules/bulletin/xoops_version.php b/xoops_trust_path/modules/bulletin/xoops_version.php index 23fbba1..2501db7 100644 --- a/xoops_trust_path/modules/bulletin/xoops_version.php +++ b/xoops_trust_path/modules/bulletin/xoops_version.php @@ -10,14 +10,15 @@ $constpref = '_MI_' . strtoupper( $mydirname ) ; $modversion['name'] = constant($constpref.'_NAME'); -$modversion['version'] = 3.04; -$modversion['detailed_version'] = "3.04.0"; +$modversion['version'] = 3.10; +$modversion['detailed_version'] = "3.10.0"; $modversion['description'] = constant($constpref.'_DESC'); -$modversion['credits'] = 'suin'; -$modversion['help'] = ''; +$modversion['credits'] = 'Suin'; +$modversion['help'] = 'help.html'; $modversion['license'] = 'GPL see LICENSE'; $modversion['official'] = 0; -$modversion['image'] = file_exists( $mydirpath.'/module_icon.png' ) ? 'module_icon.png' : 'module_icon.php' ; +//$modversion['image'] = file_exists( $mydirpath.'/module_icon.png' ) ? 'module_icon.png' : 'module_icon.php' ; +$modversion['image'] = 'images/module_icon.svg'; $modversion['dirname'] = $mydirname; $modversion['trust_dirname'] = $mytrustdirname ; @@ -61,7 +62,7 @@ $modversion['blocks'][$i]['description'] = constant($constpref.'_BDESC4'); $modversion['blocks'][$i]['show_func'] = "b_bulletin_new_show"; $modversion['blocks'][$i]['edit_func'] = "b_bulletin_new_edit"; -$modversion['blocks'][$i]['options'] = "$mydirname|published DESC|10|255|0|0";//ver3.0 changed +$modversion['blocks'][$i]['options'] = "$mydirname|published DESC|10|191|0|0";//ver3.0 changed $modversion['blocks'][$i]['template'] = "{$mydirname}_block_new.html"; $modversion['blocks'][$i]['can_clone'] = true ; $i++; @@ -70,7 +71,7 @@ $modversion['blocks'][$i]['description'] = constant($constpref.'_BDESC5'); $modversion['blocks'][$i]['show_func'] = "b_bulletin_category_new_show"; $modversion['blocks'][$i]['edit_func'] = "b_bulletin_category_new_edit"; -$modversion['blocks'][$i]['options'] = "$mydirname|published DESC|5|255|0|0|0";//ver3.0 changed +$modversion['blocks'][$i]['options'] = "$mydirname|published DESC|5|191|0|0|0";//ver3.0 changed $modversion['blocks'][$i]['template'] = "{$mydirname}_block_category_new.html"; $modversion['blocks'][$i]['can_clone'] = true ; $i++; @@ -178,7 +179,7 @@ $modversion['config'][$i]['description'] = $constpref.'_CONFIG8_D'; $modversion['config'][$i]['formtype'] = 'textbox'; $modversion['config'][$i]['valuetype'] = 'text'; -$modversion['config'][$i]['default'] = XOOPS_URL.'/images/logo.gif'; +$modversion['config'][$i]['default'] = XOOPS_URL.'/images/logo.svg'; $i++; $modversion['config'][$i]['name'] = 'titile_as_sitename'; $modversion['config'][$i]['title'] = $constpref.'_CONFIG9'; @@ -391,5 +392,3 @@ if( ! defined( 'XOOPS_CUBE_LEGACY' ) && substr( XOOPS_VERSION , 6 , 3 ) < 2.1 && ! empty( $_POST['fct'] ) && ! empty( $_POST['op'] ) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname'] ) { include dirname(__FILE__).'/include/x20_keepblockoptions.inc.php' ; } - -?>