Advertisement
swsocialweb

Add.php

Feb 12th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.36 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Wire add form body
  4.  *
  5.  * @uses $vars['post']
  6.  */
  7. $characters = elgg_get_plugin_setting('wirenum', 'wirepro');
  8.  
  9. elgg_load_js('elgg.thewire');
  10.  
  11. $post = elgg_extract('post', $vars);
  12. //$my_languages = elgg_extract('my_languages', $vars);
  13. $access_id = elgg_extract('access_id', $vars, ACCESS_DEFAULT);
  14. //$my_languages = elgg_echo('post');
  15. $my_languages = elgg_extract('my_languages', $vars, '');
  16. if ($post) {
  17.     $text = elgg_echo('thewire:reply');
  18. }
  19.  
  20. if ($post) {
  21.     echo elgg_view('input/hidden', array(
  22.         'name' => 'parent_guid',
  23.         'value' => $post->guid,
  24.     ));
  25. }
  26.  
  27. echo elgg_view('input/plaintext', array(
  28.     'name' => 'body',
  29.     'class' => 'mtm',
  30.     'id' => 'thewire-textarea',
  31. ));
  32. ?>
  33. <div id="thewire-characters-remaining">
  34.     <span><?php echo $characters; ?></span> <?php echo elgg_echo('thewire:charleft'); ?>
  35. </div>
  36. <div class="elgg-foot mts">
  37. <?php
  38.  
  39. echo elgg_view('input/submit', array(
  40.     'value' => $text,
  41.     'id' => 'thewire-submit-button',
  42. ));
  43.  
  44.  
  45.  
  46. ?>
  47. </div>
  48. <?php
  49.  
  50. echo '</br><span>Language:';
  51. echo elgg_view('input/dropdown',array(
  52.     'name'=>'my_languages',
  53. 'options_values'=> array( '0' => '  ',
  54.              'English'=>'English',
  55.              'French'=>'French',         
  56.              ),
  57. 'id'=> $my_languages));
  58.  
  59.  
  60. echo $my_languages;
  61.  
  62. $categories = elgg_view('input/categories', $vars);
  63. if ($categories) {
  64.     echo $categories;
  65. }
  66.  
  67.  
  68.  
  69.  
  70. ?></span>
  71. <div>
  72. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement