Advertisement
bhengh

SB add passages to feed: new code B (line 150)

Jan 23rd, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. <?php
  2. $passages_exist = FALSE;
  3. $description_exists = FALSE;
  4. $foo = unserialize($sermon->start);
  5. $bar = unserialize($sermon->end);
  6. if (isset($foo[0]) && isset($bar[0])) {
  7. $passages_exist = TRUE;
  8. $ref_output = array();
  9. for ($i = 0; $i < count($foo); $i++)
  10. $ref_output[] = sb_tidy_reference($foo[$i], $bar[$i], FALSE);
  11. }
  12. if ($sermon->description)
  13. $description_exists = TRUE;
  14. $summary_output = '';
  15. $subtitle_output = '';
  16. if ($passages_exist) {
  17. $summary_output .= implode($ref_output, ", ");
  18. $subtitle_output .= implode($ref_output, ", ");
  19. }
  20. if ($passages_exist && $description_exists)
  21. $summary_output .= "\n";
  22. if ($description_exists)
  23. $summary_output .= stripslashes($sermon->description);
  24. ?>
  25. <description><![CDATA[<?php echo $summary_output; ?>]]></description>
  26. <itunes:summary><![CDATA[<?php echo $summary_output; ?>]]></itunes:summary>
  27. <itunes:subtitle><![CDATA[<?php echo $subtitle_output; ?>]]></itunes:subtitle>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement