Commits

sembrestels  committed 14afa20

Added plugin setting to set how many topics in group profile.

  • Participants
  • Parent commits 0c2585f

Comments (0)

Files changed (4)

File elgg/mod/threaded_forums/languages/en.php

             'groups:threadedforum' => 'Discussion',
             'groups:moretopics' => 'More topics',
             'groups:postreply' => 'Post a reply',//
+	    'threaded_forums:num_topics' => 'Number of topics',
 
 	);
 					

File elgg/mod/threaded_forums/languages/es.php

 			'threaded_forums:changecontainer' => "Mover el hilo a otro grupo",
 			'groups:topicmessage' => 'Cuerpo del mensaje',
 			'groups:moretopics' => 'Más tíos',
+			'threaded_forums:num_topics' => 'Número de temas',
 
 		
 	);

File elgg/mod/threaded_forums/views/default/groups/forum_latest.php

 
     // get the topic information
 	$query = array('name'=>'status','value'=>array('open','sticky'));
+	$limit = get_plugin_setting('num_topics', 'threaded_forums');
 	$options = array('type'=>'object',
 			'metadata_name_value_pairs'=>$query,
 			'container_guid'=>get_input('group_guid'),
 			'order_by'=>'e.time_updated desc',
-			'limit'=>4,
+			'limit'=> $limit ? $limit : 4,
 			'count' => false,
 			'subtype'=>'groupforumtopic'
 			);

File elgg/mod/threaded_forums/views/default/settings/threaded_forums/edit.php

+<?php
+/**
+ *	Threaded Forums Plugin
+ *	@package ThreadedForums
+ **/
+
+	$num_topics = get_plugin_setting("num_topics", "threaded_forums");
+	
+?>
+<p>
+	<?php echo elgg_echo('threaded_forums:num_topics'); ?>
+	<?php echo elgg_view('input/text', array('internalname' => 'params[num_topics]','value' => $num_topics)); ?>
+</p>
+