source:
OpenPNE_specification/patch/OpenPNE_2_12_1_to_OpenPNE_2_12_2.patch
@
7771
Last change on this file since 7771 was 7771, checked in by , 13 years ago | |
---|---|
File size: 102.5 KB |
-
setup/sql/postgres74/update/update14-for2.12beta1-create_c_cmd_caster.sql
6 6 sort_order int4 NOT NULL default '0', 7 7 is_enabled smallint NOT NULL default '0', 8 8 PRIMARY KEY (c_cmd_caster_id), 9 UNIQUE url(url)9 UNIQUE (url) 10 10 ); 11 11 12 ALTER TABLE c_cmd ADD COLUMN url varchar(128) NOT NULL default ''; 13 DROP INDEX name; 14 DROP INDEX name_2; 15 ALTER TABLE c_cmd ADD COLUMN c_cmd_caster_id int4 NOT NULL default '0'; 16 ALTER TABLE c_cmd ADD COLUMN r_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 17 ALTER TABLE c_cmd ADD COLUMN u_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 12 ALTER TABLE c_cmd ADD COLUMN url varchar(128); 13 ALTER TABLE c_cmd ALTER COLUMN url SET DEFAULT ''; 14 UPDATE c_cmd SET url = ''; 15 ALTER TABLE c_cmd ALTER COLUMN url SET NOT NULL; 18 16 17 ALTER TABLE c_cmd DROP CONSTRAINT "c_cmd_name_key"; 18 DROP INDEX c_cmd_name_2; 19 20 ALTER TABLE c_cmd ADD COLUMN c_cmd_caster_id int4; 21 ALTER TABLE c_cmd ALTER COLUMN c_cmd_caster_id SET DEFAULT '0'; 22 UPDATE c_cmd SET c_cmd_caster_id = '0'; 23 ALTER TABLE c_cmd ALTER COLUMN c_cmd_caster_id SET NOT NULL; 24 25 ALTER TABLE c_cmd ADD COLUMN r_datetime timestamp; 26 ALTER TABLE c_cmd ALTER COLUMN r_datetime SET DEFAULT '0000-01-01 00:00:00'; 27 UPDATE c_cmd SET r_datetime = '0000-01-01 00:00:00'; 28 ALTER TABLE c_cmd ALTER COLUMN r_datetime SET NOT NULL; 29 30 ALTER TABLE c_cmd ADD COLUMN u_datetime timestamp; 31 ALTER TABLE c_cmd ALTER COLUMN u_datetime SET DEFAULT '0000-01-01 00:00:00'; 32 UPDATE c_cmd SET u_datetime = '0000-01-01 00:00:00'; 33 ALTER TABLE c_cmd ALTER COLUMN u_datetime SET NOT NULL; -
setup/sql/postgres74/update/update17-for2.12RC2-convert_c_diary_comment.sql
8 8 PRIMARY KEY (c_diary_comment_log_id) 9 9 ); 10 10 11 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime)12 (SELECT NULL, c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime11 INSERT INTO tmp_c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 12 (SELECT nextval('tmp_c_diary_comment_log_c_diary_comment_log_id_seq'), c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime 13 13 FROM c_diary_comment 14 14 GROUP BY c_member_id, c_diary_id 15 15 ORDER BY r_datetime); 16 16 17 17 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 18 (SELECT NULL, tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id,18 (SELECT nextval('c_diary_comment_log_c_diary_comment_log_id_seq'), tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id, 19 19 tmp_c_diary_comment_log.r_datetime as r_datetime 20 20 FROM tmp_c_diary_comment_log 21 21 INNER JOIN c_diary USING (c_diary_id) -
setup/sql/postgres74/update/update04-for2.11.5-alter_c_member_pre.sql
1 ALTER TABLE c_member_pre ADD COLUMN login_id varchar(255) NOT NULL default ''; 2 1 ALTER TABLE c_member_pre ADD COLUMN login_id varchar(255); 2 ALTER TABLE c_member_pre ALTER COLUMN login_id SET DEFAULT ''; 3 UPDATE c_member_pre SET login_id = ''; 4 ALTER TABLE c_member_pre ALTER COLUMN login_id SET NOT NULL; -
setup/sql/postgres74/update/update13-for2.12beta1-fix_bug_c_diary_comment.sql
8 8 PRIMARY KEY (c_diary_comment_log_id) 9 9 ); 10 10 11 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime)12 (SELECT NULL, c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime11 INSERT INTO tmp_c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 12 (SELECT nextval('tmp_c_diary_comment_log_c_diary_comment_log_id_seq'), c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime 13 13 FROM c_diary_comment 14 14 WHERE r_datetime <= current_timestamp + '-15 days' 15 15 GROUP BY c_member_id, c_diary_id 16 16 ORDER BY r_datetime); 17 17 18 18 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 19 (SELECT NULL, tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id,19 (SELECT nextval('c_diary_comment_log_c_diary_comment_log_id_seq'), tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id, 20 20 tmp_c_diary_comment_log.r_datetime as r_datetime 21 21 FROM tmp_c_diary_comment_log 22 22 INNER JOIN c_diary USING (c_diary_id) -
setup/sql/postgres74/update/update09-for2.11.7-alter_c_message.sql
1 ALTER TABLE c_message ADD COLUMN filename varchar(200) NOT NULL default ''; 1 ALTER TABLE c_message ADD COLUMN filename varchar(200); 2 ALTER TABLE c_message ALTER COLUMN filename SET DEFAULT ''; 3 UPDATE c_message SET filename = ''; 4 ALTER TABLE c_message ALTER COLUMN filename SET NOT NULL; -
setup/sql/postgres74/update/update15-for2.12beta1-drop_c_member_config_option.sql
1 ALTER TABLE c_member_config ADD COLUMN name varchar(64) NOT NULL default ''; 1 ALTER TABLE c_member_config ADD COLUMN name varchar(64); 2 ALTER TABLE c_member_config ALTER COLUMN name SET DEFAULT ''; 3 UPDATE c_member_config SET name = ''; 4 ALTER TABLE c_member_config ALTER COLUMN name SET NOT NULL; 2 5 3 6 UPDATE c_member_config SET name = c_member_config_option.name 4 7 FROM c_member_config_option -
setup/sql/postgres74/update/update12-for2.11.7-db-tuning.sql
1 ALTER TABLE c_commu_topic ADD COLUMN u_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 1 ALTER TABLE c_commu_topic ADD COLUMN u_datetime timestamp; 2 ALTER TABLE c_commu_topic ALTER COLUMN u_datetime SET DEFAULT '0000-01-01 00:00:00'; 3 UPDATE c_commu_topic SET u_datetime = '0000-01-01 00:00:00'; 4 ALTER TABLE c_commu_topic ALTER COLUMN u_datetime SET NOT NULL; 2 5 3 6 DROP INDEX c_commu_topic_r_datetime_c_commu_id; 4 7 CREATE INDEX c_commu_topic_r_datetime_c_commu_id on c_commu_topic (c_commu_id,u_datetime); … … 37 40 DROP TABLE tmp_c_commu_topic; 38 41 39 42 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 40 (SELECT NULL, c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime43 (SELECT nextval('c_diary_comment_log_c_diary_comment_log_id_seq'), c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime 41 44 FROM c_diary_comment 42 45 WHERE r_datetime <= current_timestamp + '-15 days' 43 46 GROUP BY c_member_id, c_diary_id -
setup/sql/postgres74/update/update11-for2.11.7-public_flag_birth_month_day.sql
1 ALTER TABLE c_member ADD COLUMN public_flag_birth_month_day varchar(20) NOT NULL default 'public'; 2 ALTER TABLE c_member_pre ADD COLUMN public_flag_birth_month_day varchar(20) NOT NULL default 'public'; 1 ALTER TABLE c_member ADD COLUMN public_flag_birth_month_day varchar(20); 2 ALTER TABLE c_member ALTER COLUMN public_flag_birth_month_day SET DEFAULT 'public'; 3 UPDATE c_member SET public_flag_birth_month_day = 'public'; 4 ALTER TABLE c_member ALTER COLUMN public_flag_birth_month_day SET NOT NULL; 5 6 ALTER TABLE c_member_pre ADD COLUMN public_flag_birth_month_day varchar(20); 7 ALTER TABLE c_member_pre ALTER COLUMN public_flag_birth_month_day SET DEFAULT 'public'; 8 UPDATE c_member_pre SET public_flag_birth_month_day = 'public'; 9 ALTER TABLE c_member_pre ALTER COLUMN public_flag_birth_month_day SET NOT NULL; -
setup/sql/postgres74/install/install-2.12-create_tables.sql
247 247 sort_order int4 NOT NULL default '0', 248 248 is_enabled smallint NOT NULL default '0', 249 249 PRIMARY KEY (c_cmd_caster_id), 250 UNIQUE url(url)250 UNIQUE (url) 251 251 ); 252 252 253 253 CREATE TABLE c_commu ( -
setup/sql/postgres74/upgrade/upgrade-2.10to2.12.sql
33 33 CREATE INDEX c_commu_id_c_memer_id_to ON c_commu_admin_invite(c_commu_id,c_member_id_to); 34 34 35 35 -- update04 36 ALTER TABLE c_member_pre ADD COLUMN login_id varchar(255) NOT NULL default ''; 36 ALTER TABLE c_member_pre ADD COLUMN login_id varchar(255); 37 ALTER TABLE c_member_pre ALTER COLUMN login_id SET DEFAULT ''; 38 UPDATE c_member_pre SET login_id = ''; 39 ALTER TABLE c_member_pre ALTER COLUMN login_id SET NOT NULL; 37 40 38 41 -- update05 39 42 CREATE TABLE c_module ( … … 156 159 INSERT INTO c_member_config_option VALUES (nextval('c_member_config_option_c_member_config_option_id_seq'),'SEND_DIARY_COMMENT_MAIL_KTAI'); 157 160 158 161 -- update09 159 ALTER TABLE c_message ADD COLUMN filename varchar(200) NOT NULL default ''; 162 ALTER TABLE c_message ADD COLUMN filename varchar(200); 163 ALTER TABLE c_message ALTER COLUMN filename SET DEFAULT ''; 164 UPDATE c_message SET filename = ''; 165 ALTER TABLE c_message ALTER COLUMN filename SET NOT NULL; 160 166 161 167 -- update10 162 168 CREATE TABLE c_album ( … … 185 191 ); 186 192 187 193 -- update11 188 ALTER TABLE c_member ADD COLUMN public_flag_birth_month_day varchar(20) NOT NULL default 'public'; 189 ALTER TABLE c_member_pre ADD COLUMN public_flag_birth_month_day varchar(20) NOT NULL default 'public'; 194 ALTER TABLE c_member ADD COLUMN public_flag_birth_month_day varchar(20); 195 ALTER TABLE c_member ALTER COLUMN public_flag_birth_month_day SET DEFAULT 'public'; 196 UPDATE c_member SET public_flag_birth_month_day = 'public'; 197 ALTER TABLE c_member ALTER COLUMN public_flag_birth_month_day SET NOT NULL; 190 198 199 ALTER TABLE c_member_pre ADD COLUMN public_flag_birth_month_day varchar(20); 200 ALTER TABLE c_member_pre ALTER COLUMN public_flag_birth_month_day SET DEFAULT 'public'; 201 UPDATE c_member_pre SET public_flag_birth_month_day = 'public'; 202 ALTER TABLE c_member_pre ALTER COLUMN public_flag_birth_month_day SET NOT NULL; 203 191 204 -- update12, update13, update17 192 ALTER TABLE c_commu_topic ADD COLUMN u_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 205 ALTER TABLE c_commu_topic ADD COLUMN u_datetime timestamp; 206 ALTER TABLE c_commu_topic ALTER COLUMN u_datetime SET DEFAULT '0000-01-01 00:00:00'; 207 UPDATE c_commu_topic SET u_datetime = '0000-01-01 00:00:00'; 208 ALTER TABLE c_commu_topic ALTER COLUMN u_datetime SET NOT NULL; 193 209 194 210 DROP INDEX c_commu_topic_r_datetime_c_commu_id; 195 211 CREATE INDEX c_commu_topic_r_datetime_c_commu_id on c_commu_topic (c_commu_id,u_datetime); … … 235 251 PRIMARY KEY (c_diary_comment_log_id) 236 252 ); 237 253 238 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime)239 (SELECT NULL, c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime254 INSERT INTO tmp_c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 255 (SELECT nextval('tmp_c_diary_comment_log_c_diary_comment_log_id_seq'), c_member_id, c_diary_id, MAX(r_datetime) AS r_datetime 240 256 FROM c_diary_comment 241 257 GROUP BY c_member_id, c_diary_id 242 258 ORDER BY r_datetime); 243 259 244 260 INSERT INTO c_diary_comment_log (c_diary_comment_log_id, c_member_id, c_diary_id, r_datetime) 245 (SELECT NULL, tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id,261 (SELECT nextval('c_diary_comment_log_c_diary_comment_log_id_seq'), tmp_c_diary_comment_log.c_member_id, tmp_c_diary_comment_log.c_diary_id, 246 262 tmp_c_diary_comment_log.r_datetime as r_datetime 247 263 FROM tmp_c_diary_comment_log 248 264 INNER JOIN c_diary USING (c_diary_id) … … 260 276 sort_order int4 NOT NULL default '0', 261 277 is_enabled smallint NOT NULL default '0', 262 278 PRIMARY KEY (c_cmd_caster_id), 263 UNIQUE url(url)279 UNIQUE (url) 264 280 ); 265 281 266 ALTER TABLE c_cmd ADD COLUMN url varchar(128) NOT NULL default ''; 267 DROP INDEX name; 268 DROP INDEX name_2; 269 ALTER TABLE c_cmd ADD COLUMN c_cmd_caster_id int4 NOT NULL default '0'; 270 ALTER TABLE c_cmd ADD COLUMN r_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 271 ALTER TABLE c_cmd ADD COLUMN u_datetime timestamp NOT NULL default '0000-01-01 00:00:00'; 282 ALTER TABLE c_cmd ADD COLUMN url varchar(128); 283 ALTER TABLE c_cmd ALTER COLUMN url SET DEFAULT ''; 284 UPDATE c_cmd SET url = ''; 285 ALTER TABLE c_cmd ALTER COLUMN url SET NOT NULL; 272 286 287 ALTER TABLE c_cmd DROP CONSTRAINT "c_cmd_name_key"; 288 DROP INDEX c_cmd_name_2; 289 290 ALTER TABLE c_cmd ADD COLUMN c_cmd_caster_id int4; 291 ALTER TABLE c_cmd ALTER COLUMN c_cmd_caster_id SET DEFAULT '0'; 292 UPDATE c_cmd SET c_cmd_caster_id = '0'; 293 ALTER TABLE c_cmd ALTER COLUMN c_cmd_caster_id SET NOT NULL; 294 295 ALTER TABLE c_cmd ADD COLUMN r_datetime timestamp; 296 ALTER TABLE c_cmd ALTER COLUMN r_datetime SET DEFAULT '0000-01-01 00:00:00'; 297 UPDATE c_cmd SET r_datetime = '0000-01-01 00:00:00'; 298 ALTER TABLE c_cmd ALTER COLUMN r_datetime SET NOT NULL; 299 300 ALTER TABLE c_cmd ADD COLUMN u_datetime timestamp; 301 ALTER TABLE c_cmd ALTER COLUMN u_datetime SET DEFAULT '0000-01-01 00:00:00'; 302 UPDATE c_cmd SET u_datetime = '0000-01-01 00:00:00'; 303 ALTER TABLE c_cmd ALTER COLUMN u_datetime SET NOT NULL; 304 273 305 -- update15 274 ALTER TABLE c_member_config ADD COLUMN name varchar(64) NOT NULL default ''; 306 ALTER TABLE c_member_config ADD COLUMN name varchar(64); 307 ALTER TABLE c_member_config ALTER COLUMN name SET DEFAULT ''; 308 UPDATE c_member_config SET name = ''; 309 ALTER TABLE c_member_config ALTER COLUMN name SET NOT NULL; 275 310 276 311 UPDATE c_member_config SET name = c_member_config_option.name 277 312 FROM c_member_config_option -
public_html/xhtml_style.php
775 775 right: 3px; 776 776 } 777 777 .diaryDetailBox dl { 778 zoom: 1; 779 overflow: hidden; 780 overflow: -moz-scrollbars-none; 778 781 border-top: 1px solid #<?php echo $colors[1]; ?>; 779 782 } 780 783 .diaryDetailBox dt { … … 824 827 * 9. topicDetailBox(トピック詳細ボックス) 825 828 *----------------------------------------------------------------------------*/ 826 829 .topicDetailBox dl { 830 zoom: 1; 831 overflow: hidden; 832 overflow: -moz-scrollbars-none; 827 833 border-top: 1px solid #<?php echo $colors[1]; ?>; 828 834 } 829 835 .topicDetailBox dt { … … 864 870 * 10. eventDetailBox(イベント詳細ボックス) 865 871 *----------------------------------------------------------------------------*/ 866 872 .eventDetailBox dl { 873 zoom: 1; 874 overflow: hidden; 875 overflow: -moz-scrollbars-none; 867 876 border-top: 1px solid #<?php echo $colors[1]; ?>; 868 877 } 869 878 .eventDetailBox dt { … … 1159 1168 * 22. commentList(コメントリスト) 1160 1169 *----------------------------------------------------------------------------*/ 1161 1170 .commentList dl { 1162 border-top: 1px solid #<?php echo $colors[1]; ?>; overflow:hidden; 1171 zoom: 1; 1172 overflow: hidden; 1173 overflow: -moz-scrollbars-none; 1174 border-top: 1px solid #<?php echo $colors[1]; ?>; 1163 1175 } 1164 1176 .commentList dt { 1165 1177 float: left; … … 1337 1349 * 25. recentList(最新書き込みリスト) 1338 1350 *----------------------------------------------------------------------------*/ 1339 1351 .recentList dl { 1352 zoom: 1; 1353 overflow: hidden; 1354 overflow: -moz-scrollbars-none; 1340 1355 border-top: 1px solid #<?php echo $colors[1]; ?>; 1341 1356 } 1342 1357 .recentList dt { 1343 clear: both;1344 1358 float: left; 1345 1359 width: 170px; 1346 1360 padding: 5px; … … 1352 1366 padding: 5px; 1353 1367 border-left: 1px solid #<?php echo $colors[1]; ?>; 1354 1368 } 1369 * html #Body .recentList dd { 1370 height: 1.2em; 1371 } 1355 1372 #LayoutB #Center .recentList dt { 1356 1373 width: 110px; 1357 1374 } … … 1647 1664 border: 1px solid #<?php echo $colors[1]; ?>; 1648 1665 } 1649 1666 .bizSideScheduleList dl { 1667 zoom: 1; 1650 1668 overflow: hidden; 1669 overflow: -moz-scrollbars-none; 1651 1670 border-top: 1px solid #<?php echo $colors[1]; ?>; 1652 1671 } 1653 1672 .bizSideScheduleList dt { -
public_html/cmd/openpne/pc_page_fh_album.js
8 8 var target_c_album_id = RegExp.$2; 9 9 10 10 var xml_url = openpne_url + "?m=pc&a=page_fh_album_output_xml&target_c_album_id=" + target_c_album_id; 11 12 var request_headers = []; 13 if (Prototype.Browser.IE) { 14 request_headers.push('If-Modified-Since', 'Thu, 01 Jun 1970 00:00:00 GMT'); 15 } 16 11 17 new Ajax.Request(xml_url, { 12 18 asynchronous : false , 13 19 method: "get", … … 55 61 56 62 onFailure: function(obj) { 57 63 pne_url2a(url); 58 } 64 }, 65 66 requestHeaders: request_headers 59 67 }); 60 68 } -
public_html/cmd/openpne/pc_page_fh_album_image_show.js
7 7 var openpne_url = RegExp.$1; 8 8 var target_c_album_image_id = RegExp.$2; 9 9 10 var request_headers = []; 11 if (Prototype.Browser.IE) { 12 request_headers.push('If-Modified-Since', 'Thu, 01 Jun 1970 00:00:00 GMT'); 13 } 14 10 15 var xml_url = openpne_url + "?m=pc&a=page_fh_album_image_show_output_xml&target_c_album_image_id=" + target_c_album_image_id; 11 16 new Ajax.Request(xml_url, { 12 17 asynchronous : false , … … 37 42 38 43 onFailure: function(obj) { 39 44 pne_url2a(url); 40 } 45 }, 46 47 requestHeaders: request_headers 41 48 }); 42 49 } -
public_html/modules/portal/css/master.css
84 84 .contents div.PatternF div.innerBox li:after { content: " "; display: block; visibility: hidden; clear: both; height: 0.1px; font-size: 0.1em; line-height: 0;} 85 85 .contents div.PatternF div.innerBox li { display:inline-block; min-height:1%;} 86 86 /* no ie mac \*/ 87 * html .contents div.PatternF div.innerBox li ,88 .contents div.PatternF div.innerBox li ,87 * html .contents div.PatternF div.innerBox li { height:1%;} 88 .contents div.PatternF div.innerBox li { display:block;} 89 89 /* */ -
public_html/js/offspring.js.src
638 638 639 639 index++; // normalize since the arrays are indexed with a "1" starting point 640 640 641 if (this.configuration.targetElement instanceof Array && this.configuration.targetElement.length) { 642 var isTargetElement = false; 643 644 for (key in this.configuration.targetElement) { 645 if (element.nodeName.toLowerCase() == this.configuration.targetElement[key]) { 646 isTargetElement = true; 647 break; 648 } 649 } 650 651 if (!isTargetElement) { 652 return; 653 } 654 } 655 656 641 657 // Steps if the element has no existing classnames... 642 658 643 659 if ((!element.className) || (!element.className.length)) … … 1093 1109 1094 1110 1095 1111 // Kick off 1096 offspring.init(); 1097 No newline at end of file 1112 offspring.init(); -
public_html/js/offspring.js.org
1 /* 2 Offspring.js -- adds the following classes as needed: 3 4 .first-child 5 .last-child 6 .only-child 7 .nth-child-odd 8 .nth-child-even 9 .nth-child-## 10 11 Configuration: 12 13 Offspring can be configured by defining an "offspringConfiguration" 14 object before referencing offspring.js. That object can contain 15 one or more of these parameters. (If any parameter is omitted -- which 16 is fine -- it gets the default value as described below.) 17 18 offspringConfiguration = 19 { 20 runningMode: 'full', <-- valid values are 'full' and 'light' (default: 'full') 21 autoStart: true, <-- valid values are true and false (default: true) 22 shouldRemoveOldOffspringClassesFirst: false <-- valid values are true and false (default: false) 23 } 24 25 * runningMode: 26 'full' -- Offspring applies all of its classes (as listed at the very top) [default] 27 'light' -- Offspring only applies 'first-child', 'last-child', and 'only-child', 28 omitting 'nth-child-odd', 'nth-child-even', and 'nth-child-##'. 29 (This may allow for faster page-processing in certain scenarios.) 30 31 * autoStart: 32 true -- Offspring runs automatically as soon as the DOM is ready [default] 33 false -- Offspring must be run manually. This can be done by calling Offspring.start(); 34 35 * shouldRemoveOldOffspringClassesFirst: 36 true --Offspring first removes any old Offspring classes before applying the new ones. 37 (This might be of use if Offspring is to be called on a page that has already 38 been processed, such as if a table has been sorted or content has been loaded 39 via Ajax.) 40 false -- Offspring applies its classes without first removing old Offspring classes that 41 might be there. Unless you're doing fancy DOM updates, this is probably the 42 better option in most cases. [default] 43 44 ================================================================== */ 45 46 47 var offspring = { 48 firstChildClass: "first-child", 49 lastChildClass: "last-child", 50 oddChildClass: "nth-child-odd", 51 evenChildClass: "nth-child-even", 52 onlyChildClass: "only-child", 53 nthChildClassPrefix: "nth-child-", 54 55 classNamesArray: [], 56 classNameSubstringsArray: [], 57 58 cacheLevel: 0, // current size of the classNames cache 59 60 nthChildren: [], 61 62 regularHashTable: [], 63 regularHashTableArray: [], 64 65 lastChildHashTable: [], 66 lastChildHashTableArray: [], 67 68 /* Configuration defaults */ 69 configuration: 70 { 71 runningMode: 'full', /* Possible values: 'full' / 'light' */ 72 autoStart: true, /* If Offspring is configured in autoStart mode (which it is by default), 73 it runs as soon as the DOM is ready */ 74 shouldRemoveOldOffspringClassesFirst: false /* If this is set to 'true', Offspring first 75 removes any old Offspring-related classes 76 before applying the new ones */ 77 }, 78 79 // Initialize 80 init: function() { 81 82 /* 83 Offspring's configuration is stored in Offspring.configuration, but 84 that con be overridden by users by defining an "offspringConfiguratin" 85 object. 86 */ 87 if (typeof offspringConfiguration != "undefined") 88 { 89 for (var configParameter in offspringConfiguration) 90 { 91 this.configuration[configParameter] = offspringConfiguration[configParameter]; 92 } 93 94 // Make sure this option is stored in lowercase 95 this.configuration.runningMode = this.configuration.runningMode.toLowerCase(); 96 } 97 98 99 /* Set the values for classNamesArray & classNameSubstringArray */ 100 101 switch (this.configuration.runningMode) 102 { 103 case 'full': 104 // this represents all possible offspring-related classnames 105 this.classNamesArray = [this.firstChildClass, this.lastChildClass, this.oddChildClass, this.evenChildClass, this.onlyChildClass]; 106 107 // this represents a list of substrings to match such as for removing classNames 108 this.classNameSubstringsArray = [this.nthChildClassPrefix]; 109 break; 110 111 case 'light': 112 // this represents all possible offspring-related classnames 113 this.classNamesArray = [this.firstChildClass, this.lastChildClass, this.onlyChildClass]; 114 115 // this represents a list of substrings to match such as for removing classNames 116 this.classNameSubstringsArray = []; 117 break; 118 } 119 120 // Define the iterator function on-the-fly depending 121 // on the configuration options that were sent in 122 this.defineTraverseChildrenFunction(); 123 124 // Define the fillCacheTo funtion's iterator on-the-fly 125 // depending on the configuration options that were sent in 126 this.defineFillCacheToFunction(); 127 this.fillCacheTo(); // seed the cache with a basic set of values 128 129 130 /* If Offspring is configured in autoStart mode (which it is by default), 131 it runs as soon as the DOM is ready */ 132 if (this.configuration.autoStart) 133 { 134 var _this = this; // Closure 135 136 this.ContentLoaded(window, function() { 137 _this.start(); 138 }); 139 } 140 141 }, 142 143 // Executed once the page has loaded 144 start: function() { 145 var startTime = new Date(); 146 147 this.traverseChildren(document.getElementsByTagName("body")[0]); 148 149 var endTime = new Date(); 150 // alert("Offspring Exec time: " + (endTime.getTime() - startTime.getTime()) + "ms"); 151 // window.status += "Offspring Exec time: " + (endTime.getTime() - startTime.getTime()) + "ms"; 152 153 }, 154 155 /* Maintenance note for defineTraverseChildrenFunction: 156 157 There are several blocks of code that are marked off as "traverseChildren.A" 158 or "traverseChildren.B" -- each of these are identical, respectively. (That is, 159 all "traverseChildren.A" blocks are the same and all "traverseChildren.B" are 160 the same.) 161 162 So, why not just create a function where the code can be kept in one place? 163 While normally a sensible idea, I decided against that approach only so 164 that the speed hits associated with the creation of the function stack 165 could be averted. At the same time, I didn't want to compromise 166 the code's maintainability; so, if any block needs to be updated, they 167 can all be kept in sync with some basic copy-n-pasting from one 168 block to the next. 169 */ 170 171 172 /* This defines the internal iterator function on-the-fly, 173 depending on the configuration options */ 174 defineTraverseChildrenFunction: function() { 175 176 switch (this.configuration.shouldRemoveOldOffspringClassesFirst) 177 { 178 case true: // shouldRemoveOldOffspringClassesFirst is true 179 180 switch (this.configuration.runningMode) 181 { 182 case 'full': // 'full' running mode and shouldRemoveOldOffspringClassesFirst is true 183 this.traverseChildren = function(parent) 184 { 185 /* ============= Begin Code Block "traverseChildren.A" ================ */ 186 187 // If the node has no children, exit 188 if (!parent.childNodes.length) return; 189 190 191 /* First, gather up all the element nodes */ 192 var childElementNodes = []; 193 194 var testNode = parent.childNodes[0]; // initialize 195 196 while (testNode) 197 { 198 if (testNode.nodeType == 1) 199 { 200 childElementNodes.push(testNode); 201 } 202 testNode = testNode.nextSibling; 203 } 204 205 /* 206 empty this variable to ensure that the JavaScript 207 interpreter doesn't have to update the variable's 208 nodelist as DOM changes are made 209 */ 210 testNode = null; 211 212 var childElementNodesLength = childElementNodes.length; 213 214 // If no element nodes were found, exit 215 if (!childElementNodesLength) return; 216 217 // Make sure that the CSS-classnames cache has enough entries to cover 218 // the number of child nodes 219 if (childElementNodesLength > this.cacheLevel) 220 { 221 this.fillCacheTo(childElementNodesLength); 222 } 223 224 var lastIndex = childElementNodesLength - 1; // index of the last element node 225 226 /* ============= /End Code Block "traverseChildren.A" ================ */ 227 228 // First, take care of all but the last element 229 for (var i = 0; i < lastIndex; i++) 230 { 231 var currentElement = childElementNodes[i]; 232 233 this.removeMultipleClassNames(currentElement, this.classNamesArray, this.classNameSubstringsArray); 234 235 // argument syntax: node to act upon, current index, boolean for whether isLast 236 this._addOffspringClassNames(currentElement, i, false); 237 this.traverseChildren(currentElement); 238 } 239 240 currentElement = null; // prevent memory leaks 241 242 // Then, take care of the last one 243 var lastElement = childElementNodes[lastIndex]; 244 245 this.removeMultipleClassNames(lastElement, this.classNamesArray, this.classNameSubstringsArray); 246 247 this._addOffspringClassNames(lastElement, lastIndex, true); 248 this.traverseChildren(lastElement); 249 250 lastElement = null; // prevent memory leaks 251 252 /* ============= Begin Code Block "traverseChildren.B" ================ */ 253 254 // prevent memory leaks 255 lastElement = null; 256 parent = null; 257 258 /* ============= /End Code Block "traverseChildren.B" ================ */ 259 260 }; // end of traverseChildren function definition 261 break; 262 263 case 'light': // 'light' running mode and shouldRemoveOldOffspringClassesFirst is true 264 this.traverseChildren = function(parent) 265 { 266 /* ============= Begin Code Block "traverseChildren.A" ================ */ 267 268 // If the node has no children, exit 269 if (!parent.childNodes.length) return; 270 271 272 /* First, gather up all the element nodes */ 273 var childElementNodes = []; 274 275 var testNode = parent.childNodes[0]; // initialize 276 277 while (testNode) 278 { 279 if (testNode.nodeType == 1) 280 { 281 childElementNodes.push(testNode); 282 } 283 testNode = testNode.nextSibling; 284 } 285 286 /* 287 empty this variable to ensure that the JavaScript 288 interpreter doesn't have to update the variable's 289 nodelist as DOM changes are made 290 */ 291 testNode = null; 292 293 var childElementNodesLength = childElementNodes.length; 294 295 // If no element nodes were found, exit 296 if (!childElementNodesLength) return; 297 298 // Make sure that the CSS-classnames cache has enough entries to cover 299 // the number of child nodes 300 if (childElementNodesLength > this.cacheLevel) 301 { 302 this.fillCacheTo(childElementNodesLength); 303 } 304 305 var lastIndex = childElementNodesLength - 1; // index of the last element node 306 307 /* ============= /End Code Block "traverseChildren.A" ================ */ 308 309 switch (childElementNodesLength) 310 { 311 case 0: return; 312 break; 313 314 case 1: 315 /* Take care of the only element */ 316 317 var onlyElement = childElementNodes[0]; 318 this.removeMultipleClassNames(onlyElement, this.classNamesArray, this.classNameSubstringsArray); 319 320 // argument syntax: node to act upon, current index, boolean for whether isLast 321 this._addOffspringClassNames( onlyElement, lastIndex, true ); 322 323 onlyElement = null; // prevent memory leaks 324 325 break; 326 327 default: 328 /* Take care of the first element */ 329 330 var firstElement = childElementNodes[0]; 331 this.removeMultipleClassNames(firstElement, this.classNamesArray, this.classNameSubstringsArray); 332 333 // argument syntax: node to act upon, current index, boolean for whether isLast 334 this._addOffspringClassNames( firstElement, 0, false ); 335 336 firstElement = null; // prevent memory leaks 337 338 /* Take care of the last element */ 339 340 var lastElement = childElementNodes[lastIndex]; 341 this.removeMultipleClassNames(lastElement, this.classNamesArray, this.classNameSubstringsArray); 342 343 // argument syntax: node to act upon, current index, boolean for whether isLast 344 this._addOffspringClassNames( lastElement , lastIndex, true ); 345 346 lastElement = null; // prevent memory leaks 347 348 break; 349 350 } // end of switch statement for childElementNodesLength 351 352 // Lastly, loop over all the childern elements 353 for (var i = 0; i < childElementNodesLength; i++) 354 { 355 this.traverseChildren( childElementNodes[i] ); 356 } 357 358 /* ============= Begin Code Block "traverseChildren.B" ================ */ 359 360 // prevent memory leaks 361 lastElement = null; 362 parent = null; 363 364 /* ============= /End Code Block "traverseChildren.B" ================ */ 365 366 }; // end of traverseChildren function definition 367 368 break; 369 370 } // end of switch-statement for configuration.runningMode 371 372 break; 373 374 case false: // shouldRemoveOldOffspringClassesFirst is false 375 376 switch (this.configuration.runningMode) 377 { 378 case 'full': // 'full' running mode and shouldRemoveOldOffspringClassesFirst is false 379 this.traverseChildren = function(parent) 380 { 381 /* ============= Begin Code Block "traverseChildren.A" ================ */ 382 383 // If the node has no children, exit 384 if (!parent.childNodes.length) return; 385 386 387 /* First, gather up all the element nodes */ 388 var childElementNodes = []; 389 390 var testNode = parent.childNodes[0]; // initialize 391 392 while (testNode) 393 { 394 if (testNode.nodeType == 1) 395 { 396 childElementNodes.push(testNode); 397 } 398 testNode = testNode.nextSibling; 399 } 400 401 /* 402 empty this variable to ensure that the JavaScript 403 interpreter doesn't have to update the variable's 404 nodelist as DOM changes are made 405 */ 406 testNode = null; 407 408 var childElementNodesLength = childElementNodes.length; 409 410 // If no element nodes were found, exit 411 if (!childElementNodesLength) return; 412 413 // Make sure that the CSS-classnames cache has enough entries to cover 414 // the number of child nodes 415 if (childElementNodesLength > this.cacheLevel) 416 { 417 this.fillCacheTo(childElementNodesLength); 418 } 419 420 var lastIndex = childElementNodesLength - 1; // index of the last element node 421 422 /* ============= /End Code Block "traverseChildren.A" ================ */ 423 424 // First, take care of all but the last element 425 for (var i = 0; i < lastIndex; i++) 426 { 427 var currentElement = childElementNodes[i]; 428 429 // argument syntax: node to act upon, current index, boolean for whether isLast 430 this._addOffspringClassNames(currentElement, i, false); 431 this.traverseChildren(currentElement); 432 } 433 434 currentElement = null; // prevent memory leaks 435 436 /* 437 Then, take care of the last one 438 (this set of code isn't integrated into 439 the for-loop above so as to avoid having 440 an addiitional if-statement inside there) 441 */ 442 var lastElement = childElementNodes[lastIndex]; 443 444 this._addOffspringClassNames(lastElement, lastIndex, true); 445 this.traverseChildren(lastElement); 446 lastElement = null; // prevent memory leaks 447 448 /* ============= Begin Code Block "traverseChildren.B" ================ */ 449 450 // prevent memory leaks 451 lastElement = null; 452 parent = null; 453 454 /* ============= /End Code Block "traverseChildren.B" ================ */ 455 456 }; // end of traverseChildren function definition 457 break; 458 459 case 'light': // 'light' running mode and shouldRemoveOldOffspringClassesFirst is false 460 this.traverseChildren = function(parent) 461 { 462 /* ============= Begin Code Block "traverseChildren.A" ================ */ 463 464 // If the node has no children, exit 465 if (!parent.childNodes.length) return; 466 467 468 /* First, gather up all the element nodes */ 469 var childElementNodes = []; 470 471 var testNode = parent.childNodes[0]; // initialize 472 473 while (testNode) 474 { 475 if (testNode.nodeType == 1) 476 { 477 childElementNodes.push(testNode); 478 } 479 testNode = testNode.nextSibling; 480 } 481 482 /* 483 empty this variable to ensure that the JavaScript 484 interpreter doesn't have to update the variable's 485 nodelist as DOM changes are made 486 */ 487 testNode = null; 488 489 var childElementNodesLength = childElementNodes.length; 490 491 // If no element nodes were found, exit 492 if (!childElementNodesLength) return; 493 494 // Make sure that the CSS-classnames cache has enough entries to cover 495 // the number of child nodes 496 if (childElementNodesLength > this.cacheLevel) 497 { 498 this.fillCacheTo(childElementNodesLength); 499 } 500 501 var lastIndex = childElementNodesLength - 1; // index of the last element node 502 503 /* ============= /End Code Block "traverseChildren.A" ================ */ 504 505 switch (childElementNodesLength) 506 { 507 case 0: break; 508 509 case 1: 510 /* Take care of the only element */ 511 512 // argument syntax: node to act upon, current index, boolean for whether isLast 513 this._addOffspringClassNames( childElementNodes[0], lastIndex, true ); 514 515 // Lastly, loop over all the childern elements 516 for (var i = 0; i < childElementNodesLength; i++) 517 { 518 this.traverseChildren( childElementNodes[i] ); 519 } 520 521 break; 522 523 default: 524 /* Take care of the first element */ 525 526 // argument syntax: node to act upon, current index, boolean for whether isLast 527 this._addOffspringClassNames( childElementNodes[0], 0, false ); 528 529 /* Take care of the last element */ 530 531 // argument syntax: node to act upon, current index, boolean for whether isLast 532 this._addOffspringClassNames( childElementNodes[lastIndex] , lastIndex, true ); 533 534 // Lastly, loop over all the childern elements 535 for (var i = 0; i < childElementNodesLength; i++) 536 { 537 this.traverseChildren( childElementNodes[i] ); 538 } 539 540 break; 541 } 542 543 /* ============= Begin Code Block "traverseChildren.B" ================ */ 544 545 // prevent memory leaks 546 lastElement = null; 547 parent = null; 548 549 /* ============= /End Code Block "traverseChildren.B" ================ */ 550 551 }; // end of traverseChildren function definition 552 553 break; 554 } // end of switch-statement for configuration.runningMode 555 556 break; 557 558 } // end of switch-statement for configuration.shouldRemoveOldOffspringClassesFirst 559 560 }, // end of defineTraverseChildrenFunction 561 562 // Recursive 563 564 /* 565 If "shouldRemoveOldOffspringClassesFirst" is deined and set to true 566 (it's optional), traverseChildren will remove old Offspring-related 567 classes before applying new ones to a node. This could be useful 568 for reapplying classes if the DOM is rejiggered. 569 */ 570 571 traverseChildren: function(parent) { 572 573 /* ============= Begin Code Block "traverseChildren.A" ================ */ 574 575 // If the node has no children, exit 576 if (!parent.childNodes.length) return; 577 578 579 /* First, gather up all the element nodes */ 580 var childElementNodes = []; 581 582 var testNode = parent.childNodes[0]; // initialize 583 584 while (testNode) 585 { 586 if (testNode.nodeType == 1) 587 { 588 childElementNodes.push(testNode); 589 } 590 testNode = testNode.nextSibling; 591 } 592 593 /* 594 empty this variable to ensure that the JavaScript 595 interpreter doesn't have to update the variable's 596 nodelist as DOM changes are made 597 */ 598 testNode = null; 599 600 var childElementNodesLength = childElementNodes.length; 601 602 // If no element nodes were found, exit 603 if (!childElementNodesLength) return; 604 605 // Make sure that the CSS-classnames cache has enough entries to cover 606 // the number of child nodes 607 if (childElementNodesLength > this.cacheLevel) 608 { 609 this.fillCacheTo(childElementNodesLength); 610 } 611 612 var lastIndex = childElementNodesLength - 1; // index of the last element node 613 614 /* ============= /End Code Block "traverseChildren.A" ================ */ 615 616 617 /* ==== Add the classes ====== */ 618 619 this._childrenIterator(childElementNodes, childElementNodesLength, lastIndex); 620 621 622 /* ============= Begin Code Block "traverseChildren.B" ================ */ 623 624 // prevent memory leaks 625 lastElement = null; 626 parent = null; 627 628 /* ============= /End Code Block "traverseChildren.B" ================ */ 629 630 }, 631 632 /* 633 This function adds the Offspring classnames to a given element, 634 given its position among it siblings (with zero being "first") 635 and whether it's the last element in its set. 636 */ 637 _addOffspringClassNames: function(element, index, isLastElement) { 638 639 index++; // normalize since the arrays are indexed with a "1" starting point 640 641 // Steps if the element has no existing classnames... 642 643 if ((!element.className) || (!element.className.length)) 644 { 645 switch (isLastElement) 646 { 647 case false: // it isn't the last element 648 element.className = this.regularHashTable[index]; 649 return; 650 break; 651 652 case true: // it is the last element 653 element.className = this.lastChildHashTable[index]; 654 return; 655 break; 656 657 } // end of isLastElement switch-statement 658 659 } // end of if-statement for checking whether the element has no existing className 660 661 // At this point, the incoming element already has className(s) 662 663 switch (isLastElement) 664 { 665 case false: // it isn't the last element 666 var applicableClassNames = this.regularHashTableArray[index]; 667 break; 668 669 case true: // it is the last element 670 var applicableClassNames = this.lastChildHashTableArray[index]; 671 break; 672 673 } // end of isLastElement switch-statement 674 675 var originalClassNames = element.className.split(' '); 676 677 var classNamesToAdd = originalClassNames; // initialize 678 679 for (var i = 0, applicableClassNamesLength = applicableClassNames.length; i < applicableClassNamesLength; i++) 680 { 681 var alreadyThere = false; // boolean for whether a given class name is already assigned to the element 682 683 var testApplicableClassName = applicableClassNames[i]; 684 685 for (var j = 0, originalClassNamesLength = originalClassNames.length; j < originalClassNamesLength; j++) 686 { 687 if (originalClassNames[j] == testApplicableClassName) 688 { 689 alreadyThere = true; 690 break; 691 } // end of if-statement for checking if the element already has a given className 692 693 } // end of the originalClassNames for-loop 694 695 if (!alreadyThere) 696 { 697 classNamesToAdd.push(testApplicableClassName); 698 } 699 700 } // end of applicableClassNames for-loop 701 702 703 // Then, after checking over the element's existing classNames, add the new version 704 element.className = classNamesToAdd.join(' '); 705 element = null; // prevent memory leaks 706 707 return; 708 709 }, // end of _addOffspringClassNames() 710 711 /* Maintenance note for defineFillCacheToFunction: 712 713 [Aside: This is basically conveys the same idea as the comment above 714 defineTraverseChildrenFunction. So, if you're read that one, you 715 probably already have the basic idea of what's going on here.] 716 717 There are several blocks of code that are marked off as "fillCacheTo.A" 718 or "fillCacheTo.B" -- each of these are identical, respectively. (That is, 719 all "fillCacheTo.A" blocks are the same and all "fillCacheTo.B" are 720 the same.) 721 722 So, why not just create a function where the code can be kept in one place? 723 While normally a sensible idea, I decided against that approach only so 724 that the speed hits associated with the creation of the function stack 725 could be averted. At the same time, I didn't want to compromise 726 the code's maintainability; so, if any block needs to be updated, they 727 can all be kept in sync with some basic copy-n-pasting from one 728 block to the next. 729 */ 730 731 732 /* This defines the internal loop function for fillCacheTo, 733 depending on how the configuration options are set */ 734 defineFillCacheToFunction: function() { 735 736 switch (this.configuration.runningMode) 737 { 738 case 'full': // 'full' running mode 739 this.fillCacheTo = function(fillAmount) 740 { 741 /* ============= Begin Code Block "fillCacheTo.A" ================ */ 742 743 var fillAmount = fillAmount || 15; // default value 744 745 if (!this.cacheLevel) this.cacheLevel = 0; // set this to a default value if needed 746 747 // If the cache level is already full enough, exit 748 if (this.cacheLevel >= fillAmount) return; 749 750 var startingPoint = this.cacheLevel++; 751 752 /* ============= /End Code Block "fillCacheTo.A" ================ */ 753 754 var isOdd = !((startingPoint % 2) == 0); // initialize 755 756 // cache these object name resolutions 757 var firstChildClass = this.firstChildClass; 758 var lastChildClass = this.lastChildClass; 759 var oddChildClass = this.oddChildClass; 760 var evenChildClass = this.evenChildClass; 761 var onlyChildClass = this.onlyChildClass; 762 var nthChildClassPrefix = this.nthChildClassPrefix; 763 764 for (var i = startingPoint; i <= fillAmount; i++) 765 { 766 this.nthChildren[i] = [nthChildClassPrefix, i].join(''); 767 768 var nthChildrenI = this.nthChildren[i]; // cache this look-up 769 770 switch (i) 771 { 772 case 1: 773 this.regularHashTableArray[i] = [firstChildClass, oddChildClass, nthChildrenI]; 774 this.lastChildHashTableArray[i] = [firstChildClass, oddChildClass, onlyChildClass, nthChildrenI, lastChildClass]; 775 break; 776 777 default: 778 switch (isOdd) 779 { 780 case true: // "odd" is true 781 this.regularHashTableArray[i] = [oddChildClass, nthChildrenI]; 782 this.lastChildHashTableArray[i] = [oddChildClass, nthChildrenI, lastChildClass]; 783 break; 784 785 case false: // "odd" is false 786 this.regularHashTableArray[i] = [evenChildClass, nthChildrenI]; 787 this.lastChildHashTableArray[i] = [evenChildClass, nthChildrenI, lastChildClass]; 788 break; 789 790 } // end of isOdd switch-statement 791 792 793 } // end of switch-statement for i 794 795 // Now make the joined versions for a given "i" 796 797 this.regularHashTable[i] = this.regularHashTableArray[i].join(' '); 798 this.lastChildHashTable[i] = this.lastChildHashTableArray[i].join(' '); 799 800 isOdd = !isOdd; // flip the isOdd flag 801 802 } // end of filling for-loop 803 804 /* ============= Begin Code Block "fillCacheTo.B" ================ */ 805 806 // If it got this far, the cacheLevel must made it to the fill amount, so update that 807 this.cacheLevel = fillAmount; 808 809 /* ============= /End Code Block "fillCacheTo.B" ================ */ 810 811 }; // end of fillCacheTo function definition 812 break; 813 814 case 'light': // 'light' running mode 815 this.fillCacheTo = function(fillAmount) 816 { 817 /* ============= Begin Code Block "fillCacheTo.A" ================ */ 818 819 var fillAmount = fillAmount || 15; // default value 820 821 if (!this.cacheLevel) this.cacheLevel = 0; // set this to a default value if needed 822 823 // If the cache level is already full enough, exit 824 if (this.cacheLevel >= fillAmount) return; 825 826 var startingPoint = this.cacheLevel++; 827 828 /* ============= /End Code Block "fillCacheTo.A" ================ */ 829 830 // cache these object name resolutions 831 var firstChildClass = this.firstChildClass; 832 var lastChildClass = this.lastChildClass; 833 834 var onlyChildClass = this.onlyChildClass; 835 836 for (var i = startingPoint; i <= fillAmount; i++) 837 { 838 839 switch (i) 840 { 841 case 1: 842 this.regularHashTableArray[i] = [firstChildClass]; 843 this.lastChildHashTableArray[i] = [firstChildClass, onlyChildClass, lastChildClass]; 844 break; 845 846 default: 847 848 this.regularHashTableArray[i] = []; 849 this.lastChildHashTableArray[i] = [lastChildClass]; 850 851 } // end of switch-statement for i 852 853 // Now make the joined versions for a given "i" 854 855 this.regularHashTable[i] = this.regularHashTableArray[i].join(' '); 856 this.lastChildHashTable[i] = this.lastChildHashTableArray[i].join(' '); 857 858 } // end of filling for-loop 859 860 /* ============= Begin Code Block "fillCacheTo.B" ================ */ 861 862 // If it got this far, the cacheLevel must made it to the fill amount, so update that 863 this.cacheLevel = fillAmount; 864 865 /* ============= /End Code Block "fillCacheTo.B" ================ */ 866 867 }; // end of fillCacheTo function definition 868 break; 869 870 } // end of switch statement for this.configuration.runningMode 871 872 }, // end of defineFillCacheToFunction 873 874 // This fills the className caches to the specified amount 875 fillCacheTo: function(fillAmount) { 876 877 /* ============= Begin Code Block "fillCacheTo.A" ================ */ 878 879 var fillAmount = fillAmount || 15; // default value 880 881 if (!this.cacheLevel) this.cacheLevel = 0; // set this to a default value if needed 882 883 // If the cache level is already full enough, exit 884 if (this.cacheLevel >= fillAmount) return; 885 886 var startingPoint = this.cacheLevel++; 887 888 /* ============= /End Code Block "fillCacheTo.A" ================ */ 889 890 this._fillCacheToIterator(startingPoint, fillAmount); 891 892 /* ============= Begin Code Block "fillCacheTo.B" ================ */ 893 894 // If it got this far, the cacheLevel must made it to the fill amount, so update that 895 this.cacheLevel = fillAmount; 896 897 /* ============= /End Code Block "fillCacheTo.B" ================ */ 898 899 }, // end of fillCacheTo() 900 901 /* Returns true if testString is found in the array, 902 or returns false otherwise */ 903 _checkIfStringFoundInArray: function(testString, testArray) { 904 905 // Loop through all testArray[] and if/when there's a match, return true 906 for (var i = 0, len=testArray.length; i < len; i++) 907 { 908 if (testString == testArray[i]) return true; 909 } 910 911 // If it got this far, it must not have found the string in the array 912 return false; 913 914 }, // end of _checkIfStringFoundInArray 915 916 /* Returns true if the beginning of testString matches one of the substrings 917 in the array. Otherwise, it returns false. 918 919 For example, given the array ['plum', 'orange', 'pine'] and 920 the testString 'pineapples', the function would return true. However, 921 given the testString 'range', it would return false (since none of 922 the strings in the array start with 'range') 923 */ 924 _checkIfStringMatchInSubstringArray: function(testString, testArray) { 925 926 // Loop through all testArray[] and if/when there's a match, return true 927 for (var i = 0, len=testArray.length; i < len; i++) 928 { 929 var currentArrayItem = testArray[i]; 930 931 /* string.substr() accepts two parameters: 932 - The starting point of the substring 933 - The length of the substring 934 */ 935 var testSubstring = testString.substr(0, currentArrayItem.length); 936 937 if (testSubstring == currentArrayItem) return true; 938 } 939 940 // If it got this far, it must not have found the string in the array 941 return false; 942 943 }, // end of _checkIfStringMatchInSubstringArray 944 945 /* 946 This removes multiple classnames from an element. It does this by 947 checking each of an element's class names against 948 classNameStrings[] for an exact match and, if a given class name 949 didn't match there, it's then checked to see if it matches 950 as a substring against classNAmeSubstrings[]. 951 952 Of note, when comparing substrings, this intentionally only compares 953 the beginning of the strings for a match. So, for example, "ora" would 954 match as a substring of "orange", but "range" would not match as a substring 955 of "orange". It was done this way because that was the only type of substring- 956 comparison that was needed in this case, and a more thorough substring 957 comparison would needlesslly use processor time. 958 */ 959 removeMultipleClassNames: function(element, classNameStrings, classNameSubstrings) { 960 961 if (!element) return; 962 var newClassName = ''; 963 var classNamesArray = element.className.split(' '); 964 965 for (var i = 0, len = classNamesArray.length; i < len; i++) 966 { 967 var currentClassName = classNamesArray[i]; 968 969 var isStringInClassNameStrings = this._checkIfStringFoundInArray(currentClassName, classNameStrings); 970 971 if (isStringInClassNameStrings) continue; 972 973 var isStringMatchingClassNameSubstrings = this._checkIfStringMatchInSubstringArray(currentClassName, classNameSubstrings); 974 975 if (isStringMatchingClassNameSubstrings) continue; 976 977 // If it got this far, it must not have matched any of the potential classNameStrings 978 // or classNameRegexes, so add the current iteration to the neClassName 979 980 if (i > 0) newClassName = newClassName + ' '; 981 newClassName = newClassName + currentClassName; 982 983 } 984 element.className = newClassName; 985 986 }, // end of removeMultipleClassNames 987 988 989 /* 990 * 991 * ContentLoaded.js 992 * 993 * Author: Diego Perini (diego.perini at gmail.com) 994 * Summary: Cross-browser wrapper for DOMContentLoaded 995 * Updated: 05/10/2007 996 * License: GPL/CC 997 * Version: 1.0 998 * 999 * http://javascript.nwbox.com/ContentLoaded/ 1000 * 1001 * Notes: 1002 * 1003 * based on code by Dean Edwards and John Resig 1004 * http://dean.edwards.name/weblog/2006/06/again/ 1005 * 1006 * 1007 */ 1008 1009 /* 1010 * Example call, in this case: 1011 1012 Offspring.ContentLoaded(window, 1013 function () { 1014 document.body.style.backgroundColor = 'green'; 1015 } 1016 ); 1017 * 1018 */ 1019 1020 // @w window reference 1021 // @f function reference 1022 ContentLoaded: function (w, fn) { 1023 var d = w.document, 1024 u = w.navigator.userAgent.toLowerCase(); 1025 1026 function init(e) { 1027 if (!arguments.callee.done) { 1028 arguments.callee.done = true; 1029 fn(e); 1030 } 1031 } 1032 1033 // konqueror/safari 1034 if (/khtml|webkit/.test(u)) { 1035 1036 (function () { 1037 if (/complete|loaded/.test(d.readyState)) { 1038 init('poll'); 1039 } else { 1040 setTimeout(arguments.callee, 10); 1041 } 1042 })(); 1043 1044 // internet explorer all versions 1045 } else if (/msie/.test(u) && !w.opera) { 1046 1047 (function () { 1048 try { 1049 d.documentElement.doScroll('left'); 1050 } catch (e) { 1051 setTimeout(arguments.callee, 10); 1052 return; 1053 } 1054 init('poll'); 1055 })(); 1056 d.attachEvent('onreadystatechange', 1057 function (e) { 1058 if (d.readyState == 'complete') { 1059 d.detachEvent('on'+e.type, arguments.callee); 1060 init(e.type); 1061 } 1062 } 1063 ); 1064 1065 // browsers having native DOMContentLoaded 1066 } else if (d.addEventListener && 1067 (/gecko/.test(u) && parseFloat(u.split('rv:')[1]) >= 1.8) || 1068 (/opera/.test(u) && parseFloat(u.split('opera ')[1]) > 9)) { 1069 1070 d.addEventListener('DOMContentLoaded', 1071 function (e) { 1072 this.removeEventListener(e.type, arguments.callee, false); 1073 init(e.type); 1074 }, false 1075 ); 1076 1077 // fallback to last resort 1078 } else { 1079 1080 // from Simon Willison 1081 var oldonload = w.onload; 1082 w.onload = function (e) { 1083 if (typeof oldonload == 'function') { 1084 oldonload(e || w.event); 1085 } 1086 init((e || w.event).type); 1087 }; 1088 1089 } 1090 } // end of ContentLoaded 1091 1092 } 1093 1094 1095 // Kick off 1096 offspring.init(); 1097 No newline at end of file -
public_html/js/offspring.js
6 6 switch(this.configuration.runningMode) 7 7 {case'full':this.classNamesArray=[this.firstChildClass,this.lastChildClass,this.oddChildClass,this.evenChildClass,this.onlyChildClass];this.classNameSubstringsArray=[this.nthChildClassPrefix];break;case'light':this.classNamesArray=[this.firstChildClass,this.lastChildClass,this.onlyChildClass];this.classNameSubstringsArray=[];break;} 8 8 this.defineTraverseChildrenFunction();this.defineFillCacheToFunction();this.fillCacheTo();if(this.configuration.autoStart) 9 {var _this=this;this.ContentLoaded(window,function(){_this.start();});}},start:function(){var startTime=new Date();this.traverseChildren(document.getElementsByTagName("body")[0]);var endTime=new Date(); window.status+="Offspring Exec time: "+(endTime.getTime()-startTime.getTime())+"ms";},defineTraverseChildrenFunction:function(){switch(this.configuration.shouldRemoveOldOffspringClassesFirst)9 {var _this=this;this.ContentLoaded(window,function(){_this.start();});}},start:function(){var startTime=new Date();this.traverseChildren(document.getElementsByTagName("body")[0]);var endTime=new Date();},defineTraverseChildrenFunction:function(){switch(this.configuration.shouldRemoveOldOffspringClassesFirst) 10 10 {case true:switch(this.configuration.runningMode) 11 11 {case'full':this.traverseChildren=function(parent) 12 12 {if(!parent.childNodes.length)return;var childElementNodes=[];var testNode=parent.childNodes[0];while(testNode) … … 59 59 testNode=testNode.nextSibling;} 60 60 testNode=null;var childElementNodesLength=childElementNodes.length;if(!childElementNodesLength)return;if(childElementNodesLength>this.cacheLevel) 61 61 {this.fillCacheTo(childElementNodesLength);} 62 var lastIndex=childElementNodesLength-1;this._childrenIterator(childElementNodes,childElementNodesLength,lastIndex);lastElement=null;parent=null;},_addOffspringClassNames:function(element,index,isLastElement){index++;if((!element.className)||(!element.className.length)) 62 var lastIndex=childElementNodesLength-1;this._childrenIterator(childElementNodes,childElementNodesLength,lastIndex);lastElement=null;parent=null;},_addOffspringClassNames:function(element,index,isLastElement){index++;if(this.configuration.targetElement instanceof Array&&this.configuration.targetElement.length){var isTargetElement=false;for(key in this.configuration.targetElement){if(element.nodeName.toLowerCase()==this.configuration.targetElement[key]){isTargetElement=true;break;}} 63 if(!isTargetElement){return;}} 64 if((!element.className)||(!element.className.length)) 63 65 {switch(isLastElement) 64 66 {case false:element.className=this.regularHashTable[index];return;break;case true:element.className=this.lastChildHashTable[index];return;break;}} 65 67 switch(isLastElement) -
webapp_biz/modules/ktai/templates/inc_f_home_h_prof.tpl
152 152 [i:68] 153 153 ({/if}) 154 154 <br> 155 ({if $is_h_prof && $ item.public_flag == 'friend'})<font color="#({$ktai_color_config.font_09})">※({$WORD_MY_FRIEND_HALF})まで公開</font><br>({/if})155 ({if $is_h_prof && $c_diary.public_flag == 'friend'})<font color="#({$ktai_color_config.font_09})">※({$WORD_MY_FRIEND_HALF})まで公開</font><br>({/if}) 156 156 </td></tr> 157 157 <tr><td bgcolor="#({$ktai_color_config.bg_07})"> 158 158 <hr color="#({$ktai_color_config.border_02})"> -
webapp_biz/modules/ktai/templates/h_home.tpl
201 201 ({if $c_topic_list_all}) 202 202 ({foreach from=$c_topic_list_all item=item}) 203 203 <tr><td bgcolor="#({cycle values="`$ktai_color_config.bg_06`,`$ktai_color_config.bg_07`"})"> 204 <font color="#({$ktai_color_config.font_06})">[({$item. r_datetime|date_format:"%m/%d"})]</font> ({$item.c_commu_name|t_truncate:22:""})<br>204 <font color="#({$ktai_color_config.font_06})">[({$item.u_datetime|date_format:"%m/%d"})]</font> ({$item.c_commu_name|t_truncate:22:""})<br> 205 205 <a href="({t_url m=ktai a=page_c_bbs})&target_c_commu_topic_id=({$item.c_commu_topic_id})&({$tail})">({$item.name|t_truncate:28:""})(({$item.number}))</a> 206 206 ({if $item.image_filename1 || $item.image_filename2 || $item.image_filename3}) 207 207 [i:68] -
webapp/lib/smarty_plugins/function.t_url_style.php
15 15 16 16 $result = <<<EOD 17 17 <!--[if lte IE 6]> 18 <script type="text/javascript" src="./js/offspring.js?r7478"></script>19 18 <script type="text/javascript"> 20 19 //<![CDATA[ 21 20 var offspringConfiguration = { 22 runningMode: "light" 21 runningMode: "light", 22 targetElement: ["tr", "th", "td"] 23 23 }; 24 24 //]]> 25 25 </script> 26 <script type="text/javascript" src="./js/offspring.js?r7689"></script> 26 27 <![endif]--> 27 28 <link rel="stylesheet" href="./xhtml_style.php?hash={$hash}" type="text/css" /> 28 29 EOD; -
webapp/lib/smarty_plugins/function.t_assign_rss.php
4 4 * @license http://www.php.net/license/3_01.txt PHP License 3.01 5 5 */ 6 6 7 require_once 'OpenPNE/RSS.php';8 9 7 function smarty_function_t_assign_rss($params, &$smarty) 10 8 { 11 9 if (empty($params['var'])) { … … 15 13 return; 16 14 } 17 15 16 require_once 'OpenPNE/RSS.php'; 18 17 $rss = new OpenPNE_RSS(); 19 18 if (!$items = $rss->fetch($params['url'])) { 20 19 $rss_data = array(); -
webapp/lib/smarty_plugins/modifier.t_url2cmd.php
4 4 * @license http://www.php.net/license/3_01.txt PHP License 3.01 5 5 */ 6 6 7 function smarty_modifier_t_url2cmd($string, $type = '', $target_c_member_id = '' )7 function smarty_modifier_t_url2cmd($string, $type = '', $target_c_member_id = '', $is_html = true) 8 8 { 9 if ( in_array($type, db_get_url2a_denied_list())) {10 // HTMLエスケープされていない場合 9 if (!$is_html || in_array($type, db_get_url2a_denied_list())) { 10 // HTMLエスケープされていない場合、 t_url2a の変換対象でない場合 11 11 // ", ', </a> がURLの後に続く場合はマッチさせない 12 12 $url_pattern = '/https?:\/\/([a-zA-Z0-9\-.]+)\/?(?:[a-zA-Z0-9_\-\/.,:;~?@=+$%#!()&])*(?!["\'a-zA-Z0-9_\-\/.,:;~?@=+$%#!()&]|<\/a>)/'; 13 13 } else { -
webapp/lib/OpenPNE/Img.php
271 271 if (($this->output_format == 'gif') || ($this->output_format == 'png')) { 272 272 $trnprt_idx_s = imagecolortransparent($source_gdimg); 273 273 if ($trnprt_idx_s >= 0) { // 透過色が設定されている 274 // truecolor イメージを (256色)パレットイメージに変換 274 275 imagetruecolortopalette($output_gdimg, true, 256); 275 276 276 // 入力画像から透明色 取得277 // 入力画像から透明色に指定してある色(RGBの配列)を取得する 277 278 $trnprt_color = imagecolorsforindex($source_gdimg, $trnprt_idx_s); 278 279 279 // 出力画像に透明色設定 280 imagecolorset($source_gdimg, 0, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']); 281 imagefill($output_gdimg, 0, 0, 0); 282 imagecolortransparent($output_gdimg, 0); 280 // 色の設定 281 $trnprt_idx_s = imagecolorallocate($output_gdimg, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']); 282 283 // 透明色(にする色)で塗りつぶす 284 imagefill($output_gdimg, 0, 0, $trnprt_idx_s); 285 286 // 透明色設定 287 imagecolortransparent($output_gdimg, $trnprt_idx_s); 283 288 } elseif ($this->output_format == 'png') { // PNG-24 284 289 // アルファチャンネル情報を保存するには、アルファブレンディングを解除する必要がある 285 290 imagealphablending($output_gdimg, false); -
webapp/lib/db/album.php
571 571 $img_tmp_dir_path = OPENPNE_VAR_DIR . '/tmp/'; 572 572 $filepath = $img_tmp_dir_path . basename($tmpfile); 573 573 574 if ( db_image_insert_c_image_album2($filename,$filepath)) {575 return $filename;574 if (!is_readable($filepath)) { 575 return false; 576 576 } 577 } else {578 $c_tmp_image = db_image_c_tmp_image4filename($tmpfile);579 577 580 $params = array( 581 'filename' => $filename, 582 'bin' => $c_tmp_image['bin'], 583 'r_datetime' => db_now(), 584 'type' => '', 585 ); 578 $filesize = filesize($filepath); 579 $fp = fopen($filepath, 'rb'); 580 $bin = fread($fp, $filesize); 581 fclose($fp); 586 582 587 $db =& db_get_instance('image');588 if ( $db->insert("c_image", $params)) {589 return $filename;583 // 写真かどうかのチェック 584 if (!@imagecreatefromstring($bin)) { 585 return false; 590 586 } 587 } else { 588 $c_tmp_image = db_image_c_tmp_image4filename($tmpfile); 589 $bin = base64_decode($c_tmp_image['bin']); 590 $filesize = strlen($bin); 591 591 } 592 return false;593 }594 592 595 function db_image_insert_c_image_album2($filename, $filepath) 596 { 597 if (!is_readable($filepath)) return false;593 if (db_image_insert_c_image_album($filename, $bin)) { 594 return array($filename, $filesize); 595 } 598 596 599 $fp = fopen($filepath, 'rb'); 600 $image_data = fread($fp, filesize($filepath)); 601 fclose($fp); 602 603 // 写真かどうかのチェック 604 if (!@imagecreatefromstring($image_data)) return false; 605 606 //TODO:typeフィールドを使う 607 return db_image_insert_c_image_album($filename, $image_data,$size); 597 return false; 608 598 } 609 599 610 600 function db_image_insert_c_image_album($filename, $bin, $type = '') -
webapp/lib/db/review.php
306 306 307 307 function db_review_list_product_c_review_list4c_member_id($c_member_id, $page, $page_size=30) 308 308 { 309 $sql = "SELECT cr c.*, cr.*, crc2.category_disp" .309 $sql = "SELECT cr.*, crc.*, crc2.category_disp" . 310 310 " FROM c_review_comment AS crc, c_review AS cr, c_review_category AS crc2" . 311 311 " WHERE crc.c_review_id = cr.c_review_id" . 312 312 " AND cr.c_review_category_id = crc2.c_review_category_id" . … … 355 355 356 356 function db_review_clip_list_h_review_clip_list4c_member_id($c_member_id, $page, $page_size=30) 357 357 { 358 $sql = "SELECT * FROM c_review _clip AS crc, c_review AS cr" .358 $sql = "SELECT * FROM c_review AS cr, c_review_clip AS crc" . 359 359 " WHERE crc.c_review_id = cr.c_review_id" . 360 360 " AND c_member_id = ?" . 361 361 " ORDER BY crc.r_datetime"; -
webapp/lib/ktaiIP.php
10 10 '210.136.161.0/24', 11 11 '210.153.86.0/24', 12 12 13 // au (2008/0 1/10更新)13 // au (2008/07/10更新) 14 14 // http://www.au.kddi.com/ezfactory/tec/spec/ezsava_ip.html 15 15 '210.169.40.0/24', 16 16 '210.196.3.192/26', … … 42 42 '121.111.231.0/25', 43 43 '121.111.231.160/27', 44 44 '121.111.227.0/25', 45 '121.111.227.160/27', 45 46 46 47 // SoftBank (2007/10/9更新) 47 48 // http://developers.softbankmobile.co.jp/dp/tech_svc/web/ip.php -
webapp/lib/util/image.php
106 106 return $image; 107 107 } 108 108 /** 109 *画像をリサイズし、出力する。 110 *@param $type 画像タイプ 111 *@param $src_filename 変換元画像ファイル名 112 *@param $dst_filename 変換先画像ファイル名 113 *@param $original_width 変換元画像の画像幅 114 *@param $original_height 変換元画像の画像高さ 115 *@param $new_width 変換先画像の画像幅 116 *@param $new_height 変換先画像の画像高さ 109 * 画像をリサイズし、出力する 110 * 111 * @param $type 画像タイプ 112 * @param $src_filename 変換元画像ファイル名 113 * @param $dst_filename 変換先画像ファイル名 114 * @param $original_width 変換元画像の画像幅 115 * @param $original_height 変換元画像の画像高さ 116 * @param $new_width 変換先画像の画像幅 117 * @param $new_height 変換先画像の画像高さ 117 118 */ 118 function resize_image( 119 function resize_image($type, $src_filename, $dst_filename, $original_width, $original_height, $new_width, $new_height) 119 120 { 120 121 $src_img = NULL; 121 122 $dst_img = NULL; 122 123 123 124 switch ($type) { 124 case IMAGETYPE_GIF: 125 $src_img = imagecreatefromgif ( $src_filename ); 126 $transparentIndex = imagecolortransparent($src_img); 127 //透過GIFの場合 128 if($transparentIndex >= 0){ 129 $dst_img = imagecreate ( $new_width, $new_height ); 130 $transparentColor=imagecolorsforindex($src_img, $transparentIndex); 131 $transparent=imagecolorallocate($dst_img, $transparentColor['red'], $transparentColor['green'], $transparentColor['blue']); 132 imagecolortransparent($dst_img, $transparent); 133 imagecopyresized ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 134 } 135 //透過GIFで無い場合 136 else{ 137 $dst_img = imagecreatetruecolor( $new_width, $new_height ); 138 imagecopyresampled ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 139 imagetruecolortopalette($dst_img, true, 256); 140 } 141 imagegif ( $dst_img, $dst_filename ); 142 break; 143 case IMAGETYPE_JPEG: 144 $src_img = imagecreatefromjpeg ( $src_filename ); 145 $dst_img = imagecreatetruecolor ( $new_width, $new_height ); 146 imagecopyresampled ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 147 imagejpeg ( $dst_img, $dst_filename ); 148 break; 149 case IMAGETYPE_PNG: 150 $src_img = imagecreatefrompng ( $src_filename ); 151 //TrueColor PNGの場合 152 if(imageistruecolor($src_img)) { 153 $dst_img = imagecreatetruecolor ( $new_width, $new_height ); 154 imagealphablending($dst_img, false); 155 imagecopyresampled ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 156 imagesavealpha($dst_img, true); 157 } 158 //TrueColor PNGで無い場合 159 else{ 160 //透過PNGの場合 161 if($transparentIndex >= 0){ 162 $dst_img = imagecreate ( $new_width, $new_height); 163 $transparentColor=imagecolorsforindex($src_img, $transparentIndex); 164 $transparent=imagecolorallocate($dst_img, $transparentColor['red'], $transparentColor['green'], $transparentColor['blue']); 165 imagecolortransparent($dst_img, $transparent); 166 imagecopyresized ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 167 } 168 //透過PNGで無い場合 169 else{ 170 $dst_img = imagecreatetruecolor( $new_width, $new_height ); 171 imagecopyresampled ($dst_img,$src_img,0,0,0,0,$new_width,$new_height,$original_width,$original_height); 172 imagetruecolortopalette($dst_img, true, 256); 173 } 174 } 175 imagepng($dst_img, $dst_filename); 176 break; 177 default: 178 break; 125 case IMAGETYPE_GIF: 126 $src_img = imagecreatefromgif($src_filename); 127 $dst_img = imagecreate($new_width, $new_height); 128 set_transparent_to_output_image($src_img, $dst_img, $type); 129 imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $original_width, $original_height); 130 imagegif($dst_img, $dst_filename); 131 break; 132 case IMAGETYPE_JPEG: 133 $src_img = imagecreatefromjpeg($src_filename); 134 $dst_img = imagecreatetruecolor($new_width, $new_height); 135 imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $original_width, $original_height); 136 imagejpeg($dst_img, $dst_filename); 137 break; 138 case IMAGETYPE_PNG: 139 $src_img = imagecreatefrompng($src_filename); 140 $dst_img = imagecreate($new_width, $new_height); 141 set_transparent_to_output_image($src_img, $dst_img, $type); 142 imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $new_width, $new_height, $original_width, $original_height); 143 imagepng($dst_img, $dst_filename); 144 break; 145 default: 146 break; 147 } 179 148 180 }181 149 //リリースを解放 182 150 imagedestroy($dst_img); 183 151 imagedestroy($src_img); 184 152 } 185 153 186 154 /** 155 * 入力画像から取得した透過情報を出力画像に適用する 156 * 157 * @params resource $source_gdimg 158 * @params resource $output_gdimg 159 * @params int $type 160 */ 161 function set_transparent_to_output_image(&$source_gdimg, &$output_gdimg, $type) 162 { 163 $trnprt_idx_s = imagecolortransparent($source_gdimg); 164 if ($trnprt_idx_s >= 0) { // 透過色が設定されている 165 // 入力画像から透明色に指定してある色(RGBの配列)を取得する 166 $trnprt_color = imagecolorsforindex($source_gdimg, $trnprt_idx_s); 167 168 // 色の設定 169 $trnprt_idx_s = imagecolorallocate($output_gdimg, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']); 170 171 // 透明色(にする色)で塗りつぶす 172 imagefill($output_gdimg, 0, 0, $trnprt_idx_s); 173 174 // 透明色設定 175 imagecolortransparent($output_gdimg, $trnprt_idx_s); 176 } elseif ($type == IMAGETYPE_PNG) { // PNG-24 177 // アルファチャンネル情報を保存するには、アルファブレンディングを解除する必要がある 178 imagealphablending($output_gdimg, false); 179 imagesavealpha($output_gdimg, true); 180 181 // 透過色設定 182 $color = imagecolorallocatealpha($output_gdimg, 0, 0, 0, 127); 183 imagefill($output_gdimg, 0, 0, $color); 184 } 185 } 186 187 /** 187 188 * 確認画面用に一時ファイルを保存して、そのファイル名を返す 188 189 * 189 190 * 保存先: var/tmp/ -
webapp/modules/portal/page/portal_user_top_ktai.php
9 9 10 10 function execute($requests) 11 11 { 12 $use_portal = db_portal_config('USE_PORTAL_KTAI'); 13 if (!$use_portal['value']) { 14 openpne_redirect('ktai'); 15 } 16 12 17 $this->set('SNS_NAME', SNS_NAME); 13 18 $this->set('IS_CLOSED_SNS', IS_CLOSED_SNS); 14 19 -
webapp/modules/portal/templates/inc_portal_Contents_Layout.tpl
235 235 ({elseif $data.kind eq PORTAL_LAYOUT_FREE1 || $data.kind eq PORTAL_LAYOUT_FREE2 || $data.kind eq PORTAL_LAYOUT_FREE3 || $data.kind eq PORTAL_LAYOUT_FREE4 || $data.kind eq PORTAL_LAYOUT_FREE5}) 236 236 <div class="box PatternC"> 237 237 ({if $data.contents}) 238 ({$data.contents|smarty:nodefaults|t_url2cmd |t_cmd})238 ({$data.contents|smarty:nodefaults|t_url2cmd:"":"":0|t_cmd}) 239 239 ({else}) 240 240 <br /> 241 241 ({/if}) -
webapp/modules/pc/do/h_album_cover_edit_insert_c_album.php
44 44 45 45 if ($tmpfile_1) { 46 46 db_album_image_data_delete($c_album_cover); 47 $filename_1 = image_insert_c_image _album4tmp("a_{$target_c_album_id}_1", $tmpfile_1);47 $filename_1 = image_insert_c_image4tmp("a_{$target_c_album_id}_1", $tmpfile_1); 48 48 } 49 49 50 50 $sessid = session_id(); -
webapp/modules/pc/do/h_confirm_list_delete_c_commu_member_confirm.php
24 24 $cmc = db_commu_c_commu_member_confirm4c_commu_member_confirm_id($target_c_commu_member_confirm_id); 25 25 26 26 if ($cmc['c_member_id'] != $u 27 && $cmc['c_member_id_admin'] != $u) { 27 && $cmc['c_member_id_admin'] != $u 28 && $cmc['c_member_id_sub_admin'] != $u) { 28 29 handle_kengen_error(); 29 30 } 30 31 // ----- -
webapp/modules/pc/do/h_album_image_edit_insert_c_album_image.php
11 11 { 12 12 function handleError($errors) 13 13 { 14 $_REQUEST['msg1'] = $errors['image_description'];14 $_REQUEST['msg1'] = array_shift($errors); 15 15 openpne_forward('pc', 'page', 'h_album_image_edit', $errors); 16 16 exit; 17 17 } … … 43 43 // アルバム写真登録処理 44 44 if ($tmpfile_1) { 45 45 db_album_image_data_delete($c_album_image['image_filename']); 46 $filename = image_insert_c_image_album4tmp("a_{$target_c_album_id}_1", $tmpfile_1); 47 $filesize_1 = filesize($img_tmp_dir_path . basename($tmpfile_1)); 46 if (!list($filename, $filesize_1) = image_insert_c_image_album4tmp("a_{$target_c_album_id}_1", $tmpfile_1)) { 47 $this->handleError(array('写真が登録できませんでした')); 48 } 48 49 } 49 50 50 51 // 写真データ一時ファイル削除 -
webapp/modules/pc/do/h_album_image_add_insert_c_album_image.php
43 43 44 44 if ($tmpfile) { 45 45 $description = $requests['image_description' . $i]; 46 $filename = image_insert_c_image_album4tmp("a_{$target_c_album_id}_{$i}", $tmpfile); 47 $filesize = filesize($img_tmp_dir_path . basename($tmpfile)); 46 if (!list($filename, $filesize) = image_insert_c_image_album4tmp("a_{$target_c_album_id}_{$i}", $tmpfile)) { 47 continue; 48 } 48 49 49 50 // 説明文が空の場合はファイル名を挿入する 50 51 if (!$description) { -
webapp/modules/pc/do/h_album_add_insert_c_album.php
34 34 $c_member_id = $u; 35 35 $c_album_id = db_album_insert_c_album($c_member_id, $subject, $description, $public_flag); 36 36 37 if ($tmpfile){38 $filename = image_insert_c_image _album4tmp("a_{$c_album_id}_1", $tmpfile);37 if ($tmpfile) { 38 $filename = image_insert_c_image4tmp("a_{$c_album_id}_1", $tmpfile); 39 39 40 40 $sessid = session_id(); 41 41 t_image_clear_tmp($sessid); -
webapp/modules/pc/templates/o_regist_prof.tpl
97 97 98 98 ({strip}) 99 99 ({if $profile.form_type == 'text'}) 100 <input type="text" class="input_text" name="profile[({$profile.name})]" value="({$profs.profile[$profile.name] .value})" size="30" />100 <input type="text" class="input_text" name="profile[({$profile.name})]" value="({$profs.profile[$profile.name]})" size="30" /> 101 101 ({elseif $profile.form_type == 'textlong'}) 102 102 <input type="text" class="input_text input_text_long" name="profile[({$profile.name})]" value="({$profs.profile[$profile.name]})" size="60" /> 103 103 ({elseif $profile.form_type == 'textarea'}) -
webapp/modules/admin/lib/smarty_plugins/function.t_assign_sns_new_topic.php
10 10 return array(); 11 11 } 12 12 13 $result = array_shift(monitor_topic_list('', 5, 1));13 $result = monitor_new_topic_list(5); 14 14 15 15 $smarty->assign($params['var'], $result); 16 16 } -
webapp/modules/admin/lib/db_admin.php
1261 1261 $return = array(); 1262 1262 $sum = 0; 1263 1263 foreach($list as $key => $value) { 1264 if ($value['target_c_commu_id']) { 1265 if ($c_commu = db_commu_c_commu4c_commu_id($value['target_c_commu_id'])) { 1266 $return[] = array_merge($value, $c_commu); 1267 $sum += $value['count']; 1268 } 1264 if ($c_commu = db_commu_c_commu4c_commu_id($value['target_c_commu_id'])) { 1265 $value['is_c_commu_exists'] = true; 1266 $return[] = array_merge($value, $c_commu); 1267 } else { 1268 $value['is_c_commu_exists'] = false; 1269 $return[] = $value; 1269 1270 } 1271 $sum += $value['count']; 1270 1272 } 1271 1273 1272 1274 $sql = "select count(*) from c_access_log where ktai_flag = ? "; … … 1349 1351 $where .= " and page_name = ? "; 1350 1352 array_push($params,$page_name); 1351 1353 } 1354 $where .= ' and target_c_commu_topic_id <> 0 '; 1352 1355 $sql = "select target_c_commu_topic_id , count(*) as count from c_access_log "; 1353 1356 $sql .= $where." group by target_c_commu_topic_id " .$orderby_str; 1354 1357 $list = db_get_all_limit($sql, $start, $page_size, $params); … … 1365 1368 $c_commu_topic['topic_name'] = $c_commu_topic['name']; 1366 1369 $c_commu = db_commu_c_commu4c_commu_id($c_commu_topic['c_commu_id']); 1367 1370 $c_commu_topic['commu_name'] = $c_commu['name']; 1371 $value['is_c_commu_topic_exists'] = true; 1368 1372 $return[] = array_merge($value, $c_commu_topic); 1369 $sum += $value['count']; 1373 } else { 1374 $value['is_c_commu_topic_exists'] = false; 1375 $return[] = $value; 1370 1376 } 1377 $sum += $value['count']; 1371 1378 } 1372 1379 } 1373 1380 … … 1434 1441 $return = array(); 1435 1442 $sum = 0; 1436 1443 foreach ($list as $key => $value) { 1437 if ($value['target_c_diary_id']) { 1438 if ($c_diary = db_diary_get_c_diary4id($value['target_c_diary_id'])) { 1439 $c_member = db_member_c_member4c_member_id($c_diary['c_member_id']); 1440 $c_diary['nickname'] = $c_member['nickname']; 1441 $return[] = array_merge($value, $c_diary); 1442 $sum += $value['count']; 1443 } 1444 if ($c_diary = db_diary_get_c_diary4id($value['target_c_diary_id'])) { 1445 $c_member = db_member_c_member4c_member_id($c_diary['c_member_id']); 1446 $c_diary['nickname'] = $c_member['nickname']; 1447 $value['is_c_diary_exists'] = true; 1448 $return[] = array_merge($value, $c_diary); 1449 } else { 1450 $value['is_c_diary_exists'] = false; 1451 $return[] = $value; 1444 1452 } 1453 $sum += $value['count']; 1445 1454 } 1446 1455 1447 1456 $sql = "select count(*) from c_access_log where ktai_flag = ? "; … … 1535 1544 foreach($list as $key => $value) { 1536 1545 if ($value['c_member_id']) { 1537 1546 if ($c_member = _db_c_member4c_member_id($value['c_member_id'])) { 1547 $value['is_c_member_exists'] = true; 1538 1548 $return[] = array_merge($value, $c_member); 1539 $sum += $value['count']; 1549 } else { 1550 $value['is_c_member_exists'] = false; 1551 $return[] = $value; 1540 1552 } 1553 $sum += $value['count']; 1541 1554 } 1542 1555 } 1543 1556 … … 1604 1617 1605 1618 $return = array(); 1606 1619 $sum = 0; 1607 foreach($list as $key => $value) { 1608 if ($value['target_c_member_id']) { 1609 if ($c_member = db_member_c_member4c_member_id($value['target_c_member_id'])) { 1610 $return[] = array_merge($value, $c_member); 1611 $sum += $value['count']; 1612 } 1620 foreach ($list as $key => $value) { 1621 if ($c_member = db_member_c_member4c_member_id($value['target_c_member_id'])) { 1622 $value['is_c_member_exists'] = true; 1623 $return[] = array_merge($value, $c_member); 1624 } else { 1625 $value['is_c_member_exists'] = false; 1626 $return[] = $value; 1613 1627 } 1628 $sum += $value['count']; 1614 1629 } 1615 1630 1616 1631 $where =" where ktai_flag = ? "; … … 2364 2379 $where = ''; 2365 2380 } 2366 2381 2367 $select = "SELECT ct.*," .2368 "ct.name AS topic_name, c.name AS commu_name," .2369 "ctc.body, ctc.filename, ctc.image_filename1, ctc.image_filename2, ctc.image_filename3";2382 $select = 'SELECT ct.*,' 2383 . ' ct.name AS topic_name, c.name AS commu_name,' 2384 . ' ctc.body, ctc.filename, ctc.image_filename1, ctc.image_filename2, ctc.image_filename3'; 2370 2385 2371 $from = " FROM c_commu_topic AS ct"2372 . " LEFT JOIN c_commu AS c ON c.c_commu_id = ct.c_commu_id "2373 . " LEFT JOIN c_commu_topic_comment AS ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id AND ctc.number = 0)";2386 $from = ' FROM c_commu_topic AS ct' 2387 . ' LEFT JOIN c_commu AS c ON c.c_commu_id = ct.c_commu_id' 2388 . ' LEFT JOIN c_commu_topic_comment AS ctc ON (ctc.c_commu_topic_id = ct.c_commu_topic_id AND ctc.number = 0)'; 2374 2389 2375 $order = " ORDER BY r_datetime desc";2390 $order = ' ORDER BY r_datetime desc'; 2376 2391 2377 $sql = $select . $from . $where . $order;2392 $sql = $select . $from . $where . $order; 2378 2393 2379 2394 $list = db_get_all_limit($sql,($page-1)*$page_size,$page_size,$params); 2380 2395 … … 2443 2458 return array($list , $prev , $next, $total_num, $total_page_num); 2444 2459 } 2445 2460 2461 function monitor_new_topic_list($limit) 2462 { 2463 $limit = intval($limit); 2464 2465 $select = 'SELECT c.name AS commu_name, ct.*'; 2466 $from = ' FROM c_commu AS c, c_commu_topic AS ct'; 2467 $where = ' WHERE c.c_commu_id = ct.c_commu_id'; 2468 $group = ' GROUP BY ct.c_commu_topic_id'; 2469 $order = ' ORDER BY ct.u_datetime DESC'; 2470 2471 $sql = $select . $from . $where . $group . $order; 2472 2473 $list = db_get_all_limit($sql, 0, $limit); 2474 2475 foreach ($list as $key => $value) { 2476 $list[$key]['count_comments'] = _db_count_c_commu_topic_comments4c_commu_topic_id($value['c_commu_topic_id']); 2477 } 2478 2479 return $list; 2480 } 2481 2446 2482 function monitor_review_list($keyword, $page_size, $page) 2447 2483 { 2448 2484 $page = intval($page); -
webapp/modules/admin/page/top.php
4 4 * @license http://www.php.net/license/3_01.txt PHP License 3.01 5 5 */ 6 6 7 require_once 'OpenPNE/RSS.php';8 9 7 // 管理画面トップページ 認証済み 10 8 class admin_page_top extends OpenPNE_Action 11 9 { -
webapp/modules/admin/templates/access_analysis_target_commu.tpl
22 22 23 23 <p>[({$page_name})]</p> 24 24 25 ({if $target_commu}) 25 26 ({if $is_prev})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_commu')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> ({/if}) 26 27 ({$start_num})件~({$end_num})件を表示 27 28 ({if $is_next})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_commu')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page+1})">次を表示></a>({/if}) … … 38 39 ({foreach from=$target_commu item=item}) 39 40 <tr> 40 41 <th>({$item.target_c_commu_id})</th> 42 ({if $item.is_c_commu_exists}) 41 43 <td>({$item.name})</td> 44 ({else}) 45 <td>(既に削除された({$WORD_COMMUNITY})です)</td> 46 ({/if}) 42 47 <td>({$item.count})</td> 43 48 </tr> 44 49 … … 50 55 </tr> 51 56 </tbody> 52 57 </table> 58 ({else}) 59 <p>アクセスされた({$WORD_COMMUNITY})はありません</p> 60 ({/if}) 53 61 54 55 62 ({$inc_footer|smarty:nodefaults}) -
webapp/modules/admin/templates/inc_dashboard.tpl
74 74 <div class="innerBox"> 75 75 <dl> 76 76 ({foreach from=$new_topic_list item=item}) 77 <dt>({$item. r_datetime|date_format:"%m/%d %H:%M"})</dt>77 <dt>({$item.u_datetime|date_format:"%m/%d %H:%M"})</dt> 78 78 <dd><a href="({t_url _absolute=1 m=pc a=page_c_topic_detail})&target_c_commu_topic_id=({$item.c_commu_topic_id})" target="_blank">({$item.name}) (({$item.count_comments|number_format}))</a> <span class="origin">(<a href="({t_url _absolute=1 m=pc a=page_c_home})&target_c_commu_id=({$item.c_commu_id})" target="_blank">({$item.commu_name})</a>)</span></dd> 79 79 ({/foreach}) 80 80 </dl> -
webapp/modules/admin/templates/access_analysis_target_member.tpl
22 22 23 23 <p>[({$page_name})]</p> 24 24 25 ({if $target_member}) 25 26 ({if $is_prev})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_member')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> ({/if}) 26 27 ({$start_num})件~({$end_num})件を表示 27 28 ({if $is_next})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_member')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page+1})">次を表示></a>({/if}) … … 35 36 ({foreach from=$target_member item=item}) 36 37 <tr> 37 38 <td>({$item.target_c_member_id})</td> 39 ({if $item.is_c_member_exists}) 38 40 <td>({$item.nickname})</td> 41 ({else}) 42 <td>(既に退会したメンバーです)</td> 43 ({/if}) 39 44 <td>({$item.count})</td> 40 45 </tr> 41 46 … … 47 52 </tr> 48 53 49 54 </table> 55 ({else}) 56 <p>アクセスされたメンバーはいません</p> 57 ({/if}) 50 58 51 59 ({$inc_footer|smarty:nodefaults}) -
webapp/modules/admin/templates/access_analysis_target_topic.tpl
22 22 23 23 <p>[({$page_name})]</p> 24 24 25 <div class="listControl"> 26 <p class="listMove"> 27 ({if $is_prev})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_topic')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> ({/if}) 25 ({if $target_topic}) 26 ({if $is_prev}) 27 <a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_topic')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> 28 ({/if}) 28 29 ({$start_num})件~({$end_num})件を表示 29 30 ({if $is_next})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_topic')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page+1})">次を表示></a>({/if}) 30 </p> 31 </div> 31 <br /> 32 32 33 33 <table class="basicType2"> 34 34 <thead> … … 43 43 ({foreach from=$target_topic item=item}) 44 44 <tr> 45 45 <th>({$item.target_c_commu_topic_id})</th> 46 ({if $item.is_c_commu_topic_exists}) 46 47 <td>({$item.topic_name})</td> 47 48 <td>({$item.commu_name})</td> 49 ({else}) 50 <td colspan="2">(既に削除されたトピックです)</td> 51 ({/if}) 48 52 <td>({$item.count})</td> 49 53 </tr> 50 54 ({/foreach}) … … 54 58 </tr> 55 59 </tbody> 56 60 </table> 61 ({else}) 62 <p>アクセスされたトピックはありません</p> 63 ({/if}) 57 64 58 65 ({$inc_footer|smarty:nodefaults}) -
webapp/modules/admin/templates/access_analysis_member.tpl
4 4 ({capture name=page_name_temp}) 5 5 ({$item_str}) ({if $month_flag})({$ymd|date_format:"%Y年%m月"})({else})({$ymd|date_format:"%Y年%m月%d日"})({/if})にアクセスしたメンバー 6 6 ({/capture}) 7 ({ * ({assign var="page_name" value=$smarty.capture.page_name_temp}) *})7 ({assign var="page_name" value=$smarty.capture.page_name_temp}) 8 8 ({ext_include file="inc_tree_adminStatisticalInformation.tpl"}) 9 9 </div> 10 10 … … 18 18 <p class="actionMsg">({$msg})</p> 19 19 ({/if}) 20 20 21 [({$item_str}) ({if $month_flag})({$ymd|date_format:"%Y年%m月"})({else})({$ymd|date_format:"%Y年%m月%d日"})({/if})にアクセスしたメンバー] 21 <p>[({$page_name})]</p> 22 22 23 <br /> 24 23 ({if $access_member}) 25 24 ({if $is_prev}) 26 25 <a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_member')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> 27 26 ({/if}) … … 38 37 ({foreach from=$access_member item=item}) 39 38 <tr> 40 39 <td>({$item.c_member_id})</td> 40 ({if $item.is_c_member_exists}) 41 41 <td>({$item.nickname})</td> 42 ({else}) 43 <td>(既に退会したメンバーです)</td> 44 ({/if}) 42 45 <td>({$item.count})</td> 43 46 </tr> 44 47 … … 50 53 </tr> 51 54 52 55 </table> 56 ({else}) 57 <p>アクセスしたメンバーはいません</p> 58 ({/if}) 53 59 54 60 ({$inc_footer|smarty:nodefaults}) -
webapp/modules/admin/templates/access_analysis_target_diary.tpl
20 20 <h2>({$item_str}) ({$WORD_DIARY})別アクセス数表示 ({if $month_flag})({$ymd|date_format:"%Y年%m月分"})({else})({$ymd|date_format:"%Y年%m月%d日分"})({/if})</h2> 21 21 <div class="contents"> 22 22 23 <p> ({$page_name})</p>23 <p>[({$page_name})]</p> 24 24 25 ({if $target_diary}) 25 26 ({if $is_prev})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_diary')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page-1})"><前を表示</a> ({/if}) 26 27 ({$start_num})件~({$end_num})件を表示 27 28 ({if $is_next})<a href="?m=({$module_name})&a=page_({$hash_tbl->hash('access_analysis_target_diary')})&ktai_flag=({$ktai_flag})&ymd=({$ymd})&month_flag=({$month_flag})&page_name=({$requests.page_name})&orderby=({$orderby})&page=({$page+1})">次を表示></a>({/if}) … … 37 38 ({foreach from=$target_diary item=item}) 38 39 <tr> 39 40 <td>({$item.target_c_diary_id})</td> 41 ({if $item.is_c_diary_exists}) 40 42 <td>({$item.subject})</td> 41 43 <td>({$item.nickname})</td> 44 ({else}) 45 <td colspan="2">(既に削除された({$WORD_DIARY})です)</td> 46 ({/if}) 42 47 <td>({$item.count})</td> 43 48 </tr> 44 49 … … 50 55 </tr> 51 56 52 57 </table> 58 ({else}) 59 <p>アクセスされた({$WORD_DIARY})はありません</p> 60 ({/if}) 53 61 54 62 ({$inc_footer|smarty:nodefaults}) -
webapp/modules/ktai/page/h_prof.php
27 27 $this->set("target_c_member", $target_c_member); 28 28 29 29 //ターゲットの最新日記5件 30 $this->set( "c_diary_list", db_diary_get_c_diary_list4c_member_id($target_c_member_id, 5, $u));30 $this->set('c_diary_list', db_diary_get_c_diary_list4c_member_id($target_c_member_id, 5, null, 'friend')); 31 31 32 32 //フレンドランダム5人 33 33 $this->set("c_friend_list", db_friend_c_friend_list_random4c_member_id($target_c_member_id, 5)); -
webapp/modules/ktai/templates/inc_f_home_h_prof.tpl
146 146 [i:68] 147 147 ({/if}) 148 148 <br> 149 ({if $is_h_prof && $ item.public_flag == 'friend'})<font color="#({$ktai_color_config.font_09})">※({$WORD_MY_FRIEND_HALF})まで公開</font><br>({/if})149 ({if $is_h_prof && $c_diary.public_flag == 'friend'})<font color="#({$ktai_color_config.font_09})">※({$WORD_MY_FRIEND_HALF})まで公開</font><br>({/if}) 150 150 </td></tr> 151 151 <tr><td bgcolor="#({$ktai_color_config.bg_07})"> 152 152 <hr color="#({$ktai_color_config.border_02})"> -
webapp/modules/ktai/templates/h_home.tpl
198 198 ({if $c_topic_list_all}) 199 199 ({foreach from=$c_topic_list_all item=item}) 200 200 <tr><td bgcolor="#({cycle values="`$ktai_color_config.bg_06`,`$ktai_color_config.bg_07`"})"> 201 <font color="#({$ktai_color_config.font_06})">[({$item. r_datetime|date_format:"%m/%d"})]</font> ({$item.c_commu_name|t_truncate:22:""})<br>201 <font color="#({$ktai_color_config.font_06})">[({$item.u_datetime|date_format:"%m/%d"})]</font> ({$item.c_commu_name|t_truncate:22:""})<br> 202 202 <a href="({t_url m=ktai a=page_c_bbs})&target_c_commu_topic_id=({$item.c_commu_topic_id})&({$tail})">({$item.name|t_truncate:28:""})(({$item.number}))</a> 203 203 ({if $item.image_filename1 || $item.image_filename2 || $item.image_filename3}) 204 204 [i:68] -
webapp/modules/ktai/templates/c_home.tpl
3 3 ({$inc_ktai_entry_point[1]|smarty:nodefaults}) 4 4 ({/if}) 5 5 <table width="100%"><tr><td align="center" bgcolor="#({$ktai_color_config.bg_02})"> 6 <font color="#({$ktai_color_config.font_05})"> ({$c_commu.name})</font><br>6 <font color="#({$ktai_color_config.font_05})"><a name="top">({$c_commu.name})</a></font><br> 7 7 </td></tr> 8 8 </table> 9 9 ({if $c_siteadmin}) -
webapp/version.php
1 <?php define('OPENPNE_VERSION', '2.12. 1'); ?>1 <?php define('OPENPNE_VERSION', '2.12.2'); ?>
Note: See TracBrowser
for help on using the repository browser.