runnerjp Posted August 29, 2006 Share Posted August 29, 2006 hey heyok if u look at my website at mo [url=http://www.runnerselite.com]www.runnerselite.com[/url]you will notice that the info from [code]<?php ssi_recentTopics(); ?>[/code]which at the mo is General Discussion] Welcome to SMF! by Simple Machines Today at 02:03:54 PM does not fit into the area i want it to in nav bar...how can i make it so the data fits nicely into the nav bar??? Quote Link to comment https://forums.phpfreaks.com/topic/19061-help-me-please/ Share on other sites More sharing options...
Corona4456 Posted August 29, 2006 Share Posted August 29, 2006 Well if you would like to create your own format (instead of the table format which is the default output formate of ssi_recentTopics() ) you can pass in a variable for the output method and it will return the posts in the array. You can look at SSI.php in order to figure out how to output what.To do this method ... do:[code]$posts = ssi_recentTopics($output_method = "custom");[/code] Quote Link to comment https://forums.phpfreaks.com/topic/19061-help-me-please/#findComment-82467 Share on other sites More sharing options...
runnerjp Posted August 29, 2006 Author Share Posted August 29, 2006 yup thats confuzeld me lol so wat do i do with the ssi document :S Quote Link to comment https://forums.phpfreaks.com/topic/19061-help-me-please/#findComment-82470 Share on other sites More sharing options...
Corona4456 Posted August 29, 2006 Share Posted August 29, 2006 Here's the code of how the $posts array is constructed:[code]$posts[] = array( 'board' => array( 'id' => $row['ID_BOARD'], 'name' => $row['bName'], 'href' => $scripturl . '?board=' . $row['ID_BOARD'] . '.0', 'link' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['bName'] . '</a>' ), 'topic' => $row['ID_TOPIC'], 'poster' => array( 'id' => $row['ID_MEMBER'], 'name' => $row['posterName'], 'href' => empty($row['ID_MEMBER']) ? '' : $scripturl . '?action=profile;u=' . $row['ID_MEMBER'], 'link' => empty($row['ID_MEMBER']) ? $row['posterName'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['posterName'] . '</a>' ), 'subject' => $row['subject'], 'short_subject' => strlen(un_htmlspecialchars($row['subject'])) > 25 ? htmlspecialchars(substr(un_htmlspecialchars($row['subject']), 0, 22) . '...') : $row['subject'], 'time' => timeformat($row['posterTime']), 'timestamp' => $row['posterTime'], 'href' => $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . ';topicseen#msg' . $row['ID_MSG'], 'link' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.msg' . $row['ID_MSG'] . '#msg' . $row['ID_MSG'] . '">' . $row['subject'] . '</a>', 'new' => !empty($row['isRead']), 'newtime' => $row['logTime'] );[/code]Here's how it is outputted to the screen:[code]echo ' <table border="0" class="ssi_table">'; foreach ($posts as $post) echo ' <tr> <td align="right" valign="top" nowrap="nowrap"> [', $post['board']['link'], '] </td> <td valign="top"> <a href="', $post['href'], '">', $post['subject'], '</a> ', $txt[525], ' ', $post['poster']['link'], ' ', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.from' . $post['newtime'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>', ' </td> <td align="right" nowrap="nowrap"> ', $post['time'], ' </td> </tr>'; echo ' </table>';[/code]It shouldn't be hard to look at the code above and figure out how to output the data. Using the above code as a reference. Quote Link to comment https://forums.phpfreaks.com/topic/19061-help-me-please/#findComment-82474 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.