From 177d9f9799df5238bb1b61e6c28d6f05ffef358d Mon Sep 17 00:00:00 2001 From: Chris Graham Date: Tue, 8 Nov 2011 14:20:38 +0000 Subject: [PATCH] Lots of fixes --- adminzone/pages/modules/admin_config.php | 13 +- adminzone/pages/modules/admin_newsletter.php | 10 +- adminzone/pages/modules/admin_themes.php | 4 +- config_editor.php | 3 + .../SpellChecker/spell-check-logic.php | 7 +- data_custom/addon_files.txt | 6 + data_custom/execute_temp.php | 2 - .../comcode_custom/EN/tut_newsletter.txt | 2 + .../comcode_custom/EN/tut_web_hosting.txt | 2 +- lang/EN/comcode.ini | 2 +- lang/EN/galleries.ini | 6 +- lang/EN/ocf.ini | 7 +- ocportal-git.tmproj | 318 ++++++++++++------ pages/modules/join.php | 31 ++ personalzone/pages/modules/editprofile.php | 9 +- site/pages/comcode/EN/userguide_comcode.txt | 2 +- site/pages/modules/calendar.php | 2 +- site/pages/modules/catalogues.php | 7 + site/pages/modules/galleries.php | 30 +- site/pages/modules/members.php | 2 +- site/pages/modules/warnings.php | 5 +- sources/blocks/side_tag_cloud.php | 2 +- sources/catalogues.php | 41 +-- sources/chat.php | 3 +- sources/comcode_text.php | 2 +- sources/currency.php | 4 +- sources/database_action.php | 2 +- sources/global2.php | 7 +- .../blocks/main_staff_checklist/cron.php | 3 +- .../systems/addon_registry/galleries.php | 2 + .../hooks/systems/awards/catalogue_entry.php | 2 +- sources/hooks/systems/cron/sitemap.php | 2 +- sources/misc_scripts.php | 2 + sources/ocf_groups.php | 18 +- sources/ocf_install.php | 5 + sources/ocf_members_action.php | 2 +- sources/ocf_members_action2.php | 5 +- sources/tempcode_compiler.php | 2 +- sources/users.php | 3 +- sources/version.php | 6 +- sources_custom/miniblocks/main_stars.php | 15 +- themes/default/css/chat.css | 2 + themes/default/css/galleries.css | 10 + themes/default/css/global.css | 2 +- .../default/templates/CHAT_LOBBY_IM_AREA.tpl | 2 +- themes/default/templates/GALLERY_NAV.tpl | 2 +- themes/default/templates/GLOBAL.tpl | 2 +- themes/default/templates/JAVASCRIPT.tpl | 2 +- themes/default/templates/JAVASCRIPT_CHAT.tpl | 2 +- .../templates/JAVASCRIPT_GALLERIES.tpl | 7 + .../templates/JAVASCRIPT_THUMBNAILS.tpl | 14 +- .../templates/JAVASCRIPT_VALIDATION.tpl | 6 + themes/default/templates/MAIL.tpl | 2 + .../NEWSLETTER_AUTOMATE_SECTION_FCOMCODE.tpl | 2 +- themes/default/templates/OCF_TOPIC_POLL.tpl | 1 + .../templates/RESULTS_BROWSER_LIST_PAGES.tpl | 2 +- .../templates/RESULTS_BROWSER_PER_SCREEN.tpl | 2 +- .../templates_custom/JAVASCRIPT_PLUPLOAD.tpl | 2 +- 58 files changed, 436 insertions(+), 224 deletions(-) diff --git a/adminzone/pages/modules/admin_config.php b/adminzone/pages/modules/admin_config.php index a7c30a328..d71cf68ba 100644 --- a/adminzone/pages/modules/admin_config.php +++ b/adminzone/pages/modules/admin_config.php @@ -692,6 +692,7 @@ function config_category() $out.=static_evaluate_tempcode(form_input_date($name_tempcode,$explanation,$myrow['the_name'],false,false,false,intval(get_option($myrow['the_name'])),40,intval(date('Y'))-20,NULL,false)); break; case 'forum': + case '?forum': if ((get_forum_type()=='ocf') && (addon_installed('ocf_forum'))) { $current_setting=get_option($myrow['the_name']); @@ -700,8 +701,14 @@ function config_category() $_current_setting=$GLOBALS['FORUM_DB']->query_value_null_ok('f_forums','id',array('f_name'=>$current_setting)); if (is_null($_current_setting)) { - $current_setting=strval(db_get_first_id()); - attach_message(do_lang_tempcode('FORUM_CURRENTLY_UNSET',$name_tempcode),'warn'); + if ($myrow['the_type']=='?forum') + { + $current_setting=NULL; + } else + { + $current_setting=strval(db_get_first_id()); + attach_message(do_lang_tempcode('FORUM_CURRENTLY_UNSET',$name_tempcode),'warn'); + } } else { $current_setting=strval($_current_setting); @@ -850,7 +857,7 @@ function config_set() $date_value=get_input_date($myrow['the_name']); $value=is_null($date_value)?'':strval($date_value); } - elseif (($myrow['the_type']=='forum') && (get_forum_type()=='ocf')) + elseif ((($myrow['the_type']=='forum') || ($myrow['the_type']=='?forum')) && (get_forum_type()=='ocf')) { $value=post_param($myrow['the_name']); if (is_numeric($value)) diff --git a/adminzone/pages/modules/admin_newsletter.php b/adminzone/pages/modules/admin_newsletter.php index 4e1989401..323eda9f7 100644 --- a/adminzone/pages/modules/admin_newsletter.php +++ b/adminzone/pages/modules/admin_newsletter.php @@ -125,6 +125,11 @@ function automatic_whats_new() $lang=choose_language($title); if (is_object($lang)) return $lang; + if (post_param('message','')!='') + { + return $this->send_gui(post_param('message')); + } + $_hooks=find_all_hooks('modules','admin_newsletter'); $chosen_content=post_param_integer('chosen_content',0); @@ -447,7 +452,7 @@ function import_subscribers() if ($jointime===false) $jointime=time(); $test=$GLOBALS['SITE_DB']->query_value_null_ok('newsletter','id',array('email'=>$email)); - if (!is_null($test)) + if (is_null($test)) { $GLOBALS['SITE_DB']->query_insert('newsletter',array( 'email'=>$email, @@ -933,6 +938,7 @@ function send_gui($_existing='') } $post_url=build_url(array('page'=>'_SELF','type'=>'confirm','old_type'=>get_param('type','')),'_SELF'); + $submit_name=do_lang_tempcode('PREVIEW'); // Build up form @@ -1090,7 +1096,7 @@ function confirm_send() breadcrumb_set_self(do_lang_tempcode('CONFIRM')); require_code('templates_confirm_screen'); - return form_confirm_screen($title,$preview,'send','new',$extra_post_data); + return form_confirm_screen($title,$preview,'send',get_param('old_type','new'),$extra_post_data); } /** diff --git a/adminzone/pages/modules/admin_themes.php b/adminzone/pages/modules/admin_themes.php index 88d4f5ab9..2f81b9f45 100644 --- a/adminzone/pages/modules/admin_themes.php +++ b/adminzone/pages/modules/admin_themes.php @@ -980,7 +980,7 @@ function get_css_revisions($theme,$find_for) { if ((substr($file,0,strlen($find_for)+1)==$find_for.'.') && (substr($file,-9)!='.editfrom')) { - $temp=explode('.',$file); + $temp=explode('.',$file,2); $filesarray[$file]=$temp[2]; } } @@ -1045,7 +1045,7 @@ function get_template_revisions($base_dir,$subdir,$find_for) if ((substr($file,0,strlen($find_for)+1)==$find_for.'.') && (substr($file,-9)!='.editfrom')) //if (substr($current,0,strlen($find_for)+1)==$find_for.'.') { - $temp=explode('.',$file); + $temp=explode('.',$file,2); if (is_numeric($temp[2])) $filesarray[$file]=intval($temp[2]); } } diff --git a/config_editor.php b/config_editor.php index 984e9b868..3b6d7cb37 100644 --- a/config_editor.php +++ b/config_editor.php @@ -259,6 +259,9 @@ function do_access($given_password) case 'prefer_direct_code_call': $notes='Assume a good opcode cache is present, so load up full code files via this rather than trying to save RAM by loading up small parts of files on occasion.'; break; + case 'backdoor_ip': + $notes='Always allow users accessing from this IP address in, automatically logged in as the oldest admin of the site.'; + break; } if (strpos($key,'_table_prefix')!==false) { diff --git a/data/areaedit/plugins/SpellChecker/spell-check-logic.php b/data/areaedit/plugins/SpellChecker/spell-check-logic.php index 4d5026938..1e61680a5 100644 --- a/data/areaedit/plugins/SpellChecker/spell-check-logic.php +++ b/data/areaedit/plugins/SpellChecker/spell-check-logic.php @@ -271,12 +271,15 @@ function aspell_init() { list($lang_stub,)=explode('_',$lang); + $charset=str_replace('ISO-','iso',str_replace('iso-','iso',do_lang('charset'))); if (DIRECTORY_SEPARATOR=='\\') // Windows pSpell is buggy, so we can't use the replacement-pairs feature. Also need to replace data dir with special one. { - $aspellcommand=pspell_new_personal($p_dict_path.'/'.$lang_stub.'.pws',$lang,$spelling,'',str_replace('ISO-','iso',str_replace('iso-','iso',do_lang('charset')))); + $aspellcommand=@pspell_new_personal($p_dict_path.'/'.$lang_stub.'.pws',$lang,$spelling,'',$charset); + if ($aspellconfig===false) $aspellcommand=pspell_new_personal($p_dict_path.'/'.$lang_stub.'.pws',$lang,$spelling,'',$charset); } else { - $aspellconfig=pspell_config_create($lang,$spelling,'',str_replace('ISO-','iso',str_replace('iso-','iso',do_lang('charset')))); + $aspellconfig=@pspell_config_create($lang,$spelling,'',$charset); + if ($aspellconfig===false) $aspellconfig=pspell_config_create('en',$spelling,'',$charset); pspell_config_personal($aspellconfig,$p_dict_path.'/'.$lang_stub.'.pws'); pspell_config_repl($aspellconfig,$p_dict_path.'/'.$lang_stub.'.prepl'); $aspellcommand=pspell_new_config($aspellconfig); diff --git a/data_custom/addon_files.txt b/data_custom/addon_files.txt index 245cce827..a74895a6d 100644 --- a/data_custom/addon_files.txt +++ b/data_custom/addon_files.txt @@ -2284,3 +2284,9 @@ theme_debug ----------- # # pages/minimodules_custom/EN/theme_debug.php + +nobox_gallery_entries +--------------------- + +# # sources_custom/hooks/systems/awards/video.php +# # sources_custom/hooks/systems/awards/image.php diff --git a/data_custom/execute_temp.php b/data_custom/execute_temp.php index 4a47c8873..4e9f8f202 100644 --- a/data_custom/execute_temp.php +++ b/data_custom/execute_temp.php @@ -67,8 +67,6 @@ */ function execute_temp() { -print_r(include('themes/default/templates_cached/EN/GLOBAL.tpl.tcp')); - } diff --git a/docs4/pages/comcode_custom/EN/tut_newsletter.txt b/docs4/pages/comcode_custom/EN/tut_newsletter.txt index b7d5e3f05..8cf15bd21 100755 --- a/docs4/pages/comcode_custom/EN/tut_newsletter.txt +++ b/docs4/pages/comcode_custom/EN/tut_newsletter.txt @@ -48,6 +48,8 @@ There is a newsletter archive available, so that you may browse through past new In a similar vein, you may create newsletters from news. To do this, just visit the view page for the news that you wish to use and click the appropriate link. You will then be given the choice to refine the newsletter before it is sent. +For each content type supported, it shows only if there are less than 300 items that would be covered. If there are 300 or more, then it considers the content type too common to include and no items are shown. + [title="2"]Customised targeting[/title] You may export the newsletter subscribers to a [acronym="Comma-separated Values"]CSV[/acronym] file, change it somehow (using whatever strategy you like) and then choose to send out newsletters to your altered copy of the CSV file. diff --git a/docs4/pages/comcode_custom/EN/tut_web_hosting.txt b/docs4/pages/comcode_custom/EN/tut_web_hosting.txt index db1716bfb..6256dfcab 100755 --- a/docs4/pages/comcode_custom/EN/tut_web_hosting.txt +++ b/docs4/pages/comcode_custom/EN/tut_web_hosting.txt @@ -138,7 +138,7 @@ Of course this is only a partial detailing of the directory structure, but the i For instance, if your account on the server was associated with a domain name, 'mywebsite.com', then [tt]http://www.mywebsite.com/index.php[/tt] would be tied to the file system file, '/home/your-account-name/httpdocs/index.php' (often the 'www.' is removable, but not on all servers). In addition, from your main FTP account, the same file would likely be '/httpdocs/index.php'. -In other words, three views of the file system exit, according to context: +In other words, three views of the file system exist, according to context: [list="1"] [*]The full file system view, which is usually completely hidden from you, but which is what ocPortal actually itself uses [*]The FTP view, which branches off from the base of your account directory in the full file system view diff --git a/lang/EN/comcode.ini b/lang/EN/comcode.ini index 322268e27..eb0bc87c0 100644 --- a/lang/EN/comcode.ini +++ b/lang/EN/comcode.ini @@ -60,7 +60,7 @@ CCP_NO_CLOSE=The tag, {1}, was closed, but it was not opened CCP_LIST_JUMPYNESS=The list unsmoothly jumped into multiple indentations CCP_MENU_JUMPYNESS=The menu unsmoothly jumped into multiple indentations ATTACHMENT_INLINE=Display inline (if possible) -ATTACHMENT_ISLAND=Display as an ‘island’ (if possible) +ATTACHMENT_ISLAND=Display as an ‘island’, i.e. with a border around it (if possible) ATTACHMENT_INLINE_EXTRACT=Display inline, extracting from TAR/ZIP archive (if possible) ATTACHMENT_ISLAND_EXTRACT=Display as an ‘island’, extracting from TAR/ZIP archive (if possible) ATTACHMENT_LEFT=Display ‘left/island’ (if possible) diff --git a/lang/EN/galleries.ini b/lang/EN/galleries.ini index e24d2838a..97397b564 100644 --- a/lang/EN/galleries.ini +++ b/lang/EN/galleries.ini @@ -111,8 +111,8 @@ DELETE_VIDEO=Delete video GALLERIES=Galleries VIEW_IMAGE=View image VIEW_SLIDESHOW=View slideshow: {1} -SPEED_IN_SECS=Speed in secs -VIEWING_GALLERY_ENTRY=« {1} of {2} » +SPEED_IN_SECS=Slide delay in secs +VIEWING_GALLERY_ENTRY=( {1} of {2} ) PT_may_download_gallery=Download the contents of a gallery as an archive file DOWNLOAD_GALLERY_CONTENTS=Download gallery files ADD_GALLERY_SELECTION=Add selection to gallery @@ -155,7 +155,7 @@ ECARD_FOR_YOU_SUBJECT=An e-card just for you ;) SLIDESHOW=Start slideshow from this entry to the end _SLIDESHOW=Start slideshow VIEWING_SLIDE=Viewing slide {1} of {2}. -CHANGING_IN=Slide will change in {1} seconds unless you press a key. +CHANGING_IN=Slide will change in {1} seconds unless you click to pause. STOPPED=Stopped. Click to continue. LAST_SLIDE=Finished. VIEW_ALONE_SLIDESHOW=View full-screen (good for starting a slide-show) diff --git a/lang/EN/ocf.ini b/lang/EN/ocf.ini index e09d0082c..9c1c52d63 100644 --- a/lang/EN/ocf.ini +++ b/lang/EN/ocf.ini @@ -292,7 +292,7 @@ PRIMARY_GROUP=Primary usergroup DESCRIPTION_PRIMARY_GROUP=This member's main usergroup. This can be considered a ‘rank’, or a ‘role’, or just to group members by privileges. DESCRIPTION_SECONDARY_GROUP=You may choose multiple secondary usergroups. Note that there may be other usergroups available with restricted or controlled membership, and these can be joined by browsing the usergroup directory. DESCRIPTION_MEMBER_VALIDATED=Whether this member is validated (allowed to login). -DEFAULT_PERMISSIONS_FROM=Take permissions from +DEFAULTPERMISSIONS_FROM=Take permissions from DESCRIPTION_DEFAULT_PERMISSIONS_FROM=Permissions for this usergroup will be based on the permissions of this usergroup. DESCRIPTION_DEFAULT_PERMISSIONS_FROM_NEW=Permissions for this usergroup will be based on the permissions of this usergroup. If you're going to use this as a primary group you should make a selection here. GROUP_TEXT=Please note that with most usergroup properties, members get the best deal of properties from of all the usergroups they are in. For example, if they were in 3 usergroups, that offered 25 gift points per day, 30 per day, and 10 per day, they would get 30 per day. @@ -891,3 +891,8 @@ GUEST_NAME=Your name GROUP_MEMBER_TIMEOUTS=Temporary usergroup membership DOC_GROUP_MEMBER_TIMEOUTS=Members may be put in a usergroup for a temporary period of time. This is useful, for example, if they pay a one-off amount of money to get a months access, or if you want to let them test something temporarily. DESCRIPTION_GROUPMT_MINUTES=The number of minutes to put the member usergroup for. If the member is already in this usergroup this will add on to their existing time (you may also enter a negative number to decrease their time). +INTRODUCE_YOURSELF=Introduce yourself +INTRO_POST_DEFAULT=Hi, I'm {1} +INTRO_FORUM_ID=Intro forum ID +CONFIG_OPTION_intro_forum_id=If you want new members to be invited to introduce themselves on the signup form, select a forum here. Their topic will be created in this forum. +DESCRIPTION_INTRO_POST=This post will be placed on the forum for you in a new topic. Of course, you can also start as many new topics as you like directly. diff --git a/ocportal-git.tmproj b/ocportal-git.tmproj index b82470231..334e82b67 100755 --- a/ocportal-git.tmproj +++ b/ocportal-git.tmproj @@ -2,6 +2,8 @@ + currentDocument + sources/hooks/systems/awards/catalogue_entry.php documents @@ -76,7 +78,7 @@ filename config_editor.php lastUsed - 2011-10-22T18:34:09Z + 2011-10-31T22:51:23Z name @@ -158,9 +160,7 @@ filename info.php lastUsed - 2011-10-28T11:55:19Z - selected - + 2011-11-07T13:23:40Z filename @@ -443,6 +443,20 @@ firstVisibleLine 0 + adminzone/pages/modules/admin_ocf_groups.php + + caret + + column + 3 + line + 334 + + firstVisibleColumn + 0 + firstVisibleLine + 330 + cms/pages/comcode/EN/panel_top.txt caret @@ -457,6 +471,20 @@ firstVisibleLine 0 + cms/pages/modules/cms_galleries.php + + caret + + column + 54 + line + 451 + + firstVisibleColumn + 0 + firstVisibleLine + 423 + collaboration/index.php caret @@ -811,6 +839,36 @@ firstVisibleLine 0 + lang/EN/comcode.ini + + caret + + column + 7 + line + 292 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 262 + selectFrom + + column + 0 + line + 292 + + selectTo + + column + 7 + line + 292 + + lang/EN/fields.ini caret @@ -909,6 +967,20 @@ firstVisibleLine 247 + site/pages/modules/catalogues.php + + caret + + column + 0 + line + 142 + + firstVisibleColumn + 0 + firstVisibleLine + 107 + site/pages/modules/downloads.php caret @@ -1013,6 +1085,20 @@ 58 + sources/catalogues.php + + caret + + column + 44 + line + 1284 + + firstVisibleColumn + 0 + firstVisibleLine + 1268 + sources/cedi_stats.php caret @@ -1157,76 +1243,6 @@ firstVisibleLine 0 - sources/hooks/modules/admin_newsletter/cedi.php - - caret - - column - 0 - line - 59 - - firstVisibleColumn - 0 - firstVisibleLine - 14 - - sources/hooks/modules/admin_newsletter/comcode_pages.php - - caret - - column - 0 - line - 0 - - firstVisibleColumn - 0 - firstVisibleLine - 28 - - sources/hooks/modules/admin_newsletter/downloads.php - - caret - - column - 0 - line - 58 - - firstVisibleColumn - 0 - firstVisibleLine - 29 - - sources/hooks/modules/admin_newsletter/ocf_forumview.php - - caret - - column - 0 - line - 54 - - firstVisibleColumn - 0 - firstVisibleLine - 27 - - sources/hooks/modules/admin_newsletter/quiz.php - - caret - - column - 0 - line - 42 - - firstVisibleColumn - 0 - firstVisibleLine - 14 - sources/hooks/modules/admin_occle_commands/append.php caret @@ -1677,6 +1693,20 @@ firstVisibleLine 51 + sources/hooks/systems/awards/catalogue_entry.php + + caret + + column + 0 + line + 70 + + firstVisibleColumn + 0 + firstVisibleLine + 26 + sources/hooks/systems/config_default/chat_default_post_colour.php caret @@ -1733,20 +1763,6 @@ firstVisibleLine 0 - sources/hooks/systems/cron/sitemap.php - - caret - - column - 14 - line - 36 - - firstVisibleColumn - 0 - firstVisibleLine - 0 - sources/hooks/systems/meta/events.php caret @@ -1903,6 +1919,20 @@ firstVisibleLine 0 + sources/users.php + + caret + + column + 32 + line + 310 + + firstVisibleColumn + 0 + firstVisibleLine + 298 + sources_custom/blocks/main_facebook_comments.php caret @@ -2077,6 +2107,36 @@ firstVisibleLine 50 + themes/default/css/global.css + + caret + + column + 50 + line + 3446 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 3418 + selectFrom + + column + 2 + line + 3446 + + selectTo + + column + 50 + line + 3446 + + themes/default/css_custom/index.html caret @@ -2205,20 +2265,6 @@ 1 - themes/default/templates/CATALOGUE_products_ENTRY.tpl - - caret - - column - 9 - line - 9 - - firstVisibleColumn - 0 - firstVisibleLine - 0 - themes/default/templates/CATALOGUE_products_LINE.tpl caret @@ -2425,6 +2471,36 @@ 0 + themes/default/templates/FOOTER.tpl + + caret + + column + 49 + line + 70 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 39 + selectFrom + + column + 31 + line + 70 + + selectTo + + column + 57 + line + 70 + + themes/default/templates/FORM_SCREEN_INPUT_CAPTCHA.tpl caret @@ -2511,6 +2587,36 @@ 2 + themes/default/templates/MENU_BRANCH_popup.tpl + + caret + + column + 222 + line + 3 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 137 + line + 3 + + selectTo + + column + 222 + line + 3 + + themes/default/templates/MENU_BRANCH_select.tpl caret @@ -3098,9 +3204,15 @@ 0 + openDocuments + + site/pages/modules/catalogues.php + sources/catalogues.php + sources/hooks/systems/awards/catalogue_entry.php + showFileHierarchyDrawer windowFrame - {{732, 135}, {1072, 828}} + {{898, -25}, {1009, 966}} diff --git a/pages/modules/join.php b/pages/modules/join.php index c22ed61ce..12bd8428d 100644 --- a/pages/modules/join.php +++ b/pages/modules/join.php @@ -164,6 +164,14 @@ function step2() list($fields,$_hidden)=ocf_get_member_fields(true,NULL,$groups); $hidden->attach($_hidden); + $forum_id=get_option('intro_forum_id'); + if ($forum_id!='') + { + $fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('INTRODUCE_YOURSELF')))); + $fields->attach(form_input_line(do_lang_tempcode('TITLE'),'','intro_title',do_lang('INTRO_POST_DEFAULT','___'),false)); + $fields->attach(form_input_text_comcode(do_lang_tempcode('POST_COMMENT'),do_lang_tempcode('DESCRIPTION_INTRO_POST'),'intro_post','',false)); + } + $text=do_lang_tempcode('ENTER_PROFILE_DETAILS'); if (addon_installed('captcha')) @@ -191,6 +199,11 @@ function step2() $script=find_script('username_check'); $javascript=" var form=document.getElementById('username').form; + form.elements['username'].onchange=function() + { + if (form.elements['intro_title']) + form.elements['intro_title'].value='".addslashes(do_lang('INTRO_POST_DEFAULT'))."'.replace(/\{1\}/g,form.elements['username'].value); + } form.old_submit=form.onsubmit; form.onsubmit=function() { @@ -406,6 +419,24 @@ function step3() $GLOBALS['FORUM_DB']->query_update('f_invites',array('i_taken'=>1),array('i_email_address'=>$email_address,'i_taken'=>0),'',1); + // Intro post + $forum_id=get_option('intro_forum_id'); + if ($forum_id!='') + { + if (!is_numeric($forum_id)) $forum_id=strval($GLOBALS['FORUM_DB']->query_value('f_forums','id',array('f_name'=>$forum_id))); + + $intro_title=post_param('intro_title',''); + $intro_post=post_param('intro_post',''); + if ($intro_post!='') + { + require_code('ocf_topics_action'); + if ($intro_title=='') $intro_title=do_lang('INTRO_POST_DEFAULT',$username); + $topic_id=ocf_make_topic(intval($forum_id)); + require_code('ocf_posts_action'); + ocf_make_post($topic_id,$intro_title,$intro_post,0,true,NULL,0,NULL,NULL,NULL,$member_id); + } + } + // Alert user to situation $message=new ocp_tempcode(); if ($coppa) diff --git a/personalzone/pages/modules/editprofile.php b/personalzone/pages/modules/editprofile.php index ec2da5a1b..d2b422b41 100644 --- a/personalzone/pages/modules/editprofile.php +++ b/personalzone/pages/modules/editprofile.php @@ -214,22 +214,21 @@ function actual() if (has_specific_permission(get_member(),'probate_members')) { $on_probation_until=get_input_date('on_probation_until'); - if (is_null($on_probation_until)) $on_probation_until=time(); $current__on_probation_until=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until'); - if (($on_probation_until<=time()) && ($current__on_probation_until>time())) + if (((is_null($on_probation_until)) || ($on_probation_until<=time())) && ($current__on_probation_until>time())) { log_it('STOP_PROBATION',strval($member_id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); } - elseif (($on_probation_until>time()) && ($current__on_probation_until<=time())) + elseif ((!is_null($on_probation_until)) && ($on_probation_until>time()) && ($current__on_probation_until<=time())) { log_it('START_PROBATION',strval($member_id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); } - elseif (($current__on_probation_until>$on_probation_until) && ($on_probation_until>time()) && ($current__on_probation_until>time())) + elseif ((!is_null($on_probation_until)) && ($current__on_probation_until>$on_probation_until) && ($on_probation_until>time()) && ($current__on_probation_until>time())) { log_it('REDUCE_PROBATION',strval($member_id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); } - elseif (($current__on_probation_until<$on_probation_until) && ($on_probation_until>time()) && ($current__on_probation_until>time())) + elseif ((!is_null($on_probation_until)) && ($current__on_probation_until<$on_probation_until) && ($on_probation_until>time()) && ($current__on_probation_until>time())) { log_it('EXTEND_PROBATION',strval($member_id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); } diff --git a/site/pages/comcode/EN/userguide_comcode.txt b/site/pages/comcode/EN/userguide_comcode.txt index 1141d2917..93c7d3c17 100755 --- a/site/pages/comcode/EN/userguide_comcode.txt +++ b/site/pages/comcode/EN/userguide_comcode.txt @@ -118,7 +118,7 @@ JavaScript script tags, onX handlers and URLs will all be filtered/blocked. Don' [url="This is a link"][/html]{$BASE_URL}[html][/url][/html][url="This is a link"]{$BASE_URL}[/url][html] [email="My E-Mail"]fake_address@example.com[/email][/html][email="My E-Mail"]fake_address@example.com[/email][html] - [page="cms" caption="Content Management"]cms[/page][/html][page="cms" caption="Content Management"]cms[/page][html] + [page="cms:cms"]Content Management[/page][/html][page="cms:cms"]Content Management[/page][html] [/html] diff --git a/site/pages/modules/calendar.php b/site/pages/modules/calendar.php index 30739e641..9ff7775aa 100644 --- a/site/pages/modules/calendar.php +++ b/site/pages/modules/calendar.php @@ -347,7 +347,7 @@ function get_sitemap_pagelinks($callback,$member_id,$depth,$pagelink_stub,$paren foreach ($entry_data as $row) { - if (!has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'calendar',strval($row['e_type']))) continue; + if (!has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(),'calendar',strval($row['category_id']))) continue; if (is_null($row['title'])) $row['title']=get_translated_text($row['e_title']); diff --git a/site/pages/modules/catalogues.php b/site/pages/modules/catalogues.php index 2a9291a16..4c3f56fc3 100644 --- a/site/pages/modules/catalogues.php +++ b/site/pages/modules/catalogues.php @@ -133,6 +133,13 @@ function install($upgrade_from=NULL,$upgrade_from_hack=NULL) $GLOBALS['SITE_DB']->create_index('catalogue_efv_integer','icf_id',array('cf_id'),'id'); $GLOBALS['SITE_DB']->create_index('catalogue_efv_float','fce_id',array('ce_id'),'id'); $GLOBALS['SITE_DB']->create_index('catalogue_efv_integer','ice_id',array('ce_id'),'id'); + + $GLOBALS['SITE_DB']->create_index('catalogue_efv_float','cefv_f_combo',array('ce_id','cf_id'),'id'); + $GLOBALS['SITE_DB']->create_index('catalogue_efv_integer','cefv_i_combo',array('ce_id','cf_id'),'id'); + $GLOBALS['SITE_DB']->create_index('catalogue_efv_long','cefv_l_combo',array('ce_id','cf_id'),'id'); + $GLOBALS['SITE_DB']->create_index('catalogue_efv_short','cefv_s_combo',array('ce_id','cf_id'),'id'); + $GLOBALS['SITE_DB']->create_index('catalogue_efv_long_trans','cefv_lt_combo',array('ce_id','cf_id'),'id'); + $GLOBALS['SITE_DB']->create_index('catalogue_efv_short_trans','cefv_st_combo',array('ce_id','cf_id'),'id'); } if (is_null($upgrade_from)) diff --git a/site/pages/modules/galleries.php b/site/pages/modules/galleries.php index 995571011..673a9ad90 100644 --- a/site/pages/modules/galleries.php +++ b/site/pages/modules/galleries.php @@ -1009,10 +1009,11 @@ function do_gallery_regular_mode($rating_details,$comment_details,$cat,$root,$de /** * The UI to show an image. * - * @return ?string Alternate category name to use (NULL: use standard one). This is useful if you are overriding this code to show images in virtual galleries. + * @param ?string Alternate category name to use (NULL: use standard one). This is useful if you are overriding this code to show images in virtual galleries. + * @param tempcode Breadcrumbs. * @return tempcode The UI */ - function show_image($category_name=NULL) + function show_image($category_name=NULL,$tree=NULL) { $id=get_param_integer('id'); @@ -1038,8 +1039,9 @@ function show_image($category_name=NULL) if (!has_category_access(get_member(),'galleries',$cat)) access_denied('CATEGORY_ACCESS'); + $true_category_name=get_translated_text($GLOBALS['SITE_DB']->query_value('galleries','fullname',array('name'=>$cat))); if (is_null($category_name)) - $category_name=get_translated_text($GLOBALS['SITE_DB']->query_value('galleries','fullname',array('name'=>$cat))); + $category_name=$true_category_name; if (get_param_integer('slideshow',0)==1) { @@ -1101,7 +1103,7 @@ function show_image($category_name=NULL) } $member_details=((is_null($member_id)) || (get_forum_type()!='ocf'))?new ocp_tempcode():ocf_show_member_box($member_id); - $tree=gallery_breadcrumbs($cat,$root,false,get_module_zone('galleries')); + if (is_null($tree)) $tree=gallery_breadcrumbs($cat,$root,false,get_module_zone('galleries')); breadcrumb_add_segment($tree,do_lang_tempcode('VIEW_IMAGE')); $GLOBALS['META_DATA']+=array( @@ -1116,16 +1118,17 @@ function show_image($category_name=NULL) 'image'=>$url, ); - return do_template('GALLERY_ENTRY_SCREEN',array('_GUID'=>'332a19b6a72505f8e1eb4d288df247ce','SLIDESHOW'=>(get_param_integer('slideshow',0)==1),'GALLERY_TITLE'=>$category_name,'MEMBER_ID'=>is_null($member_id)?'':strval($member_id),'ID'=>strval($id),'TAGS'=>get_loaded_tags('images'),'TITLE'=>$title,'SUBMITTER'=>strval($myrow['submitter']),'MEMBER_DETAILS'=>$member_details,'X'=>integer_format($x),'N'=>integer_format($n),'VIEWS'=>integer_format($myrow['image_views']),'ADD_DATE_RAW'=>strval($myrow['add_date']),'EDIT_DATE_RAW'=>is_null($myrow['edit_date'])?'':strval($myrow['edit_date']),'ADD_DATE'=>$add_date,'EDIT_DATE'=>$edit_date,'TRACKBACK_DETAILS'=>$trackback_details,'RATING_DETAILS'=>$rating_details,'COMMENT_DETAILS'=>$comment_details,'EDIT_URL'=>$edit_url,'NAV'=>$nav,'COMMENTS'=>$comments,'URL'=>$url,'WARNING_DETAILS'=>$warning_details)); + return do_template('GALLERY_ENTRY_SCREEN',array('_GUID'=>'332a19b6a72505f8e1eb4d288df247ce','CAT'=>$cat,'SLIDESHOW'=>(get_param_integer('slideshow',0)==1),'TRUE_GALLERY_TITLE'=>$true_category_name,'GALLERY_TITLE'=>$category_name,'MEMBER_ID'=>is_null($member_id)?'':strval($member_id),'ID'=>strval($id),'TAGS'=>get_loaded_tags('images'),'TITLE'=>$title,'SUBMITTER'=>strval($myrow['submitter']),'MEMBER_DETAILS'=>$member_details,'X'=>integer_format($x),'N'=>integer_format($n),'VIEWS'=>integer_format($myrow['image_views']),'ADD_DATE_RAW'=>strval($myrow['add_date']),'EDIT_DATE_RAW'=>is_null($myrow['edit_date'])?'':strval($myrow['edit_date']),'ADD_DATE'=>$add_date,'EDIT_DATE'=>$edit_date,'TRACKBACK_DETAILS'=>$trackback_details,'RATING_DETAILS'=>$rating_details,'COMMENT_DETAILS'=>$comment_details,'EDIT_URL'=>$edit_url,'NAV'=>$nav,'COMMENTS'=>$comments,'URL'=>$url,'WARNING_DETAILS'=>$warning_details)); } /** * The UI to show a video. * - * @return ?string Alternate category name to use (NULL: use standard one). This is useful if you are overriding this code to show images in virtual galleries. + * @param ?string Alternate category name to use (NULL: use standard one). This is useful if you are overriding this code to show images in virtual galleries. + * @param tempcode Breadcrumbs. * @return tempcode The UI */ - function show_video($category_name=NULL) + function show_video($category_name=NULL,$tree=NULL) { $id=get_param_integer('id'); @@ -1140,9 +1143,9 @@ function show_video($category_name=NULL) $title=get_page_title('VIEW_VIDEO',true,NULL,NULL,$awards); $root=get_param('root','root'); - + seo_meta_load_for('video',strval($id)); - + // Pic up some info $rows=$GLOBALS['SITE_DB']->query_select('videos',array('*'),array('id'=>$id),'',1); if (!array_key_exists(0,$rows)) @@ -1175,8 +1178,9 @@ function show_video($category_name=NULL) $comment_details=get_comment_details('videos',$myrow['allow_comments']==1,strval($id),false,get_value('comment_forum__videos'),NULL,NULL,false,false,$myrow['submitter'],$myrow['allow_comments']==2); $trackback_details=get_trackback_details('videos',strval($id),$myrow['allow_trackbacks']==1); + $true_category_name=get_translated_text($GLOBALS['SITE_DB']->query_value('galleries','fullname',array('name'=>$cat))); if (is_null($category_name)) - $category_name=get_translated_text($GLOBALS['SITE_DB']->query_value('galleries','fullname',array('name'=>$cat))); + $category_name=$true_category_name; // Validation if ($myrow['validated']==0) @@ -1217,7 +1221,7 @@ function show_video($category_name=NULL) $video_details=show_video_details($myrow); - $tree=gallery_breadcrumbs($cat,$root,false,get_module_zone('galleries')); + if (is_null($tree)) $tree=gallery_breadcrumbs($cat,$root,false,get_module_zone('galleries')); breadcrumb_add_segment($tree,do_lang_tempcode('VIEW_VIDEO')); $GLOBALS['META_DATA']+=array( @@ -1236,7 +1240,7 @@ function show_video($category_name=NULL) 'video:type'=>$mime_type, ); - return do_template('GALLERY_ENTRY_SCREEN',array('_GUID'=>'91e231906ed899513ec2db8a2974dddf','SLIDESHOW'=>false,'GALLERY_TITLE'=>$category_name,'MEMBER_ID'=>is_null($member_id)?'':strval($member_id),'ID'=>strval($id),'TAGS'=>get_loaded_tags('videos'),'TITLE'=>$title,'SUBMITTER'=>strval($myrow['submitter']),'URL'=>$url,'VIDEO_DETAILS'=>$video_details,'MEMBER_DETAILS'=>$member_details,'X'=>integer_format($x),'N'=>integer_format($n),'VIEWS'=>integer_format($myrow['video_views']),'ADD_DATE_RAW'=>strval($myrow['add_date']),'EDIT_DATE_RAW'=>is_null($myrow['edit_date'])?'':strval($myrow['edit_date']),'ADD_DATE'=>$add_date,'EDIT_DATE'=>$edit_date,'RATING_DETAILS'=>$rating_details,'TRACKBACK_DETAILS'=>$trackback_details,'COMMENT_DETAILS'=>$comment_details,'EDIT_URL'=>$edit_url,'NAV'=>$nav,'COMMENTS'=>$comments,'VIDEO'=>$video,'WARNING_DETAILS'=>$warning_details)); + return do_template('GALLERY_ENTRY_SCREEN',array('_GUID'=>'91e231906ed899513ec2db8a2974dddf','CAT'=>$cat,'SLIDESHOW'=>false,'TRUE_GALLERY_TITLE'=>$true_category_name,'GALLERY_TITLE'=>$category_name,'MEMBER_ID'=>is_null($member_id)?'':strval($member_id),'ID'=>strval($id),'TAGS'=>get_loaded_tags('videos'),'TITLE'=>$title,'SUBMITTER'=>strval($myrow['submitter']),'URL'=>$url,'VIDEO_DETAILS'=>$video_details,'MEMBER_DETAILS'=>$member_details,'X'=>integer_format($x),'N'=>integer_format($n),'VIEWS'=>integer_format($myrow['video_views']),'ADD_DATE_RAW'=>strval($myrow['add_date']),'EDIT_DATE_RAW'=>is_null($myrow['edit_date'])?'':strval($myrow['edit_date']),'ADD_DATE'=>$add_date,'EDIT_DATE'=>$edit_date,'RATING_DETAILS'=>$rating_details,'TRACKBACK_DETAILS'=>$trackback_details,'COMMENT_DETAILS'=>$comment_details,'EDIT_URL'=>$edit_url,'NAV'=>$nav,'COMMENTS'=>$comments,'VIDEO'=>$video,'WARNING_DETAILS'=>$warning_details)); } /** @@ -1386,7 +1390,7 @@ function show_nav($category_name,$where,$join,$current_id,$first_id,$back_id,$ne } // Link to show more. Preserve info about where we were - $slideshow_url=build_url(array('page'=>'_SELF','type'=>$first_type,'root'=>($root=='root')?NULL:$root,'wide_high'=>1,'id'=>$first_id,'slideshow'=>1,'sort'=>($sort=='add_date DESC')?NULL:$sort),'_SELF'); + $slideshow_url=build_url(array('page'=>'_SELF','type'=>$first_type,'root'=>($root=='root')?NULL:$root,'wide_high'=>1,'id'=>$first_id,'slideshow'=>1,'sort'=>($sort=='add_date DESC')?NULL:$sort),'_SELF',NULL,true); $more_url=is_null($cat)?NULL:build_url(array('page'=>'_SELF','type'=>'misc','id'=>$cat,'root'=>($root=='root')?NULL:$root,'start'=>($start==0)?NULL:$start,'max'=>($max==get_default_gallery_max())?NULL:$max,'sort'=>($sort=='add_date DESC')?NULL:$sort),'_SELF'); return do_template('GALLERY_NAV',array( diff --git a/site/pages/modules/members.php b/site/pages/modules/members.php index a403c8a0f..1d7cd3ebf 100644 --- a/site/pages/modules/members.php +++ b/site/pages/modules/members.php @@ -694,7 +694,7 @@ function profile() } else */$remote=NULL; $_on_probation=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until'); - if ($_on_probation<=time()) $on_probation=NULL; else $on_probation=strval($_on_probation); + if ((is_null($_on_probation)) || ($_on_probation<=time())) $on_probation=NULL; else $on_probation=strval($_on_probation); $GLOBALS['META_DATA']+=array( 'created'=>date('Y-m-d',$join_time), diff --git a/site/pages/modules/warnings.php b/site/pages/modules/warnings.php index b29daf1ac..d2639cd43 100644 --- a/site/pages/modules/warnings.php +++ b/site/pages/modules/warnings.php @@ -172,7 +172,8 @@ function undo_probation() $member_id=$GLOBALS['FORUM_DB']->query_value('f_warnings','w_member_id',array('id'=>$id)); $probation=$GLOBALS['FORUM_DB']->query_value('f_warnings','p_probation',array('id'=>$id)); $on_probation_until=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until'); - $GLOBALS['FORUM_DB']->query_update('f_members',array('m_on_probation_until'=>$on_probation_until-$probation*60*60*24),array('id'=>$member_id),'',1); + if (!is_null($on_probation_until)) + $GLOBALS['FORUM_DB']->query_update('f_members',array('m_on_probation_until'=>$on_probation_until-$probation*60*60*24),array('id'=>$member_id),'',1); $GLOBALS['FORUM_DB']->query_update('f_warnings',array('p_probation'=>0),array('id'=>$id),'',1); log_it('UNDO_PROBATION',strval($id),$GLOBALS['FORUM_DRIVER']->get_username($member_id)); @@ -650,7 +651,7 @@ function add_actualisation() if ($probation!=0) { $on_probation_until=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until'); - if ($on_probation_untilquery_update('f_members',array('m_on_probation_until'=>$on_probation_until),array('id'=>$member_id),'',1); } diff --git a/sources/blocks/side_tag_cloud.php b/sources/blocks/side_tag_cloud.php index a09493ff3..625b08e18 100755 --- a/sources/blocks/side_tag_cloud.php +++ b/sources/blocks/side_tag_cloud.php @@ -136,7 +136,7 @@ function run($map) 'TAG'=>$tag, 'COUNT'=>strval($count), 'EM'=>float_to_raw_string($em), - 'LINK'=>build_url(array('page'=>'search','type'=>'results','content'=>$tag,'days'=>-1,'only_search_meta'=>'1')+$search_limiter,$zone), + 'LINK'=>build_url(array('page'=>'search','type'=>'results','content'=>'"'.$tag.'"','days'=>-1,'only_search_meta'=>'1')+$search_limiter,$zone), ); } diff --git a/sources/catalogues.php b/sources/catalogues.php index e8191ccc2..d04be9c8d 100644 --- a/sources/catalogues.php +++ b/sources/catalogues.php @@ -235,34 +235,13 @@ function get_catalogue_category_entry_buildup($category_id,$catalogue_name,$cata } elseif ($order_by=='rating') { - $select_rating='(SELECT AVG(rating) FROM '.get_table_prefix().'rating WHERE '.db_string_equal_to('rating_for_type','catalogue_entry').' AND rating_for_id=id) AS compound_rating'; + $select_rating='(SELECT AVG(rating) FROM '.get_table_prefix().'rating WHERE '.db_string_equal_to('rating_for_type','catalogues').' AND rating_for_id=id) AS compound_rating'; $entries=($max==0)?array():$GLOBALS['SITE_DB']->query_select('catalogue_entries e',array('e.*',$select_rating),$map,'ORDER BY compound_rating '.$direction,$max,$start); } else { $ob=get_fields_hook($fields[intval($order_by)]['cf_type']); - list($raw_type,,)=$ob->get_field_value_row_bits($fields[$order_by]); - if (is_null($raw_type)) $raw_type=$fields[$order_by]['cf_type']; - - switch ($raw_type) - { - case 'short_trans': - $table='short_trans'; - break; - case 'long_trans': - $table='long_trans'; - break; - case 'long_unescaped': - case 'long_text': - $table='long'; - break; - case 'short_unescaped': - case 'short_text': - $table='short'; - break; - default: - warn_exit(do_lang_tempcode('INTERNAL_ERROR')); - } - + list(,,$table)=$ob->get_field_value_row_bits($fields[$order_by]); + if (strpos($table,'_trans')!==false) { $join='catalogue_entries e LEFT JOIN '.get_table_prefix().'catalogue_efv_'.$table.' f ON f.ce_id=e.id AND f.cf_id='.strval($fields[$order_by]['id']).' LEFT JOIN '.get_table_prefix().'translate t ON f.cv_value=t.id'; @@ -347,7 +326,7 @@ function get_catalogue_category_entry_buildup($category_id,$catalogue_name,$cata { foreach (array('ASC'=>'_ASCENDING','DESC'=>'_DESCENDING') as $dir_code=>$dir_lang) { - $sort_sel=(($order_by=='rating') && ($direction==$dir_code)); + $sort_sel=(($order_by==$extra_sort_code) && ($direction==$dir_code)); $_potential_sorter_name=new ocp_tempcode(); $_potential_sorter_name->attach(do_lang_tempcode($extra_sort_lang)); $_potential_sorter_name->attach(do_lang_tempcode($dir_lang)); @@ -366,15 +345,15 @@ function get_catalogue_category_entry_buildup($category_id,$catalogue_name,$cata { if (!array_key_exists($j,$entries)) continue; - $a=@$entries[$j]['map']['FIELD_'.strval($order_by)]; - if (array_key_exists('FIELD_'.strval($order_by).'_PLAIN',@$entries[$j]['map'])) + $a=@$entries[$j]['map']['FIELD_'.$order_by]; + if (array_key_exists('FIELD_'.$order_by.'_PLAIN',@$entries[$j]['map'])) { - $a=@$entries[$j]['map']['FIELD_'.strval($order_by).'_PLAIN']; + $a=@$entries[$j]['map']['FIELD_'.$order_by.'_PLAIN']; } - $b=@$entries[$i]['map']['FIELD_'.strval($order_by)]; - if (array_key_exists('FIELD_'.strval($order_by).'_PLAIN',@$entries[$i]['map'])) + $b=@$entries[$i]['map']['FIELD_'.$order_by]; + if (array_key_exists('FIELD_'.$order_by.'_PLAIN',@$entries[$i]['map'])) { - $b=@$entries[$i]['map']['FIELD_'.strval($order_by).'_PLAIN']; + $b=@$entries[$i]['map']['FIELD_'.$order_by.'_PLAIN']; } if (is_object($a)) $a=$a->evaluate(); if (is_object($b)) $b=$b->evaluate(); diff --git a/sources/chat.php b/sources/chat.php index 5e9e265d6..5a1edfaf9 100644 --- a/sources/chat.php +++ b/sources/chat.php @@ -629,6 +629,7 @@ function _chat_messages_script_ajax($room_id,$backlog=false,$message_id=NULL,$ev foreach ($events as $event) { if ($event['e_member_id']==get_member()) continue; + if (is_guest($event['e_member_id'])) continue; $send_out=false; switch ($event['e_type_code']) @@ -960,7 +961,7 @@ function get_chatters_in_room($room_id) { $extra2='room_id='.strval($room_id); } - $active=$GLOBALS['SITE_DB']->query('SELECT DISTINCT member_id FROM '.get_table_prefix().'chat_active a LEFT JOIN '.get_table_prefix().'sessions s ON s.the_user=a.member_id WHERE (session_invisible=0 OR session_invisible IS NULL) AND date_and_time>='.strval((integer)time()-CHAT_ACTIVITY_PRUNE).' AND '.$extra2); + $active=$GLOBALS['SITE_DB']->query('SELECT DISTINCT member_id FROM '.get_table_prefix().'chat_active a LEFT JOIN '.get_table_prefix().'sessions s ON s.the_user=a.member_id WHERE (session_invisible=0 OR session_invisible IS NULL) AND date_and_time>='.strval((integer)time()-60*10).' AND '.$extra2); $found_users=array(); foreach ($active as $values) diff --git a/sources/comcode_text.php b/sources/comcode_text.php index 86988e7fe..970f40bb6 100644 --- a/sources/comcode_text.php +++ b/sources/comcode_text.php @@ -1115,7 +1115,7 @@ function comcode_text_to_tempcode($comcode,$source_member,$as_admin,$wrap_pos,$p { $link_captions_title=''; $downloaded_at_link=http_download_file($auto_link,3000,false); - if ((is_string($downloaded_at_link)) && (strpos($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'],'html')!==false)) + if ((is_string($downloaded_at_link)) && (strpos($GLOBALS['HTTP_DOWNLOAD_MIME_TYPE'],'html')!==false) && ($GLOBALS['HTTP_MESSAGE']=='200')) { $matches=array(); if (preg_match('#\s*]*\s*>\s*(.*)\s*\s*<\s*/title\s*>#miU',$downloaded_at_link,$matches)!=0) diff --git a/sources/currency.php b/sources/currency.php index 842267e18..038090c82 100644 --- a/sources/currency.php +++ b/sources/currency.php @@ -127,7 +127,7 @@ function currency_convert($amount,$from_currency,$to_currency=NULL,$string=false { $GLOBALS['SITE_DB']->query('DELETE FROM '.get_table_prefix().'long_values WHERE the_name LIKE \''.db_encode_like('currency_%').'\' AND date_and_time<'.strval(time()-60*60*24*2)); // Cleanup - $result=http_download_file('http://www.google.com/search?q='.(is_float($amount)?float_to_raw_string($amount):strval($amount)).'+'.$from_currency.'+in+'.strtoupper($to_currency),NULL,false); + $result=http_download_file('http://www.google.com/ig/calculator?hl=en&q='.(is_float($amount)?float_to_raw_string($amount):strval($amount)).'+'.$from_currency.'+in+'.strtoupper($to_currency),NULL,false); if (is_string($result)) { $matches=array(); @@ -136,7 +136,7 @@ function currency_convert($amount,$from_currency,$to_currency=NULL,$string=false { if (ord($result[$i])>127) $result[$i]=' '; } - if (preg_match('#[\d\., ]+ [^=<]* = ([\d\., ]+) [^=<]*#',$result,$matches)!=0) // e.g. 1400 British pounds = 2 024.4 U.S. dollars + if (preg_match('#,rhs: "([\d\., ]+) [^=<]*"#',$result,$matches)!=0) // e.g. 1400 British pounds = 2 024.4 U.S. dollars { $new_amount=floatval(str_replace(',','',str_replace(' ','',$matches[1]))); diff --git a/sources/database_action.php b/sources/database_action.php index 612f46c3a..7b746e7a5 100644 --- a/sources/database_action.php +++ b/sources/database_action.php @@ -237,7 +237,7 @@ function permission_exists($name) */ function add_config_option($human_name,$name,$type,$eval,$category,$group,$shared_hosting_restricted=0,$data='') { - if (!in_array($type,array('float','integer','tick','line','text','transline','transtext','list','date','forum','category','usergroup','colour'))) + if (!in_array($type,array('float','integer','tick','line','text','transline','transtext','list','date','?forum','forum','category','usergroup','colour'))) fatal_exit('Invalid config option type'); $map=array('c_set'=>0,'config_value'=>'','the_name'=>$name,'human_name'=>$human_name,'the_type'=>$type,'eval'=>$eval,'the_page'=>$category,'section'=>$group,'explanation'=>'CONFIG_OPTION_'.$name,'shared_hosting_restricted'=>$shared_hosting_restricted,'c_data'=>$data); diff --git a/sources/global2.php b/sources/global2.php index 16b61936e..8abe8ebf9 100644 --- a/sources/global2.php +++ b/sources/global2.php @@ -1341,8 +1341,11 @@ function post_param($name,$default=false,$html=false) if (($a!='') && (addon_installed('wordfilter'))) { - require_code('word_filter'); - $a=check_word_filter($a,$name); + if ($name!='password') + { + require_code('word_filter'); + $a=check_word_filter($a,$name); + } } if ($a!==NULL) $a=unixify_line_format($a,NULL,$html); diff --git a/sources/hooks/blocks/main_staff_checklist/cron.php b/sources/hooks/blocks/main_staff_checklist/cron.php index f519f6a46..d48abf3a6 100644 --- a/sources/hooks/blocks/main_staff_checklist/cron.php +++ b/sources/hooks/blocks/main_staff_checklist/cron.php @@ -29,6 +29,7 @@ class Hook_checklist_cron function run() { $last_cron=get_value('last_cron'); + if ((is_null($last_cron)) || ($last_cronquery_value_null_ok_full('SELECT COUNT(*) AS cnt FROM '.get_table_prefix().'logged_mail_messages WHERE m_queued=0 AND m_date_and_time>'.strval(time()-60*60*24)); $mails_queued=$GLOBALS['SITE_DB']->query_value_null_ok_full('SELECT COUNT(*) AS cnt FROM '.get_table_prefix().'logged_mail_messages WHERE m_queued=1'); $info=do_lang_tempcode('LAST_RAN_AT',escape_html($date),escape_html(integer_format($mails_sent)),escape_html(integer_format($mails_queued))); diff --git a/sources/hooks/systems/addon_registry/galleries.php b/sources/hooks/systems/addon_registry/galleries.php index b8a7af537..33e742202 100644 --- a/sources/hooks/systems/addon_registry/galleries.php +++ b/sources/hooks/systems/addon_registry/galleries.php @@ -862,8 +862,10 @@ function tpl_preview__gallery_entry_screen() return array( lorem_globalise( do_lorem_template('GALLERY_ENTRY_SCREEN',array( + 'CAT'=>placeholder_id(), 'ID'=>placeholder_id(), 'SLIDESHOW'=>false, + 'TRUE_GALLERY_TITLE'=>lorem_phrase(), 'GALLERY_TITLE'=>lorem_phrase(), 'MEMBER_ID'=>placeholder_id(), 'TAGS'=>lorem_word_html(), diff --git a/sources/hooks/systems/awards/catalogue_entry.php b/sources/hooks/systems/awards/catalogue_entry.php index 4a4942075..6e20b0acd 100644 --- a/sources/hooks/systems/awards/catalogue_entry.php +++ b/sources/hooks/systems/awards/catalogue_entry.php @@ -68,7 +68,7 @@ function run($row,$zone) $catalogue_name=$row['c_name']; $catalogues=$GLOBALS['SITE_DB']->query_select('catalogues',array('*'),array('c_name'=>$catalogue_name),'',1); $tpl_set=$catalogue_name; - $display=get_catalogue_entry_map($row,$catalogues[0],'SEARCH',$tpl_set,-1); + $display=get_catalogue_entry_map($row,$catalogues[0],'SEARCH',$tpl_set,-1,NULL,NULL,false,true); return do_template('CATALOGUE_'.$tpl_set.'_ENTRY_EMBED',$display,NULL,false,'CATALOGUE_DEFAULT_ENTRY_EMBED');//put_in_standard_box(hyperlink($url,do_lang_tempcode('VIEW')),do_lang_tempcode('CATALOGUE_ENTRY').' ('.do_lang_tempcode('IN',get_translated_text($catalogue['c_title'])).')'); } diff --git a/sources/hooks/systems/cron/sitemap.php b/sources/hooks/systems/cron/sitemap.php index f33d40303..033fe1792 100755 --- a/sources/hooks/systems/cron/sitemap.php +++ b/sources/hooks/systems/cron/sitemap.php @@ -32,11 +32,11 @@ function run() $time=time(); $last_time=intval(get_value('last_sitemap_time_calc')); if ($last_time>time()-60*60*24) return; // Every day - set_value('last_sitemap_time_calc',strval($time)); require_code('sitemap'); sitemaps_build(); + set_value('last_sitemap_time_calc',strval($time)); set_value('sitemap_building_in_progress','0'); } diff --git a/sources/misc_scripts.php b/sources/misc_scripts.php index 7b570e18f..91707a96b 100644 --- a/sources/misc_scripts.php +++ b/sources/misc_scripts.php @@ -204,6 +204,8 @@ function cron_bridge_script($caller) } } + decache('main_staff_checklist'); + set_value('last_cron',strval(time())); $cron_hooks=find_all_hooks('systems','cron'); foreach (array_keys($cron_hooks) as $hook) diff --git a/sources/ocf_groups.php b/sources/ocf_groups.php index b2d31a9d9..0e038443b 100755 --- a/sources/ocf_groups.php +++ b/sources/ocf_groups.php @@ -258,16 +258,20 @@ function ocf_get_members_groups($member_id=NULL,$skip_secret=false,$handle_proba if (is_null($member_id)) $member_id=get_member(); - if (($handle_probation) && ($GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until')>time())) + if ($handle_probation) { - global $PROBATION_GROUP; - if (is_null($PROBATION_GROUP)) + $opt=$GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_on_probation_until'); + if ((!is_null($opt)) && ($opt>time())) { - $probation_group=get_option('probation_usergroup'); - $PROBATION_GROUP=$GLOBALS['FORUM_DB']->query_value_null_ok('f_groups g LEFT JOIN '.$GLOBALS['FORUM_DB']->get_table_prefix().'translate t ON t.id=g.g_name','g.id',array('text_original'=>$probation_group)); - if (is_null($PROBATION_GROUP)) $PROBATION_GROUP=false; + global $PROBATION_GROUP; + if (is_null($PROBATION_GROUP)) + { + $probation_group=get_option('probation_usergroup'); + $PROBATION_GROUP=$GLOBALS['FORUM_DB']->query_value_null_ok('f_groups g LEFT JOIN '.$GLOBALS['FORUM_DB']->get_table_prefix().'translate t ON t.id=g.g_name','g.id',array('text_original'=>$probation_group)); + if (is_null($PROBATION_GROUP)) $PROBATION_GROUP=false; + } + if ($PROBATION_GROUP!==false) return array($PROBATION_GROUP=>1); } - if ($PROBATION_GROUP!==false) return array($PROBATION_GROUP=>1); } global $GROUP_MEMBERS_CACHE; diff --git a/sources/ocf_install.php b/sources/ocf_install.php index 2798fd611..84bf037d7 100644 --- a/sources/ocf_install.php +++ b/sources/ocf_install.php @@ -151,6 +151,7 @@ function uninstall_ocf_everytime() delete_config_option('max_member_title_length'); delete_config_option('encryption_key'); delete_config_option('decryption_key'); + delete_config_option('intro_forum_id'); delete_value('ocf_newest_member_id'); delete_value('ocf_newest_member_username'); @@ -378,6 +379,10 @@ function install_ocf($upgrade_from=NULL) add_config_option('NO_DOB_ASK','no_dob_ask','tick','return \'0\';','SECTION_FORUMS','USERNAMES_AND_PASSWORDS'); add_config_option('ALLOW_INTERNATIONAL','allow_international','tick','return \'1\';','SECTION_FORUMS','USERNAMES_AND_PASSWORDS'); } + if ((is_null($upgrade_from)) || ($upgrade_from<8.0)) + { + add_config_option('INTRO_FORUM_ID','intro_forum_id','?forum','return \'\';','SECTION_FORUMS','USERNAMES_AND_PASSWORDS'); + } if ((!is_null($upgrade_from)) && ($upgrade_from<4.2)) { $GLOBALS['FORUM_DB']->add_table_field('f_topics','t_description_link','SHORT_TEXT'); diff --git a/sources/ocf_members_action.php b/sources/ocf_members_action.php index f92431589..08e560c97 100644 --- a/sources/ocf_members_action.php +++ b/sources/ocf_members_action.php @@ -206,7 +206,7 @@ function ocf_make_member($username,$password,$email_address,$groups,$dob_day,$do 'm_allow_emails'=>$allow_emails, 'm_password_change_code'=>'', 'm_password_compat_scheme'=>$password_compatibility_scheme, - 'm_on_probation_until'=>time() + 'm_on_probation_until'=>NULL ); if (!is_null($id)) $map['id']=$id; $member_id=$GLOBALS['FORUM_DB']->query_insert('f_members',$map,true); diff --git a/sources/ocf_members_action2.php b/sources/ocf_members_action2.php index 0b77fc4d7..9623394b7 100644 --- a/sources/ocf_members_action2.php +++ b/sources/ocf_members_action2.php @@ -484,7 +484,7 @@ function ocf_get_member_fields($mini_mode=true,$member_id=NULL,$groups=NULL,$ema if (has_specific_permission(get_member(),'probate_members')) { - $fields->attach(form_input_date(do_lang_tempcode('ON_PROBATION_UNTIL'),do_lang_tempcode('DESCRIPTION_ON_PROBATION_UNTIL'),'on_probation_until',true,$on_probation_until<=time(),true,$on_probation_until,2)); + $fields->attach(form_input_date(do_lang_tempcode('ON_PROBATION_UNTIL'),do_lang_tempcode('DESCRIPTION_ON_PROBATION_UNTIL'),'on_probation_until',true,is_null($on_probation_until) || $on_probation_until<=time(),true,$on_probation_until,2)); } if ($special_type!='ldap') { @@ -644,7 +644,8 @@ function ocf_edit_member($member_id,$email_address,$preview_posts,$dob_day,$dob_ if (!is_null($zone_wide)) $update['m_zone_wide']=$zone_wide; if (!is_null($pt_allow)) $update['m_pt_allow']=$pt_allow; if (!is_null($pt_rules_text)) $update['m_pt_rules_text']=lang_remap_comcode($_pt_rules_text,$pt_rules_text,$GLOBALS['FORUM_DB']); - if (!is_null($on_probation_until)) $update['m_on_probation_until']=$on_probation_until; + if (($skip_checks) || (has_specific_permission(get_member(),'probate_members'))) + $update['m_on_probation_until']=$on_probation_until; if (!is_null($join_time)) $update['m_join_time']=$join_time; if (!is_null($avatar_url)) $update['m_avatar_url']=$avatar_url; if (!is_null($signature)) $update['m_signature']=lang_remap_comcode($_signature,$signature,$GLOBALS['FORUM_DB']); diff --git a/sources/tempcode_compiler.php b/sources/tempcode_compiler.php index fd32cb916..dd4edc5e2 100644 --- a/sources/tempcode_compiler.php +++ b/sources/tempcode_compiler.php @@ -308,7 +308,7 @@ function compile_template($data,$template_name,$theme,$lang) if ($_opener_params=='') // Optimise it out for simple case? { $looked_up=do_lang(eval('return '.$first_param.';'),NULL,NULL,NULL,$lang); - if (escape_html($looked_up)==$looked_up) + if (apply_tempcode_escaping($escaped,$looked_up)==$looked_up) $new_line='"'.php_addslashes($looked_up).'"'; } $current_level_data[]=$new_line; diff --git a/sources/users.php b/sources/users.php index 75488a849..88c3c30a1 100644 --- a/sources/users.php +++ b/sources/users.php @@ -312,7 +312,7 @@ function handle_logins() */ function get_member($quick_only=false) { - global $SESSION_CACHE,$MEMBER_CACHED,$GETTING_MEMBER; + global $SESSION_CACHE,$MEMBER_CACHED,$GETTING_MEMBER,$SITE_INFO; if ($MEMBER_CACHED!==NULL) { @@ -325,6 +325,7 @@ function get_member($quick_only=false) delete_expired_sessions(); $backdoor_ip_address=mixed(); // Enable to a real IP address to force login from FTP access (if lost admin password) + if (array_key_exists('backdoor_ip',$SITE_INFO)) $backdoor_ip_address=$SITE_INFO['backdoor_ip']; if ((is_string($backdoor_ip_address)) && (get_ip_address()==$backdoor_ip_address)) { require_code('users_active_actions'); diff --git a/sources/version.php b/sources/version.php index 3d5260194..35173fa81 100755 --- a/sources/version.php +++ b/sources/version.php @@ -25,7 +25,7 @@ */ function ocp_version() { - return 7; + return 8; } /** @@ -35,7 +35,7 @@ function ocp_version() */ function ocp_version_minor() { - return '2.0 alpha4'; + return '0'; } /** @@ -45,7 +45,7 @@ function ocp_version_minor() */ function ocp_version_number() { - return 7.2; + return 8.0; } /** diff --git a/sources_custom/miniblocks/main_stars.php b/sources_custom/miniblocks/main_stars.php index 8826681f9..69ccf46d5 100644 --- a/sources_custom/miniblocks/main_stars.php +++ b/sources_custom/miniblocks/main_stars.php @@ -10,12 +10,10 @@ require_code('ocf_groups'); require_code('ocf_members'); -echo '
'; +echo '
'; echo ''; -$query='SELECT gift_to,SUM(amount) as cnt FROM '.get_table_prefix().'gifts g LEFT JOIN '.get_table_prefix().'translate t ON t.id=g.reason WHERE text_original LIKE \''.db_encode_like($map['param']).': %\' AND gift_from<>'.strval($GLOBALS['FORUM_DRIVER']->get_guest_id()).' GROUP BY gift_to ORDER BY cnt DESC'; - -$gifts=$GLOBALS['SITE_DB']->query($query,10); +$gifts=$GLOBALS['SITE_DB']->query('SELECT gift_to,SUM(amount) as cnt FROM '.get_table_prefix().'gifts g LEFT JOIN '.get_table_prefix().'translate t ON t.id=g.reason WHERE text_original LIKE \''.db_encode_like($map['param']).': %\' AND gift_from<>'.strval($GLOBALS['FORUM_DRIVER']->get_guest_id()).' GROUP BY gift_to ORDER BY cnt DESC',10); $count=0; foreach ($gifts as $gift) { @@ -23,20 +21,19 @@ $username=$GLOBALS['FORUM_DRIVER']->get_username($member_id); if (!is_null($username)) { - $link=$GLOBALS['FORUM_DRIVER']->member_profile_link($member_id,false,true); - if (is_object($link)) $link=$link->evaluate(); + $link=$GLOBALS['FORUM_DRIVER']->member_profile_link($member_id); $avatar_url=$GLOBALS['FORUM_DRIVER']->get_member_avatar_url($member_id); $signature=get_translated_tempcode($GLOBALS['FORUM_DRIVER']->get_member_row_field($member_id,'m_signature'),$GLOBALS['FORUM_DB']); $points=$gift['cnt']; - $rank=ocf_get_group_name(ocf_get_member_primary_group($member_id)); + $rank=get_translated_text(ocf_get_group_property(ocf_get_member_primary_group($member_id),'name'),$GLOBALS['FORUM_DB']); if ($avatar_url=='') { $avatar=''; } else { - $avatar=''; + $avatar=''; } - echo ''; + echo ''; $count++; } diff --git a/themes/default/css/chat.css b/themes/default/css/chat.css index 6f6b968e8..763c12e74 100755 --- a/themes/default/css/chat.css +++ b/themes/default/css/chat.css @@ -106,6 +106,8 @@ } .chat_lobby_convos_area { + overflow: hidden; + width: 100%; } .chat_lobby_convos_area_main { diff --git a/themes/default/css/galleries.css b/themes/default/css/galleries.css index c0a2318f6..1634118a2 100644 --- a/themes/default/css/galleries.css +++ b/themes/default/css/galleries.css @@ -101,6 +101,16 @@ top: 0; } +.slideshow_speed input { + width: 3em; +} + +#changer { + font-weight: bold; + font-family: courier; + font-size: 1.2em; +} + /* side_root galleries block */ .side_galleries_block p { diff --git a/themes/default/css/global.css b/themes/default/css/global.css index 11e934717..fb8361eb2 100644 --- a/themes/default/css/global.css +++ b/themes/default/css/global.css @@ -747,7 +747,7 @@ form { /* For IE6 */ } .standardbox_wrap_panel img { - max-width: 100%; + max-width: 98%; } {+START,IF,{$MOBILE}} diff --git a/themes/default/templates/CHAT_LOBBY_IM_AREA.tpl b/themes/default/templates/CHAT_LOBBY_IM_AREA.tpl index 058f0d174..9e8a46803 100644 --- a/themes/default/templates/CHAT_LOBBY_IM_AREA.tpl +++ b/themes/default/templates/CHAT_LOBBY_IM_AREA.tpl @@ -7,7 +7,7 @@ {!NONE}
- +
diff --git a/themes/default/templates/GALLERY_NAV.tpl b/themes/default/templates/GALLERY_NAV.tpl index 80cfd8c65..c51cb41d2 100644 --- a/themes/default/templates/GALLERY_NAV.tpl +++ b/themes/default/templates/GALLERY_NAV.tpl @@ -64,7 +64,7 @@ //]]> {+START,IF,{SLIDESHOW}} - {!VIEWING_SLIDE,{X*},{N*}}
+ {!VIEWING_SLIDE,{X*},{N*}} {+START,IF_NON_EMPTY,{SLIDESHOW_NEXT_URL}} {!CHANGING_IN,xxx} diff --git a/themes/default/templates/GLOBAL.tpl b/themes/default/templates/GLOBAL.tpl index 19c83d34f..9c3eb126b 100644 --- a/themes/default/templates/GLOBAL.tpl +++ b/themes/default/templates/GLOBAL.tpl @@ -142,7 +142,7 @@
{+END}{+END} - + {MIDDLE} diff --git a/themes/default/templates/JAVASCRIPT.tpl b/themes/default/templates/JAVASCRIPT.tpl index 12c1ac984..365712059 100644 --- a/themes/default/templates/JAVASCRIPT.tpl +++ b/themes/default/templates/JAVASCRIPT.tpl @@ -132,7 +132,7 @@ function initialise_error_mechanism() { if (typeof msg.indexOf=='undefined') return null; - if (((msg.indexOf("'undefined' is not a function")!=-1) && (typeof file=='undefined')) || (msg.indexOf('UnnamedClass.toString')!=-1) || (msg.indexOf('chrome.tabs is not supported in content script')!=-1) || (msg.indexOf('convert to string')!=-1) || (msg.indexOf('ASSERT: ')!=-1) || ((file) && (file.indexOf('TODO: FIXME')!=-1)) || (msg.indexOf('TODO: FIXME')!=-1) || (msg.indexOf('Location.toString')!=-1) || (msg.indexOf('Array.constructor')!=-1) || (msg.indexOf('Error loading script')!=-1) || ((code=='0') && (msg.indexOf('Script error.')!=-1)) || (msg.indexOf('NS_ERROR_FAILURE')!=-1)/*Can happen if AJAX is used to wrong domain name*/ || (msg.indexOf('AJAX_REQUESTS is not defined')!=-1)) return null; {$,Comes up on due to various Firefox/extension/etc bugs} + if (((msg.indexOf("'undefined' is not a function")!=-1) && (typeof file=='undefined')) || (msg.indexOf('UnnamedClass.toString')!=-1) || (msg.indexOf('chrome.tabs can only be used in extension processes')!=-1) || (msg.indexOf('chrome.tabs is not supported in content script')!=-1) || (msg.indexOf('convert to string')!=-1) || (msg.indexOf('ASSERT: ')!=-1) || ((file) && (file.indexOf('TODO: FIXME')!=-1)) || (msg.indexOf('TODO: FIXME')!=-1) || (msg.indexOf('Location.toString')!=-1) || (msg.indexOf('Array.constructor')!=-1) || (msg.indexOf('Error loading script')!=-1) || ((code=='0') && (msg.indexOf('Script error.')!=-1)) || (msg.indexOf('NS_ERROR_FAILURE')!=-1)/*Can happen if AJAX is used to wrong domain name*/ || (msg.indexOf('AJAX_REQUESTS is not defined')!=-1)) return null; {$,Comes up on due to various Firefox/extension/etc bugs} if ((typeof window.done_one_error=='undefined') || (!window.done_one_error)) { diff --git a/themes/default/templates/JAVASCRIPT_CHAT.tpl b/themes/default/templates/JAVASCRIPT_CHAT.tpl index c8b6d95cf..9556d401c 100644 --- a/themes/default/templates/JAVASCRIPT_CHAT.tpl +++ b/themes/default/templates/JAVASCRIPT_CHAT.tpl @@ -656,7 +656,7 @@ function create_overlay_event(member_id,message,click_event,avatar_url,room_id) a4.className='im_event_lobby_link'; div.appendChild(a4); div.style.left=(getWindowWidth()/2-140)+'px'; - div.style.top=(getWindowHeight()/2-50+getWindowScrollY()+(topZIndex-800)*200)+'px'; + div.style.top=(getWindowHeight()+getWindowScrollY()-(topZIndex-800)*100)+'px'; document.body.appendChild(div); } diff --git a/themes/default/templates/JAVASCRIPT_GALLERIES.tpl b/themes/default/templates/JAVASCRIPT_GALLERIES.tpl index 48dc25882..5b41212ad 100644 --- a/themes/default/templates/JAVASCRIPT_GALLERIES.tpl +++ b/themes/default/templates/JAVASCRIPT_GALLERIES.tpl @@ -29,6 +29,9 @@ function start_slideshow_timer() } } ,1000); } + + if (slideshow_current_position!=slideshow_total_slides-1) + document.getElementsByTagName('body')[0].style.cursor='progress'; } function show_current_slideshow_time() @@ -66,6 +69,7 @@ function stop_slideshow_timer(message) if (changer) setInnerHTML(changer,message); window.clearInterval(slideshow_timer); slideshow_timer=null; + document.getElementsByTagName('body')[0].style.cursor=''; } function slideshow_backward() @@ -139,8 +143,11 @@ function slideshow_show_slide(slide) slideshow_current_position=slide; } + start_slideshow_timer(); reset_slideshow_countdown(); if (slideshow_current_position!=slideshow_total_slides-1) slideshow_ensure_loaded(slide+1,false); + else + document.getElementsByTagName('body')[0].style.cursor=''; } diff --git a/themes/default/templates/JAVASCRIPT_THUMBNAILS.tpl b/themes/default/templates/JAVASCRIPT_THUMBNAILS.tpl index f29a69a5e..06ee3c077 100644 --- a/themes/default/templates/JAVASCRIPT_THUMBNAILS.tpl +++ b/themes/default/templates/JAVASCRIPT_THUMBNAILS.tpl @@ -1,12 +1,12 @@ var thumbFadeTimers=[]; /* Originally based on a Dynamic Drive Script [with this function name], but no original code remaining */ -function nereidFade(fadeElement,destPercentOpacity,periodInMsecs,increment) +function nereidFade(fadeElement,destPercentOpacity,periodInMsecs,increment,destroyAfter) { if (!fadeElement) return; {+START,IF,{$VALUE_OPTION,disable_animations}} - setOpacity(fadeElement,destPercentOpacity); + setOpacity(fadeElement,destPercentOpacity/100.0); return; {+END} @@ -71,14 +71,18 @@ function nereidFade(fadeElement,destPercentOpacity,periodInMsecs,increment) var new_increment=Math.max(direction*diff,increment/100.0); } var temp=parseFloat(fadeElement.style.opacity)+direction*new_increment; + if (temp<0.0) temp=0.0; + if (temp>1.0) temp=1.0; fadeElement.style.opacity=temp; - - again=(temp!=destPercentOpacity/100.0); + again=(Math.round(temp*100)!=Math.round(destPercentOpacity)); } else again=true; } if (again) { - thumbFadeTimers[fadeElement.faderKey]=window.setTimeout(function() { nereidFade(fadeElement,destPercentOpacity,periodInMsecs,increment); },periodInMsecs); + thumbFadeTimers[fadeElement.faderKey]=window.setTimeout(function() { nereidFade(fadeElement,destPercentOpacity,periodInMsecs,increment,destroyAfter); },periodInMsecs); + } else + { + if (destroyAfter) fadeElement.parentNode.removeChild(fadeElement); } } diff --git a/themes/default/templates/JAVASCRIPT_VALIDATION.tpl b/themes/default/templates/JAVASCRIPT_VALIDATION.tpl index 2df34c089..5e8ba906b 100644 --- a/themes/default/templates/JAVASCRIPT_VALIDATION.tpl +++ b/themes/default/templates/JAVASCRIPT_VALIDATION.tpl @@ -163,6 +163,12 @@ function do_form_submit(form) disable_buttons_just_clicked(document.getElementsByTagName('input')); disable_buttons_just_clicked(document.getElementsByTagName('button')); + if (typeof window.detect_interval!='undefined') + { + window.clearInterval(window.detect_interval); + window.detect_interval=null; + } + return true; } diff --git a/themes/default/templates/MAIL.tpl b/themes/default/templates/MAIL.tpl index 662439c2b..e9deb9a37 100755 --- a/themes/default/templates/MAIL.tpl +++ b/themes/default/templates/MAIL.tpl @@ -1,3 +1,5 @@ +{$,It is advisable to edit this MAIL template in the default theme, as this will ensure that all mail sent from the website will be formatted consistently, whatever theme happens to be running at the time} + diff --git a/themes/default/templates/NEWSLETTER_AUTOMATE_SECTION_FCOMCODE.tpl b/themes/default/templates/NEWSLETTER_AUTOMATE_SECTION_FCOMCODE.tpl index bcde22b72..666dc623a 100755 --- a/themes/default/templates/NEWSLETTER_AUTOMATE_SECTION_FCOMCODE.tpl +++ b/themes/default/templates/NEWSLETTER_AUTOMATE_SECTION_FCOMCODE.tpl @@ -1,3 +1,3 @@ [title="2"]{TITLE@}[/title] -{CONTENT} \ No newline at end of file +[surround]{CONTENT}[/surround] \ No newline at end of file diff --git a/themes/default/templates/OCF_TOPIC_POLL.tpl b/themes/default/templates/OCF_TOPIC_POLL.tpl index be286d9ee..ba229bc9e 100755 --- a/themes/default/templates/OCF_TOPIC_POLL.tpl +++ b/themes/default/templates/OCF_TOPIC_POLL.tpl @@ -40,3 +40,4 @@ function ocfCheckPoll(form,min,max,error)
AvatarDetailsSignature
'.$avatar.'Username: '.escape_html($username).'
Role points: '.integer_format($points).'
Rank: '.$rank.'
'.$signature->evaluate().'
'.$avatar.'Username: '.escape_html($username).'

Role points: '.number_format($points).'

Rank: '.$rank.'
'.$signature->evaluate().'
+
\ No newline at end of file diff --git a/themes/default/templates/RESULTS_BROWSER_LIST_PAGES.tpl b/themes/default/templates/RESULTS_BROWSER_LIST_PAGES.tpl index 7e2a9e286..266c2b29a 100644 --- a/themes/default/templates/RESULTS_BROWSER_LIST_PAGES.tpl +++ b/themes/default/templates/RESULTS_BROWSER_LIST_PAGES.tpl @@ -1,4 +1,4 @@ -
+
{HIDDEN}
diff --git a/themes/default/templates/RESULTS_BROWSER_PER_SCREEN.tpl b/themes/default/templates/RESULTS_BROWSER_PER_SCREEN.tpl index 049168695..d8bdc2a76 100755 --- a/themes/default/templates/RESULTS_BROWSER_PER_SCREEN.tpl +++ b/themes/default/templates/RESULTS_BROWSER_PER_SCREEN.tpl @@ -1,4 +1,4 @@ - + {HIDDEN}
diff --git a/themes/default/templates_custom/JAVASCRIPT_PLUPLOAD.tpl b/themes/default/templates_custom/JAVASCRIPT_PLUPLOAD.tpl index f4d8af196..bf6d30113 100644 --- a/themes/default/templates_custom/JAVASCRIPT_PLUPLOAD.tpl +++ b/themes/default/templates_custom/JAVASCRIPT_PLUPLOAD.tpl @@ -5679,7 +5679,7 @@ function replaceFileInput(page_type,name,_btnSubmitID,posting_field_name,filter) rep2.plUploadOb=ob; - window.setTimeout(function() { ob.refresh(); },1000); + window.setInterval(function() { ob.refresh(); },1000); } else // Special iOS handler { var ob={settings: settings};