create.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * File river view.
  4. */
  5. $object = $vars['item']->getObjectEntity();
  6. $excerpt = strip_tags($object->description);
  7. // Add decrypt option
  8. if (strlen(strstr($excerpt,"U2FsdGVkX1"))>0) {
  9. $excerpt = '<div id="ID' . $vars['item']->object_guid . '" title="' . $object->description . '">' . thewire_filter($excerpt) . '<blockquote> <a href="javascript:decryptText(\'ID' . $vars['item']->object_guid . '\')">' . elgg_echo("elgg-crypt:decrypt") . '</a></blockquote></div>';
  10. } else {
  11. $excerpt = thewire_filter($excerpt);
  12. }
  13. $subject = $vars['item']->getSubjectEntity();
  14. $subject_link = elgg_view('output/url', array(
  15. 'href' => $subject->getURL(),
  16. 'text' => $subject->name,
  17. 'class' => 'elgg-river-subject',
  18. 'is_trusted' => true,
  19. ));
  20. $object_link = elgg_view('output/url', array(
  21. 'href' => "thewire/owner/$subject->username",
  22. 'text' => elgg_echo('thewire:wire'),
  23. 'class' => 'elgg-river-object',
  24. 'is_trusted' => true,
  25. ));
  26. $summary = elgg_echo("river:create:object:thewire", array($subject_link, $object_link));
  27. echo elgg_view('river/elements/layout', array(
  28. 'item' => $vars['item'],
  29. 'message' => $excerpt,
  30. 'summary' => $summary,
  31. ));