Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues
Author Message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Fri Feb 20, 2009 10:46 am Reply with quote

After upgrading to 2.3.01 I let my assistant admin know that the release was out there. He replied, all looks good but I have a problem with hiding my online status ... namely it doesn't work. So I started digging. Please check my logic before I conclude that I have an appropriate solution.

In the users table there is a field user_allow_viewonline. On the change information screen of Your Account there is a from field whose english text is:

"hide your online status" and where the choices are yes and no.

After watching the table update through PHPmyadmin I can say that what happens is this. If you say yes to hide your online status then user_allow_viewonline is set to 1. If you say no then user_allow_viewonline is set to 0. This is backasswards, no? Programs such as /blocks/Block-User-Info.php interpret the meaning of user_allow_viewonline properly (or I should say logically) but a user who changes his setting through the current YA screen is most likely going to choose the wrong setting.

If I am correct then I think the least cost and most logical solution would be to simply change the language file to say something like:

"allow my online status to be shown:"

Think it over and let me know. I can take care of making the change for the next release if you all agree and users can just keep this illogic in mind for the time being.
 
View user's profile Send private message Visit poster's website
jestrella
Moderator



Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic

PostPosted: Fri Feb 20, 2009 11:22 am Reply with quote

Makes sense

_________________
"For those whom have not reach the sky... Every mountain seems high"

Best Regards
Jonathan Estrella
http://about.me/jestrella04 
View user's profile Send private message Visit poster's website
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Fri Feb 20, 2009 11:31 am Reply with quote

I´m sure many newbies don´t know exactly what it means therefore I agree change the message to something like:

Quote:
"allow my online status to be shown:"
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Feb 20, 2009 11:45 am Reply with quote

It is important to remember that this is a forum feature.

The logic as is sounds fine to me. It is asking you if you want to "hide your online status". So yes should be 1 and no should be 0. At least that is my opinion.

The problem is with the logic determining if yes or no should be set on the form. If you go the edit your "Forum" profile you will see that it is the opposite of RNYA. Menaing that if RNYA says no the forums say yes. There for we need to edit edituser.php and make it so that if the value is 1 it shows yes and if it is 0 show no. Hope that helps Smile

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
fkelly







PostPosted: Fri Feb 20, 2009 2:49 pm Reply with quote

Very good point Palbin. I hadn't thought of looking in the Forums profile.

However I'm not sure I agree with you on the solution. There's no doubt that if we want a "perfect" solution we'd have to go change a bunch of RNYA code ... this thing is in activate.php, edituser.php, newconfirm.php, newfinish.php, saveactivate.php and saveuser.php. It could require changes in any or all of them.

I just had the changeinfo from RNYA and the Forums profile up while I watched the field change in phpmyadmin. Just so everyone is clear what happens (and so I can remember 15 minutes from now.

Forums profile
Hide Online Status set to yes ... field user_viewonline is set to 0
Hide Online Status set to no ... field user_view_online is set to 1

RNYA change info
Hide Online Status set to yes ... field user_viewonline is set to 1
Hide Online Status set to no ... field user_view_online is set to 0

So you are correct Palbin that the logic is reversed. And I know that technically we should never attach semantic meaning to a field name but we all do. So if a field is named user_viewonline then if it is set to 1 you would think that means it could be viewed. No? So in that sense Forums is doing it right.

But all I am asking is why not just change the language file in RNYA. If we have the language file say something like "allow my online status to be shown" ... well it will be different than the wording in Forums but it will be semantically correct within RNYA and it will work consistently across both Forums and RNYA and I think in the user_info blocks.

In my view this is an obscure and even "stupid" feature to even have in the system ... the kind of thing that legacy Nuke was famous for ... so why spend a lot of programming resources tracing through a bunch of programs when we could "solve" the problem with a simple change to a few language files? Maybe that's "lazy" but I just think there are bigger fish to fry.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat Feb 21, 2009 2:27 am Reply with quote

We have almost separated the forums from RN. We should continue the separation approach.

This is correct:
RNYA change info
Hide Online Status set to yes ... field user_viewonline is set to 1
Hide Online Status set to no ... field user_view_online is set to 0

This is incorrect:
Forums profile
Hide Online Status set to yes ... field user_viewonline is set to 0
Hide Online Status set to no ... field user_view_online is set to 1

I think we should decouple the relationship. RNYA should NOT be updating Forums nor visa-versa.

If a field label is an imperative then the value is yes=1 no=0.

If a field label is a question then the value is yes=1 no=0.
 
View user's profile Send private message
fkelly







PostPosted: Sat Feb 21, 2009 10:32 am Reply with quote

I almost regret having raised this issue Smile ... it gets to be such a tangled web.

Historically I have no idea how this evolved. Was 'user_viewonline" a field in the original *nuke user table and then when someone integrated Forums they decided to use it but did it in a backwards manner? Or when Forums was integrated did they find user_viewonline in the Forums user table and decide to stick it in the Nuke user table and use it in YA. Is user_viewonline new to RNYA (I doubt it) or has this problem existed for some time but since it is such an obscure feature no one recognized the bug.

I am all for separating PHPBB from RN ... I think the current integration creates all sorts of problems including "sharing" one field in the users table between PHPBB and RN but using it in different semantic contexts.

However, to fix the problem more systematically than my recommended "hack" approach (changing the RN language files) would require adding another field to the users table and then making revisions either to the Forum code or to the RNYA code plus all RNYA code that accesses that field (such as block-user_info.php) plus any non RNYA code that uses the field in question. Either way gives me heartburn. Or to put it another way I think the juice just ain't worth the squeeze.

For 2.4 we could just make the language change. Then whenever we get around to "integrating" PHPBB3 we could do it right with separate bridged user tables.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Feb 21, 2009 1:32 pm Reply with quote

I agree with your last paragraph fkelly. Seems prudent to me.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Sat Feb 21, 2009 4:52 pm Reply with quote

Palbin wrote:
There for we need to edit edituser.php and make it so that if the value is 1 it shows yes and if it is 0 show no. Hope that helps


Assuming the logic only needs to be fixed in a single program as Palbin says then why wouldn't we want to do the correct thing and fix the logic?
 
fkelly







PostPosted: Sat Feb 21, 2009 7:18 pm Reply with quote

User_allow_viewonline is referenced a number of programs in RNYA. Whether changing it in just edit_user would then carry through all the rest of them is an issue I have not fully analyzed. I listed the programs that a search revealed in an earlier post in this series. It is possible that the rest of the programs are dependent on what is set in edit_user ... I just don't know. At the very least we'd have to trace the flow through all the programs and then regression test to make sure they work properly with any other program such as block-User_info that also references the field. It is possible that some reporting programs may have been written to work with the current illogical setting of the field and we would cause them to be wrong by "fixing" it.

I don't mean to be difficult. I just don't have the hours it would take to go digging through RNYA and any program that uses that field and then regression testing everything. If someone else wants to do it that would be fine. If this were some key aspect of RNYA then I'd say let's do the digging. But it's not and there appears to be a work-around that will resolve the problem without having any possible negative effects on other programs.
 
Raven







PostPosted: Sat Feb 21, 2009 7:55 pm Reply with quote

Then help me understand what the issue really is. What has changed in v2.30.01 that is making this such an issue?
 
fkelly







PostPosted: Sun Feb 22, 2009 7:41 am Reply with quote

I don't think anything has changed in RN 2.3.01 that makes this "such an issue". I think it's a longstanding issue and such a minor and trivial issue that most people have never noticed. It is such a minor issue that I think we should do the minimum possible to patch it over until we can move past it. I never would have noticed it if the guy who works with me on my site hadn't mentioned it.

I haven't traced it back but I think this issue could go back for years to when Forums where first integrated. It really doesn't matter though and is not worth the effort to trace. If someone has the time and energy to go tracing all through the RNYA code to fix it systematically that's fine; but I continue to think that's a misallocation of resources. Otherwise we could just make the language file changes I suggested and it will be swept under the table until we get past PHPBB2.
 
Raven







PostPosted: Sun Feb 22, 2009 1:01 pm Reply with quote

Go ahead then but make sure we have an open Mantis issue for it. Thanks.
 
fkelly







PostPosted: Sun Feb 22, 2009 2:48 pm Reply with quote

Okay, I will try to get it done on Monday 2/22 or Tuesday 2/23. I will test with the English language file change and assuming it is successful I will ask in Mantis for contributions for the the other language files we need.

Thanks.
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Mon Feb 23, 2009 5:31 pm Reply with quote

I just saw the Mantis issue on this, but hadn't seen this thread until now.

Here's my take:

This is a forum field. RNYA can maintain forum fields, but should use forum logic. This may have been messed up in RNYA when we force RNYA to use "logical" values to match the fields, and did not reconcile that "logic" with those forum fields.

I certainly don't mind changing whatever places in RNYA are necessary to make this work correctly with the forums for which that field is intended. We just need to make sure we all understand that perfection comes in many forms - in this case, perfect would be working in harmony with the forums, even though the forums aren't "logical." (this "logic" also made upgrading from CNBYA more difficult, but, hey, it's logical!) (I guess you can tell it's time for me to get some Listerine to get that bad taste out of my mouth Smile ) (steps down off soap box)

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
fkelly







PostPosted: Mon Feb 23, 2009 6:14 pm Reply with quote

Kevin et al: I made a SVN change to fix this situation after discussion here. It is easily reversible. I would urge you to look at RNYA "both ways" ... with this change and without. To diagnose this thing I had to have two computers going, one with a normal user login and another with an admin login and then I had to have phpymadmin going and watch the field change after both forums changes and rnya changes. It gets a little bit nuts. The findings are posted earlier in this thread.

I don't know how extensive the changes to RNYA would be. You'd need to start (I think with edituser but whether you would need to make similar changes to every program involved in the process ... I just don't know. Plus, the user_info programs work (sort of) properly with the current field values so you'd need to test them.

I think the language file change I made "finesses" the whole situation but look for yourself.
 
kguske







PostPosted: Mon Feb 23, 2009 10:09 pm Reply with quote

Did you update root or a branch?
 
fkelly







PostPosted: Mon Feb 23, 2009 10:21 pm Reply with quote

Root ... as far as I know .. revison 2894.
 
kguske







PostPosted: Mon Feb 23, 2009 11:14 pm Reply with quote

Did you just change the language file?
 
cornishpixie
Regular
Regular



Joined: Dec 15, 2008
Posts: 79

PostPosted: Tue Feb 24, 2009 4:05 am Reply with quote

As a total non techy know nothing about coding person, would it not be easier as a temporary fix to just take out the option in forums user profile to hide or show user on line?

Most people who use the sites only look in their forum profile to hide or show their online presence, if it wasnt there they'd have no choice and it would solve the problem temporarily until all you wizards come up with a proper solution.

If, however, the forum is tangled up with RN so much that this isnt possible, then slap my wrist and tell me to sit in the corner and be quiet. lol

And I apologize for posting a new thread on this, I didnt understand the title of this one and so didnt look into the thread.
 
View user's profile Send private message
Susann







PostPosted: Tue Feb 24, 2009 5:17 am Reply with quote

The idea isn´t bad but there is one reason why I wouldn´t use this because there are different older blocks out there which are coded to check if the status in the forums profile is set to hide or not.
 
fkelly







PostPosted: Tue Feb 24, 2009 8:32 am Reply with quote

I changed the language file in our "private" RN developers area last night (Monday 2/23/09). Once the RN team gets a look at this and tests it and if it works out appropriately I will post what you need to change here (it is one line in a language file).

To Cornishpixie's question, I don't think we at RN want to be mucking around inside the Forum's code unnecessarily. My "fix" makes the whole thing work logically both in Forums and in RNYA. By that I mean that when a user looks at the screen and makes a yes/no choice to hide his/her user name online or to allow it to be shown the system now does what the yes/no choice seems to indicate that it does. That's all that's needed IMHO. Over the longer run, in future Forums "integrations" or "bridges" we should definitely limit sharing of fields between the two pieces of software -- just to avoid situations like this.
 
cornishpixie







PostPosted: Tue Feb 24, 2009 5:18 pm Reply with quote

Thank you.

I think it will be much better once the forum is detached from the main site, with a bridge of some kind. And not so many files to edit with upgrades lol
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©