Minahito
minah****@users*****
2006年 11月 7日 (火) 17:04:31 JST
Index: xoops2jp/html/modules/base/blocks/legacy_usermenu.php diff -u xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.4.2.1 xoops2jp/html/modules/base/blocks/legacy_usermenu.php:removed --- xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.4.2.1 Thu Oct 5 18:07:21 2006 +++ xoops2jp/html/modules/base/blocks/legacy_usermenu.php Tue Nov 7 17:04:31 2006 @@ -1,44 +0,0 @@ -<?php -/** - * @package Legacy - * @version $Id: legacy_usermenu.php,v 1.1.2.4.2.1 2006/10/05 09:07:21 minahito Exp $ - */ - - /** - * This function is called back to display the user menu. - * - * [Template Variables] - * $block.uid ... Curent user id for the menu. - * $block.flagShowInbox ... If there is the pm module, set true. - * $block.inbox_url ... Return url to access inbox of pm. - * $block.new_messages ... amount of unread messages. - */ -function b_legacy_usermenu_show() -{ - $root =& XCube_Root::getSingleton(); - $xoopsUser =& $root->mController->mRoot->mContext->mXoopsUser; - - if (is_object($xoopsUser)) { - $block = array(); - - $block['uid'] = $xoopsUser->getVar('uid'); - $block['flagShowInbox'] = false; - - // - // Check does this system have PrivateMessage feature. - // - $url = $root->mController->getPMInboxUrl($block['uid']); - - if ($url != null) { - $block['inbox_url'] = $url; - $block['new_messages'] = $root->mController->getCountUnreadPM($block['uid']); - $block['flagShowInbox']=true; - } - - $block['show_adminlink'] = $xoopsUser->isAdmin(-1); - - return $block; - } - return false; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_notification.php diff -u xoops2jp/html/modules/base/blocks/legacy_notification.php:1.1.2.2 xoops2jp/html/modules/base/blocks/legacy_notification.php:removed --- xoops2jp/html/modules/base/blocks/legacy_notification.php:1.1.2.2 Thu Jul 20 17:16:45 2006 +++ xoops2jp/html/modules/base/blocks/legacy_notification.php Tue Nov 7 17:04:31 2006 @@ -1,47 +0,0 @@ -<?php -function b_legacy_notification_show() -{ - global $xoopsConfig, $xoopsUser, $xoopsModule; - include_once XOOPS_ROOT_PATH . '/include/notification_functions.php'; - - $root =& XCube_Root::getSingleton(); - $root->mLanguageManager->loadPageTypeMessageCatalog('notification'); - - // Notification must be enabled, and user must be logged in - if (empty($xoopsUser) || !notificationEnabled('block')) { - return false; // do not display block - } - $notification_handler =& xoops_gethandler('notification'); - // Now build the a nested associative array of info to pass - // to the block template. - $block = array(); - $categories =& notificationSubscribableCategoryInfo(); - if (empty($categories)) { - return false; - } - foreach ($categories as $category) { - $section['name'] = $category['name']; - $section['title'] = $category['title']; - $section['description'] = $category['description']; - $section['itemid'] = $category['item_id']; - $section['events'] = array(); - $subscribed_events =& $notification_handler->getSubscribedEvents ($category['name'], $category['item_id'], $xoopsModule->getVar('mid'), $xoopsUser->getVar('uid')); - foreach (notificationEvents($category['name'], true) as $event) { - if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) { - continue; - } - $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0; - $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed); - } - $block['categories'][$category['name']] = $section; - } - // Additional form data - $block['target_page'] = "notification_update.php"; - // FIXME: better or more standardized way to do this? - $script_url = explode('/', xoops_getenv('PHP_SELF')); - $script_name = $script_url[count($script_url)-1]; - $block['redirect_script'] = $script_name; - $block['submit_button'] = _NOT_UPDATENOW; - return $block; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_mainmenu.php diff -u xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:1.1.2.2.2.1 xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:removed --- xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:1.1.2.2.2.1 Thu Oct 5 18:07:21 2006 +++ xoops2jp/html/modules/base/blocks/legacy_mainmenu.php Tue Nov 7 17:04:31 2006 @@ -1,33 +0,0 @@ -<?php -function b_legacy_mainmenu_show() { - $root =& XCube_Root::getSingleton(); - $xoopsModule =& $root->mContext->mXoopsModule; - $xoopsUser =& $root->mController->mRoot->mContext->mXoopsUser; - - $block = array(); - - $module_handler =& xoops_gethandler('module'); - $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); - $criteria->add(new Criteria('isactive', 1)); - $criteria->add(new Criteria('weight', 0, '>')); - $modules =& $module_handler->getObjects($criteria, true); - $moduleperm_handler =& xoops_gethandler('groupperm'); - $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; - $read_allowed = $moduleperm_handler->getItemIds('module_read', $groups); - foreach (array_keys($modules) as $i) { - if (in_array($i, $read_allowed)) { - $block['modules'][$i]['name'] = $modules[$i]->getVar('name'); - $block['modules'][$i]['directory'] = $modules[$i]->getVar('dirname'); - $sublinks =& $modules[$i]->subLink(); - if ((count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) { - foreach($sublinks as $sublink){ - $block['modules'][$i]['sublinks'][] = array('name' => $sublink['name'], 'url' => XOOPS_URL.'/modules/'.$modules[$i]->getVar('dirname').'/'.$sublink['url']); - } - } else { - $block['modules'][$i]['sublinks'] = array(); - } - } - } - return $block; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_themes.php diff -u xoops2jp/html/modules/base/blocks/legacy_themes.php:1.1.2.1.2.1 xoops2jp/html/modules/base/blocks/legacy_themes.php:removed --- xoops2jp/html/modules/base/blocks/legacy_themes.php:1.1.2.1.2.1 Sat Oct 7 19:03:17 2006 +++ xoops2jp/html/modules/base/blocks/legacy_themes.php Tue Nov 7 17:04:31 2006 @@ -1,47 +0,0 @@ -<?php -function b_legacy_themes_show($options) -{ - global $xoopsConfig; - - if (count($xoopsConfig['theme_set_allowed']) == 0) { - return null; - } - - $theme_options = array(); - foreach ($xoopsConfig['theme_set_allowed'] as $theme) { - $theme_option['name'] = $theme; - if ($theme == $xoopsConfig['theme_set']) { - $theme_option['selected'] = 'selected="selected"'; - } else { - $theme_option['selected'] = ''; - } - $theme_options[] = $theme_option; - } - - $block = array(); - $block['count'] = count($xoopsConfig['theme_set_allowed']); - $block['mode'] = $options[0]; - $block['width'] = $options[1]; - $block['theme_options'] = $theme_options; - return $block; -} - -function b_legacy_themes_edit($options) -{ - - $chk = ""; - $form = _MB_BASE_LANG_THSHOW." "; - if ( $options[0] == 1 ) { - $chk = ' checked="checked"'; - } - $form .= '<input type="radio" name="options[0]" value="1"'.$chk.' /> '._YES; - $chk = ""; - if ( $options[0] == 0 ) { - $chk = ' checked="checked"'; - } - $form .= ' <input type="radio" name="options[0]" value="0"'.$chk.' />'._NO; - $form .= '<br />'._MB_BASE_LANG_THWIDTH.' '; - $form .= '<input type="text" name="options[1]" value="'.$options[1].'" />'; - return $form; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_search.php diff -u xoops2jp/html/modules/base/blocks/legacy_search.php:1.1.2.1 xoops2jp/html/modules/base/blocks/legacy_search.php:removed --- xoops2jp/html/modules/base/blocks/legacy_search.php:1.1.2.1 Sun Mar 26 15:07:46 2006 +++ xoops2jp/html/modules/base/blocks/legacy_search.php Tue Nov 7 17:04:31 2006 @@ -1,7 +0,0 @@ -<?php -function b_legacy_search_show() -{ - $block = array(1); - return $block; -} -?> Index: xoops2jp/html/modules/base/blocks/index.html diff -u xoops2jp/html/modules/base/blocks/index.html:1.1.2.1 xoops2jp/html/modules/base/blocks/index.html:removed --- xoops2jp/html/modules/base/blocks/index.html:1.1.2.1 Mon Mar 27 11:41:48 2006 +++ xoops2jp/html/modules/base/blocks/index.html Tue Nov 7 17:04:31 2006 @@ -1 +0,0 @@ - <script>history.go(-1);</script> \ No newline at end of file Index: xoops2jp/html/modules/base/blocks/legacy_waiting.php diff -u xoops2jp/html/modules/base/blocks/legacy_waiting.php:1.1.2.3 xoops2jp/html/modules/base/blocks/legacy_waiting.php:removed --- xoops2jp/html/modules/base/blocks/legacy_waiting.php:1.1.2.3 Sun Jul 9 00:50:58 2006 +++ xoops2jp/html/modules/base/blocks/legacy_waiting.php Tue Nov 7 17:04:31 2006 @@ -1,8 +0,0 @@ -<?php -function b_legacy_waiting_show() { - $modules = array(); - XCube_DelegateUtils::call('Legacyblock.Wating.Show', new XCube_Ref(&$modules)); - $block['modules'] = $modules; - return $block; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_comments.php diff -u xoops2jp/html/modules/base/blocks/legacy_comments.php:1.1.2.1 xoops2jp/html/modules/base/blocks/legacy_comments.php:removed --- xoops2jp/html/modules/base/blocks/legacy_comments.php:1.1.2.1 Sun Mar 26 15:07:46 2006 +++ xoops2jp/html/modules/base/blocks/legacy_comments.php Tue Nov 7 17:04:31 2006 @@ -1,47 +0,0 @@ -<?php -function b_legacy_comments_show($options) { - $block = array(); - include_once XOOPS_ROOT_PATH.'/include/comment_constants.php'; - $comment_handler =& xoops_gethandler('comment'); - $criteria = new CriteriaCompo(new Criteria('com_status', XOOPS_COMMENT_ACTIVE)); - $criteria->setLimit(intval($options[0])); - $criteria->setSort('com_created'); - $criteria->setOrder('DESC'); - $comments =& $comment_handler->getObjects($criteria, true); - $member_handler =& xoops_gethandler('member'); - $module_handler =& xoops_gethandler('module'); - $modules =& $module_handler->getObjects(new Criteria('hascomments', 1), true); - $comment_config = array(); - foreach (array_keys($comments) as $i) { - $mid = $comments[$i]->getVar('com_modid'); - $com['module'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/">'.$modules[$mid]->getVar('name').'</a>'; - if (!isset($comment_config[$mid])) { - $comment_config[$mid] = $modules[$mid]->getInfo('comments'); - } - $com['id'] = $i; - $com['title'] = '<a href="'.XOOPS_URL.'/modules/'.$modules[$mid]->getVar('dirname').'/'.$comment_config[$mid]['pageName'].'?'.$comment_config[$mid]['itemName'].'='.$comments[$i]->getVar('com_itemid').'&com_id='.$i.'&com_rootid='.$comments[$i]->getVar('com_rootid').'&'.htmlspecialchars($comments[$i]->getVar('com_exparams')).'#comment'.$i.'">'.$comments[$i]->getVar('com_title').'</a>'; - $com['icon'] = $comments[$i]->getVar('com_icon'); - $com['icon'] = ($com['icon'] != '') ? $com['icon'] : 'icon1.gif'; - $com['time'] = formatTimestamp($comments[$i]->getVar('com_created'),'m'); - if ($comments[$i]->getVar('com_uid') > 0) { - $poster =& $member_handler->getUser($comments[$i]->getVar('com_uid')); - if (is_object($poster)) { - $com['poster'] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$comments[$i]->getVar('com_uid').'">'.$poster->getVar('uname').'</a>'; - } else { - $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; - } - } else { - $com['poster'] = $GLOBALS['xoopsConfig']['anonymous']; - } - $block['comments'][] =& $com; - unset($com); - } - return $block; -} - -function b_legacy_comments_edit($options) { - $inputtag = "<input type='text' name='options[]' value='".intval($options[0])."' />"; - $form = sprintf(_MB_BASE_DISPLAYC, $inputtag); - return $form; -} -?> Index: xoops2jp/html/modules/base/blocks/legacy_siteinfo.php diff -u xoops2jp/html/modules/base/blocks/legacy_siteinfo.php:1.1.2.2 xoops2jp/html/modules/base/blocks/legacy_siteinfo.php:removed --- xoops2jp/html/modules/base/blocks/legacy_siteinfo.php:1.1.2.2 Mon Sep 25 18:35:12 2006 +++ xoops2jp/html/modules/base/blocks/legacy_siteinfo.php Tue Nov 7 17:04:31 2006 @@ -1,64 +0,0 @@ -<?php -function b_legacy_siteinfo_show($options) { - global $xoopsConfig, $xoopsUser; - $xoopsDB =& Database::getInstance(); - $myts =& MyTextSanitizer::getInstance(); - $block = array(); - if (!empty($options[3])) { - $block['showgroups'] = true; - $result = $xoopsDB->query("SELECT u.uid, u.uname, u.email, u.user_viewemail, u.user_avatar, g.name AS groupname FROM ".$xoopsDB->prefix("groups_users_link")." l LEFT JOIN ".$xoopsDB->prefix("users")." u ON l.uid=u.uid LEFT JOIN ".$xoopsDB->prefix("groups")." g ON l.groupid=g.groupid WHERE g.group_type='Admin' ORDER BY l.groupid, u.uid"); - if ($xoopsDB->getRowsNum($result) > 0) { - $prev_caption = ""; - $i = 0; - while ($userinfo = $xoopsDB->fetchArray($result)) { - if ($prev_caption != $userinfo['groupname']) { - $prev_caption = $userinfo['groupname']; - $block['groups'][$i]['name'] = $myts->htmlSpecialChars($userinfo['groupname']); - } - if (is_object($xoopsUser)) { - $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/pmlite.php?send2=1&to_userid=".$userinfo['uid']."','pmlite',450,370);\"><img src=\"".XOOPS_URL."/images/icons/pm_small.gif\" border=\"0\" width=\"27\" height=\"17\" alt=\"\" /></a>", 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']); - } else { - if ($userinfo['user_viewemail']) { - $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => '<a href="mailto:'.$userinfo['email'].'"><img src="'.XOOPS_URL.'/images/icons/em_small.gif" border="0" width="16" height="14" alt="" /></a>', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']); - } else { - $block['groups'][$i]['users'][] = array('id' => $userinfo['uid'], 'name' => $myts->htmlspecialchars($userinfo['uname']), 'msglink' => ' ', 'avatar' => XOOPS_UPLOAD_URL.'/'.$userinfo['user_avatar']); - } - } - $i++; - } - } - } else { - $block['showgroups'] = false; - } - $block['logourl'] = XOOPS_URL.'/images/'.$options[2]; - if (is_object($xoopsUser)) { - $block['recoomendtime'] = time(); - } else { - $block['recoomendtime'] = 0; - } - $block['popup_width'] = $options[0]; - $block['popup_height'] = $options[1]; - return $block; -} - -function b_legacy_siteinfo_edit($options) { - $form = _MB_BASE_PWWIDTH." "; - $form .= "<input type='text' name='options[]' value='".$options[0]."' />"; - $form .= "<br />"._MB_BASE_PWHEIGHT." "; - $form .= "<input type='text' name='options[]' value='".$options[1]."' />"; - $form .= "<br />".sprintf(_MB_BASE_LOGO,XOOPS_URL."/images/")." "; - $form .= "<input type='text' name='options[]' value='".$options[2]."' />"; - $chk = ""; - $form .= "<br />"._MB_BASE_SADMIN." "; - if ( $options[3] == 1 ) { - $chk = " checked='checked'"; - } - $form .= "<input type='radio' name='options[3]' value='1'".$chk." /> "._YES.""; - $chk = ""; - if ( $options[3] == 0 ) { - $chk = " checked=\"checked\""; - } - $form .= " <input type='radio' name='options[3]' value='0'".$chk." />"._NO.""; - return $form; -} -?>