[Free] Current activity

Started by DrBlack, September 16, 2014, 12:25:33 PM

Previous topic - Next topic

DrBlack

Quote from: DrBlack on October 08, 2014, 06:24:36 AM
Quote from: ahrasis on October 03, 2014, 11:43:40 AM
Sorry but I have to disagree. Current action is part of the mod and should be defined by that mod. It is not displayed by default, so it was not an SMF issue at the first place.

It has been answered in the support page as follows:

Quote from: live627 on September 19, 2014, 04:39:27 AM
ah, owner = admin

/Themes/default/Profile.template.php

Find

<dd>', $context['member']['action'], '</dd>

Replace with

<dd>', $context['member']['group_id'] == 1 ?  $txt['who_hidden'] : $context['member']['action'], '</dd>

IMO he can change that $txt['who_hidden'] to the word that wants i.e. 'nothing or nothing you can see' or to whatever words he wants.

thank you very much .. its awesome

it works at my profile :D

but in ( who's online ) it appear my action

can you help

is there any help to appear it in ( who's Online )

Hj Ahmad Rasyid Hj Ismail

Quote from: DrBlack on October 08, 2014, 06:24:36 AM
but in ( who's online ) it appear my action

can you help

Sorry DrBlack. I was still focusing on your OP for both post that is now merged as one. A bit confusing but I think you have resolved you problem.

Now for your second one which you just added as I quoted it above, this one is default SMF action. But default all action that is not defined by SMF or mod(s) will appear as you see.

You need to modify somewhere before this particular code in Who.php.

// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}

DrBlack

so what i should do with this code

// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}


and it if i modify it to ( nothing or nothing you can see) all members will be like that

or just the owner ? like the owner's profile

Hj Ahmad Rasyid Hj Ismail

Yes. You can simply replace $txt['who_unknown'] with 'nothing or nothing you can see'. This way, all unknown action will be nothing or nothing you can see, for everyone unknown action including you as forum admin/owner.

But It is better if you follow mashby advice and change the code

Quote from: mashby on September 26, 2014, 05:16:17 PM
Themes/default/languages/Who.english.php
$txt['who_unknown'] = '<em>Unknown Action</em>';

Similarly, change Unknown Action to nothing or nothing you can see.

DrBlack

thank you.,

but i dont just want to replace "unknown action"
i want to replace ( all owner action )
like this code.

Quote from: ahrasis on October 03, 2014, 11:43:40 AM
Sorry but I have to disagree. Current action is part of the mod and should be defined by that mod. It is not displayed by default, so it was not an SMF issue at the first place.

It has been answered in the support page as follows:

Quote from: live627 on September 19, 2014, 04:39:27 AM
ah, owner = admin

/Themes/default/Profile.template.php

Find

<dd>', $context['member']['action'], '</dd>

Replace with

<dd>', $context['member']['group_id'] == 1 ?  $txt['who_hidden'] : $context['member']['action'], '</dd>

IMO he can change that $txt['who_hidden'] to the word that wants i.e. 'nothing or nothing you can see' or to whatever words he wants.


which appear the text always in owner action ( in profile ) but in who's online its appear the action. like ( vewing the forum )

i want to do the same in who's online

thank you

Hj Ahmad Rasyid Hj Ismail

Quote from: ahrasis on October 10, 2014, 04:36:15 AM
Yes. You can simply replace $txt['who_unknown'] with 'nothing or nothing you can see'. This way, all unknown action will be nothing or nothing you can see, for everyone unknown action including you as forum admin/owner.

But It is better if you follow mashby advice and change the code

Quote from: mashby on September 26, 2014, 05:16:17 PM
Themes/default/languages/Who.english.php
$txt['who_unknown'] = '<em>Unknown Action</em>';

Similarly, change Unknown Action to nothing or nothing you can see.

Well, actually, after opening the who language file I just realized this is wrong. The $txt['who_hidden'] is already there to assist you.

And for your request, I find it even harder. For action=admin (without ;area= at its back), the $txt['who_hidden'] is already in place BUT, if it comes with area=whatever, then the $txt['who_unknown'] will be used.

If you want to use $txt['who_hidden'] for area under action=admin as well, then you will to define all of them somewhere around this code. That will be a very tedious job.


// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}

Arantor

QuoteFor action=admin (without ;area= at its back), the $txt['who_hidden'] is already in place BUT, if it comes with area=whatever, then the $txt['who_unknown'] will be used.

Only under *some* circumstances for some users. There are certain times this will be the case, however.

Hj Ahmad Rasyid Hj Ismail

Huh? Really? I do not understand at all. Care to explain further?

Arantor

There's a ton of permissions checks that get carried out inside determineActions(). Beginning with:

// Actions that require a specific permission level.
$allowedActions = array(
'admin' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'admin_forum', 'manage_permissions', 'send_mail', 'manage_attachments', 'manage_smileys', 'manage_boards', 'edit_news'),
'ban' => array('manage_bans'),


The idea is that you have to have relevant permission to be able to see this.

However... I am now wondering if this is actually buggy because back in 1.1.x those things certainly were actions. In 2.0, of course, they are not.

I can already see one bug... censoring is listed as moderate_forum but as of RC4 or RC5, configuring the censor was elevated to admin_forum for security reasons. But it may be more buggy, and if that is the case... it would behave as you describe even if it that is not how it is *supposed* to act. The idea is that if you can do a thing, you can see when others are doing the same thing.

Hj Ahmad Rasyid Hj Ismail


// Viewable only by administrators.. (if it starts with whoadmin, it's admin only!)
elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']]))
$data[$k] = $txt['whoadmin_' . $actions['action']];
// Viewable by permission level.
elseif (isset($allowedActions[$actions['action']]))
{
if (allowedTo($allowedActions[$actions['action']]))
$data[$k] = $txt['whoallow_' . $actions['action']];
else
$data[$k] = $txt['who_hidden'];
}
// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}


If I am taking the said idea, did you mean change the above code to something like this to resolve the issue?


// Viewable only by administrators.. (if it starts with whoadmin, it's admin only!)
elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']]))
$data[$k] = $txt['whoadmin_' . $actions['action']];
// Extend $txt['who_hidden'] from just action=admin to action=admin;area as well unless they are already defined above
elseif (isset($allowedActions['admin']))
$data[$k] = $txt['who_hidden'];
// Viewable by permission level.
elseif (isset($allowedActions[$actions['action']]))
{
if (allowedTo($allowedActions[$actions['action']]))
$data[$k] = $txt['whoallow_' . $actions['action']];
else
$data[$k] = $txt['who_hidden'];
}
// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}


And did you mean using allowedTo('moderate_forum') is a bug in this source file like this line: elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']]))?

From what I tested, as an admin seeing another admin, it will only display admin action as unknown except the watching admin is a mod.

Arantor

The answer to both of your questions is no, that is not what I meant. Good luck.

DrBlack

the text always in owner action ( in profile ) but in who's online its appear the action. like ( vewing the forum )

i want to do the same in who's online

thank you

======================

can anyone give me the code to appear the owner action at ( who's online ) like this "nothing or nothing you can see"

ty

Kindred

DrBlack,

I am sorry, but your questions continue to be very confusing and make little sense. I assume it is because you are not used to writing in English...  but please explain exactly what you mean?

you want to replace "unknown action" in all situations with "nothing, or nothing you can see"?

(sorry, but that makes very little sense, if so)
if that is what you want, then Mashby told you what to change, in reply #36, weeks ago.
Quote from: mashby on September 26, 2014, 05:16:17 PM
Themes/default/languages/Who.english.php
$txt['who_unknown'] = '<em>Unknown Action</em>';

If that is NOT what you want, then you will need to be much more clear...  (or ask your questions in the board dedicated to support in your native language where you can hopefully explain better in your native language)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DrBlack

i dont want only change "unkown action"

i want change all actions

exactly like this :-
   
Quote<dd>', $context['member']['group_id'] == 1 ?  $txt['who_hidden'] : $context['member']['action'], '</dd>


IMO he can change that $txt['who_hidden'] to the word that wants i.e. 'nothing or nothing you can see' or to whatever words he wants.

i use this , then its appear (nothing , or nothing you can see )in my profile all times.

but in ( who's online )

it appear the action like ( vewing the forum )
i want to do the same i did in profile.
to do it in who's online

i hope its clear

thank you

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DrBlack


Hj Ahmad Rasyid Hj Ismail

Quote from: ahrasis on October 11, 2014, 10:31:42 PM
// Viewable only by administrators.. (if it starts with whoadmin, it's admin only!)
elseif (allowedTo('moderate_forum') && isset($txt['whoadmin_' . $actions['action']]))
$data[$k] = $txt['whoadmin_' . $actions['action']];
// Extend $txt['who_hidden'] from just action=admin to action=admin;area as well unless they are already defined above
elseif (isset($allowedActions['admin']))
$data[$k] = $txt['who_hidden'];
// Viewable by permission level.
elseif (isset($allowedActions[$actions['action']]))
{
if (allowedTo($allowedActions[$actions['action']]))
$data[$k] = $txt['whoallow_' . $actions['action']];
else
$data[$k] = $txt['who_hidden'];
}
// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}


DrBlack

can you explain please where to add this code + how to add + what to change in it

thank you

Hj Ahmad Rasyid Hj Ismail

Quote from: ahrasis on October 10, 2014, 03:05:30 AM
You need to modify somewhere before this particular code in Who.php.

// Unlisted or unknown action.
else
$data[$k] = $txt['who_unknown'];
}


Advertisement: