Changeset 9697
- Timestamp:
- Mar 18, 2009, 8:27:53 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/admin/member_menu_compose.php ¶
r9451 r9697 89 89 else { 90 90 91 $aItemFields = array( 'Name', 'Caption', 'Link', 'Target', 'Icon', 'Script' , 'Eval', 'PopupHtml');91 $aItemFields = array( 'Name', 'Caption', 'Link', 'Target', 'Icon', 'Script' ); 92 92 $aItem = array(); 93 93 … … 321 321 </tr> 322 322 <tr> 323 <td class="form_label">Evaluate code:</td>324 <td>325 <textarea class="form_input_text" name="Eval" <?=$disabled?> ><?= htmlspecialchars_adv( $aItem['Eval'] )?></textarea>326 </td>327 </tr>328 <?329 if ( $sMenuPosition == 'top' || $sMenuPosition == 'top_extra' ) {330 ?>331 <tr>332 <td class="form_label">Popup Html:</td>333 <td>334 <textarea class="form_input_text" name="PopupHtml" <?=$disabled?> ><?= htmlspecialchars_adv( $aItem['PopupHtml'] )?></textarea>335 </td>336 </tr>337 <?338 }339 ?>340 <tr>341 323 <td class="form_label">Target Window:</td> 342 324 <td> -
TabularUnified trunk/inc/classes/BxDolMailBox.php ¶
r8679 r9697 907 907 } 908 908 } 909 910 ?> -
TabularUnified trunk/inc/utils.inc.php ¶
r9459 r9697 913 913 SELECT 914 914 `ID`, `Caption`, `Icon`, 915 `Link`, `Script`, `Eval`, `Popup Html`,915 `Link`, `Script`, `Eval`, `PopupMenu`, 916 916 `Visible`, `Target`, `Type` 917 917 FROM -
TabularUnified trunk/install/sql/v70.sql ¶
r9678 r9697 1043 1043 `Script` varchar(250) NOT NULL, 1044 1044 `Eval` text NOT NULL, 1045 `Popup Html` text NOT NULL,1045 `PopupMenu` text NOT NULL, 1046 1046 `Order` int(5) NOT NULL, 1047 1047 `Active` enum('1','0') NOT NULL, … … 1052 1052 `Position` enum('top','bottom','top_extra') NOT NULL default 'top', 1053 1053 `Type` enum('link','system') NOT NULL, 1054 PRIMARY KEY (`ID`)1055 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1056 1057 1054 `Parent` int(11) NOT NULL, 1055 PRIMARY KEY (`ID`), 1056 KEY `Parent` (`Parent`) 1057 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 1058 1058 1059 1059 -- … … 1061 1061 -- 1062 1062 1063 INSERT INTO `ExtendedMenuItems` VALUES(1, '_Profile', 'Profile', 'prf.png', '{evalResult}', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\nreturn getProfileLink($iProfileID);', '<a href="profile.php?ID={ID}">Profile</a>', 1, '1', 0, 0, '', 'memb', 'top', 'link'); 1064 INSERT INTO `ExtendedMenuItems` VALUES(3, '_Inbox {evalResult}', 'Inbox', 'msg.png', 'mail.php?mode=inbox', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iLetCount = getNewLettersNum( $iProfileID );\r\n\r\n$sReturnedText = ''<span class="item_count" id="top_menu_mail_count"> __iCount__ </span>'';\r\n\r\nif ($iLetCount)\r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iLetCount . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', '<a href="mail.php">MailBox</a>', 4, '1', 0, 0, '', 'memb', 'top', 'link'); 1065 INSERT INTO `ExtendedMenuItems` VALUES(7, '_About Us', 'About Us', '', 'about_us.php', '', '', '', 0, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1066 INSERT INTO `ExtendedMenuItems` VALUES(8, '_Privacy', 'Privacy', '', 'privacy.php', '', '', '', 1, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1067 INSERT INTO `ExtendedMenuItems` VALUES(9, '_Terms_of_use', 'Terms of use', '', 'terms_of_use.php', '', '', '', 2, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1068 INSERT INTO `ExtendedMenuItems` VALUES(10, '_FAQ', 'FAQ', '', 'faq.php', '', '', '', 3, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1069 INSERT INTO `ExtendedMenuItems` VALUES(12, '_Links', 'Links', '', 'links.php', '', '', '', 5, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1070 INSERT INTO `ExtendedMenuItems` VALUES(14, '_Affiliates', 'Affiliates', '', '{evalResult}', '', 'return ( getParam("enable_aff") == "on" )\n ? ''affiliates.php''\n : null;', '', 9, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1071 INSERT INTO `ExtendedMenuItems` VALUES(15, '_Invite a friend', 'Invite a friend', '', 'tellfriend.php', 'return launchTellFriend();', '', '', 6, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1072 INSERT INTO `ExtendedMenuItems` VALUES(16, '_contact_us', 'Contact us', '', 'contact.php', '', '', '', 7, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1073 INSERT INTO `ExtendedMenuItems` VALUES(17, '_Bookmark', 'Bookmark', '', '', 'addBookmark(); return false;', '', '', 8, '1', 0, 0, '', 'non,memb', 'bottom', 'link'); 1074 INSERT INTO `ExtendedMenuItems` VALUES(27, '_Affiliates', 'Affiliates', '', '{evalResult}', '', 'return ( getParam("enable_aff") == "on" )\n ? ''affiliates.php''\n : null;', '', 0, '0', 0, 0, '', 'non,memb', 'top', 'link'); 1075 INSERT INTO `ExtendedMenuItems` VALUES(32, '_Alerts {evalResult}', 'Alerts', 'ale.png', 'member.php', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iItemCount = 0;\r\n\r\n$sReturnedText = ''<span class="item_count"> __iCount__ </span>'';\r\n\r\nif ($iItemCount)\r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iItemCount . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', 'Under development', 5, '1', 0, 0, '', 'memb', 'top', 'link'); 1076 INSERT INTO `ExtendedMenuItems` VALUES(31, '_Online Friends {evalResult}', '_Online Friends', 'onl.png', 'viewFriends.php?&iUser={ID}&online_only=on', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iItemCount = get_user_friends_count($iProfileID , 1, getParam("member_online_time" ) ) ;\r\n\r\n$sReturnedText = ''<span class="item_count"> __iCount__ </span>'';\r\n\r\nif ($iItemCount)\r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iItemCount . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', '<a href="viewFriends.php?iUser={ID}">View friends</a>', 3, '1', 0, 0, '', 'memb', 'top', 'link'); 1077 INSERT INTO `ExtendedMenuItems` VALUES(30, '_Friends', 'Friends', 'fri.png', 'viewFriends.php?iUser={ID}', '', '', '<a href="viewFriends.php?iUser={ID}">View friends</a>', 2, '1', 0, 0, '', 'memb', 'top', 'link'); 1078 INSERT INTO `ExtendedMenuItems` VALUES(35, '_Member menu position', 'Member menu position', 'mmp.png', '', 'window.open( ''list_pop.php?action=extra_menu'', ''menu_settings'',''width=550,height=200,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1'');return false', '', '<a href="javascript:void(0)" onclick="\r\nwindow.open( ''list_pop.php?action=extra_menu'', ''menu_settings'',''width=550,height=200,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1'');return false"\r\n>Member menu position</a>', 0, '1', 1, 0, '', 'memb', 'top_extra', 'link'); 1079 INSERT INTO `ExtendedMenuItems` VALUES(6, '_Log Out2', 'Log Out', 'lot.png', 'logout.php?action=member_logout', '', '', '<a href="logout.php?action=member_logout">Logout</a>', 1, '1', 1, 0, '', 'memb', 'top_extra', 'link'); 1080 INSERT INTO `ExtendedMenuItems` VALUES(45, '{evalResult}', 'NickNameBlock', 'mbs.png', 'profile.php?ID={ID}', '', 'return ''<b>'' . getNickName({ID}) . ''</b>'';', '<a href="communicator.php">Activity</a>\n<br />\n<br />\n<a href="membership.php">Membership</a>\n<br />\n<br />\n<a href="unregister.php">Unregister</a>\n', 0, '1', 1, 1, '', 'memb', 'top', 'link'); 1063 INSERT INTO `ExtendedMenuItems` VALUES(1, '_Profile', 'Profile', 'prf.png', '{evalResult}', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\nreturn getProfileLink($iProfileID);', '\r\nbx_import( ''BxTemplProfileView'' );\r\nreturn BxTemplProfileView::get_member_menu_items_list({ID});\r\n', 1, '1', 0, 0, '', 'memb', 'top', 'link', 0); 1064 INSERT INTO `ExtendedMenuItems` VALUES(3, '_Inbox {evalResult}', 'Inbox', 'msg.png', 'mail.php?mode=inbox', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iLetCount = getNewLettersNum( $iProfileID );\r\n\r\n$sReturnedText = ''<span class="item_count" id="top_menu_mail_count"> __iCount__ </span>'';\r\n\r\nif ($iLetCount)\r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iLetCount . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', 'bx_import( ''BxTemplMailBox'' );\r\n// return list of messages ;\r\nreturn BxTemplMailBox::get_member_menu_messages_list({ID});', 3, '1', 0, 0, '', 'memb', 'top', 'link', 0); 1065 INSERT INTO `ExtendedMenuItems` VALUES(7, '_About Us', 'About Us', '', 'about_us.php', '', '', '', 0, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1066 INSERT INTO `ExtendedMenuItems` VALUES(8, '_Privacy', 'Privacy', '', 'privacy.php', '', '', '', 1, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1067 INSERT INTO `ExtendedMenuItems` VALUES(9, '_Terms_of_use', 'Terms of use', '', 'terms_of_use.php', '', '', '', 2, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1068 INSERT INTO `ExtendedMenuItems` VALUES(10, '_FAQ', 'FAQ', '', 'faq.php', '', '', '', 3, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1069 INSERT INTO `ExtendedMenuItems` VALUES(12, '_Links', 'Links', '', 'links.php', '', '', '', 5, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1070 INSERT INTO `ExtendedMenuItems` VALUES(14, '_Affiliates', 'Affiliates', '', '{evalResult}', '', 'return ( getParam("enable_aff") == "on" )\n ? ''affiliates.php''\n : null;', '', 9, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1071 INSERT INTO `ExtendedMenuItems` VALUES(15, '_Invite a friend', 'Invite a friend', '', 'tellfriend.php', 'return launchTellFriend();', '', '', 6, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1072 INSERT INTO `ExtendedMenuItems` VALUES(16, '_contact_us', 'Contact us', '', 'contact.php', '', '', '', 7, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1073 INSERT INTO `ExtendedMenuItems` VALUES(17, '_Bookmark', 'Bookmark', '', '', 'addBookmark(); return false;', '', '', 8, '1', 0, 0, '', 'non,memb', 'bottom', 'link', 0); 1074 INSERT INTO `ExtendedMenuItems` VALUES(27, '_Affiliates', 'Affiliates', '', '{evalResult}', '', 'return ( getParam("enable_aff") == "on" )\n ? ''affiliates.php''\n : null;', '', 0, '0', 0, 0, '', 'non,memb', 'top', 'link', 0); 1075 INSERT INTO `ExtendedMenuItems` VALUES(32, '_Alerts {evalResult}', 'Alerts', 'ale.png', 'member.php', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iItemCount = 0;\r\n\r\n$sReturnedText = ''<span class="item_count"> __iCount__ </span>'';\r\n\r\nif ($iItemCount)\r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iItemCount . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', 'return ''Under development'';', 4, '1', 0, 0, '', 'memb', 'top', 'link', 0); 1076 INSERT INTO `ExtendedMenuItems` VALUES(30, '_Friends {evalResult}', 'Friends', 'fri.png', 'viewFriends.php?iUser={ID}', '', '$iProfileID = (isset($_COOKIE[''memberID'']))\r\n ? (int) $_COOKIE[''memberID'']\r\n : 0 ;\r\n\r\n$iItemCount = get_user_friends_count($iProfileID , 1, getParam("member_online_time" ) ) ;\r\n\r\n$sReturnedText = ''<span class="item_count"> __iCount__ </span>'';\r\n\r\nif ($iItemCount) \r\n $sReturnedText = str_replace(''__iCount__'', ''('' . $iItemCount . '' '' . _t( ''online'' ) . '')'', $sReturnedText);\r\nelse\r\n $sReturnedText = str_replace(''__iCount__'', '''', $sReturnedText);\r\n\r\nreturn $sReturnedText;', 'bx_import( ''BxDolFriendsPageView'' );\r\nreturn BxDolFriendsPageView::get_member_menu_friends_list({ID});', 2, '1', 0, 0, '', 'memb', 'top', 'link', 0); 1077 INSERT INTO `ExtendedMenuItems` VALUES(35, '_Settings', 'Settings', 'mmp.png', '', 'window.open( ''list_pop.php?action=extra_menu'', ''menu_settings'',''width=550,height=200,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1'');return false', '', '$aLanguageKeys = array (\r\n ''account'' => _t( ''_Account settings'' ),\r\n ''privacy'' => _t( ''_Privacy settings'' ),\r\n ''notifications'' => _t( ''_Notifications settings'' ),\r\n ''alerts'' => _t( ''_Alerts settings'' ),\r\n ''menu'' => _t( ''_Member menu settings'' ),\r\n); \r\n \r\n$sOutputCode = \r\n''\r\n <div class="content">\r\n <a href="'' . $GLOBALS[''site''][''url''] . ''pedit.php?ID={ID}">'' . $aLanguageKeys[''account''] . ''</a>\r\n </div>\r\n <div class="content">\r\n <a href="'' . $GLOBALS[''site''][''url''] . ''member_privacy.php">'' . $aLanguageKeys[''privacy''] . ''</a>\r\n </div>\r\n <div class="content">\r\n <a href="javascript:void(0)" onclick="alert(\\''Under development\\'')">'' . $aLanguageKeys[''notifications''] . ''</a>\r\n </div>\r\n <div class="content">\r\n <a href="javascript:void(0)" onclick="alert(\\''Under development\\'')">'' . $aLanguageKeys[''alerts''] . ''</a>\r\n </div>\r\n <div class="content">\r\n <a href="javascript:void(0)" onclick="window.open( \\'''' . $GLOBALS[''site''][''url''] . ''list_pop.php?action=extra_menu\\'', \\''menu_settings\\'',\\''width=550,height=200,toolbar=0,directories=0,menubar=0,status=0,location=0,scrollbars=0,resizable=1\\'');return false">'' . $aLanguageKeys[''menu''] . ''</a>\r\n </div>\r\n'';\r\n\r\nreturn $sOutputCode;', 0, '1', 0, 0, '', 'memb', 'top_extra', 'link', 0); 1078 INSERT INTO `ExtendedMenuItems` VALUES(6, '_Log Out2', 'Log Out', 'lot.png', 'logout.php?action=member_logout', '', '', '', 1, '1', 0, 0, '', 'memb', 'top_extra', 'link', 0); 1079 INSERT INTO `ExtendedMenuItems` VALUES(45, '{evalResult}', 'NickNameBlock', 'mbs.png', 'profile.php?ID={ID}', '', 'return ''<b>'' . getNickName({ID}) . ''</b>'';', '$sMembership = null;\r\n \r\n$aLanguageKeys = array (\r\n ''activity'' => _t( ''_Activity'' ),\r\n ''membership'' => _t( ''_Membership'' ),\r\n ''unregister'' => _t( ''_Unregister'' ),\r\n ''activity_item'' => _t( ''_Blocked, Viewed, etc'' ),\r\n); \r\n \r\n$aMembershipInfo = getMembershipInfo(''{ID}'');\r\nif ( $aMembershipInfo[''Name''] ) {\r\n $sMembership = \r\n ''\r\n <div class="content">\r\n <a href="'' . $GLOBALS[''site''][''url''] . ''membership.php">'' . $aLanguageKeys[''membership''] . ''</a><span> ('' . $aMembershipInfo[''Name''] . '')</span>\r\n </div>\r\n '';\r\n}\r\n\r\n$sOutputCode = \r\n''\r\n <div class="content">\r\n <a href="'' . $GLOBALS[''site''][''url''] . ''communicator.php">'' . $aLanguageKeys[''activity''] . ''</a><span> ('' . $aLanguageKeys[''activity_item''] . '')</span>\r\n </div>\r\n '' . $sMembership . ''\r\n <div class="content">\r\n <a href="'' . $GLOBALS[''site''][''url''] . ''unregister.php">'' . $aLanguageKeys[''unregister''] . ''</a>\r\n </div>\r\n'';\r\n\r\nreturn $sOutputCode;', 0, '1', 0, 0, '', 'memb', 'top', 'link', 0); 1081 1080 1082 1081 -- -
TabularUnified trunk/member.php ¶
r9618 r9697 984 984 985 985 case 'get_menu_content' : 986 986 987 $aMemberInfo = getProfileInfo( (int) $_COOKIE['memberID']); 987 988 $iMenuId = ( isset($_GET['menu_id']) ) ? (int) $_GET['menu_id'] : 0 ; 988 989 989 $sQuery = "SELECT `PopupHtml` FROM `ExtendedMenuItems` WHERE `ID` = {$iMenuId}"; 990 // generate sub menu and sub menu's child nodes if exists ; 991 $sQuery = "SELECT `PopupMenu` FROM `ExtendedMenuItems` WHERE `ID` = {$iMenuId}"; 990 992 $sOutputHtml = db_value($sQuery); 991 993 992 $sOutputHtml = $oFunctions -> markerReplace( $aMemberInfo, $sOutputHtml); 994 $sOutputHtml = eval( $oFunctions -> markerReplace( $aMemberInfo, $sOutputHtml) ); 995 996 // try to find submenu's child nodes ; 997 $sQuery = "SELECT `Eval` FROM `ExtendedMenuItems` WHERE `Parent` = {$iMenuId}"; 998 $rResult = db_res($sQuery); 999 1000 while ( $aRow = mysql_fetch_assoc($rResult) ) 1001 { 1002 $sOutputHtml .= eval( $oFunctions -> markerReplace( $aMemberInfo, $aRow['Eval']) ); 1003 } 1004 993 1005 break; 994 1006 -
TabularUnified trunk/modules/boonex/poll/templates/base/css/main.css ¶
r9394 r9697 23 23 position:relative; 24 24 padding-top:25px; 25 width:260px;26 25 height:160px; 27 26 } -
TabularUnified trunk/templates/base/css/anchor.css ¶
r9696 r9697 211 211 z-index:900; 212 212 } 213 213 214 214 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data a, 215 215 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data a:link, … … 222 222 margin:0; 223 223 white-space: nowrap; 224 font-size:11px; 224 225 } 225 226 … … 229 230 text-decoration:underline; 230 231 } 232 233 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.extra_menu_list_message div.info div.message_caption a.msg_link, 234 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.extra_menu_list_message div.info div.message_caption a.msg_link:active 235 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.extra_menu_list_message div.info div.message_caption a.msg_link:link, 236 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.extra_menu_list_message div.info div.message_caption a.msg_link:visited{ 237 font-size:9px; 238 color:#666666; 239 white-space:normal; 240 } 241 242 243 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_name, 244 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_name:link, 245 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_name:visited, 246 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_name:hover, 247 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_name:active { 248 color:#3333CC; 249 font-size:11px; 250 } 251 252 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_action, 253 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_action:link, 254 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_action:visited, 255 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_action:hover, 256 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.content a.plugin_action:active { 257 font-size:9px; 258 color:#3333CC; 259 } -
TabularUnified trunk/templates/base/css/general.css ¶
r9685 r9697 1574 1574 background-repeat:repeat; 1575 1575 *margin-bottom:-2px; 1576 /*width:215px;*/ 1576 1577 } 1577 1578 … … 1615 1616 border-left:1px solid #939393; 1616 1617 border-right:1px solid #939393; 1617 }1618 1619 div.extra_top_menu table.fixed_menu table table.popup td.html_data img.space_img{1620 width:150px;1621 height:1px;1622 1618 } 1623 1619 … … 1641 1637 1642 1638 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data{ 1643 margin:10px; 1639 margin-left:10px; 1640 margin-right:10px; 1641 } 1642 1643 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.content{ 1644 padding-top:6px; 1645 padding-bottom:6px; 1646 font-size:9px; 1647 color:#666666; 1648 } 1649 1650 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.content table { 1651 width:100%; 1652 } 1653 1654 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.control{ 1655 background-color:#E4E4E4; 1656 border:0; 1657 margin-left:-10px; 1658 margin-right:-10px; 1659 padding-left:10px; 1660 padding-right:10px; 1661 white-space:nowrap; 1662 padding-top:5px; 1663 } 1664 1665 div.extra_top_menu table.fixed_menu table table.popup td.html_data div.html_data div.control div{ 1666 padding-bottom:4px; 1644 1667 } 1645 1668 … … 1660 1683 font-size:11px; 1661 1684 } 1662 1685 1686 div.extra_menu_list_message { 1687 padding-bottom:6px; 1688 padding-top:6px; 1689 } 1690 1691 div.extra_menu_list_message div.icon_section { 1692 background-color:#fff; 1693 border:1px solid #CFCFCF; 1694 width:36px; 1695 height:36px; 1696 float:left; 1697 margin-right:5px; 1698 padding:0; 1699 } 1700 1701 div.extra_menu_list_message div.icon_section img.member_icon { 1702 background-position:center center; 1703 background-repeat:no-repeat; 1704 height:36px; 1705 width:36px; 1706 } 1707 1708 div.extra_menu_list_message div.info { 1709 padding-left:5px; 1710 position:relative; 1711 } 1712 1713 div.extra_menu_list_message div.info div.message_caption { 1714 font-size:9px; 1715 color:#666666; 1716 white-space:normal; 1717 } -
TabularUnified trunk/templates/base/scripts/BxBaseBrowse.php ¶
r9307 r9697 21 21 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolBrowse.php'); 22 22 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPaginate.php'); 23 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $ tmpl. '/scripts/BxTemplSearchProfile.php');23 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $GLOBALS['tmpl'] . '/scripts/BxTemplSearchProfile.php'); 24 24 25 25 class BxBaseBrowse extends BxDolBrowse … … 1002 1002 return array( $sOutputHtml, $aToggleEllements ); 1003 1003 } 1004 } 1005 1006 ?> 1004 } -
TabularUnified trunk/templates/base/scripts/BxBaseFunctions.php ¶
r9640 r9697 342 342 foreach($aItems AS $sKey => $sValue ) 343 343 { 344 if ( $sKey != 'Popup Html' ) {344 if ( $sKey != 'PopupMenu' ) { 345 345 if ( $sKey == 'Caption' ) { 346 346 $aReplaced[$iKey][$sKey] = $this -> markerReplace($aMemberInfo, $sValue, $aItems['Eval'], true); … … 438 438 ); 439 439 440 if ( $aItems['Popup Html'] ) {440 if ( $aItems['PopupMenu'] ) { 441 441 $aMenuItems[$iIndex]['menu_link'] = 'javascript:void(0)'; 442 442 $aMenuItems[$iIndex]['extended_action'] = null; … … 447 447 case 'top' : 448 448 $aMenuItems[$iIndex]['bx_if:sub_menu'] = array ( 449 'condition' => $aItems['Popup Html'],449 'condition' => $aItems['PopupMenu'], 450 450 'content' => $aContentKeys, 451 451 ); … … 454 454 case 'top_extra' : 455 455 $aMenuItems[$iIndex]['bx_if:sub_menu_extra'] = array ( 456 'condition' => $aItems['Popup Html'],456 'condition' => $aItems['PopupMenu'], 457 457 'content' => $aContentKeys, 458 458 ); -
TabularUnified trunk/templates/base/scripts/BxBaseMailBox.php ¶
r9146 r9697 1328 1328 return $sOutputHtml; 1329 1329 } 1330 1331 /** 1332 * Function will get messages list for member's extra menu; 1333 * 1334 * @param : $iMemberId (integer) - member's Id ; 1335 * @return : Html presentation data ; 1336 */ 1337 function get_member_menu_messages_list( $iMemberId = 0 ) 1338 { 1339 global $oSysTemplate, $oFunctions; 1340 1341 $aNewMessages = array(); 1342 $aLanguageKeys = array ( 1343 'go_mailbox' => _t( '_Go to Mailbox' ), 1344 'compose_msg' => _t( '_Compose new message' ), 1345 ); 1346 1347 // get count of all member's messages ; 1348 $sQuery = 1349 " 1350 SELECT 1351 COUNT(*) 1352 FROM 1353 `Messages` 1354 WHERE 1355 `Recipient` = {$iMemberId} 1356 AND 1357 NOT FIND_IN_SET('Recipient', `Trash`) 1358 "; 1359 $iAllMessages = db_value($sQuery); 1360 1361 // try to generate member's messages list ; 1362 if ( $iMemberId ) { 1363 $aMemberInfo = getProfileInfo($iMemberId); 1364 $aIcon = $oFunctions -> _getImageShared( $aMemberInfo, 'icon' ); 1365 1366 // generate list with unread messages list ; 1367 $sQuery = 1368 " 1369 SELECT 1370 `ID`, `Sender`, `Subject` 1371 FROM 1372 `Messages` 1373 WHERE 1374 `Recipient`={$iMemberId} 1375 AND 1376 `New`='1' 1377 AND 1378 NOT FIND_IN_SET('Recipient', `Trash`) 1379 ORDER BY 1380 `Date` DESC 1381 LIMIT 5 1382 "; 1383 1384 $rResult = db_res($sQuery); 1385 while( $aRow = mysql_fetch_assoc($rResult) ) 1386 { 1387 $sSubject = ( mb_strlen($aRow['Subject']) > 40 ) 1388 ? mb_substr($aRow['Subject'], 0, 40) . '...' 1389 : $aRow['Subject']; 1390 1391 $aNewMessages[] = array( 1392 'sender_link' => getProfileLink($aRow['Sender']), 1393 'sender_nick' => getNickName($aRow['Sender']), 1394 'msg_caption' => $sSubject, 1395 'thumbnail' => $aIcon['file'], 1396 'message_id' => $aRow['ID'], 1397 'site_url' => $GLOBALS['site']['url'], 1398 ); 1399 } 1400 } 1401 1402 // fill array with needed keys ; 1403 $aTemplateKeys = array ( 1404 // number of all member's messages ; 1405 'site_url' => $GLOBALS['site']['url'], 1406 'mess_count' => $iAllMessages, 1407 'go_mailbox' => $aLanguageKeys['go_mailbox'], 1408 1409 'compose_msg' => $aLanguageKeys['compose_msg'], 1410 1411 'bx_repeat:new_message' => $aNewMessages, 1412 ); 1413 1414 $sOutputCode = $oSysTemplate -> parseHtmlByName( 'mail_box_member_menu_messages.html', $aTemplateKeys ); 1415 return $sOutputCode; 1416 } 1417 1418 function test() 1419 { 1420 global $oSysTemplate; 1421 1422 $aTemplateKeys = array( 1423 'page_link' => $GLOBALS['site']['url'], 1424 'onclick' => null, 1425 'title' => _t( '_Blogs' ), 1426 'extra_info' => '(50)', 1427 'action_link' => $GLOBALS['site']['url'], 1428 'action_onclick' => null, 1429 'action_title' => _t( '_Edit' ), 1430 ); 1431 $sOutputCode = $oSysTemplate -> parseHtmlByName( 'member_menu_plugin_items.html', $aTemplateKeys ); 1432 return $sOutputCode; 1433 } 1330 1434 } 1331 1332 ?> -
TabularUnified trunk/templates/base/scripts/BxBaseProfileView.php ¶
r9693 r9697 50 50 function getBlockCode_Cmts () { 51 51 return $this->oProfileGen->showBlockCmts(); 52 } 53 54 function get_member_menu_items_list( $iMemberId = 0 ) 55 { 56 global $oSysTemplate, $oFunctions; 57 58 $sOutputCode = null; 59 60 if ( $iMemberId ) { 61 $aLanguageKeys = array ( 62 'view_my' => _t( '_View my profile' ), 63 'customize' => _t( '_Customize' ), 64 ); 65 66 // fill array with needed keys ; 67 $aTemplateKeys = array ( 68 'view_my' => $aLanguageKeys['view_my'], 69 'member_lnk' => getProfileLink($iMemberId), 70 71 'customize' => $aLanguageKeys['customize'], 72 'site_url' => $GLOBALS['site']['url'], 73 'ID' => $iMemberId, 74 ); 75 76 $sOutputCode = $oSysTemplate -> parseHtmlByName( 'profile_member_menu_items.html', $aTemplateKeys ); 77 } 78 79 return $sOutputCode; 52 80 } 53 81 } … … 1135 1163 return $sActions; 1136 1164 } 1137 1138 1165 } -
TabularUnified trunk/templates/tmpl_uni/extra_top_menu.html ¶
r9677 r9697 43 43 <div class="reduce"><img src="<bx_icon_url:reduce.png />" alt="" width="14" height="14" border="0" onclick="jqueryslidemenu.close_popup('extra_menu_popup___menu_id__')"/></div> 44 44 </bx_if:reduce_element_top> 45 <!-- spacer for emulate min-width for all browsers -->46 <img src="<bx_image_url:spacer.gif />" alt="spacer" class="space_img"/>47 45 <div class="html_data" id="menu_content___menu_id__"></div> 48 46 <bx_if:reduce_element_bottom> … … 93 91 <div class="reduce"><img src="<bx_icon_url:reduce.png />" alt="" width="14" height="14" border="0" onclick="jqueryslidemenu.close_popup('extra_menu_popup___menu_id__')"/></div> 94 92 </bx_if:reduce_element_top> 95 <!-- spacer for emulate min-width for all browsers -->96 <img src="<bx_image_url:spacer.gif />" alt="spacer" class="space_img"/>97 93 <div class="html_data" id="menu_content___menu_id__"></div> 98 94 <bx_if:reduce_element_bottom> … … 207 203 // define top menu's position ; 208 204 209 // old variant ;210 //var iMenuPosition = (iMemberMenuHeight - this._dimensions.h) / 2 + this._dimensions.h - 10;211 212 var iMenuPosition = this._dimensions.h;213 214 205 if ( sMenuPosition == 'bottom' ) { 215 206 // set sub menu's bottom possition; 216 $subul.css({bottom: iMenuPosition});207 $subul.css({bottom:this._dimensions.h}); 217 208 } 218 209 else { 219 210 // set sub menu's top position ; 220 $subul.css({top: iMenuPosition});211 $subul.css({top:this._dimensions.h}); 221 212 } 222 213 … … 246 237 var iMenuLeftOffset = $(self).offset().left; 247 238 // submenu weight ; 248 var iSubMenuWeight = $(self).find('table'). outerWidth();239 var iSubMenuWeight = $(self).find('table').width(); 249 240 250 241 var iCurrentElementPos = iMenuLeftOffset + iSubMenuWeight; … … 312 303 }); 313 304 }, 314 /**315 * Function will set menu active ;316 *317 */318 set_menu_active:function()319 {320 alert('active');321 }322 305 } 323 306 -
TabularUnified trunk/viewFriends.php ¶
r9640 r9697 24 24 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' ); 25 25 26 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolFriendsPageView.php'); 26 27 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPaginate.php'); 27 28 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $tmpl . '/scripts/BxTemplProfileView.php' ); 28 29 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $tmpl . '/scripts/BxTemplSearchProfile.php'); 29 30 require_once( BX_DIRECTORY_PATH_ROOT . 'templates/tmpl_' . $tmpl . '/scripts/BxTemplUserAlertsView.php'); 30 31 class BxDolFriendsPageView extends BxDolPageView32 {33 // consit all necessary data for display members list ;34 var $aDisplayParameters;35 36 var $iProfileID;37 38 // link on search profile ;39 var $oSearchProfileTmpl;40 41 // contains the path to the current page ;42 var $sCurrentPage ;43 44 var $iMemberOnlineTime;45 46 /**47 * @description : class constructor ;48 * @param : $sPageName (string) - name of build page ;49 * @param : $aDisplayParameters (array) ;50 per_page (integer) - number of elements for per page ;51 page (integer) - current page ;52 mode (string) - will swith member view mode ;53 ext_tmpl (string) - path to extended member's template ;54 sim_tmpl (string) - path to simple member's template ;55 sort (string) - sorting parameters ;56 * @param : $iProfileID (integer) - member ID ;57 */58 59 function BxDolFriendsPageView($sPageName, &$aDisplayParameters, $iProfileID)60 {61 parent::BxDolPageView($sPageName);62 $this -> aDisplayParameters = &$aDisplayParameters;63 $this -> iProfileID = $iProfileID;64 65 $this -> oSearchProfileTmpl = new BxTemplSearchProfile();66 $this -> sCurrentPage = $_SERVER['PHP_SELF'];67 68 // check member on line time ;69 70 $this -> iMemberOnlineTime = getParam( "member_online_time" );71 }72 73 /**74 * @description : function will generate member tracker list ;75 * @return : Html presentation data;76 */77 78 function getBlockCode_Tracker() {79 $oAlerts = new BxTemplUserAlertsView($this->iProfileID, (isset($_REQUEST['page']) ? (int)$_REQUEST['page'] : 1));80 $aFilters = array('friend');81 return array(82 $oAlerts->displayActiveUnits() . '<div id="alertsView">' . $oAlerts->displayUserAlerts($aFilters, false) . '</div>',83 null,84 $oAlerts->displayPagination($aFilters, false));85 }86 87 /**88 * @description : function will generate friends list ;89 * @return : array ;90 */91 92 function getBlockCode_Friends()93 {94 global $oFunctions, $oSysTemplate;95 96 // init some variables ;97 98 $sOutputHtml = null;99 $sEmpty = null;100 $iIndex = null;101 102 $aUsedTemplates = array103 (104 'browse_searched_block.html'105 );106 107 // lang keys ;108 109 $sPhotoCaption = _t( '_With photos only' );110 $sOnlineCaption = _t( '_online only' );111 112 // collect the SQL parameters ;113 114 $aWhereParam = array();115 if ( $this -> aDisplayParameters['photos'] )116 $aWhereParam[] = '`Profiles`.`PrimPhoto` <> 0';117 118 if ( $this -> aDisplayParameters['online'] )119 $aWhereParam[] = "(`Profiles`.`DateLastNav` > SUBDATE(NOW(), INTERVAL " . $this -> iMemberOnlineTime . " MINUTE)) ";120 121 $sWhereParam = null;122 foreach( $aWhereParam AS $sValue )123 if ( $sValue )124 $sWhereParam .= ' AND ' . $sValue;125 126 $iTotalNum = get_user_friends_count($this->iProfileID, 1, 0, $sWhereParam);127 128 if( !$iTotalNum ) {129 $sEmpty = MsgBox( _t('_Empty') );130 }131 132 $iPerPage = $this -> aDisplayParameters['per_page'];133 $iCurPage = $this -> aDisplayParameters['page'];134 135 $sLimitFrom = ( $iCurPage - 1 ) * $iPerPage;136 $sqlLimit = "LIMIT {$sLimitFrom}, {$iPerPage}";137 138 // switch member's template ;139 140 if ( $this -> aDisplayParameters['mode'] == 'extended' )141 $sTemplSearch = file_get_contents( $this -> aDisplayParameters['ext_tmpl'] );142 else143 $sTemplSearch = file_get_contents( $this -> aDisplayParameters['sim_tmpl'] );144 145 // select the sorting parameters ;146 147 $sSortParam = '`Profiles`.`DateLastLogin` DESC';148 149 if ( isset($this -> aDisplayParameters['sort']) )150 {151 switch($this -> aDisplayParameters['sort']) {152 case 'activity' :153 $sSortParam = ' `Profiles`.`DateLastLogin` DESC';154 break;155 case 'date_reg' :156 $sSortParam = ' `Profiles`.`DateReg` DESC';157 break;158 case 'rate' :159 $sSortParam = ' `profile_rating`.`pr_rating_sum` DESC';160 break;161 default :162 $sSortParam = ' `Profiles`.`DateLastLogin` DESC';163 $this -> aDisplayParameters['sort'] = 'activity';164 break;165 }166 }167 else168 $this -> aDisplayParameters['sort'] = 'activity';169 170 $sQuery = "171 SELECT `Profiles`. *172 FROM `FriendList`173 INNER JOIN `Profiles` ON (174 (175 `Profiles`.`ID` = `FriendList`.`Profile`176 AND177 `FriendList`.`ID` = '{$this->iProfileID}'178 )179 OR (180 `Profiles`.`ID` = `FriendList`.`ID`181 AND182 `FriendList`.`Profile` = '{$this->iProfileID}'183 )184 )185 WHERE `FriendList`.`Check` = 1186 {$sWhereParam}187 ORDER BY {$sSortParam}188 {$sqlLimit}189 ";190 191 //$aFriends = getMyFriendsEx($this->iProfileID, '', '', '');192 //echoDbg($aFriends);193 194 $rResult = db_res($sQuery);195 196 // need for the block devider ;197 198 $aExtendedCss = array( '__ext_css_class__' => 'search_filled_block');199 200 while( $aRow = mysql_fetch_assoc($rResult) )201 {202 203 if ( $aRow['Couple'])204 {205 $aCoupleInfo = getProfileInfo( $Row['Couple'] );206 if ( !($iIndex % 2) )207 {208 $sOutputHtml .= $this -> oSearchProfileTmpl -> PrintSearhResult($aRow, $sTemplSearch, 1, $aCoupleInfo);209 }210 else211 {212 // generate filled block ;213 $sOutputHtml .= $this -> oSearchProfileTmpl -> PrintSearhResult($aRow, $sTemplSearch, 1, $aCoupleInfo, $aExtendedCss);214 }215 }216 else217 {218 if ( !($iIndex % 2) )219 {220 $sOutputHtml .= $this -> oSearchProfileTmpl -> PrintSearhResult($aRow, $sTemplSearch, 1);221 }222 else223 {224 // generate filled block ;225 $sOutputHtml .= $this -> oSearchProfileTmpl -> PrintSearhResult($aRow, $sTemplSearch, 1, null, $aExtendedCss);226 }227 }228 229 $iIndex++;230 }231 232 $sOutputHtml .= '<div class="clear_both"></div>';233 234 // work with link pagination ;235 236 $sRequest = $_SERVER['PHP_SELF'] . '?';237 $aGetParams = array('mode', 'iUser', 'photos_only', 'online_only', 'sort');238 if ( is_array($aGetParams) and !empty($aGetParams) )239 foreach($aGetParams AS $sValue )240 if ( isset($_GET[$sValue]) )241 {242 $sRequest .= '&' . $sValue . '=' . $_GET[$sValue];243 }244 245 // gen pagination block ;246 247 $sRequest = $sRequest . '&page={page}&per_page={per_page}sort={sorting}';248 249 // gen pagination block ;250 251 $oPaginate = new BxDolPaginate252 (253 array254 (255 'page_url' => $sRequest,256 'count' => $iTotalNum,257 'per_page' => $iPerPage,258 'page' => $iCurPage,259 'sorting' => $this -> aDisplayParameters['sort'],260 261 'per_page_changer' => true,262 'page_reloader' => true,263 'on_change_page' => null,264 'on_change_per_page' => null,265 )266 );267 268 $sPagination = $oPaginate -> getPaginate();269 270 // ** GENERATE HEADER PART ;271 272 // gen per page block ;273 274 $sPerPageBlock = $oPaginate -> getPages( $iPerPage );275 276 // fill array with sorting params ;277 278 $aSortingParam = array279 (280 'activity' => _t( '_Latest activity' ),281 'date_reg' => _t( '_FieldCaption_DateReg_View' ),282 'rate' => _t( '_Rate' ),283 );284 285 // gen sorting block ( type of : drop down ) ;286 287 $sSortBlock = $oPaginate -> getSorting( $aSortingParam );288 289 $sRequest = str_replace('{page}', '1', $sRequest);290 $sRequest = str_replace('{per_page}', $iPerPage, $sRequest);291 $sRequest = str_replace('{sorting}', $this -> aDisplayParameters['sort'], $sRequest);292 293 // init some visible parameters ;294 295 $sPhotosChecked = ($this -> aDisplayParameters['photos'])296 ? 'checked="checked"'297 : null;298 299 $sOnlineChecked = ($this -> aDisplayParameters['online'])300 ? 'checked="checked"'301 : null;302 303 // link for photos section ;304 305 $sPhotoLocation = $this -> getCutParam( 'photos_only', $sRequest);306 307 // link for online section ;308 309 $sOnlineLocation = $this -> getCutParam( 'online_only', $sRequest);310 311 // link for `mode switcher` ;312 313 $sModeLocation = $this -> getCutParam( 'mode', $sRequest);314 $sModeLocation = $this -> getCutParam( 'per_page', $sModeLocation);315 316 // fill array with template's keys ;317 $aTemplateKeys = array318 (319 'toggle_block' => $sParamsToggle,320 'sort_block' => $sSortBlock,321 'photo_checked' => $sPhotosChecked,322 'photo_location' => $sPhotoLocation,323 'photo_caption' => $sPhotoCaption,324 'online_checked' => $sOnlineChecked,325 'online_location' => $sOnlineLocation,326 'online_caption' => $sOnlineCaption,327 'per_page_block' => $sPerPageBlock,328 'searched_data' => $sOutputHtml,329 'pagination' => $sPagination,330 );331 332 // build template ;333 $sOutputHtml = $oSysTemplate -> parseHtmlByName( $aUsedTemplates[0], $aTemplateKeys );334 335 // build the toggle block ;336 $aToggleItems = array337 (338 '' => _t( '_Simple' ),339 'extended' => _t( '_Extended' ),340 );341 342 foreach( $aToggleItems AS $sKey => $sValue )343 {344 $aToggleEllements[$sValue] = array345 (346 'href' => $sModeLocation . '&mode=' . $sKey,347 'dynamic' => true,348 'active' => ($this -> aDisplayParameters['mode'] == $sKey ),349 );350 }351 352 return array( $sOutputHtml . $sEmpty, $aToggleEllements );353 }354 355 /**356 * @description : function will cute the parameter from received string;357 * @param : $aExceptNames (string) - name of unnecessary paremeter;358 * @return : cleared string;359 */360 361 function getCutParam( $sExceptParam, $sString )362 {363 return preg_replace( "/(&|&){$sExceptParam}=([a-z0-9\_\-]{1,})/i",'', $sString);364 }365 366 }367 368 369 31 370 32 $_page['name_index'] = 7;
Note: See TracChangeset
for help on using the changeset viewer.