File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 3838$ lang ['forums_reply ' ] = "Reply " ;
3939$ lang ['forums_reply_posted ' ] = "Reply posted! " ;
4040$ lang ['forums_posted_by ' ] = "Posted by " ;
41+ $ lang ['forums_quote ' ] = "Quote this post " ;
4142
4243//for librari's time_ago function
4344$ lang ['forums_time_second ' ] = "second " ;
Original file line number Diff line number Diff line change 3636
3737 <?php foreach ($ posts as $ post ): ?>
3838 <div class="well">
39- <?php echo htmlspecialchars_decode ($ post ->post , ENT_QUOTES ); ?> <br/><br/>
40-
39+ <div id="post-<?php echo $ post ->id ; ?> ">
40+ <?php echo htmlspecialchars_decode ($ post ->post , ENT_QUOTES ); ?>
41+ </div>
42+ <br/><br/>
43+ <a class="btn btn-default" onclick="quote('post-<?php echo $ post ->id ; ?> ', '<?php echo $ post ->username ; ?> ')"><?php echo lang ('forums_quote ' ); ?> </a>
4144 <span class="pull-right">
4245 <?php echo lang ('forums_posted_by ' ) . $ post ->username ; ?> , <?php echo $ this ->cibb ->time_ago ($ post ->date_add ); ?>
4346 </span>
44- <div class="clearfix" style="height: 30px;"></div>
45-
47+ <div class="clearfix" style="height: 20px;"></div>
4648 </div>
4749 <?php endforeach ; ?>
4850
6567 echo '</div><div class="clearfix"></div> ' ;
6668 echo form_close ();
6769 ?>
70+ <script>
71+ function quote(post, author)
72+ {
73+ var text = $('#'+post).html();
74+ var quote = '<blockquote>'+text+'<span class="pull-right">'+'<a href="<?php echo base_url ("forums/thread/ " .$ thread ->slug .'/ ' ); ?> #'+post+'"><?php echo lang ('forums_posted_by ' ); ?> '+author+'</a></span></blockquote>';
75+ var value = $('textarea.editable').val();
76+ $('textarea.editable').val(value + quote);
77+ }
78+ </script>
6879</div>
You can’t perform that action at this time.
0 commit comments