Status Updates

Status Updates is the module for ExpressionEngine 2 that allows site users to post status messages in their profile. They can also crosspost them to their social network accounts (requires Social Login PRO)

Posting status message

{exp:status_updates:form} <textarea name="message_text"></textarea> <input type="submit" value="Send" /> {/exp:status_updates:form}

Crossposting to social networks is possible only if you have Social Login PRO installed and the user has ever logged in (or performed account association) using that module

Tag parameters:

Form fields:

Variables:

You can use {providers} tag pair to display list of available social networks to crosspost. It displays only those networks that are associated with current user's account.

Inside of {providers} tag pair following variables are availabe:

Upon form submission, the user is taked to return page (no success message is shown), or is shown error message if there has been an error.

If you've specified ajax="yes" parameter then both error and success messages are returned in JSON format. Examples:

{
	"result": "error";
	"text"	: "You need to be logged in"
}
{
	"result": "success";
	"text"	: "This is my status update!";
	"date"	: 
}

Displaying status updates feed

This tag allows you to display status updates feed - by logged in user, or certain user, user group or even everyone.

{exp:status_updates:display paginate="both" limit="10"}
{paginate}{pagination_links}{/paginate}
<p>{count}. <em>{message_date format="%Y-%m-%d %H:%i"}</em>
{message_text}
<p>
{/exp:status_updates:display}

Tag parameters(all optional):

Single variables:

Variable pairs:

{paginate}{/paginate} — used to format and display pagination links (if you have limit parameter set and there's more than one page)

Adavaced pagination (like with channel entries) using {pagination_links}{/pagination_links} tag pair is also possible

Examples

Posting form with posting to social networks and remaining characters counter

{exp:jquery:script_tag}
<script type="text/javascript" src="http://www.intoeetive.com/themes/third_party/social_update/jquery.maxlength.min.js"></script>
<link type="text/css" src="http://www.intoeetive.com/themes/third_party/social_update/jquery.maxlength.css" rel="stylesheet" />
{exp:status_updates:form return="SAME_PAGE"}
<script type="text/javascript">
$(document).ready(function(){
$('#message_text').maxlength({
max: {maxlength},
truncate: true,
showFeedback: true,
feedbackTarget: '#maxlength',
feedbackText: '{r}'
});
});
</script>
<p>Enter your message, {maxlength} characters max, <span id="maxlength">{maxlength}</span> characters left</p>
<p><textarea name="message_text" id="message_text" style="width: 350px; height: 100px;"></textarea></p>
{providers}
<input type="checkbox" name="{provider_name}" value="yes" /> Post to {provider_title}<br />
{/providers}
<p><input type="submit" value="Send" /></p>
{/exp:status_updates:form}

Status messages page with AJAX form

{exp:jquery:script_tag}
<script type="text/javascript">
$(document).ready(function(){
$('#status_updates_form').live('submit', function(event){
event.preventDefault();
$('#error_container').hide();
$('#loader').show();
$('#submit_button').parent().hide();
$.post(
'/',
$('#status_updates_form').serialize(),
function(msg) {
var obj = $.parseJSON(msg);
if (obj.status=='error')
{
$('#error_container').text(obj.text);
$('#error_container').show();
}
else
{
var toclone = $('.status_message').first();
var cloned = toclone.clone();
cloned.find('.message_text').text(obj.text);
var msgdate = new Date(1000*obj.date);
cloned.find('.message_date').text(msgdate.getFullYear()+'-'+msgdate.getMonth()+'-'+msgdate.getDate()+' '+msgdate.getHours()+':'+msgdate.getMinutes());
cloned.prependTo(toclone);
$('#message_text').val('');
}
$('#loader').hide();
$('#submit_button').parent().show();
} );
});
});
</script>
<div>
{exp:status_updates:display paginate="top" limit="10"}
{paginate}
{pagination_links}
<ul>
{first_page}
<li><a href="{pagination_url}" class="page-first">First Page</a></li>
{/first_page}
{previous_page}
<li><a href="{pagination_url}" class="page-previous">Previous Page</a></li>
{/previous_page}
{page}
<li><a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a></li>
{/page}
{next_page}
<li><a href="{pagination_url}" class="page-next">Next Page</a></li>
{/next_page}
{last_page}
<li><a href="{pagination_url}" class="page-last">Last Page</a></li>
{/last_page}
</ul>
{/pagination_links}
{/paginate}
<div class="status_message">
<p><em class="message_date">{message_date format="%Y-%m-%d %H:%i"}</em><p>
<div class="message_text">{message_text}</div>
</div>
{/exp:status_updates:display}
</div>
{exp:status_updates:form ajax="yes"}
<p id="error_container" style="color: red; display: none;"></p>
<p><textarea name="message_text" id="message_text" style="width: 350px; height: 100px;"></textarea></p>
<p><input type="submit" id="submit_button" value="Send" /></p>
<p id="loader" style="display: none">please wait...</p>
{/exp:status_updates:form}

Top of page