
I believe I have to edit the articlecontent.edit.tmpl file in include/inc_tmpl however I have spent ages on it and havent figured it out.
Any help is greatly appreciated,
-mscwd
Code: Select all
$wysiwyg_editor = array(
'value' => $article["article_summary"],
'field' => 'article_summary',
'height' => '450px', // hack - was 250
'width' => '900px', // hack - was 440
'rows' => '15',
'editor' => $_SESSION["WYSIWYG_EDITOR"],
'lang' => 'en'
);
include('include/inc_lib/wysiwyg.editor.inc.php');
Code: Select all
<?php
/*************************************************************************************
Copyright notice
(c) 2002-2005 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
This script is part of PHPWCMS. The PHPWCMS web content management system is
free software; you can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
A copy is found in the textfile GPL.txt and important notices to the license
from the author is found in LICENSE.txt distributed with these scripts.
This script is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
This copyright notice MUST APPEAR in all copies of the script!
*************************************************************************************/
?><table width="538" border="0" cellpadding="0" cellspacing="0">
<form action="phpwcms.php?do=articles&p=2&s=1&aktion=1&id=<?php echo $article["article_id"] ?>" method="post" name="article" id="article">
<tr><td colspan="2" class="title"><?php echo $BL['be_article_estitle'] ?></td></tr>
<tr>
<td width="88"><img src="img/leer.gif" width="88" height="4"></td>
<td width="450"><img src="img/leer.gif" width="450" height="1"></td>
</tr>
<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="8"></td></tr>
<?php
if(!empty($article_err)) {
?>
<tr valign="top" bgcolor="#FFE9D2">
<td align="right"><strong style="color:#FF6600"><?php echo $BL['be_admin_usr_err'] ?>: </strong></td>
<td><strong style="color:#FF6600"><?php echo nl2br(html_specialchars(chop($article_err))); ?></strong></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
<?php
}
?>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_cat'] ?>: </td>
<td><select name="article_cid" id="article_cid" style="width: 325px" class="f11b">
<?php
//keine definierte Kategorie = allgemeine Artikelkategorie
echo "<option value='0'".((!$article["article_catid"])?" selected":"").">".$BL['be_admin_struct_index']."</option>\n";
struct_select_menu($db, 0, 0, $article["article_catid"]);
?></select></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="3"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_atitle'] ?>: </td>
<td><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="article_title" type="text" class="f11b" id="article_title" style="width: 325px" value="<?php echo html_specialchars($article["article_title"]) ?>" size="40" maxlength="255"></td>
<td> </td>
<td><input name="article_notitle" id="article_notitle" type="checkbox" value="1" <?php is_checked($article["article_notitle"],1) ?>></td>
<td class="v10"><label for="article_notitle"><?php echo $BL['be_admin_struct_hide1'] ?></label></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_asubtitle'] ?>: </td>
<td><input name="article_subtitle" type="text" class="f11b" id="article_subtitle" style="width: 440px" value="<?php echo html_specialchars($article["article_subtitle"]) ?>" size="40" maxlength="255"></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
<tr>
<td colspan="2"><table border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="84"><img src="img/leer.gif" width="84" height="1"></td>
<td colspan="7"><img src="img/leer.gif" width="1" height="1"></td>
</tr>
<tr bgcolor="#E7E8EB">
<td width="84" align="right" bgcolor="#FFFFFF" class="chatlist" style="width:84px;"> <br /><?php echo $BL['be_article_abegin'] ?>:<img src="img/leer.gif" width="2" height="1"></td>
<td class="chatlist"> <br /><input name="set_begin" type="checkbox" id="set_begin" value="1"<?php is_checked(1, $set_begin) ?> onClick="if(!this.checked) {document.article.article_begin.value='';}else{document.article.article_begin.value='<?php echo $article["article_begin"] ?>';}"></td>
<td class="chatlist" nowrap>YYYY-MM-DD HH:MM:SS<br /><input name="article_begin" type="text" id="article_begin" style="width:140px" class="f11" value="<?php echo $article["article_begin"] ?>"></td>
<td class="chatlist" valign="bottom"><script language="JavaScript" type="text/javascript">
<!--
function aBegin(date, month, year) {
document.article.article_begin.value = year + '-' + subrstr('00' + month, 2) + '-' + subrstr('00' + date, 2) + ' 00:00:00';
document.article.set_begin.checked = true;
}
calBegin = new dynCalendar('calBegin', 'aBegin', 'img/dynCal/');
calBegin.setOffset(10, -30);
//-->
</script><img src="img/leer.gif" width="3" height="1"></td>
<td align="right" bgcolor="#FFFFFF" class="chatlist"> <br /> <?php echo $BL['be_article_aend'] ?>:</td>
<td class="chatlist"> <br /><input name="set_end" type="checkbox" id="set_end" value="1"<?php is_checked(1, $set_end) ?> onClick="if(!this.checked) {document.article.article_end.value='';}else{document.article.article_end.value='<?php echo $article["article_end"] ?>';}"></td>
<td class="chatlist" nowrap>YYYY-MM-DD HH:MM:SS<br /><input name="article_end" type="text" id="article_end" style="width:140px" class="f11" value="<?php echo $article["article_end"] ?>"></td>
<td class="chatlist" valign="bottom"><script language="JavaScript" type="text/javascript">
<!--
function aEnd(date, month, year) {
document.article.article_end.value = year + '-' + subrstr('00' + month, 2) + '-' + subrstr('00' + date, 2) + ' 23:59:59';
document.article.set_end.checked = true;
}
calEnd = new dynCalendar('calEnd', 'aEnd', 'img/dynCal/');
calEnd.setOffset(10, -30);
//-->
</script><img src="img/leer.gif" width="3" height="1"></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_aredirect'] ?>: </td>
<td><input name="article_redirect" type="text" id="article_redirect" class="f11" style="width: 440px" value="<?php echo html_specialchars($article["article_redirect"]) ?>" size="40"></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr>
<tr valign="top">
<td align="right" class="chatlist"><img src="img/leer.gif" width="1" height="3"><br /><?php echo $BL['be_article_akeywords'] ?>: </td>
<td><textarea name="article_keyword" rows="4" class="f10" id="article_keyword" style="width: 440px" onKeyUp="if(this.value.length > 250) {this.value=this.value.substr(0,250);}"><?php echo html_specialchars($article["article_keyword"]) ?></textarea></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr><!--get_tmpl_files($dir)//-->
<tr>
<td align="right" class="chatlist" valign="top"><?php echo $BL['be_admin_struct_template'] ?>: </td>
<td valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="chatlist"><?php echo $BL['be_article_forlist'] ?>: </td>
<td><img src="img/leer.gif" width="10" height="1"></td>
<td class="chatlist"><?php echo $BL['be_article_forfull'] ?>: </td>
</tr>
<tr><td colspan="3"><img src="img/leer.gif" width="1" height="2"></td></tr>
<tr>
<td><select name="article_tmpllist" id="article_tmpllist" style="width: 215px" class="f11">
<?php
// templates for article listing
$tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/articlesummary/list');
if($article['image']['tmpllist'] == 'default') {
$vals= ' selected="selected"';
} else {
$vals = '';
}
echo '<option value="default"'.$vals.'>'.$BL['be_cnt_default']."</option>\n";
if(count($tmpllist)) {
foreach($tmpllist as $val) {
$vals = '';
if($val == $article['image']['tmpllist']) $vals= ' selected="selected"';
$val = htmlspecialchars($val);
echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n";
}
}
?>
</select></td>
<td> </td>
<td><select name="article_tmplfull" id="article_tmplfull" style="width: 215px" class="f11">
<?php
// templates for full article
$tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/articlesummary/article');
if($article['image']['tmplfull'] == 'default') $vals= ' selected="selected"';
echo '<option value="default"'.$vals.'>'.$BL['be_cnt_default']."</option>\n";
if(count($tmpllist)) {
foreach($tmpllist as $val) {
$vals = '';
if($val == $article['image']['tmplfull']) $vals= ' selected="selected"';
$val = htmlspecialchars($val);
echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n";
}
}
?>
</select></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
<tr><td colspan="2"><img src="img/lines/l538_70.gif"></td></tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
<!-- hack following html so editor aligns right-->
<tr>
<td valign="top" align="right" class="chatlist"><img src="img/leer.gif" width="1" height="3"><br /><?php echo $BL['be_article_asummary'] ?>:</td>
<td valign="top"> </td>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
</tr>
<tr>
<td colspan="2" align="left" valign="top" class="chatlist"><?php
$wysiwyg_editor = array(
'value' => $article["article_summary"],
'field' => 'article_summary',
'height' => '450px', // hack - was 250
'width' => '530px', // hack - was 440
'rows' => '15',
'editor' => $_SESSION["WYSIWYG_EDITOR"],
'lang' => 'en'
);
include('include/inc_lib/wysiwyg.editor.inc.php');
?></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_cnt_image'] ?>: </td>
<td valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="cimage_name" type="text" id="cimage_name" class="f11b" style="width: 200px; color: #727889;" value="<?php echo html_specialchars($article['image']['name']) ?>" size="40" maxlength="250" onFocus="this.blur()"></td>
<!-- browser_image.php //-->
<td><img src="img/leer.gif" width="3" height="1"><a href="javascript:;" title="<?php echo $BL['be_cnt_openimagebrowser'] ?>" onClick="tmt_winOpen('filebrowser.php','imageBrowser','width=380,height=300,left=8,top=8,scrollbars=yes,resizable=yes',1)"><img src="img/button/open_image_button.gif" width="20" height="15" border="0"></a></td>
<td><img src="img/leer.gif" width="3" height="1"><a href="javascript:;" alt="<?php echo $BL['be_cnt_delimage'] ?>" onClick="document.article.cimage_name.value='';document.article.cimage_id.value='0';this.blur();return false;"><img src="img/button/del_image_button.gif" width="15" height="15" border="0"></a><input name="cimage_id" type="hidden" value="<?php echo $article['image']['id'] ?>"></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_cnt_maxw'] ?>: </td>
<td valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="cimage_width" type="text" class="f11b" id="cimage_width" style="width: 50px;" size="3" maxlength="3" onKeyUp="if(!parseInt(this.value)) this.value='';" value="<?php echo $article['image']['width'] ?>"></td>
<td class="chatlist"> <?php echo $BL['be_cnt_maxh'] ?>: </td>
<td><input name="cimage_height" type="text" class="f11b" id="cimage_height" style="width: 50px;" size="3" maxlength="3" onKeyUp="if(!parseInt(this.value)) this.value='';" value="<?php echo $article['image']['height'] ?>"></td>
<td class="chatlist"> pixel </td>
<td bgcolor="#E7E8EB"> </td>
<td bgcolor="#E7E8EB"><input name="cimage_zoom" type="checkbox" id="cimage_zoom" value="1" <?php is_checked(1, $article['image']['zoom']); ?>></td>
<td bgcolor="#E7E8EB" class="v10"><label for="cimage_zoom"> <?php echo $BL['be_cnt_enlarge'] ?></label> </td>
<td bgcolor="#E7E8EB"><img src="img/leer.gif" width="6" height="15"></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="6"></td></tr>
<tr>
<td align="right" valign="top" class="chatlist"><img src="img/leer.gif" width="1" height="13"><?php echo $BL['be_cnt_caption'] ?>: </td>
<td valign="top"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><textarea name="cimage_caption" cols="30" rows="3" class="f11" id="cimage_caption" style="width: 300px;"><?php echo html_specialchars($article['image']['caption']) ?></textarea></td>
<td valign="top"><img src="img/leer.gif" width="15" height="1"></td>
<td valign="top"><?php
$_SESSION['image_browser_article'] = 1;
$thumb_image = false;
if(!empty($article["image"]["hash"])) {
$thumb_image = get_cached_image(
array( "target_ext" => $article['image']['ext'],
"image_name" => $article['image']['hash'] . '.' . $article['image']['ext'],
"thumb_name" => md5($article['image']['hash'].$phpwcms["img_list_width"].$phpwcms["img_list_height"].$phpwcms["sharpen_level"])
)
);
}
if($thumb_image != false) {
echo '<img src="'.PHPWCMS_IMAGES . $thumb_image[0] .'" border="0" '.$thumb_image[3].'>';
} else {
echo ' ';
}
?></td>
</tr>
</table></td>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_rendering'] ?>: </td>
<td><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><input name="article_hidesummary" type="checkbox" id="article_hidesummary" value="1"<?php is_checked(1, $article["article_hidesummary"]); ?>></td>
<td> <label for="article_hidesummary"><?php echo $BL['be_article_nosummary'] ?></label></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="5"></td></tr>
<tr><td colspan="2"><img src="img/lines/l538_70.gif"></td></tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
<?php
if($_SESSION["wcs_user_admin"]) {
?>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_articleowner'] ?>: </td>
<td><table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><select name="article_uid" id="article_uid" style="width: 300px" class="f11b">
<?php
$u_sql = "SELECT usr_id, usr_name, usr_login, usr_admin FROM ".DB_PREPEND."phpwcms_user WHERE usr_aktiv=1 ORDER BY usr_admin DESC, usr_name";
if($u_result = mysql_query($u_sql, $db)) {
while($u_row = mysql_fetch_row($u_result)) {
echo '<option value="'.$u_row[0].'"';
if($u_row[0] == $article["article_uid"]) echo ' selected';
if(intval($u_row[3])) echo ' style="background-color: #FFC299;"';
echo '>'.html_specialchars(($u_row[1]) ? $u_row[1] : $u_row[2]).'</option>'."\n";
}
mysql_free_result($u_result);
}
?>
</select></td>
<td> </td>
<td bgcolor="#FFC299"><img src="img/leer.gif" width="15" height="10"></td>
<td class="chatlist"> <?php echo $BL['be_article_adminuser'] ?></td>
</tr></table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="3"></td></tr>
<?php
}
?>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_article_username'] ?>: </td>
<td><input name="article_username" type="text" id="article_username" class="f11" style="width: 300px" value="<?php echo html_specialchars($article["article_username"]) ?>" size="40" maxlength="100"></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="15"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_cache'] ?>: </td>
<td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB">
<tr>
<td><input name="article_cacheoff" type="checkbox" id="article_cacheoff" value="1" <?php if($article["article_timeout"] === '0') echo "checked"; ?>></td>
<td> <label for="article_cacheoff"><?php echo $BL['be_off'] ?></label> </td>
<td> </td>
<td><select name="article_timeout" class="f11" style="margin:2px;" onChange="document.article.article_cacheoff.checked=false;">
<?php
echo '<option value=" ">'.$BL['be_admin_tmpl_default']."</option>\n";
echo '<option value="60"'.is_selected($article["article_timeout"], '60', 0, 0).'> 1 '.$BL['be_date_minute']."</option>\n";
echo '<option value="300"'.is_selected($article["article_timeout"], '300', 0, 0).'> 5 '.$BL['be_date_minutes']."</option>\n";
echo '<option value="900"'.is_selected($article["article_timeout"], '900', 0, 0).'>15 '.$BL['be_date_minutes']."</option>\n";
echo '<option value="1800"'.is_selected($article["article_timeout"], '1800', 0, 0).'>30 '.$BL['be_date_minutes']."</option>\n";
echo '<option value="3600"'.is_selected($article["article_timeout"], '3600', 0, 0).'> 1 '.$BL['be_date_hour']."</option>\n";
echo '<option value="14400"'.is_selected($article["article_timeout"], '14400', 0, 0).'> 4 '.$BL['be_date_hours']."</option>\n";
echo '<option value="43200"'.is_selected($article["article_timeout"], '43200', 0, 0).'>12 '.$BL['be_date_hours']."</option>\n";
echo '<option value="86400"'.is_selected($article["article_timeout"], '86400', 0, 0).'> 1 '.$BL['be_date_day']."</option>\n";
echo '<option value="172800"'.is_selected($article["article_timeout"], '172800', 0, 0).'> 2 '.$BL['be_date_days']."</option>\n";
echo '<option value="604800"'.is_selected($article["article_timeout"], '604800', 0, 0).'> 1 '.$BL['be_date_week']."</option>\n";
echo '<option value="1209600"'.is_selected($article["article_timeout"], '1209600', 0, 0).'> 2 '.$BL['be_date_weeks']."</option>\n";
echo '<option value="2592000"'.is_selected($article["article_timeout"], '2592000', 0, 0).'> 1 '.$BL['be_date_month']."</option>\n";
?>
</select></td>
<td> <?php echo $BL['be_cache_timeout'] ?> </td>
<td class="chatlist" bgcolor="#FFFFFF"> <?php echo $BL['be_ctype_search'] ?>: </td>
<td><input name="article_nosearch" type="checkbox" id="article_nosearch" value="1" <?php is_checked(1, $article['article_nosearch']); ?>></td>
<td> <label for="article_nosearch"><?php echo $BL['be_off'] ?></label> </td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
<tr>
<td align="right" class="chatlist"><?php echo $BL['be_ftptakeover_status'] ?>: </td>
<td><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB">
<tr>
<td><input name="article_aktiv" type="checkbox" id="article_aktiv" value="1"<?php is_checked(1, $article["article_aktiv"]); ?>></td>
<td> <label for="article_aktiv"><?php echo $BL['be_admin_struct_visible'] ?></label> </td>
<td><input name="article_public" type="checkbox" id="article_public" value="1"<?php is_checked(1, $article["article_public"]); ?>></td>
<td> <label for="article_public"><?php echo $BL['be_ftptakeover_public'] ?></label> </td>
<td><input name="article_nositemap" type="checkbox" id="article_nositemap" value="1"<?php is_checked(1, $article["article_nositemap"]); ?>></td>
<td> <label for="article_nositemap"><?= $BL['be_ctype_sitemap'] ?></label> </td>
<td><img src="img/leer.gif" width="1" height="23"></td>
<td bgcolor="#FFFFFF"><img src="img/leer.gif" width="25" height="1"></td>
<td bgcolor="#FFFFFF" class="chatlist"><?php echo $BL['be_article_eslastedit'] ?>: </td>
<td bgcolor="#FFFFFF"><?php
if(empty($_POST["article_update"]) || !intval($_POST["article_update"])) {
echo $article["article_date"];
} else {
echo $BL['be_article_esnoupdate'];
}
?></td>
</tr>
</table></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="15"></td></tr>
<tr>
<td><input name="article_update" type="hidden" id="article_update" value="1"></td>
<td><input name="Submit" type="submit" class="button10" value="<?php echo $BL['be_article_cnt_button3'] ?>"> <input name="donotsubmit" type="button" class="button10" value="<?php echo $BL['be_newsletter_button_cancel'] ?>" onClick="location.href='phpwcms.php?do=articles&p=2&s=1&id=<?php echo $article["article_id"] ?>'"></td>
</tr>
<tr><td colspan="2"><img src="img/leer.gif" width="1" height="10"></td></tr>
<tr><td colspan="2"><img src="img/lines/l538_70.gif" width="538" height="1"></td></tr>
</form>
</table>