aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/feed_reader/edit.php
blob: a721f0e8a89201fe13e043efc3af81479d4b91dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
	$num_items = $vars['entity']->num_items;
	if (!isset($num_items)) {
		$num_items = 10;
	}

	$excerpt = $vars['entity']->excerpt;
	if (!isset($excerpt)) {
		$excerpt = 0;
	}
	
	$post_date = $vars['entity']->post_date;
	if (!isset($post_date)) {
		$post_date = 0;
	}
?>

<p>
	<?php echo elgg_echo("simplepie:feed_url"); ?>
	<input type="text" onclick="this.select();" name="params[feed_url]" value="<?php echo htmlentities($vars['entity']->feed_url); ?>" />  
</p>

<p>
<?php echo elgg_echo('simplepie:num_items'); ?>
	
<?php
	echo elgg_view('input/pulldown', array(
			'internalname' => 'params[num_items]',
			'options_values' => array(	'3' => '3',
										'5' => '5',
										'8' => '8',
										'10' => '10',
										'12' => '12',
										'15' => '15',
										'20' => '20',
									),
			'value' => $num_items
		));
?>
</p>

<p>
<?php 
// used a hidden input field so that something is always sent unlike a checkbox
echo elgg_view('input/hidden', array('internalname' => 'params[excerpt]', 
									'js' => 'id="params[excerpt]"', 
									'value' => $excerpt ));
echo "<input class='input-checkboxes' type='checkbox' value='' name='excerptcheckbox' onclick=\"document.getElementById('params[excerpt]').value = 1 - document.getElementById('params[excerpt]').value;\" ";
if ($excerpt) {
	echo "checked='yes'";
}
echo " />";
echo ' ' . elgg_echo('simplepie:excerpt');
?>
</p>  

<p>
<?php 
echo elgg_view('input/hidden', array('internalname' => 'params[post_date]', 
									'js' => 'id="params[post_date]"', 
									'value' => $post_date ));
echo "<input class='input-checkboxes' type='checkbox' value='' name='post_datecheckbox' onclick=\"document.getElementById('params[post_date]').value = 1 - document.getElementById('params[post_date]').value;\" ";
if ($post_date) {
	echo "checked='yes'";
}
echo " />";
echo ' ' . elgg_echo('simplepie:post_date');
?>
</p>