[Free] Current activity

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

Previous topic - Next topic

Ninja ZX-10RR

Quote from: Arantor on September 30, 2014, 10:31:19 AM
Can't be done without more information.
??????
Actually mashby got it...
Quote from: mashby on September 26, 2014, 05:16:17 PM
Themes/default/languages/Who.english.php
$txt['who_unknown'] = '<em>Unknown Action</em>';
And this guy didn't read for the 3rd time since he didn't check the topic at first, he didn't check the cross-posted one and he is not even reading the messages in here. I think that any further reply will be useless, actually. :(
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

That string is used for every single time a user hits an action that doesn't have a better string defined.

I could quite easily produce that here without even trying.

action=blah would produce it because action=blah would be checked against $txt['whoaction_blah'] and found to not exist. Consequently any mod that doesn't do its job properly will cause these.

So like I said, it cannot be fixed without further information, because the problem is a mod making action=*something* requests but we don't know what.

Of course, I'm just speculating about all of this...

Ninja ZX-10RR

Ah that's what you meant, but oh well I don't know now. I was thinking that he just wanted to change that string by replacing it with something of his choice but it could be interpreted in that way as well. I can't figure out what he wants and he seems not to care very much, mine is only curiosity :) now I got what you meant though. Replacing an action done by a mod indeed is another thing but it should be up to the mod authors to fix it :P it would be quite easy to me if I didn't get it wrong.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

It really depends on how complex the mod is and whether you're planning on interfering too much with the internals of things.

Simple mods that just declare an action - that's easy. Just a language string for the action, one for each subaction you want to be descriptive with, job done.

Want to enforce permissions on it or do things like get extra data (think: user is viewing an item in a gallery), that's suddenly a world more work to do.

Ninja ZX-10RR

Yeah I was thinking about the first case and I have been wondering about the second, I have indeed no idea on how to force permissions in a language string file :o also fetching data and so on will be harder and you are quite obviously talking about LevGal ;)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

That was more of a for-example. I haven't decided how far I'm going to go with that yet. It really depends because doing it without file edits is... insanely tricky. Who's Online only offers up one hook in 2.0, and it's called on every item.

Problem is, if that's 25 people all looking at gallery items, that's 25-50 separate database queries. I really need to be able to do it once, but there's no hook for that. I might just leave it as 'viewing an item in the gallery' to keep that part simple and see if I can figure out a better way for doing it in the next version.

See, this mod is actually half the problem; it's possible to deal with it fairly easily purely for the who's online log with a bit of careful coding and imagination but not when it's pulled out into the profile area with something like this mod.

Ninja ZX-10RR

What about doing it halfway? Like "viewing an item in [username]'s gallery? It gets more complicated right?
*feels like being the asker now* xD
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

Of course it does.

If you're doing *anything* beyond very generic stuff, you run into all the headaches. The basic functionality is fine for most mods.

Also that particular question is suitably hideous in LevGal because a single album can be owned by multiple owners (e.g. jointly owned by two users), alternatively could be owned by a group (think clans)

Ninja ZX-10RR

I forgot that additional authors/co-authors thing. Well about DevGal I'll post in the relative thread :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Kindred

Quote from: Kindred on September 26, 2014, 06:08:13 PM
However, it usually only falls back to "unknown activity" in the case of actions which have not been fully/correctly defined (e.g. a poorly defined mod)

right...  Arantor was saying exactly what I already said as well...


As for the action and subaction stuff...   I actually wrote a tweak/trick to handle much of that in the existing system...
Сл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."

Ninja ZX-10RR

Yeah indeed but I forgot it since it was 5 days ago and I didn't re-read it XD
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Hj Ahmad Rasyid Hj Ismail

DrBlack, I can see that you opened another same topic earlier here: http://www.simplemachines.org/community/index.php?topic=527807.0. As such I think this topic just be merged with it.

But I also noticed that you have had support from here as well: http://www.simplemachines.org/community/index.php?topic=385735.msg3745131#msg3745131 for problems you mentioned in the earlier topic.

Though I want to think that you clearly know that this current activity is coming the mod of which you already got some assistance with it, I would also like to think that you might have forgotten about it.

So, again, this is a mod related issue and as such, please refer back to the said mod support page for better solution.

Arantor

No, he's got the mod installed and it's working fine - 'unknown action' is produced by core SMF code and it can't be changed without figuring out what else is broken.

Hj Ahmad Rasyid Hj Ismail

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.

Arantor

You are wrong. Reading the entire thread may help explain why this is so, but to summarise:

Current action being *displayed* is the mod. $context['member']['action'] is defined by Who.php::determineActions.

The string 'unknown action' is used for one reason and only one reason: because there is no better description. An action has been accessed that has no description. You can change it all you like to be worded differently but that wasn't what the OP was asking for, nor is it what the OP actually wants.

He wants it to be the action it is, not 'unknown action' because he thinks that's a bug. It's not. It's because one or other of the mods he has installed *itself* has a bug by not declaring something to the online list.

This is not an SMF bug because SMF can't make mods magically fix not having an action (and 2.1 tries to do it and ends up revealing a minor security issue in the process).

DrBlack

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

Hj Ahmad Rasyid Hj Ismail

I rather think I am confused, Arantor. You said this:
Quote from: Arantor on October 03, 2014, 11:31:06 AM
No, he's got the mod installed and it's working fine - 'unknown action' is produced by core SMF code and it can't be changed without figuring out what else is broken.

As I stated in post #53, that is added by the mod and as advised by the mod author. That  text can be changed to something else. It won't be there at the first place if it is not because of the mod.

The OP doesn't want to display the action for his profile. The OP wants (the said text to be changed to) 'nothing or nothing you can see' instead for his profile and that was it. The OP already confirmed this above.

And for the OP, please, do ask at the mod support page. Your question is with regards to additional field added by that mod.

Arantor

#57
QuoteAs I stated in post #53

How many more times do I have to explain this?

QuoteYour question is with regards to additional field added by that mod.

No it is NOT.

The mod just displays something SMF ALREADY WORKS OUT. If you were to go to the full Who's Online page, you would find that it would ALSO say it there, because both the mod and the full Who's Online page use the same routine - determineActions - to work out what the person in question is doing.

If you have a mod installed that does not declare its action into the online list properly, you will get unknown action entries. PURE AND SIMPLE.

Here's a simple test on a completely unmodified SMF install: get two users. User 1 visits index.php?action=blah. User 2 looks at the online list... guess what user 2 will see for user 1? "Unknown action".

Supposing the mod was installed... they would see "Unknown action" if they looked at user 1's profile - for the EXACT SAME REASON.

It is nothing whatsoever to do with that mod because Profile.php itself declares $context['member']['action'] as the result of determineActions() for the online list and has for a long, long time, it just doesn't *show* the result which is all the mod does.

The correct behaviour is absolutely not to change it to 'nothing or nothing you can see' because the odds are that whatever is being done CAN be seen by the person who is getting the wrong message and that it is a DIFFERENT buggy mod that is the problem.

Hj Ahmad Rasyid Hj Ismail

You seems angry Arantor and I am not in the mood to argue with you. It is as simple as declaring if and or to resolve this by the said mod. It doesn't have to call for the action.

And no need to bark. I am not deaf.

Arantor

Well, I made a mistake with formatting which I have now fixed, but yes I do generally get quite angry when I have to repeat myself multiple times because people aren't listening to what I'm saying the first two or three times.

Advertisement: