• Page 1 of 1
  • 1
How to create basic HTML page with conditional operators?
Bengaltiger
Posts: 57
Reputation: 1

Message # 1 | 1:54 PM
Hello Ucoz,
I have created a basic HTML page. I used this Conditional operators code which you can see below :
<?if($USER_LOGGED_IN$)?> Hello, $USERNAME$ <?else?> Hello, Guest! <?endif?>

Then I uploaded it in file manager.
But, those conditional operators code are not working properly... sad

Source i use on my basic HTML page.

Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html><head>
<title>Download Page</title>
<link type="text/css" rel="StyleSheet" href="http://www.mysite.com/_st/my.css" />
</head>
<body style="padding:5px;">

<?if($USER_LOGGED_IN$)?>  
<iframe frameborder="0" height="100%" id="test" marginheight="0" marginwidth="0" name="test" noresize="noresize"scrolling="no"src="http://www.4shared.com/file/azHl9RH8/.html" width="100%">need frames </p></iframe>
  <?else?>  
Only Members can Download <A title="Welcome Back" href="$LOGIN_LINK$"><B>Sign in</B></A> with ur Tiger Identity, Not Member yat <A title="Join us" href="$REGISTER_LINK$"><B>Sign up</B></A>!!
  <?endif?>

</body>
</html>
Natashko
Posts: 3366
Reputation: 171

Message # 2 | 2:08 PM
Bengaltiger, you need to go to Control Panel -> Page Editor and create a page. When doing so mark "Apply personal template to the page" and save. And then embed your code into the template of this page. In this way it has to work.
Bengaltiger
Posts: 57
Reputation: 1

Message # 3 | 10:47 PM
Hi Natashko, thanks for your reply.
I know about this "create new page" but i want to create a blank page where nothing of my site shows.
Like a blank page going to pop-up if users are not logged in, the page going to ask to log in and if users did log in then hiding page will show!!!

For Example, When you create a new page like you said...If you are not logged in to your site, Ucoz asks you to log in first without showing any part of the site. Then, when you log in you get the access to create a new page.

I want to make a page like that. smile

Added (2011-05-14, 4:47 PM)
---------------------------------------------
Natashko, Now I did understand what u said!!!..........

Quote (Natashko)
"Apply personal template to the page"

I did not knew about this. But now I know....So, problem is, as u know it has a limit of 20. I need to create more than that. So, any solution for this??... sad

Please help me..I am just 1step away from my new project smile

Post edited by Bengaltiger - Friday, 2011-05-13, 9:10 PM
Animorph
Posts: 2856
Reputation: 189

Message # 4 | 1:18 PM
Quote (Bengaltiger)
any solution for this??

no there isn't any solution , you can't create more pages like that if your website says that 20 is the limit

To busy building a passive income online ;)
Natashko
Posts: 3366
Reputation: 171

Message # 5 | 3:19 PM
Bengaltiger, I might have a suggestion. Select a module that you do not use. Go to the template "Page with entry full text and its comments". Remove everything that is not necessary. Add the script, so your template will look like this:
Code
....
<body>
      <script type="text/javascript src="$OTHER1$""></script>
</body>
</html>

Upload script to the File Manager (script that will generate the necessary HTML page). Indicate the path to the script in the Custom field 1 of each entry.
In this way, each entry of this module can be a page with a different template.
Bengaltiger
Posts: 57
Reputation: 1

Message # 6 | 9:00 PM
Natashko, I don't know how script that will generate the necessary HTML page.
Can you please explain more or give an example?

Added (2011-05-17, 3:00 PM)
---------------------------------------------
Animorph, thanks for ur info btw tongue

Natashko
Posts: 3366
Reputation: 171

Message # 7 | 12:25 PM
Bengaltiger,
Quote (Bengaltiger)
I don't know how script that will generate the necessary HTML page.
Can you please explain more or give an example?

Here is an example. If you add this
Code
document.write('<h1>TITLE</h1>');
to the uploaded file in the File manager - the title will be output in bigger letters - TITLE. So the browser will process the code
Code
document.write('<h1>TITLE</h1>');
and we will get
Code
<h1>TITLE</h1>
This HTML code means - "output TITLE on the screen"
macaiba
Posts: 1
Reputation: 0

Message # 8 | 1:54 PM
iam new in everything no to help me can you begin from the begining
1. what is this?
2. where can i apply it?
3. how can i use it?
Natashko
Posts: 3366
Reputation: 171

Message # 9 | 2:24 PM
macaiba,
Quote (macaiba)
iam new in everything no to help me can you begin from the begining
1. what is this?
2. where can i apply it?
3. how can i use it?

first of all, I suggest you search a little before asking. Then you would know that you have to post your messages in the correct thread and be as specific as possible. When you say "it" what do you mean?
Bengaltiger
Posts: 57
Reputation: 1

Message # 10 | 7:42 PM
Natashko, sorry for replying late, my internet connection was down. Anyways,
i am going to ask u one more favor and that is, can u create a script file for me?....I have no idea about making script files smile
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 11 | 7:05 AM
Bengaltiger, we do not provide support with custom coding. You can request custom scripting here though: http://forum.ucoz.com/forum/25-13186-1

This link may also be useful if you wish to learn JavaScript : http://w3schools.com/js/default.asp

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
Bengaltiger
Posts: 57
Reputation: 1

Message # 12 | 7:55 PM
Paradox, thanks for info smile
  • Page 1 of 1
  • 1
Search: