Skip to content

Commit

Permalink
Lots of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Graham committed Nov 8, 2011
1 parent f1cf7da commit 177d9f9
Show file tree
Hide file tree
Showing 58 changed files with 436 additions and 224 deletions.
13 changes: 10 additions & 3 deletions adminzone/pages/modules/admin_config.php
Expand Up @@ -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']);
Expand All @@ -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);
Expand Down Expand Up @@ -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))
Expand Down
10 changes: 8 additions & 2 deletions adminzone/pages/modules/admin_newsletter.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions adminzone/pages/modules/admin_themes.php
Expand Up @@ -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];
}
}
Expand Down Expand Up @@ -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]);
}
}
Expand Down
3 changes: 3 additions & 0 deletions config_editor.php
Expand Up @@ -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)
{
Expand Down
7 changes: 5 additions & 2 deletions data/areaedit/plugins/SpellChecker/spell-check-logic.php
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions data_custom/addon_files.txt
Expand Up @@ -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
2 changes: 0 additions & 2 deletions data_custom/execute_temp.php
Expand Up @@ -67,8 +67,6 @@
*/
function execute_temp()
{
print_r(include('themes/default/templates_cached/EN/GLOBAL.tpl.tcp'));

}


Expand Down
2 changes: 2 additions & 0 deletions docs4/pages/comcode_custom/EN/tut_newsletter.txt
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs4/pages/comcode_custom/EN/tut_web_hosting.txt
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lang/EN/comcode.ini
Expand Up @@ -60,7 +60,7 @@ CCP_NO_CLOSE=The tag, <kbd>{1}</kbd>, 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 &lsquo;island&rsquo; (if possible)
ATTACHMENT_ISLAND=Display as an &lsquo;island&rsquo;, 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 &lsquo;island&rsquo;, extracting from TAR/ZIP archive (if possible)
ATTACHMENT_LEFT=Display &lsquo;left/island&rsquo; (if possible)
Expand Down
6 changes: 3 additions & 3 deletions lang/EN/galleries.ini
Expand Up @@ -111,8 +111,8 @@ DELETE_VIDEO=Delete video
GALLERIES=Galleries
VIEW_IMAGE=View image
VIEW_SLIDESHOW=View slideshow: {1}
SPEED_IN_SECS=Speed in <abbr title="Seconds">secs</abbr>
VIEWING_GALLERY_ENTRY=&laquo; <strong>{1}</strong> of <strong>{2}</strong> &raquo;
SPEED_IN_SECS=Slide delay in <abbr title="Seconds">secs</abbr>
VIEWING_GALLERY_ENTRY=( <strong>{1}</strong> of <strong>{2}</strong> )
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
Expand Down Expand Up @@ -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 <strong>{1}</strong> of <strong>{2}</strong>.
CHANGING_IN=Slide will change in <span id="changer">{1}</span> seconds unless you press a key.
CHANGING_IN=Slide will change in <span id="changer">{1}</span> seconds unless you <em>click to pause</em>.
STOPPED=<em>Stopped</em>. Click to continue.
LAST_SLIDE=<strong>Finished.</strong>
VIEW_ALONE_SLIDESHOW=<a href="{1}">View full-screen</a> (good for starting a slide-show)
Expand Down
7 changes: 6 additions & 1 deletion lang/EN/ocf.ini
Expand Up @@ -292,7 +292,7 @@ PRIMARY_GROUP=Primary usergroup
DESCRIPTION_PRIMARY_GROUP=This member's main usergroup. This can be considered a &lsquo;rank&rsquo;, or a &lsquo;role&rsquo;, 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 <a href="{1}">usergroup directory</a>.
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. <strong>If you're going to use this as a primary group you should make a selection here.</strong>
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.
Expand Down Expand Up @@ -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.

0 comments on commit 177d9f9

Please sign in to comment.