Jump to content

Pulling Date And Time


Zer0Cam

Recommended Posts

I want to pull the date and time from my forum.

comments.JPG

Also Add some other features like

*Profile Comment / New Message Notifications     

* "Report Profile , To Admin" 

* Admin Interface (Whos got the feature enabled)

Top 8 for friends / Editable

* Box For Music

*Date and Time for comments (Matti Suggestion)

*Nottification, On Comments / Profile /Messages/ 

 

I don't know were to start so I started with the pulling the date and time

 

From this code:

</script>

<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="65%" id="post_comments">
<tr>
	<td class="titlebg"><a href="javascript:void(0);" onclick="comment()">', $txt['profile_comment_add'] ,'</a></td>
</tr>
<tr id="comment" class="windowbg" style="display: none;">
	<td>
		<form action="', $scripturl ,'?action=profile;u=', $context['member']['id'] ,';sa=comment;add" method="post">
			', $txt['profile_comment'] ,'<br />
			<textarea  cols="50" rows="4" name="comment"></textarea><br />
			<br />
			<input type="submit" value="', $txt[10] ,'" />
			<input type="hidden" name="sc" value="', $context['session_id'], '" />
		</form>
	</td>
</tr>
</table>

<div class="div2"></div>

<br />

<table border="0" cellpadding="4" cellspacing="1" align="center" class="bordercolor" width="100%" id="comments">
<tr>
	<td class="titlebg" colspan="2" align="center">', $txt['profile_comments'] ,'</td>
</tr>';

// Only show comments if they have made some!
if (!empty($context['comments'])) {
	foreach ($context['comments'] as $comment) {
		echo '

<tr>
	<td class="windowbg" align="center" valign="top">
		<b><a href="', $scripturl ,'?action=profile;u=', $comment['author']['ID_MEMBER'] ,'">', $comment['author']['realName'] ,'</a></b>
		<div class="smalltext">
			', $comment['author']['avatar'] ,'<br /><br />
			<i>', $settings['use_image_buttons'] ? '<img src="' . $context['member']['online']['image_href'] . '" alt="' . $context['member']['online']['text'] . '" align="middle" />' : $context['member']['online']['text'], $settings['use_image_buttons'] ? '<span class="smalltext"> ' . $context['member']['online']['text'] . '</span>' : '', '</i>				
		</div>
	</td>
	<td class="windowbg2">
		<table width="100%">
			<tr>
				<td>', $comment['body'] ,'</td>
			</tr>';
		if ($context['can_delete'])
			echo '
			<tr>
				<td align="right" valign="bottom" class="smalltext">
					<a href="', $comment['delete'], '">', $txt['profile_comment_delete'] ,'</a>
				</td>
			</tr>';

			echo '
		</table>
	</td>
</tr>';

	}

}
else
	echo '
<tr class="windowbg2">
	<td colspan="2">', $txt['profile_comment_no'] ,'</td>
</tr>';

echo '
</table>';

Link to comment
https://forums.phpfreaks.com/topic/63268-pulling-date-and-time/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.