00001 <?php
00002
00003
00004 function basic_page_DoSummary($pid)
00005
00006 {
00007 if (get_field('pages', 'id', $pid, 'frontpage') == 0)
00008 return;
00009
00010 $title = get_field('pages', 'id', $pid, 'title');
00011 $content = get_field('pages', 'id', $pid, 'content');
00012 $type = get_field('pages', 'id', $pid, 'type');
00013 $author = get_field('pages', 'id', $pid, 'author');
00014
00015 $length = get_entry('config', 'summary_length');
00016 $readMore = get_entry('lang', 'read_more');
00017
00018 RemoveHTML($content);
00019 textToXHTML($content, FALSE, TRUE);
00020 if (strlen($content) > $length)
00021 $content = substr($content, 0, $length - 3) . '...';
00022 $content = "<p>\n$content\n</p>\n";
00023 $content = preg_replace('/\n\n/', "\n</p>\n\n<p>", $content);
00024 ?>
00025 <tr class='article_row'>
00026 <th class='article_title'>
00027 <?php
00028 CallHooks('title_left');
00029 echo $title;
00030 CallHooks('title_right');
00031 ?>
00032 </th>
00033 </tr>
00034 <tr class='article_row'>
00035 <td class='article_text'>
00036 <?php
00037 CallHooks('content_top');
00038 echo $content;
00039 CallHooks('content_bottom');
00040 ?>
00041 </td>
00042 </tr>
00043 <tr class='article_row'>
00044 <td class='article_bRow'>
00045 <table width='100%' cellspacing='0'><tr>
00046 <td class='article_author'>
00047 <a href='page.php?pt=user&pid=<?php echo $author;?>'>
00048 <?php
00049 CallHooks('author_left');
00050 echo $author;
00051 CallHooks('author_right');
00052 ?></a>
00053 </td>
00054 <td class='article_go'>
00055 <a href='page.php?pt=<?php echo "$type&pid=$pid"; ?>'>
00056 <?php
00057 CallHooks('go_left');
00058 echo $readMore;
00059 CallHooks('go_right');
00060 ?></a>
00061 </td>
00062 </tr></table>
00063 </td>
00064 </tr>
00065 <?php
00066 }
00067
00068 function Ibasic_page_cmpID($a, $b)
00069
00070 {
00071 if ($a['id'] == $b['id'])
00072 die("Two identical page IDs: '$id'.\n");
00073
00074 if ($a['id'] < $b['id'])
00075 return -1;
00076 else
00077 return 1;
00078 }
00079
00080 ?>