Link to Mod (http://mods.simplemachines.org/index.php?mod=540)
Rate this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=540)
*****************************************************
Profile User Action - Modification for SMF
version 1.0
© 2006, Rudolf Martincsek
*****************************************************
A small addon to the Profile Summary, to show what the member is doing. Like in the Who's online list.
Follows the permissions set therein.
Pretty good and working fine for me on RC2 - thanks :)
Getting ready to test it now and Ty for completing my request for this ;-)... will edit with concerns if any regarding this mod...
Edit : works flawlessly, Thx... I even like the placement you hose for the Action: its better than what I had suggested placement wise hehe... Once again thx for doing this request of mine ;-)
In he profile it shows this...
Action: <user is>
What file is the word action defined in bec I wana change it to say " Current Action: " instead of just action...
It is in Who.english.php.
$txt['who_action'] = 'Action';
Note that this will change the text displayed in the Who's online list too, but I guess it's not such a big issue.
I kinda half figured it would change that to but not biggie... I just think Current Action is more appropiate than just action... but thx for that...
Edit : The line you posted above isnt in my custom themes who.template.php file however there is this which is most of the code you posted... just checked the default theme as well... its the same line in that as well... so the line u said to look for is non-existant in any of my files...
<td>', $txt['who_action'], '</td>
Edit : I think I found the proper ling to change... Ill get back to you to let it know it it worked...
<td>', $member['action'], '</td>
Edit : Nope didnt work **sighs**... but heres my entire who.template.php file for my custom theme...
Code removed by MoreBloodWine to shorten post length... problem solved anyway...
Look in the Themes/default/languages/ folder.
Quote from: Rudolf on November 14, 2006, 02:52:38 AM
Look in the Themes/default/languages/ folder.
Found it in the who.english.php file... and it works... now displays Current Action for me... Thx !
Ok maybe I did something wrong but I dont see any changes in the Profile summary. Here's what I did:
Modified the Profile.template.php file in my custom theme folder, as given in changes.xml:
added this code
/***Profile Who START***/
if (!empty($context['user_action']))
echo '
<tr>
<td><b>', $txt['who_action'], ': </b></td>
<td><span', $context['user_action']['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $context['user_action']['action'],' <span style="white-space: nowrap">(', $context['user_action']['time'], ')</span></span></td>
</tr>';
/***Profile Who END***/
after this code
[<tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr>';
When nothing happened, I even uploaded the who.english.php to the language folder in the custom theme directory...still nothing.
What exactly does the modified profile summary look like? Maybe I don't know what to look for.
There's a screenshot attached to the first post.
Thank you, but now I can confirm that nothing like that is visible in the profiles I view. Can you tell me if there is anything else I should have done, or something I should have done differently? I'd really like to make this work.
If the mod installed fine then it should work. Two files are changed one change in both files, so I really can't imagine what could be wrong.
You are not supposed to see anything, if you are not an administrator and the user has checked the hide online status. Otherwise it has to be there.
Check your forum error logs for anything there.
Also this function won't work if you have the Whos' online list disabled.
Can I get a ink to your forum?
One thing I havent bothered to check... assuming a user hasnt checked the hide online status then anyone can see their action in the profile right... I more or less wanted this mod made for my own reasons but figured id ask this out of curiosity... hope i made sense lol...
It will show to those who have the permission to see the Who's online list. ;)
I said, that it follows the same permissions.
thanks for this, it's cool.
Ok am I supposed to enable it somewhere? Can you tell me where?
Its enabled by default you just have to install it... but if your not using the default theme then you will have to modify your custom theme files to get it to work...
A great mod, but i want to change the permissions of this mod fallows...
How can I make this mod shows the information only to Admins for example, or admins plus moderators? not to the Who's online list can see it.
Thanks
PD.: Sorry for my english.
The best way would be to uninstall the mod, and to modify the changes.xml in the mod package (the zip file).
Find:
/*** Profile Who START***/
if (allowedTo('who_view'))
Replace with:
/*** Profile Who START***/
if (allowedTo('moderate_forum'))
When it's done reinstall the mod.
Just to be sure... the name here:
/*** Profile Who START***/
if (allowedTo('moderate_forum'))
is the same name of my Membergroups?
Thank you.
Regardless of your groups name if theyre able to moderate the forum in anyway then that change will apply to said group...
Edit : DONT change anything in that code just apply it as instructed...
The 'moderate_forum' permission applies to all the groups tha have the "Moderate forum members" permission checked in the Admin -> Permissions -> Selected group's permissions page.
By default only the Global Moderators have it checked, but you can set it to any group you want.
Also the administrators are never subject to any permission, so they will always see, regardless of what you put.
Works perfect, thanks a lot.
Works perfect thank you nice mod.
Good idea, this could be rather useful ;)
hi does this work with 1.1.1 or do i gotta wait for an update?
thanks, sounds great can't wait to try it out!
-SelArom
Yes it works.
update 1.1.1 ?
i can confirm this does indeed work with 1.1.1, but i've only used it on default theme so you'll obviously have to mod your own theme to find out for sure
but no problems here! thanks, great mod!
-SelArom
Yeah works on 1.1.1 for me
I updated the mod page to include 1.1.1 in the supported versions.
Hi!
I've noticed that this mod have a small bug, when someone is editing his own profile and I spy his profile I saw him editing MY profile..., what I mean is that action switch users.
I can see correctly on who.php, but see wrong on profile action.
HecKel
Thanks for reporting it, I remember seeing something strange with this.
I fixed the bug and updated the package.
I have a problem. I've just tried to install the mod and ended up with this error -
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/default/Profile.template.php on line 163
Yet I have this from the mod which I've just cut and paste:
163: if (!empty($context['user_action']))
Help?
When will you release the version for smf 1.1.3 ... ?
It does work in 1.1.3
Quote from: Tony on June 29, 2007, 06:38:01 AM
It does work in 1.1.3
It gives me this error :
Type Action Description
1. Execute Modification ./Sources/Profile.php
Test failed2. Execute Modification ./Themes/default/Profile.template.php
Test successfulWhat should I do ... ???
Quote from: riderraghav on June 29, 2007, 12:38:42 PM
Quote from: Tony on June 29, 2007, 06:38:01 AM
It does work in 1.1.3
It gives me this error :
Type Action Description
1. Execute Modification ./Sources/Profile.php Test failed
2. Execute Modification ./Themes/default/Profile.template.php Test successful
Same here. :(
Well, in that case you have a modified Profile.php file. Install the mod anyway, and do the following.
Look if you have the following text in your file:
// They haven't even been registered for a full day!?
If you can find this or something similar then add before the following code
if (allowedTo('who_view'))
{
// Look for people online, provided they don't mind if you see they are.
$request = db_query("
SELECT (UNIX_TIMESTAMP(lo.logTime) - UNIX_TIMESTAMP() + " . time() . ") AS logTime, lo.url,
IFNULL(mem.showOnline, 1) AS showOnline, lo.session
FROM {$db_prefix}log_online AS lo LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
WHERE lo.ID_MEMBER = $memID " . (!allowedTo('moderate_forum') && $memID != $context['user']['id'] ? " AND IFNULL(mem.showOnline, 1) = 1" : '') . "
LIMIT 1", __FILE__, __LINE__);
$url_data = '';
while ($row = mysql_fetch_assoc($request))
{
$actions = @unserialize($row['url']);
if ($actions === false)
continue;
$context['user_action'] = array(
'showOnline' => $row['showOnline'],
'time' => strtr(timeformat($row['logTime']), array($txt['smf10'] => '', $txt['smf10b'] => '')),
'timestamp' => forum_time(true, $row['logTime']),
'is_hidden' => $row['showOnline'] == 0,
'action' => ''
);
$url_data[0] = array($row['url'],$memID);
}
if (!empty($url_data))
{
require_once($sourcedir.'/Who.php');
list($context['user_action']['action']) = determineActions($url_data);
}
}
//-Profile User Action MOD- End
If you can't find it then search
// View a summary.
function summary($memID)
{
global $context, $memberContext, $txt, $modSettings, $user_info, $user_profile, $sourcedir, $db_prefix, $scripturl;
and add after this the large block of code from above.
Thanks works ok. :-*
I attempted to install this mod but received this error:
Execute Modification ./Sources/Profile.php Test failed
I know why its doing it and was hoping someone could help me find a work around for it.
I have the karma description mod installed which also affects the Profile.php file and its conflicting with that one. I went ahead and installed it on a test site that has the karma mod also installed on it just to see what would happen. The result is that this mod just simply doesnt work. No errors or anything in the error log.
Is there something I can alter in the profile.php file to make it work while also keeping the karma mod installed?
Rudolfs post above also applies to you.
I would fix the Karma Description mod, because it changes a line in the source wich it really shouldn't.
You can install the mod manually without using the package manager with tthese two steps.
In Profile.php
// They haven't even been registered for a full day!?
//-Profile User Action MOD- Start
if (allowedTo('who_view'))
{
// Look for people online, provided they don't mind if you see they are.
$request = db_query("
SELECT (UNIX_TIMESTAMP(lo.logTime) - UNIX_TIMESTAMP() + " . time() . ") AS logTime, lo.url,
IFNULL(mem.showOnline, 1) AS showOnline, lo.session
FROM {$db_prefix}log_online AS lo LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
WHERE lo.ID_MEMBER = $memID " . (!allowedTo('moderate_forum') && $memID != $context['user']['id'] ? " AND IFNULL(mem.showOnline, 1) = 1" : '') . "
LIMIT 1", __FILE__, __LINE__);
$url_data = '';
while ($row = mysql_fetch_assoc($request))
{
$actions = @unserialize($row['url']);
if ($actions === false)
continue;
$context['user_action'] = array(
'showOnline' => $row['showOnline'],
'time' => strtr(timeformat($row['logTime']), array($txt['smf10'] => '', $txt['smf10b'] => '')),
'timestamp' => forum_time(true, $row['logTime']),
'is_hidden' => $row['showOnline'] == 0,
'action' => ''
);
$url_data[0] = array($row['url'],$memID);
}
if (!empty($url_data))
{
require_once($sourcedir.'/Who.php');
list($context['user_action']['action']) = determineActions($url_data);
}
}
//-Profile User Action MOD- End
In Profile.template.php
<tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr>';[/code
//-Profile User Action MOD- Start
if (!empty($context['user_action']))
echo '
<tr>
<td><b>', $txt['who_action'], ': </b></td>
<td><span', $context['user_action']['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $context['user_action']['action'],' <span style="white-space: nowrap">(', $context['user_action']['time'], ')</span></span></td>
</tr>';
//-Profile User Action MOD- End
ok I have never done anything manually to a mod before so bare with me...lol
Since the mod is already installed can I just edit those files you mentioned make those changes or do I need to uninlstall the entire mod and use those changes "instead" of installing the mod the normal way through the package manager.
Are those changes what basically is installing the whole mod?
If you have already installed it, then just apply the change in the Profile.php. The Profile.template.php should be already modified.
Check if it's so.
Yes, the mod consists in these two changes only, so technically there's no difference between the automaic install and the manual install of these these two changes.
ok thanks for the help. I will let you know how it goes :)
Ok I made sure the profile mod wasnt installed and then added both of the above adjustments and it still isnt working. Ive added both those files so you can check it for me.
The template file is not correct. The text gets inserted in a comment block.
It has to be like this:
<td>', $context['member']['last_login'], '</td>
</tr>';
*/
//-Profile User Action MOD- Start
if (!empty($context['user_action']))
echo '
<tr>
<td><b>', $txt['who_action'], ': </b></td>
<td><span', $context['user_action']['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $context['user_action']['action'],' <span style="white-space: nowrap">(', $context['user_action']['time'], ')</span></span></td>
</tr>';
//-Profile User Action MOD- End
// If karma enabled show the members karma.
ok sorry.. I thought that the "//" was the code that was used for comments - it looks like the only difference between mine and yours is the */ at the beginning and the */ at the end. I will change that and see if it works.
.
Edit.. I fixed the above and its still not working. I even tried re-copying and pasting all the code in.
I have added the new template file
Kimmie do the files you are making your changes in have a ~ like the attached ones? If so those are backup files you need to edit the files without ~.
I have a small problem. Could be another mod playing games.
http://wegotmud.com/forum/index.php?action=profile;u=1553
8: Undefined offset: 0
File: /homepages/19/d127847727/htdocs/forum/Sources/Profile.php
Line: 1301
This error shows up in error log sometimes 5 times a day. The forum is pretty active so this is not everytime. I have tried to recreate but failed. I have viewed profiles with user on and offline. The mod works perfect other than this error in log. When I goto unistall mod it says profile template failed and all the code looks original. I am not trying to remove just check files. Both files attached.
SMF 1.1.4
Mods:
1. FlashChat Integration 1.0
2. E-Arcade 2.4.2
3. Display Age and Location next to posts 1.0
4. MySpace Field 2.4
5. Avatar on Member List 1.0
6. Custom Profile Field Mod 3.17
7. Profile User Action 1.1
8. MySpace BBC Tag 1.0
9. YouTube BBCode 2.1
10. Google Video BBC Tag (XHTML Compliant) 1.3
11. RemovePM 1.1.4
12. Google Member Map 0.1
13. SMF Trader System 1.1
Update: I just made the error happen. It was when Nothing, or nothing you can see... was showing in users online. Then I viewed that profile. Then I refresh and it showed me Nothing, or nothing you can see... in profile. So it didnt work once then it worked. I attached a pic of profile when error went down. I think Im gonna define it Nothing, or nothing you can see... if it is not allready defined. i guess that will fix it. Unless someone knows where this error is coming from.
Thanx Todd
ok I have tried and tried and tried to get this to work and it wont. I tried it both ways - installing it and having the test failed on the profile.php and them manually adding the code to that file.. (the result was a syntax error when you clicked on the profile button). Then removed all that and tried manually installing both codes - and all that did was make the text on the profile pages bold...lol.
If I uploaded both those templates could someone possibly add the code for me (since there are only two edits) and let me try that?
this mod didnt work for 1.1.4
:(
Works fine for 1.1.5 default theme :)
Anna
Works for 1.1.5 with TP 1.05 beta 1 on the Green theme
hey guys
make it in smf 2.0 beta 3.1 public is very simple
find:Quote<td>', $context['member']['last_login'], '</td>
</tr>';
Add After:Quote
//-Profile User Action MOD- Start
if (empty($context['user_action']))
echo '
<tr>
<td><b>Action: </b></td>
<td><span>', $context[member]['action'], '</span></td>
</tr>';
//-Profile User Action MOD- End
If you can't find then loking for:
$context['member']['last_login'] and go in the context
the secret here is only this code:
', $context[member]['action'], '
Great Mod! Works Perfectly on my Dilber MC theme & SMF 1.15.... without modifying anything! Thanks!
Will this work whit 2.x?
And if not, will it do in the future?
Quote from: Rocks-HD on July 16, 2008, 03:52:42 AM
hey guys
make it in smf 2.0 beta 3.1 public is very simple
find:
Quote<td>', $context['member']['last_login'], '</td>
</tr>';
Add After:
Quote
//-Profile User Action MOD- Start
if (empty($context['user_action']))
echo '
<tr>
<td><b>Action: </b></td>
<td><span>', $context[member]['action'], '</span></td>
</tr>';
//-Profile User Action MOD- End
If you can't find then loking for: $context['member']['last_login'] and go in the context
the secret here is only this code: ', $context[member]['action'], '
That wouden't work. You're calling an index that doesn't exist, using a undefined constant 'member', and checking if the action index is empty (when it should be not empty) in the check statement.
The proper way of doing it is like this:
if( !empty( $context['member']['action'] )
{
echo '
<tr>
<td><strong>Current Action: </strong></td>
<td>', $context['member']['action'], '</td>
</tr>';
}
Quote from: MoreBloodWine on October 10, 2008, 10:52:11 PM
What happened to the originally requested by link that I forget was either on the mod page of first post... This mod was made because of a request of mine.
What does it matter?
Nice little addition to the profile page Rudolf.
Thanks mate :)
Quote from: Sabre™ on October 12, 2008, 12:14:20 AM
Quote from: MoreBloodWine on October 10, 2008, 10:52:11 PM
What happened to the originally requested by link that I forget was either on the mod page of first post... This mod was made because of a request of mine.
What does it matter?
Nice little addition to the profile page Rudolf.
Thanks mate :)
Credit should be given where credit is due, he may have created this but the original ideas was and is mine ;-)
LOL
Mate..... :)
Ok.... fair enough :)
Nice idea.
This will be upgraded to SMF 2.0 Beta 4?
It will be upgraded for SMF 2.0, for one version or another.
Is it possible to get a block with last 5 recent action?
it would be great if you could help do that as well. current action in profile is already a good step but i've been looking for the recent action as well.
I just want to modify the mod for admin...
I want it to write "You don't have permission to view" in only admin's profile page...
How can i do that ?
Is this going to be available for RC1 soon?
I am also requesting smf 2 rc1 compatibility
http://custom.simplemachines.org/mods/index.php?mod=540
i need this to smf2.0rc3
theme: core
....
thanx....
I know this has already been said but I just wana show my support for a 2.0 RC3 version ;-)
Was wondering if someone would consider please porting this to 2.0. I'm the one who originally requested in an Rudolph graciously made it but sadly it seems that this lost some interest considering it hasn't been touched since 2007. I almost forgot about it completely but I still would like to be able to use this.
Quote from: MoreBloodWine on October 08, 2011, 04:18:20 PM
Was wondering if someone would consider please porting this to 2.0. I'm the one who originally requested in an Rudolph graciously made it but sadly it seems that this lost some interest considering it hasn't been touched since 2007. I almost forgot about it completely but I still would like to be able to use this.
http://custom.simplemachines.org/mods/index.php?mod=2593
Quote from: Project Evolution on October 08, 2011, 06:09:50 PM
Quote from: MoreBloodWine on October 08, 2011, 04:18:20 PM
Was wondering if someone would consider please porting this to 2.0. I'm the one who originally requested in an Rudolph graciously made it but sadly it seems that this lost some interest considering it hasn't been touched since 2007. I almost forgot about it completely but I still would like to be able to use this.
http://custom.simplemachines.org/mods/index.php?mod=2593
Thx for that !
All I need to do now is mod it a bit to move the Current Action to a diff spot ;-)