1
adwin
HTML Code messed up in PHP source code (a beginner question)
  • 2004/7/7 11:43

  • adwin

  • Just popping in

  • Posts: 68

  • Since: 2004/6/27


Hi... I am a new bie for XOOPS.
I want to develop a new module for my web site.

I have question regarding the codes in XOOPS (core ?).

Why you guys put such as echo '
' ; (drawing HTML code) in php. Is it better to separate between display (html template) with the code (*.php) ?

I use smarty for quite long time and I get used to make separate between php code (logic) with the display (html). In this way, I can do better coding while my web designer can do the page design without messing my code.

And can I separate between code and display, for my module, with the XOOPS ?



thx


2
Dave_L
Re: HTML Code messed up in PHP source code (a beginner question)
  • 2004/7/7 11:55

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


It's better to separate the presentation from the content, as you described, and you can do that if you're writing a new module.

Some of the existing code doesn't do it correctly.

Where did you see the echo '
';
?

P.S. An exception is the admin part of the module. It's possible to use Smarty templates for that, but the documentation doesn't really show you how.

3
Dave_L
Re: HTML Code messed up in PHP source code (a beginner question)
  • 2004/7/7 11:56

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


(duplicate post - ignore)

4
adwin
Re: HTML Code messed up in PHP source code (a beginner question)
  • 2004/7/7 13:31

  • adwin

  • Just popping in

  • Posts: 68

  • Since: 2004/6/27


I just wonder, why admin part modules didnt use Smarty ? Imho, I think smarty help so much for separating view (design) and logic(code). May be some of you have a good reason for this decision :)

ps: Where I can get the offline documentation of module development ? is there any ?

thx

adwin


5
sottwell
Re: HTML Code messed up in PHP source code (a beginner question)
  • 2004/7/11 7:36

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


hhttp://wiki.xoops.org/wakka.php?wakka=HomePage

Some explanations and tutorials here. Also check links on left column of this page

Login

Who's Online

377 user(s) are online (248 user(s) are browsing Support Forums)


Members: 0


Guests: 377


more...

Donat-O-Meter

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

Latest GitHub Commits