Created
February 28, 2012 17:56
-
-
Save readysetawesome/1933993 to your computer and use it in GitHub Desktop.
Make comments "fall off" in Joomla plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-<script type="text/javascript">var livefyre_blogtype='joomla';</script> | |
+<script type="text/javascript"> | |
+ var livefyre_blogtype='joomla'; | |
+ var customLivefyreDelegates = { | |
+ handle_comment_shown: function(data) { | |
+ var max_comment_length = 200, | |
+ cid = data.comment.attr('comment_id'), | |
+ models = LF.Comments.models, | |
+ len = models.length; | |
+ if (len > max_comment_length) { | |
+ if ( $jl.cursor == null || cid == $jl.cursor.split(':')[1] ) { | |
+ $jl.cursor = 'id:' + models[len-2].id; | |
+ } | |
+ models[len-1].remove(); | |
+ LF.Helpers.initShowMore(); | |
+ } | |
+ } | |
+ }; | |
+ | |
+ LF.ready(function() { | |
+ LF.Dispatcher.addListener(customLivefyreDelegates); | |
+ }); | |
+</script> | |
<div id='lf_comment_stream' livefyre_title="<?php echo $articleTitle; ?>"> | |
<?php | |
//use show_partial |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment