There is a Template Engine for C like Smarty ( http://smarty.php.net/)
to separate the html from the C code?
Thanks,
Carlos. 10 3854 gl****@neuroticweb.com wrote: There is a Template Engine for C like Smarty (http://smarty.php.net/) to separate the html from the C code?
how do you combine C and HTML? IMHO if you want to use say OOP-like
functionality in HTML or alike, use PHP
greetings,
--
EP
Erich Pul ha escrito: gl****@neuroticweb.com wrote: There is a Template Engine for C like Smarty (http://smarty.php.net/) to separate the html from the C code?
how do you combine C and HTML? IMHO if you want to use say OOP-like functionality in HTML or alike, use PHP
greetings, -- EP
I know, i know, but i need it for C, i cannot change the language.
> I know, i know, but i need it for C, i cannot change the language.
well, HOW do you want to employ C with HTML? putout HTML code with C?
Erich Pul ha escrito: I know, i know, but i need it for C, i cannot change the language.
well, HOW do you want to employ C with HTML? putout HTML code with C?
I want to modify a web server log file analysis program written in C
(the output it's a html). Now the code it's a mess and i want to use
html templates in order to make easier to modify the html output in the
future. I want to modify a web server log file analysis program written in C (the output it's a html). Now the code it's a mess and i want to use html templates in order to make easier to modify the html output in the future.
ah, ok - thx for the fill-in... maybe it is possible to put the html
and include functions in C that add smarty-style functionality to it.
but AFAIK is smarty for PHP files, right? so if you are able to put out
..php files, you may have a cron or alike run over the files with a php
script and modify them? just a suggest though since i never actually
tried something like this...
hth,
--
erich pul
Erich Pul ha escrito: I want to modify a web server log file analysis program written in C (the output it's a html). Now the code it's a mess and i want to use html templates in order to make easier to modify the html output in the future.
ah, ok - thx for the fill-in... maybe it is possible to put the html and include functions in C that add smarty-style functionality to it. but AFAIK is smarty for PHP files, right? so if you are able to put out .php files, you may have a cron or alike run over the files with a php script and modify them? just a suggest though since i never actually tried something like this...
hth, -- erich pul
Thanks Erich but i don't want to complicate myself so much. Maybe a C
cgi library has some similar to Template Engine. Thanks Erich but i don't want to complicate myself so much. Maybe a C cgi library has some similar to Template Engine.
maybe you can circumvent all the hassle by simply modifying the C code
to include a CSS-stylesheet into the output html. then you can simply
do the spacing etc. with relative or absolute DIVs and SPANs (just to
complicate this further ; )
greetings,
--
E
Erich Pul ha escrito: Thanks Erich but i don't want to complicate myself so much. Maybe a C cgi library has some similar to Template Engine.
maybe you can circumvent all the hassle by simply modifying the C code to include a CSS-stylesheet into the output html. then you can simply do the spacing etc. with relative or absolute DIVs and SPANs (just to complicate this further ; )
greetings, -- E
I'll do it using CSS but i want to have also the option of modify the
html easely. Thanks anyway :)
Neurotic wrote: Erich Pul ha escrito:
I know, i know, but i need it for C, i cannot change the language.
well, HOW do you want to employ C with HTML? putout HTML code with C?
I want to modify a web server log file analysis program written in C (the output it's a html). Now the code it's a mess and i want to use html templates in order to make easier to modify the html output in the future.
There isn't anything like PHP templates in C. PHP is an interpreted
language and the template fields are filled in at run time, with C you
have to form the document structure at compile time.
You should be able to break the problem down into its component parts
and come up with something like
outputHTML() which calls
outputHead() and outputBody() which calls
outputYourData().
You can break outputYourData() down into a set of functions that mimic
PHP templates.
If this is to be viewed via a browser, make it a CGI application and
place all your formatting in a CSS file.
--
Ian Collins. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: beale |
last post by:
Hi,
I have been doing some reading on the template systems available for use
with php to separate design from coding.
I have been looking at the FastTemplate and Smarty solutions. From the...
|
by: Brian |
last post by:
Hello,
I am trying to work out how to have smarty use a string's contents as the
display-> template..
ie:
$smarty->display($buffer);
obviously $buffer isn't a filename, but a smarty template...
|
by: Andrea A |
last post by:
Hi,
i'm developing a website that will have an huge amount of visitors a day -->
it will be a contest with 100.000$ of prize.
I'm concerning about using a template class (and which one do you...
|
by: Don Sutter |
last post by:
Hello,
I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.
I'm somewhat of a newbie with PHP and bacame interested in templates via...
|
by: Brian |
last post by:
I have an application that uses an array of values as a "lookup" table and
smarty as a template engine.
$lookup = "label";
$lookup = "label2";
$lookup = "label";
$lookup = "label2";
In my...
| |
by: Wensheng |
last post by:
Hi, I wrote a small template engine called spytee.
Like any template enigne, it take a text(html) template file as input,
process the variable tags in the file, and display the resulted text.
The...
|
by: HchC |
last post by:
PHP is already a HTML templating laguage, but I am looking for a HTML
template engine for users who know nothing about HTML. This template engine
should not be too complex, as this is for very...
|
by: Conrad |
last post by:
Hi, I'm very new to Smarty Template Engine and I'm using PHP 5.0.4 on
the Windows XP Professional platform and I have the following question:
When I change the 7th line of the script to use a...
|
by: Egbert Teeselink |
last post by:
Hi all,
The last few months I've worked on making a template engine because
the ones out there didn't serve my needs. I guess everybody knows
Smarty and has an opinion on it; I like many things...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |