Posted by Simon Goodchild at January 23rd, 2012
Following on from part 1, we are now going to format the contents of the users inbox, showing their avatar, and so on. It will look like this:
All we are really doing is adding some DIVs and applying some of the styles from the CSS. You can play around with this as much as you want to make whatever sort of page you desire!
Nothing much is added – the majority is the layout itself, however some additional class methods add the following:
$mail['avatar'] – displays the avatar of the member who sent the mail
$mail['display_name_link'] – shows the name of the sender, as a link to their profile page
wps_get_monthname() – this is a WPS function that will get the text of a month if passed a numeric (1-12). It is used to make the format of the mail_sent value more readable!
You can use your imagination to layout the inbox contents – what about highlight the most recent message at the top with different styles?
The next part of the tutorial will highlight read/unread messages and display of mail message when clicked on :)
Category: Tutorials

Post Tagged with 


Saving...
Leave a Reply