Mikel
Posts: 7
|
| Posted: 07/11/2007, 11:44 AM |
|
Hi
does anyone know how to hide a row befor the login and after the login it shows up any help would be great
Mikel
|
 |
 |
Damian Hupfeld
|
| Posted: 07/11/2007, 3:01 PM |
|
You can easily hide components and panels by first clecking for
CCGetUserID()...
"Mikel" <Mikel@forum.codecharge> wrote in message
news:546952522ca8e1@news.codecharge.com...
> Hi
>
> does anyone know how to hide a row befor the login and after the login it
> shows
> up any help would be great
>
> Mikel
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
DonB
|
| Posted: 07/11/2007, 5:02 PM |
|
Create this function and put it somewhere accessible by all your code (I
tend to create and include a 'library.php' and put these sorts of things in
there). You can stick it into Common.php, instead.
function ifLoggedIn(&$obj) {
if (function_exists('CCGetUserID')
$obj->Visible = CCGetUserID() ? true : false;
}
And call it from any Before Show event of anything that has a Visible
property. It will show the object if you are logged in, or hide if it you
aren't.
For things that don't have this property (like the chunk of HTML that
defines your table row), you can enclose them in a Panel. The Panel does
have the Visible property.
--
DonB
http://www.gotodon.com/ccbth
"Mikel" <Mikel@forum.codecharge> wrote in message
news:546952522ca8e1@news.codecharge.com...
> Hi
>
> does anyone know how to hide a row befor the login and after the login it
shows
> up any help would be great
>
> Mikel
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
Mikel
Posts: 7
|
| Posted: 07/12/2007, 11:03 AM |
|
Hi
thanks for the quick response from both of you.
donb i tryed you code but it is still not hidden it still shows up for some reaseon
thanks mike
|
 |
 |
wkempees
|
| Posted: 07/12/2007, 3:36 PM |
|
ifLoggedIn(&$obj);
I think you want to lose the $
Walter
|
|
|
 |
DonB
|
| Posted: 07/12/2007, 3:52 PM |
|
The $ in front of the 'if', that is.
But note that the function, function_exists(), takes the name of the
function as a string, NOT just the name by itself - as you might be
accustomed to passing in a javascript function parameter. You must enclose
the name in apostrophes or double-quotes.
--
DonB
http://www.gotodon.com/ccbth
"wkempees" <kempe819@planet.nl> wrote in message
news:f76ade$13s$1@news.codecharge.com...
>
> ifLoggedIn(&$obj);
>
> I think you want to lose the $
>
> Walter
>
>
>
|
|
|
 |
Mikel
Posts: 7
|
| Posted: 07/18/2007, 6:36 PM |
|
Hey all
thanks for the help i got it to work and it works great
thanks again
|
 |
 |