Permalink
Browse files

implemented the threaded comments to the river

  • Loading branch information...
1 parent a334e9a commit b4acf2ac34a1f4c2b3d59f58c931eeb97f959f32 @narinder-izap narinder-izap committed Sep 2, 2011
@@ -36,6 +36,9 @@
.threadedComment {
padding:5px 0px 0px 10px; font-size:12px;
}
+.river-thread{
+height:100px;
+border:1px solid #000;
/* end Threaded comments css */
@@ -11,29 +11,30 @@
* For discussion about corresponding plugins, visit http://www.pluginlotto.com/pg/forums/
* Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
*/
-
if($vars['div_placement'] == '') {
$append_prepend = 'prepend';
}else {
$append_prepend = $vars['div_placement'];
}?>
-<form action="<?php echo IzapBase::getFormAction('save', GLOBAL_IZAP_THREADED_COMMENTS_PLUGIN)?>" method="post" id="form_threaded_comment_<?php echo $vars['parent_guid'];?>">
+
+<form action="<?php echo IzapBase::getFormAction('save', GLOBAL_IZAP_THREADED_COMMENTS_PLUGIN)?>" method="post" id="form_threaded_comment_<?php echo $vars['parent_guid'];?>" style="height:70px">
<?php
echo elgg_view('input/hidden', array('name'=>"attributes[_parent_guid]", 'value'=>$vars['parent_guid']) );
echo elgg_view('input/hidden', array('name'=>"attributes[_main_entity]", 'value'=>$vars['main_entity_guid']) );
echo elgg_view('input/hidden', array('name'=>"attributes[_access_id]", 'value'=>$vars['access_id']) );
?>
+ <fieldset>
+ <textarea name="attributes[_description]" id="form_threaded_comment_<?php echo $vars['parent_guid'];?>_textarea" style="height: 40px;"></textarea>
- <p>
- <textarea name="attributes[_description]" id="form_threaded_comment_<?php echo $vars['parent_guid'];?>_textarea" style="height: 50px;"></textarea>
- </p>
<?php
$posting_icon = '<div id="form_posting"><img src="'.$vars['url'].'mod/'.GLOBAL_IZAP_THREADED_COMMENTS_PLUGIN.'/_graphics/ajax-loader.gif"></div>';
//echo $vars['url'].'mod/'.GLOBAL_IZAP_THREADED_COMMENTS_PLUGIN.'/_graphics/ajax-loader.gif';
echo elgg_view('input/submit',array(
'name'=>'submit',
'value'=>'Submit'
));
+ ?>
+ </fieldset><?php
if($vars['close_button']):
?>
<a href="#" onclick="$('#reply_form_<?php echo $vars['parent_guid']?>').remove(); return false;"><?php echo elgg_echo('close');?></a>
@@ -45,7 +46,7 @@
elgg.action(this.action, {
data: $(this).serialize(),
success: function(data){
-
+
$('#form_threaded_comment_<?php echo $vars['parent_guid'];?>_textarea').val('');
$('#form_posting').remove();
$('#reply_form_<?php echo $vars['parent_guid']?>').remove();
@@ -41,6 +41,5 @@
'pagination' => FALSE
) );
- //echo list_entities_from_metadata("parent_guid", $vars['entity']->guid, "object", "IzapThreadedComments", 0, 9999, TRUE, FALSE, FALSE);
-// todo: replace "IzapThreadedComments" with getSubtype function of entity. ?>
+ ?>
</div>
@@ -0,0 +1,22 @@
+<?php
+/***************************************************
+ * PluginLotto.com *
+ * Copyrights (c) 2005-2011. iZAP *
+ * All rights reserved *
+ ***************************************************
+ * @author iZAP Team "<support@izap.in>"
+ * @link http://www.izap.in/
+ * Under this agreement, No one has rights to sell this script further.
+ * For more information. Contact "Tarun Jangra<tarun@izap.in>"
+ * For discussion about corresponding plugins, visit http://www.pluginlotto.com/forum/
+ * Follow us on http://facebook.com/PluginLotto and http://twitter.com/PluginLotto
+ */
+
+$item = $vars['item'];
+$object = $item->getObjectEntity();
+if(!elgg_in_context('widgets')){
+echo elgg_view('input/threaded_comments',array(
+ 'entity' => $object,
+ 'paging' => 'off',
+ 'limit' => 200,));
+}

0 comments on commit b4acf2a

Please sign in to comment.