Location: PHPKode > projects > Zzap > zzap/app/plugins/blog/views/html_settings.php
<?php 
/**
 * Settings view for blog plugin
 * 
 * @package Zzap
 * @subpackage plugins
 * @author Dirk Ollmetzer <hide@address.com>
 * @copyright 2008 Dirk Ollmetzer
 * @version $Id: html_settings.php 130 2008-09-16 18:44:28Z dollmetzer $
 * @license GPLv3 http://www.gnu.org/copyleft/gpl.html
 */
?>

<form action="<?php echo $GLOBALS['application']->buildLink('plugin', $GLOBALS['application']->content['piName']) ?>" method="post">
<table>
<tr>
	<td colspan="2"><?php echo $language['subheadline_yourbadge']; ?></td>
</tr>
<tr>
	<td><?php echo $language['form_badgesize']; ?></td>
	<td><select id="badgesize" onchange="newBadgeCode();" style="width:250px;"><?php foreach($GLOBALS['application']->setup['internal']['images']['sizes'] as $size) {
		echo '<option>'.$size." px</option>\n";
	} ?></select></td>
</tr>
<tr>
	<td><?php echo $language['form_badgecode'] ?></td>
	<td><textarea id="badgearea" rows="4" cols="60" >&nbsp;</textarea></td>
</tr>
<tr style="border-bottom:1px solid #cccccc;"><td colspan="2">&nbsp;</td></tr>



<tr>
	<td colspan="2"><?php echo $language['subheadline_general']; ?></td>
</tr>
<?php if(isset($content['formError']['blogurl'])) { ?>
<tr class="error">
	<td colspan="2"><?php echo $content['formError']['blogurl']; ?></td>
</tr>
<tr class="error">	
<?php } else { ?>
<tr>
<?php } ?>
	<td><?php echo $language['form_blogurl']; ?>&nbsp;</td>
	<td><input name="f_blogurl" value="<?php echo $content['blog']['blogurl']; ?>" maxlength="128" style="width:250px;"" /></td>
</tr>

<?php if(isset($content['formError']['blogtype'])) { ?>
<tr class="error">
	<td colspan="2"><?php echo $content['formError']['blogtype']; ?></td>
</tr>
<tr class="error">	
<?php } else { ?>
<tr>
<?php } ?>
	<td><?php echo $language['form_blogtype']; ?>&nbsp;</td>
	<td><select name="f_blogtype" style="width:250px;">
		<option><?php echo $language['option_state_unknown']; ?></option>
	<?php 
	foreach($GLOBALS['application']->setup['external']['blogsystems'] as $bsystem=>$bparam) { 
	
		echo '<option ';
		echo 'value="'.$bsystem.'"';
		if($content['blog']['blogtype'] == $bsystem) {
			echo ' selected="selected"';
		}
		echo '>'.$bparam['name']."</option>\n";
		
	}
	 ?></select>
	</td>
</tr>
<tr style="border-bottom:1px solid #cccccc;"><td colspan="2">&nbsp;</td></tr>



<tr>
	<td colspan="2"><?php echo $language['subheadline_incoming']; ?></td>
</tr>
<tr>
	<td><?php echo $language['form_announce']; ?>&nbsp;</td>
	<td><input type="checkbox" name="f_announce" <?php if($content['blog']['announce'] == 1) { echo 'checked="checked" '; } ?>/></td>
</tr>
<tr>
	<td><?php echo $language['form_replycomment']; ?>&nbsp;</td>
	<td><input type="checkbox" name="f_replycomment" <?php if($content['blog']['replycomment'] == 1) { echo 'checked="checked" '; } ?>/></td>
</tr>
<tr>
	<td><?php echo $language['form_pingpath']; ?></td>
	<td>&nbsp;http://<?php echo URL_BASE; ?>/ping.php</td>
</tr>
<tr style="border-bottom:1px solid #cccccc;"><td colspan="2">&nbsp;</td></tr>



<tr>
	<td colspan="2"><?php echo $language['subheadline_ougoing']; ?></td>
</tr>
<tr>
	<td><?php echo $language['form_sendarticle']; ?>&nbsp;</td>
	<td><input type="checkbox" name="f_sendarticle" <?php if($content['blog']['sendarticle'] == 1) { echo 'checked="checked" '; } ?>/></td>
</tr>
<tr>
	<td><?php echo $language['form_blogcategory']; ?>&nbsp;</td>
	<td><input name="f_blogcategory" value="<?php echo $content['blog']['blogcategory']; ?>" maxlength="64" style="width:250px;" /></td>
</tr>
<tr>
	<td><?php echo $language['form_bloguser']; ?>&nbsp;</td>
	<td><input name="f_bloguser" value="<?php echo $content['blog']['bloguser']; ?>" maxlength="64" style="width:250px;" /></td>
</tr>
<tr>
	<td><?php echo $language['form_blogpassword']; ?>&nbsp;</td>
	<td><input name="f_blogpassword" value="<?php echo $content['blog']['blogpassword']; ?>" maxlength="64" style="width:250px;" /></td>
</tr>
<tr style="border-bottom:1px solid #cccccc;"><td colspan="2">&nbsp;</td></tr>


<tr>
	<td>&nbsp;</td>
	<td><input type="submit" name="f_submit" value="<?php echo $language['action_update'] ?>" /></td>
</tr>
</table>
</form>



<script type="text/javascript">
function newBadgeCode() {
	
	picwidth = parseInt(document.getElementById('badgesize').value);
	badgesize = picwidth + 20;
	var badgecode = '<';
	badgecode += 'iframe src="http://<?php echo URL_BASE; ?>/api.php?q=messages/user/<?php echo $GLOBALS['session']->get('user_handle'); ?>/1/';
	badgecode += picwidth + '/iframe" ';
	badgecode += 'style="margin:0;border:1px solid blue;width:';
	badgecode += badgesize + 'px;height:420px;><';
	badgecode += '/iframe>';	
	document.getElementById('badgearea').value = badgecode;
}
newBadgeCode();
</script>
Return current item: Zzap