1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

- first try to break things...

git-svn-id: file:///svn/phpbb/trunk@5108 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2005-03-21 22:43:07 +00:00
parent 68b7397da8
commit a4e51c9699
32 changed files with 260 additions and 235 deletions

View File

@@ -709,7 +709,7 @@ function swatch()
<tr>
<td class="cat" colspan="5" align="right"><select name="action"><option class="sep" value=""><?php echo $user->lang['SELECT_OPTION']; ?></option><?php
foreach(array('default' => 'DEFAULT', 'approve' => 'APPROVE', 'demote' => 'DEMOTE', 'promote' => 'PROMOTE', 'deleteusers' => 'DELETE') as $option => $lang)
foreach (array('default' => 'DEFAULT', 'approve' => 'APPROVE', 'demote' => 'DEMOTE', 'promote' => 'PROMOTE', 'deleteusers' => 'DELETE') as $option => $lang)
{
echo '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
}

View File

@@ -19,7 +19,7 @@ if (!empty($setmodules))
}
$filename = basename(__FILE__);
$module['POST']['SMILE'] = "$filename$SID&amp;mode=emoticons";
$module['POST']['SMILIES'] = "$filename$SID&amp;mode=smilies";
$module['POST']['ICONS'] = "$filename$SID&amp;mode=icons";
return;
@@ -47,10 +47,10 @@ $id = request_var('id', 0);
// What are we working on?
switch ($mode)
{
case 'emoticons':
case 'smilies':
$table = SMILIES_TABLE;
$lang = 'SMILE';
$fields = 'smile';
$lang = 'SMILIES';
$fields = 'smiley';
$img_path = $config['smilies_path'];
break;
@@ -141,7 +141,7 @@ switch ($action)
$after = FALSE;
}
$after_txt = ($mode == 'emoticons') ? $row['code'] : $row['icons_url'];
$after_txt = ($mode == 'smilies') ? $row['code'] : $row['icons_url'];
$order_list = '<option value="' . ($row[$fields . '_order']) . '"' . $selected . '>' . sprintf($user->lang['AFTER_' . $lang], ' -&gt; ' . htmlspecialchars($after_txt)) . '</option>' . $order_list;
}
}
@@ -156,7 +156,7 @@ switch ($action)
$data = $_images;
}
$colspan = (($mode == 'emoticons') ? '7' : '5');
$colspan = (($mode == 'smilies') ? '7' : '5');
$colspan += ($id) ? 1 : 0;
$colspan += ($action == 'add') ? 2 : 0;
@@ -177,7 +177,7 @@ switch ($action)
<td class="cat"><?php echo $user->lang[$lang . '_URL'] ?></td>
<td class="cat"><?php echo $user->lang[$lang . '_LOCATION'] ?></td>
<?php
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
?>
<td class="cat"><?php echo $user->lang[$lang . '_CODE'] ?></td>
@@ -216,12 +216,12 @@ switch ($action)
<td valign="top" class="<?php echo $row_class; ?>">[<?php echo $img; ?>]</td>
<?php
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
?>
<td class="<?php echo $row_class; ?>"><input class="post" type="text" name="code[<?php echo $img; ?>]" value="<?php echo (!empty($img_row['code'])) ? $img_row['code'] : '' ?>" size="10" /></td>
<td class="<?php echo $row_class; ?>"><input class="post" type="text" name="emotion[<?php echo $img; ?>]" value="<?php echo (!empty($img_row['emoticon'])) ? $img_row['emoticon'] : '' ?>" size="10" /></td>
<td class="<?php echo $row_class; ?>"><input class="post" type="text" name="emotion[<?php echo $img; ?>]" value="<?php echo (!empty($img_row['smiley'])) ? $img_row['smiley'] : '' ?>" size="10" /></td>
<?php
}
@@ -286,7 +286,7 @@ switch ($action)
foreach ($images as $image)
{
if (($mode == 'emoticons' && ($image_emotion[$image] == '' || $image_code[$image] == '')) ||
if (($mode == 'smilies' && ($image_emotion[$image] == '' || $image_code[$image] == '')) ||
($action == 'create' && !isset($image_add[$image])))
{
}
@@ -306,10 +306,10 @@ switch ($action)
'display_on_posting'=> (isset($image_display_on_posting[$image])) ? 1 : 0,
);
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
$img_sql = array_merge($img_sql, array(
'emoticon' => $image_emotion[$image],
'smiley' => $image_emotion[$image],
'code' => $image_code[$image])
);
}
@@ -403,7 +403,7 @@ switch ($action)
switch ($mode)
{
case 'emoticons':
case 'smilies':
break;
case 'icons':
@@ -419,7 +419,7 @@ switch ($action)
{
$cur_img = array();
$field_sql = ($mode == 'emoticons') ? 'code' : 'icons_url';
$field_sql = ($mode == 'smilies') ? 'code' : 'icons_url';
$result = $db->sql_query("SELECT $field_sql FROM $table");
while ($row = $db->sql_fetchrow($result))
@@ -441,7 +441,7 @@ switch ($action)
if (preg_match_all("#'(.*?)', #", $pak_entry, $data))
{
if ((sizeof($data[1]) != 3 && $mode == 'icons') ||
(sizeof($data[1]) != 5 && $mode == 'emoticons'))
(sizeof($data[1]) != 5 && $mode == 'smilies'))
{
trigger_error($user->lang['WRONG_PAK_TYPE']);
}
@@ -456,19 +456,19 @@ switch ($action)
}
if ($current == 'replace' &&
(($mode == 'emoticons' && !empty($cur_img[$code])) ||
(($mode == 'smilies' && !empty($cur_img[$code])) ||
($mode == 'icons' && !empty($cur_img[$img]))))
{
$replace_sql = ($mode == 'emoticons') ? $code : $img;
$replace_sql = ($mode == 'smilies') ? $code : $img;
$sql = array(
$fields . '_url' => $img,
$fields . '_height' => (int) $height,
$fields . '_width' => (int) $width,
);
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
$sql = array_merge($sql, array(
'emoticon' => $emotion
'smiley' => $emotion
));
}
@@ -486,11 +486,11 @@ switch ($action)
$fields . '_order' => (int) $order,
);
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
$sql = array_merge($sql, array(
'code' => $code,
'emoticon' => $emotion
'smiley' => $emotion
));
}
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql));
@@ -581,9 +581,9 @@ switch ($action)
$pak .= "'" . addslashes($row[$fields . '_url']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_height']) . "', ";
$pak .= "'" . addslashes($row[$fields . '_width']) . "', ";
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
$pak .= "'" . addslashes($row['emoticon']) . "', ";
$pak .= "'" . addslashes($row['smiley']) . "', ";
$pak .= "'" . addslashes($row['code']) . "', ";
}
$pak .= "\n";
@@ -612,7 +612,7 @@ switch ($action)
switch ($mode)
{
case 'emoticons':
case 'smilies':
break;
case 'icons':
@@ -704,7 +704,7 @@ switch ($action)
<tr>
<th><?php echo $user->lang[$lang]; ?></th>
<?php
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
?>
<th><?php echo $user->lang['CODE']; ?></th>
@@ -730,23 +730,23 @@ switch ($action)
$spacer = TRUE;
?>
<tr>
<td class="row3" colspan="<?php echo ($mode == 'emoticons') ? 5 : 3; ?>" align="center"><?php echo $user->lang[$lang . '_NOT_DISPLAYED'] ?></td>
<td class="row3" colspan="<?php echo ($mode == 'smilies') ? 5 : 3; ?>" align="center"><?php echo $user->lang[$lang . '_NOT_DISPLAYED'] ?></td>
</tr>
<?php
}
$row_class = ($row_class != 'row1') ? 'row1' : 'row2';
$alt_text = ($mode == 'emoticon') ? htmlspecialchars($row['code']) : '';
$alt_text = ($mode == 'smilies') ? htmlspecialchars($row['code']) : '';
?>
<tr>
<td class="<?php echo $row_class; ?>" align="center"><img src="<?php echo $phpbb_root_path . $img_path . '/' . $row[$fields . '_url']; ?>" width="<?php echo $row[$fields . '_width']; ?>" height="<?php echo $row[$fields . '_height']; ?>" alt="<?php echo $alt_text; ?>" title="<?php echo $alt_text; ?>" /></td>
<?php
if ($mode == 'emoticons')
if ($mode == 'smilies')
{
?>
<td class="<?php echo $row_class; ?>" align="center"><?php echo htmlspecialchars($row['code']); ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['emoticon']; ?></td>
<td class="<?php echo $row_class; ?>" align="center"><?php echo $row['smiley']; ?></td>
<?php
}
?>
@@ -760,7 +760,7 @@ switch ($action)
?>
<tr>
<td class="cat" colspan="<?php echo ($mode == 'emoticons') ? 5 : 3; ?>" align="center"><input type="submit" name="add" value="<?php echo $user->lang['ADD_' . $lang]; ?>" class="btnmain" />&nbsp;<input type="submit" name="edit" value="<?php echo $user->lang['EDIT_' . $lang]; ?>" class="btnmain" /></td>
<td class="cat" colspan="<?php echo ($mode == 'smilies') ? 5 : 3; ?>" align="center"><input type="submit" name="add" value="<?php echo $user->lang['ADD_' . $lang]; ?>" class="btnmain" />&nbsp;<input type="submit" name="edit" value="<?php echo $user->lang['EDIT_' . $lang]; ?>" class="btnmain" /></td>
</tr>
</table>
</td>

View File

@@ -295,7 +295,7 @@ switch ($submit)
{
$option_id_ary[] = $row['auth_option_id'];
}
while($row = $db->sql_fetchrow($result));
while ($row = $db->sql_fetchrow($result));
foreach ($ug_data as $id)
{

View File

@@ -233,7 +233,7 @@ if ($mode == 'create' || $mode == 'edit')
// Or we are creating a new dropdown list.
$cp->vars['lang_options'] = explode("\n", $options);
}
else if($mode == 'edit')
else if ($mode == 'edit')
{
$cp->vars['lang_options'] = $lang_options;
$error[] = 'You are not allowed to remove or add options within already existing profile fields';
@@ -376,7 +376,7 @@ if ($mode == 'create' || $mode == 'edit')
$error[] = $user->lang['EMPTY_FIELD_IDENT'];
}
if(!preg_match('/^[a-z_]$/', $cp->vars['field_ident']))
if (!preg_match('/^[a-z_]+$/', $cp->vars['field_ident']))
{
$error[] = $user->lang['INVALID_CHARS_FIELD_IDENT'];
}
@@ -502,7 +502,7 @@ if ($mode == 'create' || $mode == 'edit')
// Initialize these array elements if we are creating a new field
if (!sizeof($cp->vars['lang_options']))
{
if($field_type == FIELD_BOOL)
if ($field_type == FIELD_BOOL)
{
// No options have been defined for a boolean field.
$cp->vars['lang_options'][0] = '';

View File

@@ -2521,7 +2521,7 @@ function install_style($action, &$error, $name, $copyright, $active, $default, $
// and do the install if necessary
if (!${$element . '_id'})
{
$error = install_element($element, $action, $root_path, ${$element . '_id'}, ${$element . '_name'}, ${$element . '_copyright'});
$error = install_element($element, $error, $action, $root_path, ${$element . '_id'}, ${$element . '_name'}, ${$element . '_copyright'});
}
}
@@ -3051,7 +3051,8 @@ function install($type, $action, $id)
<tr>
<td class="row1" width="40%"><b><?php echo $user->lang[$l_type . '_NAME']; ?>:</b></td>
<td class="row2"><?php
$style_name = 'proSilver';
$style_copyright = '(c) 2004 Tom Beddard';
echo ($action == 'add') ? '<input class="post" type="text" name="name" maxlength="30" size="30" value="' . $name . '" />' : '<b>' . ${$type . '_name'} . '</b>';
?></td>

View File

@@ -1058,7 +1058,7 @@ function marklist(match, status)
'viewcensors' => false,
'bbcode' => true,
'html' => false,
'smile' => true,
'smilies' => true,
'attachsig' => true,
);
@@ -1081,7 +1081,7 @@ function marklist(match, status)
unset($data);
// Set the popuppm option
$option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smile', 'attachsig');
$option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smilies', 'attachsig');
foreach ($option_ary as $option)
{
@@ -1133,7 +1133,7 @@ function marklist(match, status)
}
unset($option_ary);
$option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smile', 'attachsig');
$option_ary = array('popuppm', 'viewimg', 'viewflash', 'viewsmilies', 'viewsigs', 'viewavatars', 'viewcensors', 'bbcode', 'html', 'smilies', 'attachsig');
foreach ($option_ary as $option)
{
@@ -1210,8 +1210,8 @@ function marklist(match, status)
<td class="row2"><input type="radio" name="html" value="1"<?php echo $html_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="html" value="0"<?php echo $html_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DEFAULT_SMILE']; ?>:</b></td>
<td class="row2"><input type="radio" name="smile" value="1"<?php echo $smile_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="smile" value="0"<?php echo $smile_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
<td class="row1"><b><?php echo $user->lang['DEFAULT_SMILIES']; ?>:</b></td>
<td class="row2"><input type="radio" name="smilies" value="1"<?php echo $smilies_yes; ?> /><span class="gen"><?php echo $user->lang['YES']; ?></span>&nbsp;&nbsp;<input type="radio" name="smilies" value="0"<?php echo $smilies_no; ?> /><span class="gen"><?php echo $user->lang['NO']; ?></span></td>
</tr>
<tr>
<td class="row1"><b><?php echo $user->lang['DEFAULT_ADD_SIG']; ?>:</b></td>

View File

@@ -47,7 +47,7 @@ function arraypop(thearray) {
return retval;
}
function emoticon(text) {
function smiley(text) {
text = ' ' + text + ' ';
if (document.forms[form_name].elements[text_name].createTextRange && document.forms[form_name].elements[text_name].caretPos) {
var caretPos = document.forms[form_name].elements[text_name].caretPos;