There is a Template Engine for C like Smarty ( http://smarty.php.net/)
to separate the html from the C code?
Thanks,
Carlos. 10 3857 gl****@neurotic web.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****@neurotic web.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
benchmarks I have seen, the FastTemplate solution looks the fastest where
there is no acceleration on the server, but where there is acceleration,...
|
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 inside a string
variable. Take this example:
|
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 suggest)
or developing an optimized set of pages without using class nor PEAR
package.
What do you think about?
What will be your action if you'll...
|
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
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't...
|
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 application I can easily use this array to find the values I need.
| |
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 difference from most templates are: you can edit the template file
in the html editor(Frontpage, Dreamweaver, whatever), thus a near
Complete...
|
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 basic users only.
Some HTML online editor is good, but too complex, it's useful for web
builder writting HTML page.
|
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 new name and refresh
the browser, it maintains the old value instead of updating to the new
value. Both index.php and SmartySetup.class.php appear...
|
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 about it, but
dislike many others. The thing I made is called 'Farty' (sorry, I suck
at names) and is in many ways a simpler version of Smarty. It...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
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.
| |