Jump to content


Photo

help me please :(


  • Please log in to reply
3 replies to this topic

#1 runnerjp

runnerjp
  • Members
  • PipPipPip
  • Advanced Member
  • 2,214 posts

Posted 29 August 2006 - 09:10 PM

hey hey
ok if u look at my website at mo www.runnerselite.com
you will notice that the info from
<?php ssi_recentTopics(); ?>
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???

#2 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 29 August 2006 - 09:40 PM

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:

$posts = ssi_recentTopics($output_method = "custom");

What is the CoronaMatrix?

#3 runnerjp

runnerjp
  • Members
  • PipPipPip
  • Advanced Member
  • 2,214 posts

Posted 29 August 2006 - 09:43 PM

yup thats confuzeld me lol so wat do i do with the ssi document :S

#4 Corona4456

Corona4456
  • Members
  • PipPipPip
  • Advanced Member
  • 244 posts
  • LocationEl Paso, TX

Posted 29 August 2006 - 09:52 PM

Here's the code of how the $posts array is constructed:
$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']
		);

Here's how it is outputted to the screen:

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>';

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.
What is the CoronaMatrix?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users