PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/output_modules/other/link.inc.php

https://github.com/adamfranco/segue-1.x
PHP | 39 lines | 15 code | 9 blank | 15 comment | 3 complexity | d2f39cfc83befcfed8da8f57aa004233 MD5 | raw file
  1. <? /* $Id$ */
  2. include("output_modules/common.inc.php");
  3. /* */
  4. /* if ($a[category]) { */
  5. /* printc("<div class='contentinfo' align='right'>"); */
  6. /* printc("Category: <b>".spchars($a[category])."</b>"); */
  7. /* printc("</div>"); */
  8. /* } */
  9. /* print "<pre>"; */
  10. /* print_r($o->data); */
  11. /* print "</pre>"; */
  12. /* print db_get_value("story","story_text_long","story_id=".$o->id); */
  13. $abbrurl = substr($o->getField("url"),0,75);
  14. $url = $o->getField("url");
  15. /******************************************************************************
  16. * replace general media library urls (i.e. $mediapath/$sitename/filename)
  17. * replace general with specific
  18. ******************************************************************************/
  19. $url = convertTagsToInteralLinks($site, $url);
  20. $abbrurl = substr($url,0,75);
  21. if ($o->getField("title")) {
  22. printc("<div class='leftmargin'><b><a href='".$url."' target='_blank'>");
  23. printc(spchars($o->getField("title"))."</a></b></div>");
  24. }
  25. printc("<div class='desc'><a href='".$url."' target='_blank'>".$abbrurl."...</a></div>");
  26. //printc("<div><a href='".$o->getField("url")."' target='_blank'>".$o->getField("url")."</a></div>");
  27. if ($o->getField("shorttext")) printc("<div class='desc'>".stripslashes($o->getField("shorttext"))."</div>");
  28. if ($o->getField("discuss")) {
  29. include (dirname(__FILE__)."/discussionLink.inc.php");
  30. }