Jimmy ([info]scenejournal) wrote in [info]lj_dev,
@ 2008-04-17 21:43:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
/support/help.bml Code
Hey,

I have users who want to help out other users in the support queue, but whenever they try to visit the page (by clicking on the link to go to the queue from the /support/index.bml page they're told the support queue is only available to people with the privs. So I had a peek at the code in the /support/help.bml page and there was this chunk of code:

return $ML{'.interim'} if
(!$remote || !$remote->{'_priv'}) &&
($r->header_in("Referer") eq "$LJ::SITEROOT/support/" || $r->header_in("Referer") eq "$LJ::SITEROOT/support/index.bml" || $r->header_in("Referer") eq "$LJ::SITEROOT/support/submit.bml");

It makes sense to me about what it's doing, but not why it's there...anyone know why you would block people from clicking that link? I tried it on LiveJournal and it works as intended, it shows you the queue and allows users to submit screened responses which is what I am going for...

In my database I have categories with public_help turned off (0) and allow_screened turned on (1).

So now I appear to be getting the sam effect as on LiveJournal, normal users can submit a screened response and I as the admin can change categories, rename topics, etc...and when someone who is not logged in viewed a thread it says they need to login to help others out, although they can still see all the information about the user (styles, email validated, etc...) so maybe the better idea here would be to insert some code that made sure the user was logged in and if so, then they can see all the support threads, maybe a better idea to toss that error out instead of saying users need special privs...

But then maybe I am mistaken and am looking at this the wrong way!

Any help on why that chunk of code is there would be great... :)


(Post a new comment)


[info]jemmix
2008-04-28 06:24 am UTC (link)
On lj.com installation this note is replaced by "hey, welcome to support, here's what you need to know, and now click the link to get to the requests".

(Reply to this)(Thread)


[info]scenejournal
2008-04-28 10:31 am UTC (link)
Yeah, so I am kind of wondering why the OS code has that bit, making it not possible for regular users to help out...actually, the OS code does say something like that, but when you click the link to the requests, it'll spit out the message that only people with special support privs can help out, whereas LJ.com code doesn't...

(Reply to this)(Parent)(Thread)


[info]jemmix
2008-04-28 10:36 am UTC (link)
Editing it is as easy as editing an includefile, like support-currentissues and similar, so this issue is kinda minor. Also, that code checks by referrer, so it's possible to reach the request by clicking "go" on the page with this notice in a browser.

(Reply to this)(Parent)(Thread)


[info]scenejournal
2008-04-28 10:39 am UTC (link)
Yeah, what I did was pull that piece of code out, and then put some code in that checked to see if the user was logged in or not. That seemed to make more sense to me.

(Reply to this)(Parent)


[info]pauamma
2008-04-28 06:45 am UTC (link)
You can use it as an interstitial page. The default .interim in htdocs/support/help.bml.text just says "This is for prived people only", but you can override it with htdocs/support/help.bml.text.local, which could set .interim to something like: Welcome to support - please read (doc link) for a quick introduction, then click <a href="help.bml">here</a> to see the board.

Next time, the referrer will be http://www.example.com/support/help.bml itself, and you'll skip the interstitial.

(Reply to this)(Thread)


[info]scenejournal
2008-04-28 10:34 am UTC (link)
Oh that's true, that's not a bad idea...what I actually ended up doing is pulling that chunk of code out and replacing it with some code that checked to see if the user was logged in or not.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…