Facebook-style user status by h@ck3r

h@ck3r

New Member
This is a hack called vBStatus, but I've edited it to make it better.

I'm using postbit on my forums, so not tested it in postbit legacy, but it should work just the same.

Tested only on 3.8.0, but may work on other versions.

Info:

This is a facebook style status addon for VBulletin. It allows your members to add their 'status' via any of their posts within a thread. Screenshots explain it better.

Screenshots:

a.jpg


b.jpg


c.jpg


d.jpg


e.jpg



Instructions:

Upload the files to your forum root, then import the XLM file through the products menu in your Admin Control Panel, then....



You need to perform the following template edits:


In HEADINCLUDE template, add this to the very bottom:

PHP:
<!--BEGIN VBSTATUS-->
<if condition="$vbulletin->options['vbstatus_active']">
<div id='mypopup' name='mypopup' style='z-index:1000; position: absolute; background: none; border: none;'></div>
<script type="text/javascript" src="vbstatus/ajax_wrapper.js"></script>

<script type="text/javascript" src="vbstatus/headerjavascript.js"></script>
</if>
<!--END VBSTATUS-->


In Postbit template, find:

PHP:
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>

Add after:

PHP:
$post[vbstatus_status]


Also in your postbit template find:

PHP:
					<else />
					$post[musername]
					</if>
				</div>

After add:


PHP:
<!--BEGIN VB STATUS-->
<if condition="$vbulletin->options['vbstatus_active']">

	<em id="vbstatus_$post[postid]">
	<if condition="$bbuserinfo['userid']==$post['userid'] OR $vbstatus_isadmin==1">
		<if condition="$vbulletin->options['vbstatus_inline']">
			<a href="javascript:Att_AjaxDiv('inline=1&userid=$post[userid]&postid=$post[postid]','vbstatus/vbstatus_ajax.php','vbstatus_$post[postid]')">Save</a>

		<else />
			<a href="javascript:Att_Ajax('userid=$post[userid]&postid=$post[postid]','vbstatus/vbstatus_ajax.php')">Edit</a>
		</if>
	
	</if>	
	</em>

</if>
<!--END VB STATUS-->

In your MEMBERINFO template, search for:

PHP:
<if condition="$prepared['usertitle']">

And ABOVE, add:


PHP:
<!--BEGIN VB STATUS-->
<if condition="$vbulletin->options['vbstatus_active']">

	<div class=smallfont> 
	$userinfo[username] 
	<em id="vbstatus_$userinfo[userid]">
	$userinfo[vbstatus_status]
	<if condition="$bbuserinfo['userid']==$userinfo['userid'] OR $vbstatus_isadmin==1">
		<if condition="$vbulletin->options['vbstatus_inline']">
			<a href="javascript:Att_AjaxDiv('inline=1&userid=$userinfo[userid]&postid=$userinfo[userid]','vbstatus/vbstatus_ajax.php','vbstatus_$userinfo[userid]')">Edit</a>

		<else />
			<a href="javascript:Att_Ajax('userid=$userinfo[userid]&postid=$userinfo[userid]','vbstatus/vbstatus_ajax.php')">Edit</a>
		</if>
	
	</if>	
	</em>
	</div>


</if>
<!--END VB STATUS-->


Now go to your admin control panel, and go to:
vBulletin Options->vBulletin Options->vBStatus options

Set your settings to these:

Banned Usergroups
[Your choice]

Administrator Usergroups
[Your choice]

Is vBStatus On/Off?
[Yes]

Maximum characters in Status Updates
[45]

Word Wrap Char Limit
[18]

Use In-Line Editting?
[No]

Default Status
[has not set a status]

Status Prefix.
[is]


Clicksave, and it will now work.

(If you wish, you can configure them however you wish, but this is how I have got mine working how it does in the screenshots).

Download:
View attachment 16101

View attachment 16096

View attachment 16097

View attachment 16098

View attachment 16099

View attachment 16100


Don't forget to hit the THANKS button, since this is my 1000th post :D
 

h@ck3r

New Member
DaniFilth said:
Cool!!! :D

Working on 3.8.3!

But one question: how do I modify the language like "Save" or "Edit" variables?

You can find those either in vbstatus_modifystatus template :)
 

dark_hunter

New Member
Um why are their 3? Shouldn't their only be one
Code:
<!--BEGIN VB STATUS--> 
<!--BEGIN VB STATUS--> 
<!--BEGIN VB STATUS-->
 

h@ck3r

New Member
dark_hunter said:
Um why are their 3? Shouldn't their only be one
Code:
<!--BEGIN VB STATUS--> 
<!--BEGIN VB STATUS--> 
<!--BEGIN VB STATUS-->

It was part of the original code.

Does it really matter? :D

ChopSuey said:
And This Seems The Same As The Normal Version.

If that's how you feel... then go back to the normal version. Nobody is asking you to use this hack.

However if you look a bit closer- you'll see that this is quite different to the original version.
 

h@ck3r

New Member
To keep some of you happy, I've removed:

PHP:
<!--BEGIN VBSTATUS-->
<!--BEGIN VBSTATUS-->
<!--BEGIN VBSTATUS-->

And added only

PHP:
<!--BEGIN VBSTATUS-->

To the template edits.

Not that it makes any difference, but hey; I done it anyway.
 
Top