Page 1 of 21

User status mod

Posted: Sat May 30, 2009 7:43 pm
by Extensions Robot
Modification name: User status mod
Author: 5hocK
Modification description: Allow users to add a facebook style status to there account. Can be set to show in users profile/viewtopic or both. Easily Administrate statuses from in your ACP
Modification version: 1.0.5
Tested on phpBB version: 3.0.4

Download file: Status_mod_1.0.5.zip
File size: 179.67 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extensions Team may not be able to provide support.

-->Modification support<--

User status mod

Posted: Sat May 30, 2009 7:43 pm
by DavidIQ
Modification validated/released

Notes:

User status mod

Posted: Sat May 30, 2009 7:43 pm
by platinum_2007
Thanks for the Validation Mod team :)

Screen shots :

Form in header after clicking "Update status"

Image

Status in memberlist

Image

Status in viewtopic

Image

Re: User status mod

Posted: Sun May 31, 2009 8:22 am
by Greight
Any screenshots or test forums?

Re: User status mod

Posted: Sun May 31, 2009 12:34 pm
by PinoyEngine™
will this link facebook account of my members?

Re: User status mod

Posted: Sun May 31, 2009 1:24 pm
by platinum_2007
No This will not link facebook up with phpbb, its a status mod much like facebooks but for your phpbb profile.

You can test it at

http://www.itmods.com

Username : test
password : Tester

Click "Update status" in the link nav and then type in a status. Ajax is used yo submit the status so you never leave the page.

To view your status either look in your profile on in a topic page that you made a post with.

EDIT : Screenshots are now in the post above!

Re: User status mod

Posted: Sun May 31, 2009 4:01 pm
by thesecret
Finally validate :D :D
Congratulations

Re: User status mod

Posted: Sun May 31, 2009 4:07 pm
by PinoyEngine™
Hello, This is really fantastic! This is like the old phpBB2 Title MOD.

Btw, Is there a way I can limit the characters the user can use?

Re: User status mod

Posted: Sun May 31, 2009 6:15 pm
by platinum_2007
PinoyEngine™ wrote:Hello, This is really fantastic! This is like the old phpBB2 Title MOD.

Btw, Is there a way I can limit the characters the user can use?
Open overall_header.html and find the input form and add a max length to it like:

Code: Select all

<input maxlength="100" id="status_text" name="status_text" type="text" />
you can change maxlength="100" to what ever you like.

Mod works great on 3.0.5

Re: User status mod

Posted: Sun May 31, 2009 7:11 pm
by rspowers
I am getting a 'forbidden message' error when trying to access the /status_install.php file. Am I doing something wrong or do I need to change permissions?

Re: User status mod

Posted: Sun May 31, 2009 7:46 pm
by platinum_2007
rspowers wrote:I am getting a 'forbidden message' error when trying to access the /status_install.php file. Am I doing something wrong or do I need to change permissions?
check that the permission is 644 and are you the board founder?

Re: User status mod

Posted: Sun May 31, 2009 10:07 pm
by rspowers
Got it to work. I was looking in the wrong directory. Works great! Thanks!

Now the next step for something like this when I update my facebook or twitter status, it updates this status

Re: User status mod

Posted: Tue Jun 02, 2009 6:19 pm
by v_lizzy
Hi,

I'm sorry, could someone possibly help me please? I'm trying to install this but am stuck on where to enter the last two sections of code in styles/subsilver2/template/overall_header.html :oops:

I don't have

Code: Select all

<a href="{U_FAQ}"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_FAQ}</a>
So don't know where to insert

Code: Select all

	<!-- IF ENABLE_STATUS && S_USER_LOGGED_IN -->
<a id="status" href="#"><img src="{T_THEME_PATH}/images/icon_mini_faq.gif" width="12" height="13" alt="*" /> {L_UPDATE_STATUS}</a><!-- ENDIF -->
And I don't have

Code: Select all

<!-- INCLUDE breadcrumbs.html -->
So don't know where to insert

Code: Select all

<div id="hide_status" style="display:none; text-align:center;"> 
<br />
<form id="newstatus" method="post" action="">
<fieldset>
<input maxlength="150" id="status_text" name="status_text" type="text" />
<input name="submit" type="submit" id="submit" value="{L_SUBMIT}" /><br />
{L_STATUS_CURRENT} <!-- BEGIN stat_q -->{stat_q.STATUS}<!-- END stat_q --><br />
</fieldset>
</form>

<div class="success" style="display:none;">
 <p style="text-align:center">{L_STATUS_UPDATED}</p>
</div>
</div>

This is my code as it is:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<!-- INCLUDE _mg_config.html -->

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<!-- IF S_META_TAGS -->
<meta name="author" content="{META_AUTHOR}" />
<meta name="publisher" content="{META_AUTHOR}" />
<meta http-equiv="refresh" content="{META_REFRESH_TIME}; URL={META_REFRESH_URL}" />
<meta name="identifier-url" content="{META_IDENTIFIER}" />
<meta name="revisit-after" content="{META_REVISIT} Days" />
<meta name="category" content="{META_CATEGORY}" />
<meta name="abstract" content="{META_ABSTRACT}" />
<meta name="copyright" content="{META_COPYRIGHT}" />
<meta name="robots" content="{META_ROBOTS}" />
<meta name="date-creation-yyyymmdd" content="{META_CREATION}" />
<meta name="date-revision-yyyymmdd" content="{META_REVISION}" />
<!-- ENDIF -->
<meta name="keywords" content="{PAGE_KEYWORDS}" />
<meta name="description" content="{PAGE_DESCRIPTION}" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />

<script type="text/javascript" src="{T_TEMPLATE_PATH}/scripts.js"></script>
<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

function jumpto()
{
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var perpage = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';

	if (page !== null && !isNaN(page) && page > 0)
	{
		document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * perpage);
	}
}

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

// ]]>
</script>


    <link rel='icon' href='http://forum.animallifelineuk.org/favicon.ico' type='image/favicon.ico' />

<!--[if lt IE 7]>
<script type="text/javascript" src="{T_TEMPLATE_PATH}/pngfix.js"></script>
<![endif]-->


			<script type="text/javascript">
$(document).ready(function(){
    
    $("#status").click(function () {
      $("#hide_status").toggle("slow");
    });  

});

 $(document).ready(function(){

	$("#newstatus").submit(function() {

 	var status_text    = $('#status_text').attr('value'); 
   $("#newstatus").empty().html('<img src="{T_THEME_PATH}/images/loader.gif" alt="loading" />');

		$.ajax({
			type: "POST",
			url: "{SUB_STATUS}",
			data: "status_text="+ status_text,
			success: function(del){
				$('#newstatus').hide();
				$('div.success').fadeIn();

			}
		});
	return false;
	});
});

</script>


</head>
<body class="{S_CONTENT_DIRECTION}">

<a name="top"></a>

<div style="width:{$MG_GLOBAL_WIDTH};clear:both;margin: 0 auto;">
<table width="100%" align="center" cellspacing="0" cellpadding="0" border="0">
	<tr>
		<td class="leftshadow" width="9" valign="top"><img src="{T_THEME_PATH}/images/spacer.gif" alt="" width="9" height="1" /></td>
		<td class="np-body" width="100%" valign="top">

<div id="top_logo">
<a href="{U_INDEX}">{SITE_LOGO_IMG}</a><br>
<span class="tagline">{SITE_DESCRIPTION}</span>
</div>

<!-- INCLUDE menu_block.html -->



<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --><span style="color:#BDB342;">{L_BOARD_DISABLED}</span><!-- ENDIF -->

<div id="wrapcentre">

<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
<div style="margin-top:50px;margin-bottom:50px;text-align:center;clear:both;"><div class="popuppm-new"><a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a></div></div>
<!-- ENDIF -->
Thank you! :)

Re: User status mod

Posted: Tue Jun 02, 2009 6:39 pm
by platinum_2007
The first edit will have to go in this file some where

Code: Select all

<!-- INCLUDE menu_block.html -->
and the second can go at the end of the file you posted.

Re: User status mod

Posted: Tue Jun 02, 2009 7:09 pm
by v_lizzy
Thank you for that! :D

I have now copied all of the code into the right places (triple checked everything) and purged the cache and still nothing. Am I missing something really obvious? This is the site I'm trying to add it to: http://www.forum.animallifelineuk.org

Ah, I have no idea what it means but I'm now getting this error in the acp:

Code: Select all

SQL ERROR [ mysql4 ]

Table 'animall1_phpb3.phpbb_status' doesn't exist [1146]

SQL

SELECT u.user_id,u.username, u.user_colour, s.user_id,s.status_text, s.status_id, s.status_time FROM phpbb_users u INNER JOIN phpbb_status s ON s.user_id = u.user_id ORDER BY status_time DESC LIMIT 25

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: includes/db/mysql.php
LINE: 221
CALL: dbal_mysql->sql_query()

FILE: includes/db/dbal.php
LINE: 170
CALL: dbal_mysql->_sql_query_limit()

FILE: includes/acp/acp_status.php
LINE: 56
CALL: dbal->sql_query_limit()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_status->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
:?