|
Revision 9, 1.0 KB
(checked in by daris, 3 years ago)
|
|
portal: fixed error with missing position field in menu panel
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | /*********************************************************************** |
|---|
| 3 | |
|---|
| 4 | PunBB extension |
|---|
| 5 | Portal |
|---|
| 6 | Daris <daris91@gmail.com> |
|---|
| 7 | |
|---|
| 8 | ************************************************************************/ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | // Make sure no one attempts to run this script "directly" |
|---|
| 12 | if (!defined('FORUM')) |
|---|
| 13 | exit; |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | ?> |
|---|
| 17 | <ul class="portal-menu"> |
|---|
| 18 | <?php |
|---|
| 19 | |
|---|
| 20 | $navlinks = generate_navlinks(); |
|---|
| 21 | // remove id from navlinks |
|---|
| 22 | $navlinks = preg_replace('#<li(.*?)>#', '<li>', $navlinks); |
|---|
| 23 | |
|---|
| 24 | $navlinks = preg_replace('#<span>(.*)</span>#', '$1', $navlinks); |
|---|
| 25 | echo $navlinks; |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | $query = array( |
|---|
| 29 | 'SELECT' => 'pg.id, pg.title, pg.content', |
|---|
| 30 | 'FROM' => 'pages AS pg', |
|---|
| 31 | ); |
|---|
| 32 | ($hook = get_hook('pr_menu_qr_get_pages')) ? eval($hook) : null; |
|---|
| 33 | $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
|---|
| 34 | |
|---|
| 35 | while ($cur_page = $forum_db->fetch_assoc($result)) |
|---|
| 36 | { |
|---|
| 37 | echo "\n\t\t".'<li><a href="'.forum_link($forum_url['page_id'], array($cur_page['id'], sef_friendly($cur_page['title']))).'">'.forum_htmlencode($cur_page['title']).'</a></li>'; |
|---|
| 38 | |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | ?> |
|---|
| 42 | </ul> |
|---|