1
Bazus
I get a "PARSE ERROR" in index.php (root) with following code:
  • 2003/11/2 20:50

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


I getting a parse error with this code:

Quote:
<?php
<{if !$xoops_isuser}><form action="<{$xoops_url}>/user.php" method="post"><b>user:< /b>< /br>

<input type="text" id="topfield" name="uname" value="<{$block.unamevalue}>" />< /br>

<b>pass:</b>< /br>
<input type="password" id="topfield" name="pass" />
<input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" />< /br>

<input type="submit" id="topbutton" value="login" />&nbsp; <a href="<{$xoops_url}>/user.php#lost">lost pass?</a>< /br>

<a href="<{$xoops_url}>/register.php">register</a></form><{ /if}>
?>


the parse error says is at line <{if !$xoops_isuser}>....

I"m trying to use an html template I have instead of the index.php at the root ( I made the html template a php file and named it index.php)

Any help to solve this problem is appreciated.

Regards

2
Herko
Re: I get a "PARSE ERROR" in index.php (root) with following code:
  • 2003/11/2 20:53

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


I don't know < /br> but <br />...

Herko

3
Herko
Re: I get a "PARSE ERROR" in index.php (root) with following code:
  • 2003/11/2 20:55

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


now that I've reread your post: you start with <?php and without a ?> you go in with smarty code and HTML code. Drop the <?php and let the HTML renderer pasre the page. Smarty statements do not need the <?php code...

Herko

4
Bazus
Re: I get a "PARSE ERROR" in index.php (root) with following code:
  • 2003/11/2 21:35

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


with the <?php ?> I get a blank page loads with the parse error,

and if I take-out the <?php at the beginng and ?> at the end of that, the code inside the brackets don't get executed, the page loads but I can see the brackets and the code inside instead of the values.


5
Mithrandir
Re: I get a "PARSE ERROR" in index.php (root) with following code:

Did you add the template to the index.php? or are you viewing the index.html?

6
Mikhail
Re: I get a "PARSE ERROR" in index.php (root) with following code:
  • 2003/11/2 22:32

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


hey! Slash before quotes


btw... php in templates?

7
Bazus
..
  • 2003/11/2 22:41

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


what I'm trying to do is place the login in a specific place in an html template that I converted to index.php by adding <?php ?> at the beginning and after that the html code and at the end closing with <?php ?> again.

other words is the index.php at the root.

I have tryed many things and what I get is the same parse error.

this is the latest code I tryed:
Quote:
//<?php include "index-workswithcodevisible.php"; ?>
<?php if {!$xoops_isuser} ?>

<form action=<?php "<{$xoops_url} >/user.php" ?> method="post"><br>

<b>user:</b><br>
<input type="text" id="topfield" name="uname" value=<?php "<{$block.unamevalue}>" /> ?> <br>

<b>pass:</b><br>
<input type="password" id="topfield" name="pass" />
<input type="hidden" name="xoops_redirect" value=<?php "<{$xoops_requesturi}>" /> ?> <input type="hidden" name="op" value="login" /><br>

<input type="submit" id="topbutton" value="login" />&nbsp; <a href=<?php "<{$xoops_url}>/user.php#lost"> ?><br>

lost pass?</a>&nbsp;&nbsp;&nbsp;
<a href=<?php "<{$xoops_url}>/register.php"> ?> register</a></form><?php <{ /if}> ?>//


Parse error: parse error, expecting `'('' on line 139
which is the line: <?php if {!$xoops_isuser} ?>

8
Mikhail
Re: ..
  • 2003/11/2 22:46

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


[size=xx-large];[/size]

9
Bazus
Re: ..
  • 2003/11/2 22:52

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


nope, that doesn't fix it

<?php if {!$xoops_isuser}; ?>

10
Derya
Re: ..
  • 2003/11/3 0:49

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


Quote:
I"m trying to use an html template I have instead of the index.php at the root ( I made the html template a php file and named it index.php)

1.This can't work, because you have nowhere an including of the needed files. If you use this instead of the index.php you need to tell the script from there it can get the needed variables.
2.if you want to use this as php you can't use smarty tags. There are two ways to do this right:
- create an index.php and a template for it, so you have php and smarty separeted...
- make everything in php without smarty-tags
3. Why don't you turn all blocks and modules off for anonymous users and set the login block visible for anonymous. It's the same effect, if you want you can set the login-block as centerblock...

Login

Who's Online

218 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits