Changeset 2364 in ExiteCMS
- Timestamp:
- 07/29/10 17:16:11 (22 months ago)
- Location:
- branches
- Files:
-
- 31 edited
- 2 copied
-
ITXP/administration/forums.php (modified) (6 diffs)
-
ITXP/administration/tools/language_pack_English.php (modified) (5 diffs)
-
ITXP/administration/tools/language_pack_Nederlands.php (modified) (2 diffs)
-
ITXP/administration/upgrade/rev02360.php (copied) (copied from trunk/administration/upgrade/rev02360.php)
-
ITXP/files/locales/en.main.global.php (modified) (1 diff)
-
ITXP/files/locales/en.main.setup.php (modified) (1 diff)
-
ITXP/files/locales/nl.main.global.php (modified) (1 diff)
-
ITXP/files/locales/nl.main.setup.php (modified) (1 diff)
-
ITXP/forum/post.php (modified) (10 diffs)
-
ITXP/includes/ajax.response.php (modified) (3 diffs)
-
ITXP/includes/jscripts/core_functions.js (modified) (1 diff)
-
ITXP/includes/secureimage-1.0.3/securimage.php (modified) (14 diffs)
-
ITXP/includes/session_functions.php (modified) (1 diff)
-
ITXP/includes/templates/admin.forums.tpl (modified) (4 diffs)
-
ITXP/includes/templates/forum.index.tpl (modified) (1 diff)
-
ITXP/includes/templates/forum.post.tpl (modified) (7 diffs)
-
ITXP/themes/ExiteCMS/templates/templates/_header.tpl (modified) (3 diffs)
-
PLi-Fusion/administration/forums.php (modified) (6 diffs)
-
PLi-Fusion/administration/tools/language_pack_English.php (modified) (5 diffs)
-
PLi-Fusion/administration/tools/language_pack_Nederlands.php (modified) (5 diffs)
-
PLi-Fusion/administration/upgrade/rev02360.php (copied) (copied from trunk/administration/upgrade/rev02360.php)
-
PLi-Fusion/files/locales/en.main.global.php (modified) (1 diff)
-
PLi-Fusion/files/locales/en.main.setup.php (modified) (1 diff)
-
PLi-Fusion/files/locales/nl.main.global.php (modified) (1 diff)
-
PLi-Fusion/files/locales/nl.main.setup.php (modified) (1 diff)
-
PLi-Fusion/forum/post.php (modified) (10 diffs)
-
PLi-Fusion/includes/ajax.response.php (modified) (3 diffs)
-
PLi-Fusion/includes/jscripts/core_functions.js (modified) (1 diff)
-
PLi-Fusion/includes/secureimage-1.0.3/securimage.php (modified) (14 diffs)
-
PLi-Fusion/includes/session_functions.php (modified) (1 diff)
-
PLi-Fusion/includes/templates/admin.forums.tpl (modified) (4 diffs)
-
PLi-Fusion/includes/templates/forum.index.tpl (modified) (1 diff)
-
PLi-Fusion/includes/templates/forum.post.tpl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/ITXP/administration/forums.php
r2342 r2364 215 215 $forum_attach = isset($_POST['forum_attach'])?"1":"0"; 216 216 $forum_attachtypes = stripinput($_POST['forum_attachtypes']); 217 $forum_prefix = isset($_POST['forum_prefix'])?"1":"0"; 217 218 $forum_prefixes = stripinput($_POST['forum_prefixes']); 218 219 if ($action == "edit" && $t == "forum") { … … 240 241 } 241 242 // update the forum record 242 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_name='".mysql_real_escape_string($forum_name)."', forum_cat='$forum_cat', forum_description='".mysql_real_escape_string($forum_description)."', forum_access='$forum_access', forum_posting='$forum_posting', forum_modgroup='$forum_modgroup', forum_attach='$forum_attach', forum_attachtypes='$forum_attachtypes', forum_prefix es='".mysql_real_escape_string($forum_prefixes)."', forum_rulespage='$forum_rulespage', forum_banners='$forum_banners' WHERE forum_id='$forum_id'");243 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_name='".mysql_real_escape_string($forum_name)."', forum_cat='$forum_cat', forum_description='".mysql_real_escape_string($forum_description)."', forum_access='$forum_access', forum_posting='$forum_posting', forum_modgroup='$forum_modgroup', forum_attach='$forum_attach', forum_attachtypes='$forum_attachtypes', forum_prefix='$forum_prefix', forum_prefixes='".mysql_real_escape_string($forum_prefixes)."', forum_rulespage='$forum_rulespage', forum_banners='$forum_banners' WHERE forum_id='$forum_id'"); 243 244 redirect(FUSION_SELF.$aidlink."&status=savefe"); 244 245 } else { … … 248 249 if(!$forum_order) $forum_order=dbfunction("MAX(forum_order)", "forums", "forum_cat='$forum_cat'")+1; 249 250 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_order=forum_order+1 WHERE forum_cat='$forum_cat' AND forum_order>='$forum_order'"); 250 $result = dbquery("INSERT INTO ".$db_prefix."forums (forum_cat, forum_name, forum_order, forum_description, forum_moderators, forum_access, forum_posting, forum_modgroup, forum_attach, forum_attachtypes, forum_prefix es, forum_rulespage, forum_banners, forum_lastpost, forum_lastuser) VALUES ('$forum_cat', '$forum_name', '$forum_order', '$forum_description', '$forum_mods', '$forum_access', '$forum_posting', '$forum_modgroup', '$forum_attach', '$forum_attachtypes', '".mysql_real_escape_string($forum_prefixes)."', '$forum_rulespage', '$forum_banners', '0', '0')");251 $result = dbquery("INSERT INTO ".$db_prefix."forums (forum_cat, forum_name, forum_order, forum_description, forum_moderators, forum_access, forum_posting, forum_modgroup, forum_attach, forum_attachtypes, forum_prefix, forum_prefixes, forum_rulespage, forum_banners, forum_lastpost, forum_lastuser) VALUES ('$forum_cat', '$forum_name', '$forum_order', '$forum_description', '$forum_mods', '$forum_access', '$forum_posting', '$forum_modgroup', '$forum_attach', '$forum_attachtypes', '$forum_prefix', '".mysql_real_escape_string($forum_prefixes)."', '$forum_rulespage', '$forum_banners', '0', '0')"); 251 252 redirect(FUSION_SELF.$aidlink."&status=savefu"); 252 253 } … … 321 322 $forum_attach = $data['forum_attach']?true:false; 322 323 $forum_attachtypes = $data['forum_attachtypes']; 324 $forum_prefix = $data['forum_prefix']; 323 325 $forum_prefixes = $data['forum_prefixes']; 324 326 $forum_title = $locale['422']; … … 346 348 $forum_attach = ($settings['attachments'] == 1); 347 349 $forum_attachtypes = $settings['attachtypes']; 350 $forum_prefix = 0; 348 351 $forum_prefixes = ""; 349 352 $forum_title = $locale['421']; … … 420 423 $variables['forum_attach'] = $forum_attach; 421 424 $variables['forum_attachtypes'] = $forum_attachtypes; 425 $variables['forum_prefix'] = $forum_prefix; 422 426 $variables['forum_prefixes'] = $forum_prefixes; 423 427 $variables['forum_rulespage'] = $forum_rulespage; -
branches/ITXP/administration/tools/language_pack_English.php
r2348 r2364 368 368 $localestrings['493'] = "Refresh Forum Ordering"; 369 369 $localestrings['494'] = "Subject prefix list:"; 370 $localestrings['495'] = "Use subject prefixes in this forum"; 370 371 load_localestrings($localestrings, LP_LOCALE, "admin.forums", $step); 371 372 … … 2579 2580 $localestrings['473'] = "Comments (Max.length: 255 characters):"; 2580 2581 $localestrings['474'] = "Toggle Message"; 2582 $localestrings['475'] = "Error: Your are required to select a prefix when posting in this forum"; 2581 2583 $localestrings['480'] = " Make this Thread Sticky"; 2582 2584 $localestrings['481'] = " Show My Signature in this Post"; … … 2590 2592 $localestrings['500'] = "You cannot edit this post."; 2591 2593 $localestrings['501'] = "You cannot move a post that has a poll attached to it."; 2592 $localestrings['502'] = "You cannot edit this post. The thread has been locked by a moderator";2593 2594 $localestrings['530'] = "Search Forum"; 2594 2595 $localestrings['531'] = "Search Keyword(s)"; … … 2599 2600 $localestrings['550'] = "Thread Reply Notification - {THREAD_SUBJECT}"; 2600 2601 $localestrings['551'] = "Hello {USERNAME},\n\nA reply has been posted in the forum thread '{THREAD_SUBJECT}' which you are tracking at {SITE_NAME}. You can use the following link to view the reply:\n\n{THREAD_URL}\n\nIf you no longer wish to watch this thread you can click the 'Tracking Off' button located at the bottom of the thread.\n\nRegards,\n{SITE_WEBMASTER}."; 2602 $localestrings['552'] = "You cannot edit this post. The thread has been locked by a moderator"; 2601 2603 load_localestrings($localestrings, LP_LOCALE, "forum.post", $step); 2602 2604 … … 3846 3848 if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "us|gb|ca|au|nz|in|za|ir|mt|hk|pr"); 3847 3849 if (!defined('LP_VERSION')) define('LP_VERSION', "7.30"); 3848 if (!defined('LP_DATE')) define('LP_DATE', time());3850 if (!defined('LP_DATE')) define('LP_DATE', "1280139239"); 3849 3851 $lp_date = LP_DATE; 3850 3852 -
branches/ITXP/administration/tools/language_pack_Nederlands.php
r2348 r2364 368 368 $localestrings['493'] = "Volgorde herrekenen"; 369 369 $localestrings['494'] = "Topic prefix lijst:"; 370 $localestrings['495'] = "Gebruik topic prefixen voor dit forum"; 370 371 load_localestrings($localestrings, LP_LOCALE, "admin.forums", $step); 371 372 … … 3846 3847 if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "nl|be|sr|aw|an"); 3847 3848 if (!defined('LP_VERSION')) define('LP_VERSION', "7.30"); 3848 if (!defined('LP_DATE')) define('LP_DATE', time());3849 if (!defined('LP_DATE')) define('LP_DATE', "1280139245"); 3849 3850 $lp_date = LP_DATE; 3850 3851 -
branches/ITXP/files/locales/en.main.global.php
r2348 r2364 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Wed Jun 9 2010, 17:36:48CEST5 // generated on : Mon Jul 26 2010, 12:14:21 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
branches/ITXP/files/locales/en.main.setup.php
r2346 r2364 3 3 // locale : English 4 4 // locale name : main.setup 5 // generated on : Tue Jun 8 2010, 22:35:58CEST6 // translators : ExiteCMS team 5 // generated on : Wed Jun 16 2010, 19:48:07 CEST 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- 8 8 $locale['400'] = "Select your default locale"; -
branches/ITXP/files/locales/nl.main.global.php
r2348 r2364 3 3 // locale : Nederlands 4 4 // locale name : main.global 5 // generated on : Wed Jun 9 2010, 17:37:56CEST5 // generated on : Wed Jun 16 2010, 19:48:12 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
branches/ITXP/files/locales/nl.main.setup.php
r2346 r2364 3 3 // locale : English 4 4 // locale name : main.setup 5 // generated on : Tue Jun 8 2010, 22:36:03CEST6 // translators : ExiteCMS team 5 // generated on : Wed Jun 16 2010, 19:48:12 CEST 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- 8 8 $locale['400'] = "Selecteer de standaard taal voor uw site"; -
branches/ITXP/forum/post.php
r2348 r2364 62 62 // function to validate the contents of the $_POST array 63 63 function validatepost() { 64 global $locale ;64 global $locale, $fdata; 65 65 66 66 // we need both a subject and a message body … … 71 71 if ($_POST['new_prefix'] == '[?]') $_POST['new_prefix'] = ''; 72 72 73 // is a prefix required? 74 if ($fdata['forum_prefix'] && !empty($fdata['forum_prefixes']) && empty($_POST['new_prefix'])) { 75 return $locale['475']; 76 } 77 73 78 return ""; 74 79 } 75 80 76 81 // function to add or replace the prefix in the subject 77 function subject_prefix($subject, $prefix) { 82 function strip_prefix($subject) { 83 84 $result = array('subject' => '', 'prefix' => ''); 85 86 // check for a reply, and strip the reply prefix 87 if (strtolower(substr($subject,0,3))=="re:") { 88 $result['subject'] = "Re: "; 89 $subject = trim(substr($subject,3)); 90 } 91 92 // split the subject to check for a prefix 93 if (preg_match('~(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 94 // a match must be at the beginning 95 if (empty($matches[1])) { 96 $result['prefix'] .= $matches[2]; 97 $result['subject'] .= trim($matches[3]); 98 } else { 99 $result['subject'] .= $matches[0]; 100 } 101 } else { 102 $result['subject'] .= $subject; 103 } 104 105 return $result; 106 } 107 108 // function to add or replace the prefix in the subject 109 function add_prefix($subject, $prefix) { 78 110 79 111 // was a prefix defined … … 83 115 84 116 // split the subject to check for a prefix 85 if (!preg_match('~( .*)\[(.*)\](.*)~', $subject, $matches))86 { 87 // was this a reply?88 if (strtolower(substr($subject,0,3)) == 're:') {89 $subject = 'Re: [' . $prefix . '] ' . substr($subject,4);117 if (!preg_match('~(re:)(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 118 119 if (preg_match('~(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 120 if (empty($matches[1])) { 121 $subject = '[' . $prefix . '] ' . trim($matches[3]); 90 122 } else { 91 123 $subject = '[' . $prefix . '] ' . $subject; 92 124 } 93 125 } else { 94 // remove spaces from the matches 95 foreach($matches as $key => $value) { 96 $matches[$key] = trim($value); 97 } 98 unset($matches[0]); 99 $matches[2] = '[' . trim($prefix) . ']'; 100 $subject = trim(implode(' ', $matches)); 101 } 126 if (preg_match('~(re:)(.*)~i', $subject, $matches)) { 127 $subject = 'Re: [' . $prefix . '] ' . trim($matches[2]); 128 } else { 129 $subject = '[' . $prefix . '] ' . $subject; 130 } 131 } 132 } else { 133 $subject = 'Re: [' . $prefix . '] ' . trim($matches[4]); 134 } 102 135 } 103 136 … … 490 523 $preview['post_subject'] = trim(stripinput(censorwords($_POST['subject'])));; 491 524 if ($preview['post_subject'] == "" && isset($tdata) && is_array($tdata)) { 492 $preview['post_subject'] = "Re: ".$tdata['thread_subject'];525 $preview['post_subject'] = add_prefix("Re: ".$tdata['thread_subject'], trim(stripinput($_POST['new_prefix']))); 493 526 } else { 494 $preview['post_subject'] = subject_prefix($preview['post_subject'], trim(stripinput($_POST['new_prefix'])));527 $preview['post_subject'] = add_prefix($preview['post_subject'], trim(stripinput($_POST['new_prefix']))); 495 528 } 496 529 $preview['post_message'] = trim(stripmessageinput(censorwords($_POST['message']))); … … 614 647 // bail out if an edit is requested, but no edit rights have been detected 615 648 if ($action == "edit" && !$user_can_edit) { 616 resultdialog($locale['408'], $locale['5 02']);649 resultdialog($locale['408'], $locale['552']); 617 650 } elseif (isset($_POST["cancel"])) { 618 651 // post cancelled? … … 649 682 $smileys = isset($_POST['disable_smileys']) ? "0" : "1"; 650 683 $subject = trim(stripinput(censorwords($_POST['subject']))); 684 if (isset($tdata) && strtolower(substr($subject,0,3)) != "re:") { 651 685 if ($subject == "") { 652 686 $subject = "Re: ".$tdata['thread_subject']; 687 } else { 688 if ($action != "edit") { 689 $subject = "Re: ".$subject; 653 690 } 654 $subject = subject_prefix($subject, stripinput($_POST['new_prefix'])); 691 } 692 } 693 if ($fdata['forum_prefix']) { 694 $subject = add_prefix($subject, stripinput($_POST['new_prefix'])); 695 } 655 696 $message = trim(stripmessageinput(censorwords($_POST['message']))); 656 697 if ($action == 'edit') { 657 698 // update the post record 658 699 if ($_POST['message'] == $_POST['org_message']) 659 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject=' $subject', post_smileys='$smileys' WHERE post_id='$post_id'");700 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject='".mysql_real_escape_string($subject)."', post_smileys='$smileys' WHERE post_id='$post_id'"); 660 701 else { 661 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject=' $subject', post_message='$message', post_smileys='$smileys', post_edituser='".$userdata['user_id']."', post_edittime='".time()."' WHERE post_id='$post_id'");702 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject='".mysql_real_escape_string($subject)."', post_message='".mysql_real_escape_string($message)."', post_smileys='$smileys', post_edituser='".$userdata['user_id']."', post_edittime='".time()."' WHERE post_id='$post_id'"); 662 703 } 663 704 $data = dbarray(dbquery("SELECT * FROM ".$db_prefix."posts WHERE thread_id='$thread_id' ORDER BY post_datestamp ASC LIMIT 1")); 664 705 if ($data['post_id'] == $post_id) { 665 $result = dbquery("UPDATE ".$db_prefix."threads SET thread_subject=' $subject' WHERE thread_id='$thread_id'");706 $result = dbquery("UPDATE ".$db_prefix."threads SET thread_subject='".mysql_real_escape_string($subject)."' WHERE thread_id='$thread_id'"); 666 707 } 667 708 // flag the forum and the thread as updated … … 808 849 rename(PATH_ATTACHMENTS.$attachment['attach_tmp'], PATH_ATTACHMENTS.$attachname); 809 850 chmod(PATH_ATTACHMENTS.$attachname,0664); 810 $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_realname, attach_comment, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', ' $attachname', '".$attachment['attach_name']."', '".$attachment['attach_comment']."', '$attachext', '".$attachment['attach_size']."')");851 $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_realname, attach_comment, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '".mysql_real_escape_string($attachname)."', '".mysql_real_escape_string($attachment['attach_name'])."', '".mysql_real_escape_string($attachment['attach_comment'])."', '$attachext', '".$attachment['attach_size']."')"); 811 852 } 812 853 } … … 1020 1061 $variables['prefixes'] = array(); 1021 1062 foreach ($prefixes as $prefix) { 1022 if (!empty($prefix)) $variables['prefixes'][] = trim($prefix); 1063 $prefix = trim($prefix); 1064 if (!empty($prefix)) $variables['prefixes'][] = $prefix; 1023 1065 } 1024 1066 if (!isset($title)) $title = $locale['415']." #".$reply_id; … … 1044 1086 } elseif ($post_id > 0 || $reply_id > 0) { 1045 1087 $subject = $pdata['post_subject']; 1046 // split the subject to check for a prefix 1047 if (preg_match('~(.*)\[(.*)\](.*)~', $subject, $matches)) 1048 { 1049 // update the subject, set the prefixes 1050 $subject = trim($matches[3]); 1051 $variables['prefix'] = $matches[2]; 1052 $variables['new_prefix'] = '['.$matches[2].']'; 1053 } 1054 if ($action != "newthread" && strtolower(substr($subject,0,3)) != "re:") { 1088 if (!in_array($action, array("edit","newthread")) && strtolower(substr($subject,0,3)) != "re:") { 1055 1089 $variables['subject'] = 'Re: '.$subject; 1056 1090 } else { … … 1088 1122 $bbcolor = ""; 1089 1123 } 1124 // do we need to deal with a subject prefix 1125 if (!isset($variables['prefix'])) { 1126 $sparray = strip_prefix($variables['subject']); 1127 1128 $variables['subject'] = $sparray['subject']; 1129 // check if it's a custom prefix 1130 if (in_array($sparray['prefix'],$variables['prefixes'])) { 1131 $variables['prefix'] = $sparray['prefix']; 1132 $variables['new_prefix'] = '['.$sparray['prefix'].']'; 1133 } else { 1134 if (empty($sparray['prefix'])) { 1135 $variables['prefix'] = ''; 1136 $variables['new_prefix'] = '[?]'; 1137 } else { 1138 $variables['prefix'] = '?'; 1139 $variables['new_prefix'] = '['.$sparray['prefix'].']'; 1140 } 1141 } 1142 } 1143 1090 1144 // process attachments 1091 1145 if ($settings['attachments'] == "1" && $fdata['forum_attach'] == "1") { -
branches/ITXP/includes/ajax.response.php
r2164 r2364 89 89 // make sure we have json_encode and json_decode available 90 90 require_once "json_include.php"; 91 header("Content-Type:application/json; charset=utf-8"); 91 92 if (iMEMBER) { 92 93 // return the user record datastore … … 104 105 } 105 106 } 107 break; 108 case "counters": 109 if (!iMEMBER) { 110 $pms = $posts = 0; 111 $pmtext = $posttext = ""; 112 } else { 113 $pms = dbcount("(pmindex_id)", "pm_index", "pmindex_user_id='".$userdata['user_id']."' AND pmindex_to_id='".$userdata['user_id']."' AND pmindex_read_datestamp = '0'"); 114 if ($pms == 1) { 115 $pmtext = sprintf($locale['085'], $pms); 116 } else { 117 $pmtext = sprintf($locale['086'], $pms); 118 } 119 if ($userdata['user_posts_unread']) { 120 $result = dbquery(" 121 SELECT count(*) as unread 122 FROM ".$db_prefix."posts p 123 INNER JOIN ".$db_prefix."forums f ON p.forum_id = f.forum_id 124 INNER JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 125 WHERE ".groupaccess('f.forum_access')." 126 AND tr.user_id = '".$userdata['user_id']."' 127 AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") 128 AND ((p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read) 129 OR (p.post_datestamp < tr.thread_first_read OR (p.post_edittime != 0 AND p.post_edittime < tr.thread_first_read)))" 130 ); 131 } else { 132 $result = dbquery(" 133 SELECT count(*) as unread 134 FROM ".$db_prefix."posts p 135 INNER JOIN ".$db_prefix."forums f ON p.forum_id = f.forum_id 136 INNER JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 137 WHERE ".groupaccess('f.forum_access')." 138 AND tr.user_id = '".$userdata['user_id']."' 139 AND p.post_author != '".$userdata['user_id']."' 140 AND p.post_edituser != '".$userdata['user_id']."' 141 AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") 142 AND ((p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read) 143 OR (p.post_datestamp < tr.thread_first_read OR (p.post_edittime != 0 AND p.post_edittime < tr.thread_first_read)))" 144 ); 145 } 146 $posts = ($result ? mysql_result($result, 0) : 0); 147 if ($posts == 1) { 148 $posttext = sprintf($locale['088'], $posts); 149 } else { 150 $posttext = sprintf($locale['089'], $posts); 151 } 152 } 153 // make sure we have json_encode and json_decode available 154 require_once "json_include.php"; 155 // send the results back 156 header("Content-Type:application/json; charset=utf-8"); 157 echo json_encode(array('pmcount' => $pms, 'pmtext' => $pmtext, 'postcount' => $posts, 'posttext' => $posttext)); 106 158 break; 107 159 case "pm": … … 211 263 mysql_close(); 212 264 } 213 ?> -
branches/ITXP/includes/jscripts/core_functions.js
r2301 r2364 104 104 } 105 105 } 106 } 107 108 // return a new AJAX object 109 function asyncajaxcall() { 110 var result = false; 111 if (window.XMLHttpRequest) { 112 // For Safari, Firefox, and other non-MS browsers 113 try { 114 result = new XMLHttpRequest(); 115 } catch (e) { 116 result = false; 117 } 118 } else if (window.ActiveXObject) { 119 // For Internet Explorer on Windows 120 try { 121 result = new ActiveXObject("Msxml2.XMLHTTP"); 122 } catch (e) { 123 try { 124 result = new ActiveXObject("Microsoft.XMLHTTP"); 125 } catch (e) { 126 result = false; 127 } 128 } 129 } 130 return result; 106 131 } 107 132 -
branches/ITXP/includes/secureimage-1.0.3/securimage.php
r2092 r2364 18 18 * License along with this library; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br /><br /> 20 * 21 * Any modifications to the library should be indicated clearly in the source code 20 * 21 * Any modifications to the library should be indicated clearly in the source code 22 22 * to inform users that the changes are not a part of the original software.<br /><br /> 23 23 * … … 121 121 var $charset = 'ABCDEFGHKLMNPRSTUVWYZ23456789'; 122 122 //var $charset = '0123456789'; 123 123 124 124 /** 125 125 * Create codes using this word list … … 128 128 */ 129 129 var $wordlist_file = ''; 130 130 131 131 /** 132 132 * True to use a word list file instead of a random code … … 363 363 var $audio_path = './audio/'; 364 364 365 /** 366 * Captcha expiry timeout in seconds. 367 * 368 * @since 1.0.3 369 * @var string 370 */ 371 var $timeout = 300; 372 373 365 374 366 375 //END USER CONFIGURATION … … 423 432 die('no session available!'); 424 433 } 425 434 426 435 // we use random colors to make it even more difficult 427 436 $this->image_bg_color = $this->getHexColor(); … … 445 454 return $clr; 446 455 } 447 456 448 457 /** 449 458 * Generate a code and output the image to the browser. … … 693 702 { 694 703 $this->code = false; 695 704 696 705 if ($this->use_wordlist && is_readable($this->wordlist_file)) { 697 706 $this->code = $this->readCodeFromFile(); 698 707 } 699 708 700 709 if ($this->code == false) { 701 710 $this->code = $this->generateCode($this->code_length); 702 711 } 703 712 704 713 $this->saveData(); 705 714 } … … 721 730 return $code; 722 731 } 723 732 724 733 /** 725 734 * Reads a word list file to get a code … … 733 742 $fp = @fopen($this->wordlist_file, 'r'); 734 743 if (!$fp) return false; 735 744 736 745 $fsize = filesize($this->wordlist_file); 737 746 if ($fsize < 32) return false; // too small of a list to be effective 738 747 739 748 if ($fsize < 128) { 740 749 $max = $fsize; // still pretty small but changes the range of seeking … … 742 751 $max = 128; 743 752 } 744 753 745 754 fseek($fp, rand(0, $fsize - $max), SEEK_SET); 746 755 $data = fread($fp, 128); // read a random 128 bytes from file 747 756 fclose($fp); 748 757 749 758 $start = strpos($data, "\n", rand(0, 100)) + 1; // random start position 750 759 $end = strpos($data, "\n", $start) - 1; // find end of word 751 760 752 761 return strtolower(substr($data, $start, $end - $start)); // return substring in 128 bytes 753 762 } … … 822 831 { 823 832 $_SESSION['securimage_code_value'] = strtolower($this->code); 833 $_SESSION['securimage_code_timestamp'] = time(); 824 834 } 825 835 … … 834 844 if ( isset($_SESSION['securimage_code_value']) && !empty($_SESSION['securimage_code_value']) ) { 835 845 if ( $_SESSION['securimage_code_value'] == strtolower(trim($this->code_entered)) ) { 836 $this->correct_code = true; 837 $_SESSION['securimage_code_value'] = ''; 846 if (isset($_SESSION['securimage_code_timestamp']) && (time() - $_SESSION['securimage_code_timestamp']) < $this->timeout) { 847 $this->correct_code = true; 848 $_SESSION['securimage_code_value'] = ''; 849 } else { 850 $this->correct_code = false; 851 } 838 852 } else { 839 853 $this->correct_code = false; … … 906 920 $file['size'] = $data['ChunkSize'] + 8; 907 921 $file['data'] = $body; 908 922 909 923 if ( ($p = strpos($file['data'], 'LIST')) !== false) { 910 924 // If the LIST data is not at the end of the file, this will probably break your sound file … … 914 928 $file['size'] = $file['size'] - (strlen($file['data']) - $p); 915 929 } 916 930 917 931 $files[] = $file; 918 932 $data = null; -
branches/ITXP/includes/session_functions.php
r2224 r2364 48 48 49 49 // update the timestamp of the session cookie, we want expiry after the last page load, not after the session has started! 50 setcookie(ini_get("session.name"), session_id(), time()+ ini_get("session.gc_maxlifetime"), "/");50 setcookie(ini_get("session.name"), session_id(), time()+$settings['session_gc_maxlifetime'], "/"); 51 51 52 52 // store the last_url cookie if found -
branches/ITXP/includes/templates/admin.forums.tpl
r2342 r2364 65 65 <tr> 66 66 <td colspan='2' class='tbl'> 67 <input type='checkbox' name='forum_prefix' value='1' onchange='togglefields("prefixes");'{if $forum_prefix} checked="checked"{/if} /> {$locale.495} 68 </td> 69 </tr> 70 <tr id='prefixes'{if !$forum_prefix} style='display:none'{/if}> 71 <td colspan='2' class='tbl'> 67 72 {$locale.494} 68 73 <br /> … … 145 150 <tr> 146 151 <td colspan='2' class='tbl'> 147 <input type='checkbox' name='forum_attach' value='1' onchange='togglefields( );'{if $forum_attach} checked="checked"{/if} /> {$locale.469}152 <input type='checkbox' name='forum_attach' value='1' onchange='togglefields("attachtypes");'{if $forum_attach} checked="checked"{/if} /> {$locale.469} 148 153 </td> 149 154 </tr> … … 167 172 </form> 168 173 {literal}<script type='text/javascript'> 169 function togglefields( ) {174 function togglefields(name) { 170 175 if(navigator.appName.indexOf('Microsoft') > -1) { 171 176 state = 'block'; … … 173 178 state = 'table-row'; 174 179 } 175 if (document.getElementById( 'attachtypes').style.display == 'none') {176 document.getElementById( 'attachtypes').style.display = state;180 if (document.getElementById(name).style.display == 'none') { 181 document.getElementById(name).style.display = state; 177 182 } else { 178 document.getElementById( 'attachtypes').style.display = 'none';183 document.getElementById(name).style.display = 'none'; 179 184 } 180 185 } -
branches/ITXP/includes/templates/forum.index.tpl
r2346 r2364 151 151 {buttonlink name=$locale.415 link="tracking.php"} 152 152 {buttonlink name=$locale.414 link="viewposts.php"}<br /> 153 <form name='searchform' method='post' style="margin-top:2px;" action='{$smarty.const.BASEDIR}search.php? stype=f'>153 <form name='searchform' method='post' style="margin-top:2px;" action='{$smarty.const.BASEDIR}search.php?action=search'> 154 154 <input type='text' name='stext' class='textbox' style='width:150px' /> 155 <input type='hidden' name='boolean' value='1' /> 156 <input type='hidden' name='qtype' value='AND' /> 157 <input type='hidden' name='search_id' value='3.2' /> 158 <input type='hidden' name='sortby' value='datestamp' /> 159 <input type='hidden' name='order' value='0' /> 160 <input type='hidden' name='limit' value='0' /> 161 <input type='hidden' name='datelimit' value='0' /> 162 <input type='hidden' name='contentfilter_users' value='0' /> 163 <input type='hidden' name='contentfilter_forums' value='0' /> 155 164 <input type='submit' name='search' value='{$locale.550}' class='button' /> 156 165 </form> -
branches/ITXP/includes/templates/forum.post.tpl
r2348 r2364 124 124 <td> 125 125 <table width='100%' border='0' cellspacing='1' cellpadding='0'> 126 <tr >126 <tr {if $forum.forum_prefix == 0}style="display:none;"{/if}> 127 127 <td align='right' width='145' valign='top' class='tbl2'> 128 128 {$locale.533}: 129 129 </td> 130 130 <td class='tbl1'> 131 <select name="prefix" class="textbox" style="width:125px;" onChange="javascript:update_prefix(this);"> 132 <option value="">{$locale.534}</option> 131 {assign var=show_prefix value=0} 132 <select name="prefix" class="textbox" style="width:125px;" onChange="update_prefix(this);"> 133 <option value="" {if $prefix == ""}selected="selected"{/if}>{$locale.534}</option> 133 134 {foreach from=$prefixes item=post_prefix} 134 135 <option value="{$post_prefix}" {if $prefix == $post_prefix}selected="selected"{/if}>{$post_prefix}</option> 135 136 {/foreach} 136 <option value="?" >{$locale.535}</option>137 <option value="?" {if $prefix == "?"}selected="selected"{assign var=show_prefix value=1}{/if}>{$locale.535}</option> 137 138 </select> 138 <input type='text' id="new_prefix" name='new_prefix' value='{$new_prefix}' class='textbox' maxlength='255' style='width: 250px ' disabled="disabled"/>139 <input type='text' id="new_prefix" name='new_prefix' value='{$new_prefix}' class='textbox' maxlength='255' style='width: 250px;{if $show_prefix ==0}display:none;{/if}' /> 139 140 </td> 140 141 </tr> … … 150 151 <tr> 151 152 <td align='right' width='145' class='tbl2' valign='top' style='white-space:nowrap'> 152 <input type='submit' class='button' name='toggle_msg' value='{$locale.474}' onclick=' javascript:flipDiv("org_message");return false;' />153 <input type='submit' class='button' name='toggle_msg' value='{$locale.474}' onclick='flipDiv("org_message");return false;' /> 153 154 </td> 154 155 <td class='tbl1'> … … 194 195 <tr> 195 196 <td align='right' width='145' valign='top' class='tbl2'> 196 <input type='button' name='toggle' class='button' value='{$locale.467}' onclick=' javascript:loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' />197 <input type='button' name='toggle' class='button' value='{$locale.467}' onclick='loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' /> 197 198 </td> 198 199 <td class='tbl1'> … … 266 267 <input type='submit' name='upload' value='{$locale.471}' class='button' /> 267 268 {else} 268 <input type='submit' name='upload' value='{$locale.471}' class='button' onclick=' javascript:get_hoteditor_data("message");' />269 <input type='submit' name='upload' value='{$locale.471}' class='button' onclick='get_hoteditor_data("message");' /> 269 270 {/if} 270 271 </td> … … 309 310 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' /> 310 311 {else} 311 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' onclick=' javascript:get_hoteditor_data("message");' />312 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' onclick='get_hoteditor_data("message");' /> 312 313 {/if} 313 314 {/if} … … 380 381 <input type='submit' name='save' value='{$button_save}' class='button' /> 381 382 {else} 382 <input type='submit' name='preview' value='{$button_preview}' class='button' onclick=' javascript:document.getElementById("new_prefix").disabled = false;get_hoteditor_data("message");' />383 <input type='submit' name='save' value='{$button_save}' class='button' onclick=' javascript:document.getElementById("new_prefix").disabled = false;get_hoteditor_data("message");' />383 <input type='submit' name='preview' value='{$button_preview}' class='button' onclick='get_hoteditor_data("message");' /> 384 <input type='submit' name='save' value='{$button_save}' class='button' onclick='get_hoteditor_data("message");' /> 384 385 {/if} 385 386 <input type='hidden' name='post_author' value='{$post_author}' /> … … 413 414 if ( el.value == "?") { 414 415 document.getElementById('new_prefix').value = "[?]"; 415 document.getElementById('new_prefix'). disabled = false;416 document.getElementById('new_prefix').style.display = 'inline'; 416 417 document.getElementById('new_prefix').focus = true; 417 418 } else { 418 document.getElementById('new_prefix'). disabled = true;419 document.getElementById('new_prefix').style.display = 'none'; 419 420 if ( el.value == "") { 420 421 document.getElementById('new_prefix').value = ""; -
branches/ITXP/themes/ExiteCMS/templates/templates/_header.tpl
r2301 r2364 38 38 {/literal} 39 39 {if $favicon|default:false != false}<link rel='shortcut icon' href='{$favicon}' />{/if} 40 <script type='text/javascript' src='{$smarty.const.INCLUDES}jscripts/core_functions.js?version= 3'></script>40 <script type='text/javascript' src='{$smarty.const.INCLUDES}jscripts/core_functions.js?version=4'></script> 41 41 {if $smarty.const.LOAD_TINYMCE} 42 42 {include file="_load_tinymce.tpl"} … … 88 88 createCookie('width', myWidth, 0); 89 89 createCookie('height', myHeight, 0); 90 90 // 91 // Dynamic fontsize 92 // 91 93 var fontGrootte = 0.7; 92 94 var pliCookie = readCookie('pliFontSize'); … … 117 119 118 120 fontReset(fontGrootte); 119 121 {/literal} 122 {if iMEMBER} 123 {literal} 124 // 125 // PM and forum post counter checks 126 // 120 127 function checkMessages() { 121 // check for new forum messages 122 var newmsg = AjaxCall("{/literal}{$smarty.const.BASEDIR}{literal}includes/ajax.response.php?request=posts"); 123 if (newmsg != null && document.getElementById("new_posts_header")) { 124 if (newmsg > 0) { 125 document.getElementById("new_posts_header").innerHTML = "<a href='{/literal}{$smarty.const.BASEDIR}{literal}modules/forum_threads_list_panel/new_posts.php'><img src='{/literal}{$smarty.const.THEME}{literal}images/newposts.gif' height='9' alt='{/literal}{$locale.028}{literal}' /></a> "; 126 } else { 127 document.getElementById("new_posts_header").innerHTML = ""; 128 // check for new pm messages 129 var asyncajax = asyncajaxcall(); 130 if (asyncajax) { 131 try { 132 // Asynchronous request, wait till we have it all 133 asyncajax.open('GET', exitecms_basedir + "includes/ajax.response.php?request=counters", true); 134 asyncajax.onreadystatechange = function() { 135 if(asyncajax.readyState == 4) { 136 if (asyncajax.status == 200) { 137 try { 138 // update the new message indicator 139 newmsg = eval('('+asyncajax.responseText+')'); 140 if (document.getElementById("new_pm_header")) { 141 if (parseInt(newmsg.pmcount) > 0) { 142 document.getElementById("new_pm_header").innerHTML = "<a href='" + exitecms_basedir + "pm.php?action=show_new'><img src='" + exitecms_themedir + "images/newmsgs.gif' height='9' alt='' /></a> "; 143 } else { 144 document.getElementById("new_pm_header").innerHTML = ''; 145 } 146 } 147 if (document.getElementById("new_pm_panel")) { 148 if (parseInt(newmsg.pmcount) > 0) { 149 document.getElementById("new_pm_panel_value").innerHTML = newmsg.pmtext; 150 document.getElementById("new_pm_panel").style.display = 'inline'; 151 } else { 152 document.getElementById("new_pm_panel").style.display = 'none'; 153 } 154 } 155 if (document.getElementById("new_posts_header")) { 156 if (parseInt(newmsg.postcount) > 0) { 157 document.getElementById("new_posts_header").innerHTML = "<a href='" + exitecms_basedir + "modules/forum_threads_list_panel/new_posts.php'><img src='" + exitecms_themedir + "images/newposts.gif' height='9' alt='" + locale_028 + "' /></a> "; 158 } else { 159 document.getElementById("new_posts_header").innerHTML = ''; 160 } 161 } 162 if (document.getElementById("new_posts_panel")) { 163 if (parseInt(newmsg.postcount) > 0) { 164 document.getElementById("new_posts_panel_value").innerHTML = newmsg.posttext; 165 document.getElementById("new_posts_panel").style.display = 'inline'; 166 } else { 167 document.getElementById("new_posts_panel").style.display = 'none'; 168 } 169 } 170 // set a timer for the next check 171 msgtimerid = setTimeout("checkMessages()", 60000); 172 } 173 catch (e) { 174 // catch the error 175 } 176 } 177 } 178 }; 179 asyncajax.send(null); 180 } catch (e) { 181 return null; 128 182 } 183 } else { 184 return null; 129 185 } 130 if (newmsg != null && document.getElementById("new_posts_panel")) {131 if (newmsg > 0) {132 document.getElementById("new_posts_panel_value").innerHTML = AjaxCall("{/literal}{$smarty.const.BASEDIR}{literal}includes/ajax.response.php?request=posts&parms=text");133 document.getElementById("new_posts_panel").style.display = 'inline';134 } else {135 document.getElementById("new_posts_panel").style.display = 'none';136 }137 }138 // check for new pm messages139 var newpm = AjaxCall("{/literal}{$smarty.const.BASEDIR}{literal}includes/ajax.response.php?request=pm");140 if (newpm != null && document.getElementById("new_pm_header")) {141 if (newpm > 0) {142 document.getElementById("new_pm_header").innerHTML = "<a href='{/literal}{$smarty.const.BASEDIR}{literal}pm.php?action=show_new'><img src='{/literal}{$smarty.const.THEME}{literal}images/newmsgs.gif' height='9' alt='' /></a> ";143 } else {144 document.getElementById("new_pm_header").innerHTML = "";145 }146 }147 if (newpm != null && document.getElementById("new_pm_panel")) {148 if (newpm > 0) {149 document.getElementById("new_pm_panel_value").innerHTML = AjaxCall("{/literal}{$smarty.const.BASEDIR}{literal}includes/ajax.response.php?request=pm&parms=text");150 document.getElementById("new_pm_panel").style.display = 'inline';151 } else {152 document.getElementById("new_pm_panel").style.display = 'none';153 }154 }155 // restart the timer for the next check, in 5 minutes156 msgtimerid = setTimeout("checkMessages()", 300000);157 186 } 158 187 {/literal} 159 {if iMEMBER} 160 // start the timer for the first check, in 5 minutes 161 msgtimerid = setTimeout("checkMessages()", 300000); 188 var locale_028 = "{$locale.028}"; 189 var exitecms_basedir = "{$smarty.const.BASEDIR}"; 190 var exitecms_themedir = "{$smarty.const.THEME}"; 191 // start the timer for the first check, in 1 minute 192 msgtimerid = setTimeout("checkMessages()", 60000); 162 193 {/if} 163 194 /* ]]> */ -
branches/PLi-Fusion/administration/forums.php
r2342 r2364 215 215 $forum_attach = isset($_POST['forum_attach'])?"1":"0"; 216 216 $forum_attachtypes = stripinput($_POST['forum_attachtypes']); 217 $forum_prefix = isset($_POST['forum_prefix'])?"1":"0"; 217 218 $forum_prefixes = stripinput($_POST['forum_prefixes']); 218 219 if ($action == "edit" && $t == "forum") { … … 240 241 } 241 242 // update the forum record 242 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_name='".mysql_real_escape_string($forum_name)."', forum_cat='$forum_cat', forum_description='".mysql_real_escape_string($forum_description)."', forum_access='$forum_access', forum_posting='$forum_posting', forum_modgroup='$forum_modgroup', forum_attach='$forum_attach', forum_attachtypes='$forum_attachtypes', forum_prefix es='".mysql_real_escape_string($forum_prefixes)."', forum_rulespage='$forum_rulespage', forum_banners='$forum_banners' WHERE forum_id='$forum_id'");243 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_name='".mysql_real_escape_string($forum_name)."', forum_cat='$forum_cat', forum_description='".mysql_real_escape_string($forum_description)."', forum_access='$forum_access', forum_posting='$forum_posting', forum_modgroup='$forum_modgroup', forum_attach='$forum_attach', forum_attachtypes='$forum_attachtypes', forum_prefix='$forum_prefix', forum_prefixes='".mysql_real_escape_string($forum_prefixes)."', forum_rulespage='$forum_rulespage', forum_banners='$forum_banners' WHERE forum_id='$forum_id'"); 243 244 redirect(FUSION_SELF.$aidlink."&status=savefe"); 244 245 } else { … … 248 249 if(!$forum_order) $forum_order=dbfunction("MAX(forum_order)", "forums", "forum_cat='$forum_cat'")+1; 249 250 $result = dbquery("UPDATE ".$db_prefix."forums SET forum_order=forum_order+1 WHERE forum_cat='$forum_cat' AND forum_order>='$forum_order'"); 250 $result = dbquery("INSERT INTO ".$db_prefix."forums (forum_cat, forum_name, forum_order, forum_description, forum_moderators, forum_access, forum_posting, forum_modgroup, forum_attach, forum_attachtypes, forum_prefix es, forum_rulespage, forum_banners, forum_lastpost, forum_lastuser) VALUES ('$forum_cat', '$forum_name', '$forum_order', '$forum_description', '$forum_mods', '$forum_access', '$forum_posting', '$forum_modgroup', '$forum_attach', '$forum_attachtypes', '".mysql_real_escape_string($forum_prefixes)."', '$forum_rulespage', '$forum_banners', '0', '0')");251 $result = dbquery("INSERT INTO ".$db_prefix."forums (forum_cat, forum_name, forum_order, forum_description, forum_moderators, forum_access, forum_posting, forum_modgroup, forum_attach, forum_attachtypes, forum_prefix, forum_prefixes, forum_rulespage, forum_banners, forum_lastpost, forum_lastuser) VALUES ('$forum_cat', '$forum_name', '$forum_order', '$forum_description', '$forum_mods', '$forum_access', '$forum_posting', '$forum_modgroup', '$forum_attach', '$forum_attachtypes', '$forum_prefix', '".mysql_real_escape_string($forum_prefixes)."', '$forum_rulespage', '$forum_banners', '0', '0')"); 251 252 redirect(FUSION_SELF.$aidlink."&status=savefu"); 252 253 } … … 321 322 $forum_attach = $data['forum_attach']?true:false; 322 323 $forum_attachtypes = $data['forum_attachtypes']; 324 $forum_prefix = $data['forum_prefix']; 323 325 $forum_prefixes = $data['forum_prefixes']; 324 326 $forum_title = $locale['422']; … … 346 348 $forum_attach = ($settings['attachments'] == 1); 347 349 $forum_attachtypes = $settings['attachtypes']; 350 $forum_prefix = 0; 348 351 $forum_prefixes = ""; 349 352 $forum_title = $locale['421']; … … 420 423 $variables['forum_attach'] = $forum_attach; 421 424 $variables['forum_attachtypes'] = $forum_attachtypes; 425 $variables['forum_prefix'] = $forum_prefix; 422 426 $variables['forum_prefixes'] = $forum_prefixes; 423 427 $variables['forum_rulespage'] = $forum_rulespage; -
branches/PLi-Fusion/administration/tools/language_pack_English.php
r2348 r2364 368 368 $localestrings['493'] = "Refresh Forum Ordering"; 369 369 $localestrings['494'] = "Subject prefix list:"; 370 $localestrings['495'] = "Use subject prefixes in this forum"; 370 371 load_localestrings($localestrings, LP_LOCALE, "admin.forums", $step); 371 372 … … 2579 2580 $localestrings['473'] = "Comments (Max.length: 255 characters):"; 2580 2581 $localestrings['474'] = "Toggle Message"; 2582 $localestrings['475'] = "Error: Your are required to select a prefix when posting in this forum"; 2581 2583 $localestrings['480'] = " Make this Thread Sticky"; 2582 2584 $localestrings['481'] = " Show My Signature in this Post"; … … 2590 2592 $localestrings['500'] = "You cannot edit this post."; 2591 2593 $localestrings['501'] = "You cannot move a post that has a poll attached to it."; 2592 $localestrings['502'] = "You cannot edit this post. The thread has been locked by a moderator";2593 2594 $localestrings['530'] = "Search Forum"; 2594 2595 $localestrings['531'] = "Search Keyword(s)"; … … 2599 2600 $localestrings['550'] = "Thread Reply Notification - {THREAD_SUBJECT}"; 2600 2601 $localestrings['551'] = "Hello {USERNAME},\n\nA reply has been posted in the forum thread '{THREAD_SUBJECT}' which you are tracking at {SITE_NAME}. You can use the following link to view the reply:\n\n{THREAD_URL}\n\nIf you no longer wish to watch this thread you can click the 'Tracking Off' button located at the bottom of the thread.\n\nRegards,\n{SITE_WEBMASTER}."; 2602 $localestrings['552'] = "You cannot edit this post. The thread has been locked by a moderator"; 2601 2603 load_localestrings($localestrings, LP_LOCALE, "forum.post", $step); 2602 2604 … … 3846 3848 if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "us|gb|ca|au|nz|in|za|ir|mt|hk|pr"); 3847 3849 if (!defined('LP_VERSION')) define('LP_VERSION', "7.30"); 3848 if (!defined('LP_DATE')) define('LP_DATE', time());3850 if (!defined('LP_DATE')) define('LP_DATE', "1280139239"); 3849 3851 $lp_date = LP_DATE; 3850 3852 -
branches/PLi-Fusion/administration/tools/language_pack_Nederlands.php
r2348 r2364 368 368 $localestrings['493'] = "Volgorde herrekenen"; 369 369 $localestrings['494'] = "Topic prefix lijst:"; 370 $localestrings['495'] = "Gebruik topic prefixen voor dit forum"; 370 371 load_localestrings($localestrings, LP_LOCALE, "admin.forums", $step); 371 372 … … 2579 2580 $localestrings['473'] = "Commentaar (Max.lengte: 255 tekens):"; 2580 2581 $localestrings['474'] = "Orgineel bericht"; 2582 $localestrings['475'] = "Fout: U bent verplicht een prefix te kiezen als u een bericht in dit forum wilt plaatsen"; 2581 2583 $localestrings['480'] = " Maak deze topic belangrijk"; 2582 2584 $localestrings['481'] = " Toon mijn handtekening onder dit bericht"; … … 2590 2592 $localestrings['500'] = "U kunt dit bericht niet wijzigen."; 2591 2593 $localestrings['501'] = "U kunt geen bericht verplaatsen waaraan een poll is gekoppeld."; 2592 $localestrings['502'] = "U kunt dit bericht niet wijzigen. Deze topic is gesloten door een moderator.";2593 2594 $localestrings['530'] = "Zoeken"; 2594 2595 $localestrings['531'] = "Zoekwoord(en)"; … … 2599 2600 $localestrings['550'] = "Notificatie van anwoord op topic - {THREAD_SUBJECT}"; 2600 2601 $localestrings['551'] = "Hallo {USERNAME},\n\nEr is een antwoord geplaatst in de forum topic '{THREAD_SUBJECT}' welke u volgt op {SITE_NAME}. U kunt de volgende link gebruiken om het antwoord te lezen:\n\n{THREAD_URL}\n\nAls u dit topic niet langer wil volgen, klik dan op de 'Stop het volgen van dit topic' knop die u onderaan het topic scherm kunt vinden.\n\nMet vriendelijke groeten,\n{SITE_WEBMASTER}."; 2602 $localestrings['552'] = "U kunt dit bericht niet wijzigen. Deze topic is gesloten door een moderator."; 2601 2603 load_localestrings($localestrings, LP_LOCALE, "forum.post", $step); 2602 2604 … … 3846 3848 if (!defined('LP_COUNTRIES')) define('LP_COUNTRIES', "nl|be|sr|aw|an"); 3847 3849 if (!defined('LP_VERSION')) define('LP_VERSION', "7.30"); 3848 if (!defined('LP_DATE')) define('LP_DATE', time());3850 if (!defined('LP_DATE')) define('LP_DATE', "1280139245"); 3849 3851 $lp_date = LP_DATE; 3850 3852 -
branches/PLi-Fusion/files/locales/en.main.global.php
r2348 r2364 3 3 // locale : English 4 4 // locale name : main.global 5 // generated on : Wed Jun 9 2010, 17:36:48CEST5 // generated on : Mon Jul 26 2010, 12:14:21 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
branches/PLi-Fusion/files/locales/en.main.setup.php
r2346 r2364 3 3 // locale : English 4 4 // locale name : main.setup 5 // generated on : Tue Jun 8 2010, 22:35:58CEST6 // translators : ExiteCMS team 5 // generated on : Wed Jun 16 2010, 19:48:07 CEST 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- 8 8 $locale['400'] = "Select your default locale"; -
branches/PLi-Fusion/files/locales/nl.main.global.php
r2348 r2364 3 3 // locale : Nederlands 4 4 // locale name : main.global 5 // generated on : Wed Jun 9 2010, 17:37:56CEST5 // generated on : Wed Jun 16 2010, 19:48:12 CEST 6 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- -
branches/PLi-Fusion/files/locales/nl.main.setup.php
r2346 r2364 3 3 // locale : English 4 4 // locale name : main.setup 5 // generated on : Tue Jun 8 2010, 22:36:03CEST6 // translators : ExiteCMS team 5 // generated on : Wed Jun 16 2010, 19:48:12 CEST 6 // translators : ExiteCMS team,WanWizard 7 7 // ---------------------------------------------------------- 8 8 $locale['400'] = "Selecteer de standaard taal voor uw site"; -
branches/PLi-Fusion/forum/post.php
r2348 r2364 62 62 // function to validate the contents of the $_POST array 63 63 function validatepost() { 64 global $locale ;64 global $locale, $fdata; 65 65 66 66 // we need both a subject and a message body … … 71 71 if ($_POST['new_prefix'] == '[?]') $_POST['new_prefix'] = ''; 72 72 73 // is a prefix required? 74 if ($fdata['forum_prefix'] && !empty($fdata['forum_prefixes']) && empty($_POST['new_prefix'])) { 75 return $locale['475']; 76 } 77 73 78 return ""; 74 79 } 75 80 76 81 // function to add or replace the prefix in the subject 77 function subject_prefix($subject, $prefix) { 82 function strip_prefix($subject) { 83 84 $result = array('subject' => '', 'prefix' => ''); 85 86 // check for a reply, and strip the reply prefix 87 if (strtolower(substr($subject,0,3))=="re:") { 88 $result['subject'] = "Re: "; 89 $subject = trim(substr($subject,3)); 90 } 91 92 // split the subject to check for a prefix 93 if (preg_match('~(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 94 // a match must be at the beginning 95 if (empty($matches[1])) { 96 $result['prefix'] .= $matches[2]; 97 $result['subject'] .= trim($matches[3]); 98 } else { 99 $result['subject'] .= $matches[0]; 100 } 101 } else { 102 $result['subject'] .= $subject; 103 } 104 105 return $result; 106 } 107 108 // function to add or replace the prefix in the subject 109 function add_prefix($subject, $prefix) { 78 110 79 111 // was a prefix defined … … 83 115 84 116 // split the subject to check for a prefix 85 if (!preg_match('~( .*)\[(.*)\](.*)~', $subject, $matches))86 { 87 // was this a reply?88 if (strtolower(substr($subject,0,3)) == 're:') {89 $subject = 'Re: [' . $prefix . '] ' . substr($subject,4);117 if (!preg_match('~(re:)(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 118 119 if (preg_match('~(.*?)\[(.*?)\](.*)~i', $subject, $matches)) { 120 if (empty($matches[1])) { 121 $subject = '[' . $prefix . '] ' . trim($matches[3]); 90 122 } else { 91 123 $subject = '[' . $prefix . '] ' . $subject; 92 124 } 93 125 } else { 94 // remove spaces from the matches 95 foreach($matches as $key => $value) { 96 $matches[$key] = trim($value); 97 } 98 unset($matches[0]); 99 $matches[2] = '[' . trim($prefix) . ']'; 100 $subject = trim(implode(' ', $matches)); 101 } 126 if (preg_match('~(re:)(.*)~i', $subject, $matches)) { 127 $subject = 'Re: [' . $prefix . '] ' . trim($matches[2]); 128 } else { 129 $subject = '[' . $prefix . '] ' . $subject; 130 } 131 } 132 } else { 133 $subject = 'Re: [' . $prefix . '] ' . trim($matches[4]); 134 } 102 135 } 103 136 … … 490 523 $preview['post_subject'] = trim(stripinput(censorwords($_POST['subject'])));; 491 524 if ($preview['post_subject'] == "" && isset($tdata) && is_array($tdata)) { 492 $preview['post_subject'] = "Re: ".$tdata['thread_subject'];525 $preview['post_subject'] = add_prefix("Re: ".$tdata['thread_subject'], trim(stripinput($_POST['new_prefix']))); 493 526 } else { 494 $preview['post_subject'] = subject_prefix($preview['post_subject'], trim(stripinput($_POST['new_prefix'])));527 $preview['post_subject'] = add_prefix($preview['post_subject'], trim(stripinput($_POST['new_prefix']))); 495 528 } 496 529 $preview['post_message'] = trim(stripmessageinput(censorwords($_POST['message']))); … … 614 647 // bail out if an edit is requested, but no edit rights have been detected 615 648 if ($action == "edit" && !$user_can_edit) { 616 resultdialog($locale['408'], $locale['5 02']);649 resultdialog($locale['408'], $locale['552']); 617 650 } elseif (isset($_POST["cancel"])) { 618 651 // post cancelled? … … 649 682 $smileys = isset($_POST['disable_smileys']) ? "0" : "1"; 650 683 $subject = trim(stripinput(censorwords($_POST['subject']))); 684 if (isset($tdata) && strtolower(substr($subject,0,3)) != "re:") { 651 685 if ($subject == "") { 652 686 $subject = "Re: ".$tdata['thread_subject']; 687 } else { 688 if ($action != "edit") { 689 $subject = "Re: ".$subject; 653 690 } 654 $subject = subject_prefix($subject, stripinput($_POST['new_prefix'])); 691 } 692 } 693 if ($fdata['forum_prefix']) { 694 $subject = add_prefix($subject, stripinput($_POST['new_prefix'])); 695 } 655 696 $message = trim(stripmessageinput(censorwords($_POST['message']))); 656 697 if ($action == 'edit') { 657 698 // update the post record 658 699 if ($_POST['message'] == $_POST['org_message']) 659 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject=' $subject', post_smileys='$smileys' WHERE post_id='$post_id'");700 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject='".mysql_real_escape_string($subject)."', post_smileys='$smileys' WHERE post_id='$post_id'"); 660 701 else { 661 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject=' $subject', post_message='$message', post_smileys='$smileys', post_edituser='".$userdata['user_id']."', post_edittime='".time()."' WHERE post_id='$post_id'");702 $result = dbquery("UPDATE ".$db_prefix."posts SET post_subject='".mysql_real_escape_string($subject)."', post_message='".mysql_real_escape_string($message)."', post_smileys='$smileys', post_edituser='".$userdata['user_id']."', post_edittime='".time()."' WHERE post_id='$post_id'"); 662 703 } 663 704 $data = dbarray(dbquery("SELECT * FROM ".$db_prefix."posts WHERE thread_id='$thread_id' ORDER BY post_datestamp ASC LIMIT 1")); 664 705 if ($data['post_id'] == $post_id) { 665 $result = dbquery("UPDATE ".$db_prefix."threads SET thread_subject=' $subject' WHERE thread_id='$thread_id'");706 $result = dbquery("UPDATE ".$db_prefix."threads SET thread_subject='".mysql_real_escape_string($subject)."' WHERE thread_id='$thread_id'"); 666 707 } 667 708 // flag the forum and the thread as updated … … 808 849 rename(PATH_ATTACHMENTS.$attachment['attach_tmp'], PATH_ATTACHMENTS.$attachname); 809 850 chmod(PATH_ATTACHMENTS.$attachname,0664); 810 $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_realname, attach_comment, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', ' $attachname', '".$attachment['attach_name']."', '".$attachment['attach_comment']."', '$attachext', '".$attachment['attach_size']."')");851 $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_realname, attach_comment, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '".mysql_real_escape_string($attachname)."', '".mysql_real_escape_string($attachment['attach_name'])."', '".mysql_real_escape_string($attachment['attach_comment'])."', '$attachext', '".$attachment['attach_size']."')"); 811 852 } 812 853 } … … 1020 1061 $variables['prefixes'] = array(); 1021 1062 foreach ($prefixes as $prefix) { 1022 if (!empty($prefix)) $variables['prefixes'][] = trim($prefix); 1063 $prefix = trim($prefix); 1064 if (!empty($prefix)) $variables['prefixes'][] = $prefix; 1023 1065 } 1024 1066 if (!isset($title)) $title = $locale['415']." #".$reply_id; … … 1044 1086 } elseif ($post_id > 0 || $reply_id > 0) { 1045 1087 $subject = $pdata['post_subject']; 1046 // split the subject to check for a prefix 1047 if (preg_match('~(.*)\[(.*)\](.*)~', $subject, $matches)) 1048 { 1049 // update the subject, set the prefixes 1050 $subject = trim($matches[3]); 1051 $variables['prefix'] = $matches[2]; 1052 $variables['new_prefix'] = '['.$matches[2].']'; 1053 } 1054 if ($action != "newthread" && strtolower(substr($subject,0,3)) != "re:") { 1088 if (!in_array($action, array("edit","newthread")) && strtolower(substr($subject,0,3)) != "re:") { 1055 1089 $variables['subject'] = 'Re: '.$subject; 1056 1090 } else { … … 1088 1122 $bbcolor = ""; 1089 1123 } 1124 // do we need to deal with a subject prefix 1125 if (!isset($variables['prefix'])) { 1126 $sparray = strip_prefix($variables['subject']); 1127 1128 $variables['subject'] = $sparray['subject']; 1129 // check if it's a custom prefix 1130 if (in_array($sparray['prefix'],$variables['prefixes'])) { 1131 $variables['prefix'] = $sparray['prefix']; 1132 $variables['new_prefix'] = '['.$sparray['prefix'].']'; 1133 } else { 1134 if (empty($sparray['prefix'])) { 1135 $variables['prefix'] = ''; 1136 $variables['new_prefix'] = '[?]'; 1137 } else { 1138 $variables['prefix'] = '?'; 1139 $variables['new_prefix'] = '['.$sparray['prefix'].']'; 1140 } 1141 } 1142 } 1143 1090 1144 // process attachments 1091 1145 if ($settings['attachments'] == "1" && $fdata['forum_attach'] == "1") { -
branches/PLi-Fusion/includes/ajax.response.php
r2166 r2364 89 89 // make sure we have json_encode and json_decode available 90 90 require_once "json_include.php"; 91 header("Content-Type:application/json; charset=utf-8"); 91 92 if (iMEMBER) { 92 93 // return the user record datastore … … 104 105 } 105 106 } 107 break; 108 case "counters": 109 if (!iMEMBER) { 110 $pms = $posts = 0; 111 $pmtext = $posttext = ""; 112 } else { 113 $pms = dbcount("(pmindex_id)", "pm_index", "pmindex_user_id='".$userdata['user_id']."' AND pmindex_to_id='".$userdata['user_id']."' AND pmindex_read_datestamp = '0'"); 114 if ($pms == 1) { 115 $pmtext = sprintf($locale['085'], $pms); 116 } else { 117 $pmtext = sprintf($locale['086'], $pms); 118 } 119 if ($userdata['user_posts_unread']) { 120 $result = dbquery(" 121 SELECT count(*) as unread 122 FROM ".$db_prefix."posts p 123 INNER JOIN ".$db_prefix."forums f ON p.forum_id = f.forum_id 124 INNER JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 125 WHERE ".groupaccess('f.forum_access')." 126 AND tr.user_id = '".$userdata['user_id']."' 127 AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") 128 AND ((p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read) 129 OR (p.post_datestamp < tr.thread_first_read OR (p.post_edittime != 0 AND p.post_edittime < tr.thread_first_read)))" 130 ); 131 } else { 132 $result = dbquery(" 133 SELECT count(*) as unread 134 FROM ".$db_prefix."posts p 135 INNER JOIN ".$db_prefix."forums f ON p.forum_id = f.forum_id 136 INNER JOIN ".$db_prefix."threads_read tr ON p.thread_id = tr.thread_id 137 WHERE ".groupaccess('f.forum_access')." 138 AND tr.user_id = '".$userdata['user_id']."' 139 AND p.post_author != '".$userdata['user_id']."' 140 AND p.post_edituser != '".$userdata['user_id']."' 141 AND (p.post_datestamp > ".$settings['unread_threshold']." OR p.post_edittime > ".$settings['unread_threshold'].") 142 AND ((p.post_datestamp > tr.thread_last_read OR p.post_edittime > tr.thread_last_read) 143 OR (p.post_datestamp < tr.thread_first_read OR (p.post_edittime != 0 AND p.post_edittime < tr.thread_first_read)))" 144 ); 145 } 146 $posts = ($result ? mysql_result($result, 0) : 0); 147 if ($posts == 1) { 148 $posttext = sprintf($locale['088'], $posts); 149 } else { 150 $posttext = sprintf($locale['089'], $posts); 151 } 152 } 153 // make sure we have json_encode and json_decode available 154 require_once "json_include.php"; 155 // send the results back 156 header("Content-Type:application/json; charset=utf-8"); 157 echo json_encode(array('pmcount' => $pms, 'pmtext' => $pmtext, 'postcount' => $posts, 'posttext' => $posttext)); 106 158 break; 107 159 case "pm": … … 211 263 mysql_close(); 212 264 } 213 ?> -
branches/PLi-Fusion/includes/jscripts/core_functions.js
r2301 r2364 104 104 } 105 105 } 106 } 107 108 // return a new AJAX object 109 function asyncajaxcall() { 110 var result = false; 111 if (window.XMLHttpRequest) { 112 // For Safari, Firefox, and other non-MS browsers 113 try { 114 result = new XMLHttpRequest(); 115 } catch (e) { 116 result = false; 117 } 118 } else if (window.ActiveXObject) { 119 // For Internet Explorer on Windows 120 try { 121 result = new ActiveXObject("Msxml2.XMLHTTP"); 122 } catch (e) { 123 try { 124 result = new ActiveXObject("Microsoft.XMLHTTP"); 125 } catch (e) { 126 result = false; 127 } 128 } 129 } 130 return result; 106 131 } 107 132 -
branches/PLi-Fusion/includes/secureimage-1.0.3/securimage.php
r1986 r2364 18 18 * License along with this library; if not, write to the Free Software 19 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br /><br /> 20 * 21 * Any modifications to the library should be indicated clearly in the source code 20 * 21 * Any modifications to the library should be indicated clearly in the source code 22 22 * to inform users that the changes are not a part of the original software.<br /><br /> 23 23 * … … 121 121 var $charset = 'ABCDEFGHKLMNPRSTUVWYZ23456789'; 122 122 //var $charset = '0123456789'; 123 123 124 124 /** 125 125 * Create codes using this word list … … 128 128 */ 129 129 var $wordlist_file = ''; 130 130 131 131 /** 132 132 * True to use a word list file instead of a random code … … 363 363 var $audio_path = './audio/'; 364 364 365 /** 366 * Captcha expiry timeout in seconds. 367 * 368 * @since 1.0.3 369 * @var string 370 */ 371 var $timeout = 300; 372 373 365 374 366 375 //END USER CONFIGURATION … … 423 432 die('no session available!'); 424 433 } 425 434 426 435 // we use random colors to make it even more difficult 427 436 $this->image_bg_color = $this->getHexColor(); … … 445 454 return $clr; 446 455 } 447 456 448 457 /** 449 458 * Generate a code and output the image to the browser. … … 693 702 { 694 703 $this->code = false; 695 704 696 705 if ($this->use_wordlist && is_readable($this->wordlist_file)) { 697 706 $this->code = $this->readCodeFromFile(); 698 707 } 699 708 700 709 if ($this->code == false) { 701 710 $this->code = $this->generateCode($this->code_length); 702 711 } 703 712 704 713 $this->saveData(); 705 714 } … … 721 730 return $code; 722 731 } 723 732 724 733 /** 725 734 * Reads a word list file to get a code … … 733 742 $fp = @fopen($this->wordlist_file, 'r'); 734 743 if (!$fp) return false; 735 744 736 745 $fsize = filesize($this->wordlist_file); 737 746 if ($fsize < 32) return false; // too small of a list to be effective 738 747 739 748 if ($fsize < 128) { 740 749 $max = $fsize; // still pretty small but changes the range of seeking … … 742 751 $max = 128; 743 752 } 744 753 745 754 fseek($fp, rand(0, $fsize - $max), SEEK_SET); 746 755 $data = fread($fp, 128); // read a random 128 bytes from file 747 756 fclose($fp); 748 757 749 758 $start = strpos($data, "\n", rand(0, 100)) + 1; // random start position 750 759 $end = strpos($data, "\n", $start) - 1; // find end of word 751 760 752 761 return strtolower(substr($data, $start, $end - $start)); // return substring in 128 bytes 753 762 } … … 822 831 { 823 832 $_SESSION['securimage_code_value'] = strtolower($this->code); 833 $_SESSION['securimage_code_timestamp'] = time(); 824 834 } 825 835 … … 834 844 if ( isset($_SESSION['securimage_code_value']) && !empty($_SESSION['securimage_code_value']) ) { 835 845 if ( $_SESSION['securimage_code_value'] == strtolower(trim($this->code_entered)) ) { 836 $this->correct_code = true; 837 $_SESSION['securimage_code_value'] = ''; 846 if (isset($_SESSION['securimage_code_timestamp']) && (time() - $_SESSION['securimage_code_timestamp']) < $this->timeout) { 847 $this->correct_code = true; 848 $_SESSION['securimage_code_value'] = ''; 849 } else { 850 $this->correct_code = false; 851 } 838 852 } else { 839 853 $this->correct_code = false; … … 906 920 $file['size'] = $data['ChunkSize'] + 8; 907 921 $file['data'] = $body; 908 922 909 923 if ( ($p = strpos($file['data'], 'LIST')) !== false) { 910 924 // If the LIST data is not at the end of the file, this will probably break your sound file … … 914 928 $file['size'] = $file['size'] - (strlen($file['data']) - $p); 915 929 } 916 930 917 931 $files[] = $file; 918 932 $data = null; -
branches/PLi-Fusion/includes/session_functions.php
r2232 r2364 48 48 49 49 // update the timestamp of the session cookie, we want expiry after the last page load, not after the session has started! 50 setcookie(ini_get("session.name"), session_id(), time()+ ini_get("session.gc_maxlifetime"), "/");50 setcookie(ini_get("session.name"), session_id(), time()+$settings['session_gc_maxlifetime'], "/"); 51 51 52 52 // store the last_url cookie if found -
branches/PLi-Fusion/includes/templates/admin.forums.tpl
r2342 r2364 65 65 <tr> 66 66 <td colspan='2' class='tbl'> 67 <input type='checkbox' name='forum_prefix' value='1' onchange='togglefields("prefixes");'{if $forum_prefix} checked="checked"{/if} /> {$locale.495} 68 </td> 69 </tr> 70 <tr id='prefixes'{if !$forum_prefix} style='display:none'{/if}> 71 <td colspan='2' class='tbl'> 67 72 {$locale.494} 68 73 <br /> … … 145 150 <tr> 146 151 <td colspan='2' class='tbl'> 147 <input type='checkbox' name='forum_attach' value='1' onchange='togglefields( );'{if $forum_attach} checked="checked"{/if} /> {$locale.469}152 <input type='checkbox' name='forum_attach' value='1' onchange='togglefields("attachtypes");'{if $forum_attach} checked="checked"{/if} /> {$locale.469} 148 153 </td> 149 154 </tr> … … 167 172 </form> 168 173 {literal}<script type='text/javascript'> 169 function togglefields( ) {174 function togglefields(name) { 170 175 if(navigator.appName.indexOf('Microsoft') > -1) { 171 176 state = 'block'; … … 173 178 state = 'table-row'; 174 179 } 175 if (document.getElementById( 'attachtypes').style.display == 'none') {176 document.getElementById( 'attachtypes').style.display = state;180 if (document.getElementById(name).style.display == 'none') { 181 document.getElementById(name).style.display = state; 177 182 } else { 178 document.getElementById( 'attachtypes').style.display = 'none';183 document.getElementById(name).style.display = 'none'; 179 184 } 180 185 } -
branches/PLi-Fusion/includes/templates/forum.index.tpl
r2346 r2364 151 151 {buttonlink name=$locale.415 link="tracking.php"} 152 152 {buttonlink name=$locale.414 link="viewposts.php"}<br /> 153 <form name='searchform' method='post' style="margin-top:2px;" action='{$smarty.const.BASEDIR}search.php? stype=f'>153 <form name='searchform' method='post' style="margin-top:2px;" action='{$smarty.const.BASEDIR}search.php?action=search'> 154 154 <input type='text' name='stext' class='textbox' style='width:150px' /> 155 <input type='hidden' name='boolean' value='1' /> 156 <input type='hidden' name='qtype' value='AND' /> 157 <input type='hidden' name='search_id' value='3.2' /> 158 <input type='hidden' name='sortby' value='datestamp' /> 159 <input type='hidden' name='order' value='0' /> 160 <input type='hidden' name='limit' value='0' /> 161 <input type='hidden' name='datelimit' value='0' /> 162 <input type='hidden' name='contentfilter_users' value='0' /> 163 <input type='hidden' name='contentfilter_forums' value='0' /> 155 164 <input type='submit' name='search' value='{$locale.550}' class='button' /> 156 165 </form> -
branches/PLi-Fusion/includes/templates/forum.post.tpl
r2348 r2364 124 124 <td> 125 125 <table width='100%' border='0' cellspacing='1' cellpadding='0'> 126 <tr >126 <tr {if $forum.forum_prefix == 0}style="display:none;"{/if}> 127 127 <td align='right' width='145' valign='top' class='tbl2'> 128 128 {$locale.533}: 129 129 </td> 130 130 <td class='tbl1'> 131 <select name="prefix" class="textbox" style="width:125px;" onChange="javascript:update_prefix(this);"> 132 <option value="">{$locale.534}</option> 131 {assign var=show_prefix value=0} 132 <select name="prefix" class="textbox" style="width:125px;" onChange="update_prefix(this);"> 133 <option value="" {if $prefix == ""}selected="selected"{/if}>{$locale.534}</option> 133 134 {foreach from=$prefixes item=post_prefix} 134 135 <option value="{$post_prefix}" {if $prefix == $post_prefix}selected="selected"{/if}>{$post_prefix}</option> 135 136 {/foreach} 136 <option value="?" >{$locale.535}</option>137 <option value="?" {if $prefix == "?"}selected="selected"{assign var=show_prefix value=1}{/if}>{$locale.535}</option> 137 138 </select> 138 <input type='text' id="new_prefix" name='new_prefix' value='{$new_prefix}' class='textbox' maxlength='255' style='width: 250px ' disabled="disabled"/>139 <input type='text' id="new_prefix" name='new_prefix' value='{$new_prefix}' class='textbox' maxlength='255' style='width: 250px;{if $show_prefix ==0}display:none;{/if}' /> 139 140 </td> 140 141 </tr> … … 150 151 <tr> 151 152 <td align='right' width='145' class='tbl2' valign='top' style='white-space:nowrap'> 152 <input type='submit' class='button' name='toggle_msg' value='{$locale.474}' onclick=' javascript:flipDiv("org_message");return false;' />153 <input type='submit' class='button' name='toggle_msg' value='{$locale.474}' onclick='flipDiv("org_message");return false;' /> 153 154 </td> 154 155 <td class='tbl1'> … … 194 195 <tr> 195 196 <td align='right' width='145' valign='top' class='tbl2'> 196 <input type='button' name='toggle' class='button' value='{$locale.467}' onclick=' javascript:loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' />197 <input type='button' name='toggle' class='button' value='{$locale.467}' onclick='loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' /> 197 198 </td> 198 199 <td class='tbl1'> … … 266 267 <input type='submit' name='upload' value='{$locale.471}' class='button' /> 267 268 {else} 268 <input type='submit' name='upload' value='{$locale.471}' class='button' onclick=' javascript:get_hoteditor_data("message");' />269 <input type='submit' name='upload' value='{$locale.471}' class='button' onclick='get_hoteditor_data("message");' /> 269 270 {/if} 270 271 </td> … … 309 310 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' /> 310 311 {else} 311 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' onclick=' javascript:get_hoteditor_data("message");' />312 <input type='submit' name='fpm[add_options]' class='button' value='{$locale.FPM_104}' onclick='get_hoteditor_data("message");' /> 312 313 {/if} 313 314 {/if} … … 380 381 <input type='submit' name='save' value='{$button_save}' class='button' /> 381 382 {else} 382 <input type='submit' name='preview' value='{$button_preview}' class='button' onclick=' javascript:document.getElementById("new_prefix").disabled = false;get_hoteditor_data("message");' />383 <input type='submit' name='save' value='{$button_save}' class='button' onclick=' javascript:document.getElementById("new_prefix").disabled = false;get_hoteditor_data("message");' />383 <input type='submit' name='preview' value='{$button_preview}' class='button' onclick='get_hoteditor_data("message");' /> 384 <input type='submit' name='save' value='{$button_save}' class='button' onclick='get_hoteditor_data("message");' /> 384 385 {/if} 385 386 <input type='hidden' name='post_author' value='{$post_author}' /> … … 413 414 if ( el.value == "?") { 414 415 document.getElementById('new_prefix').value = "[?]"; 415 document.getElementById('new_prefix'). disabled = false;416 document.getElementById('new_prefix').style.display = 'inline'; 416 417 document.getElementById('new_prefix').focus = true; 417 418 } else { 418 document.getElementById('new_prefix'). disabled = true;419 document.getElementById('new_prefix').style.display = 'none'; 419 420 if ( el.value == "") { 420 421 document.getElementById('new_prefix').value = "";
Note: See TracChangeset
for help on using the changeset viewer.
