Current time: 05-23-2012, 10:49 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSS owns me...
07-12-2009, 10:16 PM
Post: #21
RE: CSS owns me...
Not a bad idea! I try to avoid iframes but in this case it would be my best bet.

- KuJoe
▒ LvL8
▒ The Free Web Hosting Guide
▒ FreeWebHostingTalk


PM me for theme conversions @ $15!
Visit this user's website Find all posts by this user
Quote this message in a reply
07-13-2009, 01:12 PM
Post: #22
RE: CSS owns me...
You could also try some JavaScript InnerHTML.

Code:
<div id="box>
What you want to show by default.
</box>

and then have some JavaScript that checks if the user is logged in and uses innerHTML accordingly. Beware of using JavaScript variables, though. They can be changed at any time by the user.

Code:
document.getElementById('box').innerHTML = 'Welcome!';

For more info about this go to Tizag.

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2009, 05:38 AM (This post was last modified: 07-14-2009 05:39 AM by Jimmie.)
Post: #23
RE: CSS owns me...
No, use the existing APIs in THT:
PHP Code:
if($_SESSION['username']){
     
$array["LOGINBOX"] = "";
}
else{
    
$array["LOGINBOX"] = $style->replaceVar("tpl/whatever/loginbox/lol.tpl");
}
echo 
$style->replaceVar.......... 

Check for _SESSION['username'] and make it something like that.
I wish there was something like this on THT's templating system though:
Code:
{if $_SESSION['username']}
    You're a user!
{/if}
{elseif $_SESSION['fail']}
You fail!
{/elseif}
{else}
uh
{/else}

Jimmie Lin - Community Manager & THT.Next Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2009, 10:21 AM (This post was last modified: 07-14-2009 10:22 AM by Kevin.)
Post: #24
RE: CSS owns me...
(07-14-2009 05:38 AM)Jimmie Wrote:  No, use the existing APIs in THT:
PHP Code:
if($_SESSION['username']){
     
$array["LOGINBOX"] = "";
}
else{
    
$array["LOGINBOX"] = $style->replaceVar("tpl/whatever/loginbox/lol.tpl");
}
echo 
$style->replaceVar.......... 

Check for _SESSION['username'] and make it something like that.
I wish there was something like this on THT's templating system though:
Code:
{if $_SESSION['username']}
    You're a user!
{/if}
{elseif $_SESSION['fail']}
You fail!
{/elseif}
{else}
uh
{/else}

I'm not sure if he wants it to integrate with THT. Tongue (But he might Smile )

Kevin Mark - TheHostingTool Lead Developer
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)