The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
No Permission Error on WOL
I've been trying without much luck to get the text No Permission in front of a users loaction on the WOL page if they have the standard no permission error, like vB3 has.
Anyone have any ideas/know how to do this? |
#2
|
|||
|
|||
err... do you mean for the users that are trying to view the wol or the users that have permission and view other users that get wol permission errors? i haven't seen the vb3 wol in the works yet sorry
but should be able to do somethign within the function included in the online.php the varaiable... $userinfo[activity] thats in the whosonlinebit in the php file find... PHP Code:
PHP Code:
g-force2k2 |
#3
|
||||
|
||||
hmm, i think they use another session system within vb3..
perhaps an idea: open admin/functions.php find: PHP Code:
PHP Code:
find: PHP Code:
PHP Code:
then edit your whosonlinebit template and add $userinfo[nop] before $userinfo[where] i'm not sure if it works correct, but the idea should work, maybe small bugs in |
#4
|
|||
|
|||
then again Xenon's code is probably alot more affective for one it uses the show_nopermission function so yeah his code is more effecient and effective oh well i tried...
g-force2k2 |
#5
|
||||
|
||||
As long as the guardians solve the problems it's good
also take up the competition pal, it'll train our both skills |
#6
|
||||
|
||||
Thanks for the help Xenon and g-force2k2.
I started out along the same lines as what Xenon posted, the problem is that the query that adds nop- to the start of the location gets overwritten by the final query that is run for the page, which updates the users session and therefore re-setting the location without the nop- preceding it. I can't seem to see anyway around it where the nop- will get removed when the session is updated and the users hasn't got the show_nopermission(); message. |
#7
|
||||
|
||||
it is?
hmm the query within the function show_nopermission should be the last query, because there's an exit call in it... hmm *subscribing to the thread* i'll test it out tomorrow perhaps i can find a way |
#8
|
||||
|
||||
I turned debug on to see and it was about 8th out of the 13 queries that were being run.
Thanks for the help Xenon |
#9
|
||||
|
||||
@NTLDR: This is a good hack idea, I can use this one too. I can't convince my Super Moderators that user in whoisonline is not actually in that location when he's not allowed.
@Xenon: Your algorithm is very good, congratulations. And the solution: The problem why your solutions do not apply is related to the PHP's register_shutdown_function(). To recap, in PHP you can set the script to run a couple of commands before its execution is terminated. This is done via register_shutdown_function and allows the developer to arrange things before the script ends.. So even if you put an "EXIT" command right after $DB_site->query("UPDATE session SET location=CONCAT('nop-',location) WHERE sessionhash='$session[sessionhash]'"); You'll find that the location field is still overwritten. This is because the function doshutdown() runs right before the script ends (as a part of register_shutdown configuration) and it overwrites your table field since there is another session update in that function. The solution as you might guess is to hack that function too.. It's in function.php. BTW. I like threads like this, they are good for our brain.. |
#10
|
||||
|
||||
Thx pal
i didn't know the how the shutdownfunction works, now i see why you always have to reload the who's online to show yourself viewing who's online ... well i think then it shouldn't be so hard to fix this bug: instead of this line PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|