News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Profile User Action

Started by Rudolf, November 13, 2006, 05:43:32 PM

Previous topic - Next topic

MoreBloodWine

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...
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


Rudolf

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.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

fritpa

Works perfect, thanks a lot.

msocal

Works perfect thank you nice mod.

Skipdawg

Good idea, this could be rather useful  ;)
Skipdawg's Community

Powered by SMF 1.1.3

sonofabit

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

Rudolf

I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Mustafa Güngör


sonofabit

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

L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Rudolf

I updated the mod page to include 1.1.1 in the supported versions.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

HecKel

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  
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Rudolf

Thanks for reporting it, I remember seeing something strange with this.
I fixed the bug and updated the package.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

CraftyLion

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?

RiderRaghav

When will you release the version for smf 1.1.3 ... ?

Tony Reid

Tony Reid

RiderRaghav

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



What should I do ... ???

TimL

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.  :(

Rudolf

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.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

kamili34


Advertisement: