Starting with 17th May 2007, Adobe Systems will stop offering support for any version of the discontinued InterAKT products. As a result, we will not answer to new support incidents starting with May 17th, 2007. Pending support incidents will still be followed in order to be closed. The product forums will remain open and be transformed in user-to-user forums. The general forums will be made read-only and not allow new posts or comments.
For more information about the affected products visit: www.interaktonline.com/Support/
tom upton
06-16-2007 13:59:40 GMT +2
|
Hi Guy's,
Im hoping someone maybe able to help me here.
Ok i have a website which is an online radio website - http://www.raunchyrhythms.com/
When a DJ is logged in and playing on the website a "Request" box appears just underneath the PayPal Donate Button. I have set this up so when a DJ is logged in it will display the "show if user is logged in" option. i.e. we dont want people to send requests when there is no specific dj playing.
This works fine for example if i login, it displays the Request Box etc. But if someone else views it from another browser, in a different location they dont see the requests box. I presume the "Show If User is logged in" is set via Browser Sessions and is only specific to the browser they are logged in at.
How can i resolve this, so if a DJ is logged in, the request box will display on the site so all visitors to the website can see it. Obviously at the moment its only showing on my browser as im logged in. If my friend a few miles away logs in, he doesnt see anything!
Any advice would be much appreciated!
Regards
Tom
|
|
|
Guenter Schenk
06-17-2007 00:31:11 GMT +2
|
Hi,
yes, the "show if user is logged in" behaviour will only affect the currently logged in user and is related to his current session.
What you could do to display the currently logged in DJs is :: create a query, say, SELECT * FROM login_table WHERE user_status = 'DJ' and logged_in = 'Y' -- and use DW´s native "Show Region -> Show if recordset is not empty" behaviour to just display the request box when at least one DJ is logged in.
Günter
|
|
|
tom upton
06-17-2007 00:38:40 GMT +2
|
Hi mate,
Thank you for the quick response. I presume you are relating to the "User Login" history section which you can create when setting up the "login" section for your site?
Regards
Tom
|
|
|
Guenter Schenk
06-17-2007 19:47:36 GMT +2
|
Hi,
>>
I presume you are relating to the "User Login" history section which you can create when setting up the "login" section for your site?
>>
not necessarily. In the old "Kollection" days when they didn´t have a separate "login History" section, I helped myself by adding customer triggers to the Login/Logout pages which set a certain field in the main Login table to Y (on login) and N (on logout) -- I wouldn´t want to expose the login stats to other visitors, I just needed a flag.
If you´re interested in my custom triggers, just let me know
Günter
|
|
|
tom upton
06-17-2007 22:12:58 GMT +2
|
HI Mate,
Thanks for the reply, Yes these custom triggers you have setup seem very interesting, I would love to check these out.
I have managed to get around this by adding an extra field in my "Members" table which highlights whether the user is online or offline. Its very much a manual proccess though!
Regards
Tom
|
|
|
Guenter Schenk
06-17-2007 23:13:26 GMT +2
|
Hi Tom,
here you are:
this is the custom trigger for the login page:
-------------------------
$update_login_status = "UPDATE login SET logged_in = 'Y' WHERE id = ".$_SESSION["kt_login_id"];
$update_result = $tNG->connection->execute($update_login_status);
if(!$update_result) {
$updateError = new tNG_error( "Error updating the login status", array(), array());
return $updateError;
} else {
return NULL;
}
________________
and this is the custom trigger for the logout page:
--------------------------
$update_login_status = "UPDATE login SET logged_in = 'N' WHERE id = ".$_SESSION["kt_login_id"];
$update_result = $tNG->connection->execute($update_login_status);
if(!$update_result) {
$updateError = new tNG_error( "Error updating the login status", array(), array());
return $updateError;
} else {
return NULL;
}
_________________
Some remarks:
1. please make your "extra field" a char(1) NULL field -- means, it can be NULL and will store either Y or N
2. as the user session is by default not defined on the "logout" page, add a "@session_start();" - command on top of the page
3. some query aliases : "login" = your user table, "logged_in" = your extra field, "id" = the usual unique autoincrement numeric field
Hope this helps ;-)
Günter
|
|
|
benjamin wende
02-15-2008 20:19:47 GMT +2
|
|
|
|