[PHP] Re: fast template over xsl

2003-01-09 Thread rush
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi i am considering the move from fast template to xslt , is there any
> benifits for this ? also is there a way to intergrate xsl like fast
template
> ie parse rows in the php script

In my (biased) opinion, you could be better of staying with templates. But
you could try TemplateTamer, to simplify, organize, and improve your
template development. I believe that TemplateTamer would be more productive
than either FastTemplate or xslt.

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Medium to Large PHP Application Design

2003-01-09 Thread rush
"Nick Oostveen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> As such, my question is this: What methods and techniques can be used to
> help design and build complex, medium to large PHP applications that are
> not only scalable, but maintainable and extensible?  I'm looking for
online
> references, personal experience and opinion and even examples of open
> source code which you think demonstrate the above criteria on this one.  I
> think an extended discussion on this topic could be of great benefit to
> everyone.
>
> Obviously separating application and business logic from interface code is
> a given, but what about other things? Are the object orientated facilities
> of PHP currently worth really trying to take advantage of? If so, what are
> you doing to take advantage of them? Are design concepts such as design
> patterns relevant at this level?  What frameworks, if any, currently exist
> to assist in rapid, structured development, and what specific benefits do
> they bring to the table?

Hello,

It is not nearly covering all aspects you have asked about but here is  some
of my expirience.

I think there is a good usage of object oriented approach when working with
PHP. Projects I am working on are using TemplateTamer to separate interface
from the appearance from the functionality. Asifde from that it also
encourages usage of objects

First for each page you get php class descirbing it, and on larger projects
it commes naturaly to have a few base page classes defining common stuff
while each particular page class overides or adds its specifics to it. Base
class usually has bells and wistless for sessions, cacheing, translation,
general layout etc.

Second thing that usually happens is that we develop a lot of smaller parts
of the page as classes that can be used or refined. For instance various
widgets like menus, paged lists, some entity editor, etc.. , they all
naturally fit into the classes.

Third  place where it is a good isea to use classes is to access db objects.
Generally wrapping a something from the db into the object can be usefull in
order to siplify migration to another database, to have good loging,
replication etc.

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Template tutorials?

2003-01-10 Thread rush
"Chad Day" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm googling around for template tutorials and such after seeing a link to
> the Smarty template engine .. can anyone point me to any particularly good
> ones?  I've always been going with the 'one-file' approach .. which I
think
> it's time I changed.

you could take a look at the TemplateTamer http://www.templatetamer.org/

rush
--
http://www.templatetamer.org/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: php editor

2003-01-12 Thread rush
I think Scite (http://www.scintilla.org/SciTE.html) can do it.

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Making alternate rows of different colour

2003-01-17 Thread rush
"Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I put the output of the database query in a table. It works fine. Now I
have a need to make the alternate rows of a different color.
>
> Can someone please help me with the code?

See one possible solution (with TemplateTamer) :

http://www.templatetamer.org/index.php?AlternatingListExample

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: dreading OOP

2003-01-22 Thread rush
"Larry Brown" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> OOP in a couple of different places.  However, my mind apparently works
> different and I keep trying to relate the OOP structure to what I already
> know which equates an object to a function.  I am resolving to purchase a
> book dedicated to instruction in the inns and outs of OOP.  Specifically
at
> it relates to PHP would be great but my emphasis is towards something that
> teaches someone that is stubborn in his reliance on previously learned
> methods.  I hope this makes sense and I'm not alone on this. :)  Any
> suggestions would be greatly appreciated!

My advice is somewhat radical: "learn Smalltalk". Since it is a very pure OO
language, you will barely be able to do anything until it "snaps" to you.
But when it does, it will becomme cristally clear, and you will learn to use
OO very well in languages that let you get away with non OO. The
disadvantages of this approach is that you will have to invest considerable
effort, and that you might like Smalltalk too much in the and ;) . For some
Smalltalk resources see: www.whysmalltalk.com

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Is there a way to undo the md5() encryption??

2003-01-22 Thread rush
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!  Is there a way to do the decryption of the encrypted data with the
use
> of md5()??

nope, that's way it is called one-way function. But if you could, I assume
it would be worth a big pile of money ;).

rush
--
http://www.templatetamer.org/

>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: xtemplate & windows

2003-01-26 Thread rush
"Cenk Uysal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> i try to run xtemplate on my windows machine but i get errors such
> like :

hi, I am not fluent with xtemplate, but it does not seems likely that your
problem is related to windows. It could be that you have not installed
everything needed on it?

rush
--
http://www.templatetamer.org/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] [ANN] TemplateTamer - release candidate

2003-01-29 Thread rush
TemplateTamer is a tool for creating and maintaining a template based
dynamic PHP web applications, with clearly and completely separated code
from the html design. As such it is a great tool for complex dynamic sites,
especially where Designers and Programmers work together on the creation of
the site.

It's main parts are:

* Integrated development environment (IDE)
* Framework for development of template based applications
* Code generator
* Template engine

The release candidate can be downloaded from TemplateTamer site:

http://www.templatetamer.com/

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: how to write clean code.

2003-02-02 Thread rush
"Anders Thoresson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Where can I find good guidelines on how to write PHP-code that's easy to
> read for a human?

it is also good idea to separate html from the code, for instance by using
some template engine.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: PHP Framework

2003-02-03 Thread rush
"Karthikeyan.Balasubramanian" <[EMAIL PROTECTED]>
wrote in message 024e01c2cb8c$bc54cfd0$[EMAIL PROTECTED]">news:024e01c2cb8c$bc54cfd0$[EMAIL PROTECTED]...
>   I finally decided to upgrade my PHP.  Just want to know your thoughts on
> which Framework is the best with a clear seperation of content from
> presentation.
>
>   Please let me know which do you think is the best and why?

Hello


I would suggest that you try the TemplateTamer, it offers separation of html
from the code. The framework keeps those two in completely separate files.
The html template files are very simple, with only a few marker constructs.
What is important there is no code inside the templates, since everything
needed to control them is located in php logic files.

Aside from that TemplateTamer lets you organize your templates, and provides
a lot of automation while working with them. Finnaly, it usually enourages
OO based development of php apps (althoug this is not a strict requirement).


Other well know and tried options would be Smarty, xml+xslt, ..

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP Framework

2003-02-03 Thread rush
"Maxim Maletsky" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I agree, I'd go for Smarty. Though, on the other hand, I often see no
> reason for using the Templates of any kind. Why? Because you stil get to
> hard code the tags in it. Not making that much sense as many think. You

hi,

give a shot to TemplateTamer, in it looping controls, conditionals, reside
in php logic files where they belong not in the html template.

rush




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Best way to include multi-lingual support in an application.

2003-02-05 Thread rush
"Jj Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am currently planning an application. I would like to include multiple
> language support so that I can have a german or french version down the
> track if need be.
>
> What are your views on the best way to include the ability to "add"
> languages after it is complete?

With TemplateTamer, you mark every item that needs to be translated as
{#WORDKEY}, and the framework will do a call back to your page class to get
a correct translation for the WORDKEY, and substitue translation in the
output. In your app you can then detect the current language setting, and
return appropriate translation.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: 3 tier web development

2003-02-07 Thread rush
> 1. How one can seperate HTML and PHP (or any other
> programming code).  Is there anything in PHP so i can
> seperate Interface layer and programming logic layer?

You can do it by using some template engine or with xslt.

I would suggest that you try TemplateTamer (link is in the sig), since it
offers very strong separation, encourages class based development, and
includes development environment to do so. Other well known options include
FastTemplate, Smarty, ..

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Class Interfaces

2003-02-09 Thread rush
"Laborda" <[EMAIL PROTECTED]> wrote in message
005201c2cfe9$47c704b0$ad629c40@galaxy">news:005201c2cfe9$47c704b0$ad629c40@galaxy...
>
> Hello,
>
> I have a question.. Does PHP have support for Class Interfaces
declaration?
> What in Java would be:
>
> ? If not, how can I do this?.. Thanks a lot.

Well, interfaces are needed in Java since it is a statically typed language.
For dynamically typed language like php there is no need for it. If you
would like to do it just for the documentation sake, than write abstract
class like:

class pehro_interface {
function a1() {}
function a2() {}
function a3() {}
}


rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: any windows php developers out here?

2003-02-09 Thread rush
It works reliably. I have used Abria Merlin form abria soft to install
apache, php, mysql, and various utils on my machine. It is single install
that installs without problems. The php version inside is a bit dated, but
you can later on easily replace it once everything is connected and working
properly.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Alternating Row Colors in PHP........

2003-02-09 Thread rush
"Cf High" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

> I'm coming from Cold Fusion to PHP; in CF I could alternate rows with the

Here is an example how to do it with TemplateTamer:

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3538

same code can also be used for more sofisticated effects, and finer
formatting.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Templates

2003-02-14 Thread rush
"Darren Young" <[EMAIL PROTECTED]> wrote in message
000e01c2d3b3$a88217e0$[EMAIL PROTECTED]">news:000e01c2d3b3$a88217e0$[EMAIL PROTECTED]...
>
> I'm looking around for some options on using templates with PHP. I've
> used several Perl solutions in the past, but never tried it in PHP.
> Digging on the web yields several options so I'd love some thoughts or
> comments. The real driver is that the basic site design could change
> over time and I'd like to have the basic HTML in the templates, and the
> real logic in the PHP code.

Hi,

take a look at the TemplateTamer (link is in the sig). Aside from beeing
just template engine, it commes with complete environment that eases many
chores while programming with templates. It is very easy to see the
structure of your templates, and to use them. Also TT offers very strong
separation of templates and logic, and does not suffer from code creeping
back into the templates.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Forms Question

2003-02-15 Thread rush
"Beauford.2002" <[EMAIL PROTECTED]> wrote in message
000701c2d51c$616206d0$6401a8c0@p1">news:000701c2d51c$616206d0$6401a8c0@p1...
> Im trying to figure out the best way to do the following.  I need to have
a
> series of forms that when the user finishes the first part of the form he
is
> sent to another page where a second form is filled out, and then a third.
> Making the forms etc. is no problem, what I'm not sure of is how to keep
the
> data from all forms so it can be displayed at the end. I don't want to
have
> anything written to the users drive, or to the server - so this
information
> would have to be kept in memory. Would an array work in this situation?

how about using layers and javascript to switch between the parts of the
form. User will have wizard like behaviout (form with next and prev
buttons), and to the php, everything will be submitted as one large form.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: smarty vs. patTemplate vs. includes - newbie q

2003-02-19 Thread rush
"David Caplan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
> From what I understand, both smarty and patTemplate are popular and both
> have supporters and detractors, is one template significantly faster or
more
> stable than the other?
>
> If I just use includes, am I gonna run into problems, other than the loss
of
> elegance and some abstraction that a template system might offer. My site
> will have approx 100 pages, with a peak of 600,000 hits per day.

You can also consider TemplateTamer, it also generates compiled code, and
can support various cacheing approaches.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: smarty vs. patTemplate vs. inclu

2003-02-21 Thread rush
"Awlad Hussain" <[EMAIL PROTECTED]> wrote in message
00d801c2d9a7$05c5f360$0200a8c0@GATEWAY">news:00d801c2d9a7$05c5f360$0200a8c0@GATEWAY...
> David,
> Is there any point using smarty on s small site? eg: website consists of
6/8
> pages?

If you are allready fluent with your template engine, yeah, why not,
especially if you have some more complex logic on those 6/8 pages. I have
used TemplateTamer on such sites.

But if you need to learn engine just for that site, that can be overkill,
but then again, you can use that knowledge in the future for some other
sites.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] creating flat versions of php pages

2003-02-24 Thread rush
"Electroteque" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i dont understand what you mean , anyway, this is a short term situation
as
> the site is pretty slow and cpu intensive,  the setup is a sun solaris box
> running apache 1.3 and php3 , just had a meeting today to push through
apahe
> 2 and php 4.3 ut wont happen for a while , we need a solution in the next
> month, we basically need a system that will trawl the site or the latest
> news and flatten them so they are less taxing on the server as our last
time
> cost us dearly , 170,000 hits in one day !
> so would flattening to html solve our problem or is the server going to
get
> hammered anyway ?

hmm.. 170.000 a day should not be too much for the dynamic pages, but back
to your original question. It may be a bit rude, but how about using
something like http://webstripper.net/ ? it can save the whole site
including various parameters to the pages. The page names are far from
pretty though :)

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: classes and functions in include files

2003-02-27 Thread rush
"Sunfire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> just a fast question here.. and the lotic probably isnt to bright on my
part
> and i think i know the answer to this question too but just to make
sure...
> if you can include variables in an include file and use them outside that
> file (in the file that includes that file that is) then can you do the
same
> with classes and functions

yap.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [ANN] TemplateTamer 1.0.3 released

2003-03-03 Thread rush
Hello,

After several months of beta, TemplateTamer 1.0 has been released, and it
can be downloaded from the TemplateTamer web site:
http://www.templatetamer.com/

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] question about smarty

2003-03-04 Thread rush
"Sunfire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> k then that wont be able to be a choice for me then... will try maguma
> studio then..

I think you have misunderstood the posting, since Smarty can be used in most
web hosting environments. Anyway if you would like to evaluate other
options, you can also give a shot to the TemplateTamer.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: creating class

2003-03-05 Thread rush
"Awlad Hussain" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am very new to class, trying out this class, but it doesn't seem to
display anything?
>what i am donig wrong?

how about this:?

class site_init {
var $midgard; // array

function site_init()
{
echo 123;
}
}

$new_midgard = new site_init();


rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: newbie OOP?

2003-03-14 Thread rush
"Bobby Rahman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am new to PHP and was wondering whether to develop small applications
(20
> pages ) is it worth it to use OOP?

My take is that on 20 pages especially if they behave like app, it makes
sence to use OO.

> In particular I am having troubles breaking my application design-wise,
into
> classes and operations.

I could give you some hints how would you go on dividing things with
TemplateTamer.

When working with TT, you need to define a class for each page on your site,
and this class provides the data in the run time needed to display the page
(i.e. it provides values for the variables, and which templates get
displayed, etc).

First you would define base class for your site, that would contain handling
of elements common to all of your pages. For instance menu, footer, you get
the idea. For the parts that change from page to page (perhaps title, or
main content in the middle, or..) you would call a member function leaving
this function responsible to return correct values.

Now when defining the class for particular page, you would go on by
extending this base class for this site, and automatically inherit common
behaviour. For things that are specific for this page you would overide
member functions from the base class and provide specific implementation
(for instance function returning a middle content).

Now dependning on the size and complexity of your site, 2 things would
probably come naturaly. One is that you would refine your class hiearchy of
pages. So you would for instance have one base class, then for instance
class for the user pages, and class for supervisor pages, both of them
extending base class. Now all user pages would extend user page class, and
all supervisor pages would extend supervisor page class.

Anothe thing that could happen is that you would define classes for parts of
your interface, for instance toolbox, or similar. When you do so, you will
be able to configure them and insert as components in each particular page.

Probably it does sound like a lot of complication, especially in the
begging, but once you get a hang of it, it is a real time saver, an let's
you concentrate on your applications behavior and functionality. If you need
some more advice how to use TemplateTamer and OO togehter, drop me an
e-mail.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Code and Good Design Methods

2003-07-13 Thread rush
"Dan J. Rychlik" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am reading PHP and MySQL web development 2nd edition book.  Chapter 6
talks about displaying >dynamic web content using class objects.  For the
type of project that I am building, this is not optimal.  >How do I keep my
self from having html mixed with my PHP code?  In other words how do I
serperate the >two.  I need to concentrate on writing good code and not
designing a nice looking website.  (someone else >is going to do that)


You could try TemplateTamer, it offers good separation of html and code, has
"clean" templates, and it commes with IDE to support template based
development.


rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to display?

2003-08-11 Thread rush
Here is small example on how to do it with PHP MySQL and TemplateTamer:

http://www.templatetamer.org/index.php?SimpleMySqlRowList

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: suggestion on php-editor?

2003-08-14 Thread rush
"Louie Miranda" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> But i was wondering if you guys have any other suggestions?

For the extensive list see Keith's listof editors:

http://linuxbackup.co.uk/

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP - Interpreted or Compiled Language

2003-08-14 Thread rush
"Binay Agarwal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

>Is php Interpreted language or Compiled Language like C or C++.


Beeing compiled or interpreted is not property of language but of
implementation. For almost all languages you have implementations from pure
interpreters to pure compilers, and often some blends of the two. For PHP i
believe the first implementations were pure interpreters, and nowdays Zend
engine is compiler that generates some form of opcode that gets interpreted.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: back button and forms

2003-08-20 Thread rush
"Tim Winters" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there any way to avoid this from happening?

instead of POST, you could use GET as form method.

More nicely, but also much more work, is to use N layers on one page for
each group of inputs and to switch layers by javascript. That way, all data
will be posted as one big form, in single action. This would also solve
nasty problem your solution has if user clicks on new window in the middle
of forms and contionues to enter different data in both of windows, this is
quiote likely to confuse dta you are storing to the session.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Which CMS (if any) should I use for my application.

2003-03-18 Thread rush
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Should I just do this myself ?

I do not think you will find something allready done, so probably you would
need to wrap something yourself. Some template system will propably come
handy though

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Anybody have any thoughts on Smarty?

2003-03-19 Thread rush
"Charles Kline" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Was reading this and it sounds really cool. I do work as a consultant
> to designers and thought this may be a good way to improve work flow? I
> have read mixed thoughts on this, but was wondering what this list
> thought? Anyone using it? Real world?

I think that Smarty can definitely help workflow, especially in
designer-programer teams. For that situation, maybe you could also take a
look at TemplateTamer, which I believe has stricter separation of code and
html.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: fast template class

2003-03-22 Thread rush
"Gilberto Garcia Jr." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I´m a newbie on this class. But i´m getting this error.

can you post snippet of the code and exact error that you get?

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: odd problem

2003-03-24 Thread rush
"Sebastian" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> having a little problem. I know i have a connection to the mysql database
> but for some reason i can't get this to update the database when submit is
> clicked. perhaps i am overlooking something.. Here is part of the script:

one of the ways to debug such problems is that you echo sql statement you
are sending to mysql. In 99% of the cases you will spot some syntax error in
it missing a quote, or some value not filled in properly. Once you find out
what is wrong with sql statement, you can go on, and find out what caused
it.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Help me pervade Bristol City council to use PHP

2003-03-24 Thread rush
"Ben Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Am talking to a part Bristol City Council in the UK.  To persuade them to
> use PHP I need to find some high profile reference sites.
>
> So..
>
> Can anyone give me some sites who use PHP that the people at Bristol city
> Council would of heard of (i.e. high profile sites).

It is probably recently overused (and misused), but Yahoo is an example that
they should have heard of. A few months ago Yahoo anounced that they plan to
move to PHP.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Please point me in the right direction

2003-03-25 Thread rush
"Jerry" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> As I am very unfamiliar with the PHP environment, can someone point in the
> right direction? If I use PHP for the front-end, what is the best tool to
> create the CGI? I was considering using Python, but would Pearl be better?

OO in PHP is less than perfect, but in many cases you could probably stick
to the PHP, and avoid a hassle of mixed system.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] gd library + animated gif

2003-03-28 Thread rush
Can GD library produce animated gif's?

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: XML+XSLT or Smarty again??

2003-03-29 Thread rush
"Hardik Doshi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> During reading of XML+XSLT and Smarty, i have
> following two questions.

> Actually i dont know much about Advantages of XML+XSLT
> in web based application. What i know is Smarty's
> advantages. So if you have any idea then please let me
> know. I am more and more concern for perfect selection
> of template engine.

Hello,

>From my point of view, both XML+XSLT and smarty have "dirty" templates, in
sense, that their templates contain both html, and controling code. While
some people consider this nice, I prefer templates that do not contain logic
and controling code, so this is the way TemplateTamer works.

With TT templates contain only markers fot templates and variables, and
programmer is responsible for returning and array containing information
about templates to be displayed and values of variables, and TT framework
does the rest. This does have some resemblance to XML+XSLT approach but with
following differences:

a) there are no contol structures (or code) inside of templates
b) data tree is easier and much less costly to asssemble since it is
implemented with simple arrays
c) all other glueing is done by TT framework.

In addition to that, TemplateTamer offers:
* IDE, that can keep track of the project,
* tool to visualize template structures (which commes handy in more
comlicated and nested structures)
* example code generator.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
"Pete James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This xml+html+xslt paradigm provides great separation, especially when
> viewed in light of the traditional xslt=html+code method.  I've used it
> with good success.

This does relieve the problem of dirty templates, but with some costs in
inreased complexity. With TT you would have less things to do to achieve
similar, but I assume that in the end it is largely a matter of taste and/or
preferences.

Sincerely,

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: XML+XSLT or Smarty again??

2003-03-31 Thread rush
"Pete James" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This xml+html+xslt paradigm provides great separation, especially when
> viewed in light of the traditional xslt=html+code method.  I've used it
> with good success.

This does relieve the problem of dirty templates, but with some costs in
inreased complexity. With TT you would have less things to do to achieve
similar, but I assume that in the end it is largely a matter of taste and/or
preferences.

Sincerely,

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fast Templates error in PHP 4.3.1 ?

2003-04-06 Thread rush
"Travel Jadoo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> PHP 4.3.1 apparently doesn't allow anymore assigning of the same
> function name twice which FastTemplates still does around line 630 with
> function "clear_assign" for a perl module alias.
>
> So Fast Template users beware!

but the function in queston is very rarely used, and in most installations
can be renamed without problems.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread rush
"William N. Zanatta" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>   It is a known issue that function calls are expensive for the processor.
>
>   The OOP let us better organize the code but, thinking in function (or
> method) calls it may be more expensive than in the procedural form.
>
>   My question is, has anyone made any tests regarding the performance of
> OOP versus procedural language? Is it a good choice to code in OOP with
> PHP ?

I would say, that web app model is so inefficient in itself, that you can
hardly do anything to make things significantly worse or better performance
wise. Also OOP is extensively used in other environments, and unless you are
coding critical device drivers, it is rarely to "expensive" in terms of
processing time.

So my advice would be use OOP, and take benefit of better organization of
your code.

Just my 2c.

rush
--
http://www.templatetamer.com/





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP OOP x Procedural Performance

2003-05-30 Thread rush
"Joe Stump" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sure ...
>
> I'm of the belief that OOP (in PHP anyways) has great use for core
> libraries. Core libraries, by their nature, generally don't output HTML.
> It's a core libraries job to separate logic and presentation. How portable
> is your library that outputs HTML for a guy who wants PDF/WAP/XML output?
>
> For instance, I have a product class that does various things to format
> product *data* prior to my procedural scripts putting it into my Smarty
> templates. If that product class outputted the data in HTML it would be
> useless to me for WAP users or a script that generated PDF versions of our
> online catalog.

Core libraries are of course first candidate for OOP, but I think there are
many other places where you can use it successfully. Take for instance how
it is used in TemplateTamer.

In it, you define a class responsible for the generation of the page. In
typicall usage you have a common class that all page classes inherit from,
and which defines elements of page common to all pages on the site, and
specific page classes implement only the parts they differ in. When the site
grows, it is common to refine the hierarchy of page classes, so you have one
page class on the top, then a few below it describing main sections of the
site, and then on the bottom concrete page classes.

Another OOP usage in TT can be in creating classes that represent GUI
components. For instance on one site I have worked, I have created a
JobAdForm object, that handles for reponsible displaying form and editing of
JobAd object. Than when I needed similar but litle more extended version for
superuser pages, I have just created a subclass SuperuserJobAdForm, and
overided necessary parts, but inhertied 95% of code.

So I think there is usage for OOP also in "gui" parts of the code, where it
can also help better organization of code, and reuse between the pages or
components on the same site.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: call-time pass-by-reference feature really deprecated?

2003-06-19 Thread rush
"Dorgon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Will the pass-by-reference feature really be dropped?! Many software
> design patterns wouldn't be possible anymore! It's an essential feature.

I think call-pass-by-reference is going away, but pass-by-reference is going
to be default in PHP5.

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Website templating schemes

2003-08-27 Thread rush
"Joel Konkle-Parker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm trying to make a PHP-backed website, and I'm trying to decide between
two
> templating schemes:

Neither sounds very exciting to me :) . While PHP is often considered as
template system in it self, I think it is is not very strong, or efficient
one. So if you would like to use templates you could consider some add-on to
help you out. On the other hand if you do not like additional template
systems for whatever reason, I am surrendering immediately to prevent holly
war :)

rush
--
http://www.templatetamer.com/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Website templating schemes

2003-08-28 Thread rush
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Wow... where'd you pull that from?? Any facts to back that up? :)

:) no, I was think in terms of how easy is to write template oriented
software, and how flexible te results are, which are all pretty subjective
things, that is why I used "I think" fomulation :). Anyhow, it was not my
intent to refer to the execution efficiency. My appologoizes for beeing
misleading.

> FYI: I've got a template benchmark site running at
> http://sepodati.realxl.net/tpl_bench/
>
> Any interest in looking over the code and adding a TemplateTamer
> benchmark to the list?

I'll take a look, but I am not sure I could fit into the structure of the
benchmark. Problem is that this benchmark oriented towards the simple
templating class (or functions) that user has to initialize and make some
calls in order to has his variables substituted. This benchmark then wraps
this substitution calls in the loop to see how efficient is template engine
at simple variable substitutions.

TemplateTamer works other way around, it basically provides you a light
framework, and code generator. You as a progaramer have a duty to provide
the data for the variables (by returning them in the array as result of the
getData() function), and there is no more you are doing. You do not
initialize templates, you do not load various template files into the
template engine, you do not assign variable one by one, you do not call
substitute function, you do not echo the youtput in order for your page to
appear. All this is handled by code that was generated by TemplateTamer or
by framework. Actually first (internal) versions of TemplateTamer did not
have its own template engine, they were just using FastTemplate for the
task.

I believe such approach can be a real time saver and more easy way to work,
but it seems difficult to fit into your benchmark, but I will give it a try
if nothing else to get one more link :) . Another problem is that thing that
is benchmarked is plain page without structure. No subtemplates, not
conditional parts, no repeated subtemplates. And I believe this is where the
real action is for the templates, and this is all you have in the real world
situations. Also I believe that in real world situations, time that is spent
in the any template engine is not that important, usually the bottleneck is
somewhere else, database most usually. But I am driffting.

Thanks for the response!

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: allow_call_time_pass_reference?

2003-08-30 Thread rush
"Armand Turpel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> Why allow_call_time_pass_reference is deprecated? I mean it should be the
> choice of the programmer to make use of  pass by reference or not.

maybe it was a problematicd idea to have call time decision in the first
place, and now they want it to put it to rest somehow. In all other
languages the decision is in the signature of the function, and there is no
ability to to have call time decision. Probably it causes implentation
problems and inconsistences, and needs to be eliminated before new 5.0
semantics is in the place.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Strange error

2003-09-16 Thread rush
"Sid" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello everyone,
>
> Am I having a bad day or WHAT! I have exactly 5 lines of code as follows
> what is the problem here.

works fine at my localhost.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Language filter

2003-09-16 Thread rush
"Kris Reid" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I have a website with a standard html form on it. Every now and then some
jerk submits the form with some >dirty words. This is then seen by my
clients which as you can imagine is very unprofessional.

>Any ideas?

I think you will hardly cover all dirty or unwanted words. How about having
interface for editor to allow posting to appear on the site, so the post
will not appear until is allowed by editor?

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to comment out chunk of html/php mixed code?

2003-09-16 Thread rush
"Raditha Dissanayake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Wrong approach all together. Start using CVS

and do not mix php and html - use templates :)

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Basic Framework

2003-09-18 Thread rush
"Lee Herron Qcs" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm not fond of the phrase "framework," but for lack of any other term,
this
> is what I use ..
>
> Without going to a bloated framework such as fusebox or MVP, have any of
you
> put together a simple structure to allow very basic template and module
> inclusion with menuing?

Some of my users find framework around TemplateTamer very light and simple,
yet helpfull. You could consider trying it for yourself, and I will be happy
to help you out with questions.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Cleaning up my messy code

2003-09-30 Thread rush
"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm not looking for an IDE or code generator so much as some practical
> advice for organization and framework when developing a larger app. I know
> of PHP Fusebox, having programmed with Cold Fusion fusebox for a while,
but
> it seems like that might be too much. Maybe I just need a sensical,
> practical approach to application layout. What do you all do? How can I
> learn to be a better PHP programmer in this regard?

Try giving a TemplateTamer a shot. It is not too big, but it can help you
organize yourself better. On it's wiki you will find some examples and
tutorials.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Building associative arrays

2003-10-03 Thread rush
> I'm trying to build an associative array from a database result. How can I
> assign a new key and value pair
>
> eg
>
> mysql_fetch_row etc
> {
> dbRowCol1 = myarray(key)
> dbRowCol2 = myarray(value)
> }
>
> You get the general idea. Can't find any examples. I'm trying to lookup a
> key and retrieve the corresponding value.

is this what you are lookin for?

 mysql_fetch_row etc
 { //let's assume $row is result of mysql_fetch:row(..
$key = $row['key_sql_col'];
    $value = $row['value_sql_col'];
$myarray[$key]=$value;
 }

rush
--
http://www.templatetamer.com/

"Chris Neale" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] NEW: XML Application Objects

2003-10-04 Thread rush
"Terence" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> <>
> If you *do* finally decide to master XSLT, you have to conclude that
> *any* other templating system is a complete/utter waste of time. (all
> authors of ``yet another PHP templating system'', please try not to be
> offended). I'm not talking about features/functionality either (for
> which XSLT is more than adequate), I'm talking about sheer
> bothersomeness. ie. I'm fundamentally lazy and I couldn't be bothered
> learning "snazzy g.o.a.t. [proprietary] templaty goodness system" --
> "crappy" or otherwise -- I don't care how fantastic it is. The reason
> why the PHP template has been re-invented so many times, is becuase
> there is something missing - IMHO, XSLT fits that gap more than "good
> enough". And since it is a standard, it will only get better -- it has a
> future. And that, my friends, it good enough for me (being that I am
> lazy and all).

Well, I completely agree with you that there is no "one size fits all"
solution for templates, and that one should choose what suites him best.

Anyway, in similar "very personal" way, especially since I am naturaly
biased, I will like to point out my reasons why I prefere my php template
system compared to the xml+xslt combination:

a) xslt templates are "fat" or "dirty" ones if you will, meaning they
contain code, effectively nullifying my major reason to use templates:
separation of html from code. Some people prefer "fat" templetes and try to
stuff whole presentation logic in them while only models reside in php, but
prefer "thin" or "clean" templates, where template is basically resource
produced independently by designer, and php runs presentation and model
code. With fat templates, they usualy get to complex to be coded by web
designers, so they have to be poked by programmers, which means that it is
much more difficult to split the job. Also means that programmer has to code
in 2 languages, php, and in some template language, while in thin templates
model he can code in one language domain.
b) working with xml+xslt requires more footwork than with TT.

Well, again, it is just my reasons. Other people may have other needs and
preferences.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: What Is Scalability?

2003-10-20 Thread rush
"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How do you define scalability? What factors do you consider when you
declare
> whether a particular technology is scalable? Do you think PHP is scalable?
Does
> Yahoo?

Well, from I think that your approach is interesting, especially with 3
graphs with kinds of scalability. Anyway, I am not sure one can draw such
graphs for just technologies like java or php. Maybe for some specific app
it can be done. Even then one should be quite causios not to compare apples
and oranges, and also to measure scalability in really important matters.

Also there is one trivial kind of scalability that is often found: when some
solution does not scale at all. You can put as much servers, processors,
ram, you are still stuck. Notorious and overused example is "delivering the
baby" problem. You can engage as many women as you wish, it still takes a 9
months. Since people have often been caught in the situation with
technologies where no adding of resources can make difference, they are
content that there is at least some possibility to scale, so that they say
"this technology can scale" to differentiate it from complete dead ends.

rush
p.s. I really enjoyed your book :)
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Read a file, extract and echo some information

2003-10-21 Thread rush
"Php Webmaster" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Anyway, the following code is inside of home.php:
> As you can see, the above code will not work as the $title variable has
not
> been set yet. So, I need a way of opening up the home.php file, extracting
> the line containing the $title variable and putting that information
> inbetween the  tags.

I do not completely get why are you doing things the way you are doing and
what exactly you tra to accomplish, but I guess you could have home-head.php
that defines the varibale, and include that before you use title variable.

But it seems to me that in the longer run you could consider some php
template system to approach such problems.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How can i count time it taked to render the page?

2003-10-26 Thread rush
"Bas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Any help appreciated.

here is one general article about it:
http://www.phpbuilder.com/columns/akent2926.php3

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Templates/Separate content from presentation

2003-11-01 Thread rush
"Pedro Pais" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've coded in PHP for a while, but I had to leave it for some time. Now
> I'm back, and I'd like to know what's currently being used to separate
> content from presentation, besides Smarty (that seems to be Google's top
> choice)?

Try also TemplateTamer, it comes with dev environment for tempalte based
development.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: High bandwidth application tips

2003-11-07 Thread rush
"Luis Lebron" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have been coding php for a few years now, but I haven't build a "high
> bandwidth" application. I am currently working on an application for a
> customer that may have a very large amount of users (10,000 or more
> according to the customer).  Are there any good reference books, articles
> and general information on building such a site. I have been "googling"
for
> a while but have found anything on this particular topic.

Well, here are some, somewhat ordered by importance:

* use recent mysql 4.x The new versions have ability to cache results of
often used queries, and return the results very fast without even touching
the disk. Note that this is much better for web apps than usual query
cacheing that many databases offer.
* mark directories with static images as cacheabe.
* use page output compression on your pages.
* if you have some parts of the page(s) that are expensive to calculate
introduce some cacheing mechanic in your app.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: I need answers for the questions

2003-11-18 Thread rush
"Arivazhagi Govindarajan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> PHP Questions

This would not be homework or exam questions, right?

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP IDE?

2003-12-14 Thread rush
"Jough Jeaux" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Was wondering what everyone's favortie IDE is for
> coding in PHP.  I've got a big PHP project in the
> works.  I'll be doing alot with it and am looking for
> ways to boost my productivity.

If you are going to work with templates, you can take a look at
TemplateTamer, which has IDE geared for such development.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP IDE?

2003-12-15 Thread rush
"Peter Walter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Rush,
>
> templatetamer looks like an environment that I would be interested in
> using; however, what support resources are available for templatetamer?
> Is there a news server, bulletin board, or other help resource for
> people new to templatetamer?

Hello,

currently there is only Wiki, and mail support. However, to compensate, I
try my best not to affer only answers to strictly technical support
questions, but also to all various questions on how to do something with TT,
or how to approach some problem with it. Quite often I compile answer to
such question and put it afterwards on the wiki as an example, so I have
double benefit from it. In the future I may open a mailing list or something
similar.

Hope that helps, and if you have any questions please do not hesitate to
mail me.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php/mysql data display

2003-12-18 Thread rush
"Jlake" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a small database that I want to display data from. in such a way
that
> it shows shows in a table with the table header being the department
> category and the table cells being the categories for each department. I
> have no problem connecting to the database) I imagine that I will need
> nested loops, but I haven't seen a tutorial showing quite what I am
looking
> for. If anyone can point me in the right direction that would be great.

Maybe this example would be of some help:

http://www.templatetamer.org/index.php?MySqlRowList

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP Template Function

2003-12-19 Thread rush
"Cameron B. Prince" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Basically, a directory was defined within the webserver to have a
> PerlHandler, Embperl::Object. When any page in or under that directory is
> called, Embperl::Object would look for template files in the current
> directory and go upward in the tree until they are found and
prepend/append
> them. There was no code or includes required within the pages themselves.

In TemplateTamer, for each page you define the class that is responsible for
handling it. In typical site you use this to build a hierarchy of pages
something like below:

MySitePage
--UserPage
--NewsPage
--ArticlePage
--ListPage
...
--ContributorPage
--EditNewsPage
...
--AdminPage
--AddUserPage
--BackupPage
...

You catch my drift. Then NewsPage inhertis from the UserPage, and
overides/adds functinality specific to itself, while keeping most of the
implementation from the parent UserPage.

The organization is not per directory, like in your example, but TT lets you
keep your projects files in neat bundle, and helps you with house keeping
with template files. It also lets you see your templates in tree view, sith
all variables and subtemplates.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Small riddle with classes and references, or bug?

2003-12-22 Thread rush
Hello,

I have a problem understanding following chunk of code. It seems that global
$rme does not remember an reference to $this, but instead it is remembering
null or something like that:

someInstanceVar =77;
}

function report() {
global $rme;
echo 'X';  print_r($rme); echo 'X';
 }
}

$a = new A();
$a->rememberMe();
$a->report();

?>

This little script outputs:
XX

While I would expect it to return:

Xa Object ( [someInstanceVar] => 77 ) X

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Small riddle with classes and references, or bug?

2003-12-22 Thread rush
"Messju Mohr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> this creates a reference from $rme to $GLOBALS['rme']
>
> > $rme = & $this;
>
> this create a *new* reference from $rme to $this. so only a local $rme
> is referencing $this now.  change the line to
>
>   $GLOBALS['rme'] = & $this;
>
> to get the expected behaviour.

Thank you very much, I was not aware that global $something is just a syntax
sugar for reference into the $GLOBALS array.

Very spookey indeed, but thanks again :)

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP 5 Book

2004-01-22 Thread rush
"Donald Tyler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Anyone know if Rasmus (or anyone for that matter) is writing a book on PHP
> 5? And when it might be available?

Core PHP Programming third edition by Leon Atkinson covers the PHP 5 (in
state it was when the book went to press).

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Using templates (Code & User Interface)

2004-01-24 Thread rush
"Hamid Hossain" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Always I have a problem that I don't know how to make my code away from
the
> user interface files.
>
> I tried to use some template classes, but I did'nt like what I tired
because
> some if statments are used inside the template.

Maybe you could try to use TemplateTamer. With TT there are no statements
inside the template (like if loops etc), in template file there are only
begin i end markers which show where some template starts and palceholders
for variables, and that is all. All program logic is stored in separate php
file, and programed in standard php.

Aside from that TemplateTamer commes with IDE to develop in which shows you
structure of the templates in tree like view, lets you conviniently edit
template and coresponding php file, keeps account of all files in the
project, and even has some rudimentary vizards that can offer you some code
that fits your template.

So if this sounds interesting please try it, and also do not hesitate to
mail me if you have some questions, or need some advice.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using templates (Code & User Interface)

2004-01-25 Thread rush
"Robert Cummings" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A common misconception is that templates provide complete separation
> from logic, this is untrue. Template frameworks (the best ones) provide
> separation of business logic from presentation logic. So using an "if"
> statement inside a template is completely normal if it pertains to the
> display logic.

My opinon on that is that template system role is to separate presentation
logic from the html which can be considered as resource. Therefore I do not
prefer template systems with embeded control structures in it. But I guess
it is a matter of ones own preferences, and what is "right approach" for
them it is not necessary right for me and other way around.

I completely agree that it is also necessary to separate bussines logic from
the presentation, but I do not think this is a job of template system.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP editor that doesn't require installation

2004-07-24 Thread rush
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anyone know of a good windows PHP editor that I can run from a USB
> flash drive without installing it? A good stand-alone editor. I know how
> to use Vi, so I'll even take a copy of that (so long as it's got syntax
> hightlighting) so long as installation isn't required.
>
> For everyone else, yes, I know what editor you use, so you don't have to
> tell me. I agree that what you use is the best editor ever. No, really.
> Honest. ;)

scite, from the scintilla fame. TemplateTamer would also work fine if you
just copy the whole directory

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP editor that doesn't require installation

2004-07-24 Thread rush
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Scite is perfect. You rock. A single 364KB file with PHP source code
> highlighting, brace matching, (regex) search and replace and more. It's
> so perfect I won't even make fun of you for mentioning ...

there is also code folding if I recall correctly. Not making fun of me is
also kindly appreciated, although I am not sure if I would have deserved
that kind of attention in the first place :). Anyway, I suggest that we put
it to rest, and enjoy the rest of the evening/day (depending on the time
zone). Good luck!

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: If...Or...Else

2004-07-25 Thread rush
"Jason Davidson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> ah right.. :)
> Jason

OR has a very low priority , and right argument is not evaluated if left one
is true. In other words OR is here so that you could in pre exception
handling days easily write something like this:

mysql_query(...) OR die;

so as long mysql_query returns non false result , everything is fine and
script continues, if it returns 0 (false), script dies.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: If...Or...Else

2004-07-26 Thread rush
"Skippy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I just wanted to make things clear, because the way you said it above may
> lead to misinterpretations, such as believing that || makes all the
elements
> in a condition evaluate even if not necessary, which is not true.
>
> So OR simply has lower precedence than ||, but no other hidden properties.
>
> Any idea why the need to have two logical operators with the same meaning
BUT
> different precedences? I dig the need to put in OR as an alias, but why
> confuse people with the precedence issue? One would tend to think || and
OR
> are perfectly interchangeable.

with OR you can write (and even get desirable result ;) :

$resultSet = mysql_query( abla dabla ) OR die("something");

since it OR has lower precedence than assignment operator =

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP editor that doesn't require installation

2004-07-28 Thread rush
"Justin Patrin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Edit locally and FTP manually.
>
> Or get some kind of mounted FTP filesystemdoesn't Windows XP have
> something like this built in?

As far as I know, but there is great program that does that. WebDrive. A
true little gem I may add.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] For Loop Problems

2004-07-28 Thread rush
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> for ($j = 0; $j < 32; $j++) {
> for ($i = 0; $i < count($num_days); $i++) {
> $template->addVar("room_num", "ROOM_NUM", '101');
> $template->addVar("room_type", "ROOM_TYPE", 'NQQ');
> $template->addVar("guest_NameRate", "GUEST_NAME", 'NAVID YAR');
> $template->addVar("guest_NameRate", "GUEST_ID", 'fname');
> $template->addVar("guest_NameRate", "CLASS_GUEST", 'fname');
> $template->addVar("guest_NameRate", "ROOM_RATE", '49.95');
> $template->parseTemplate("guest_NameRate", "a");
> }
> $template->parseTemplate("guest_row", "a");
> }
>
> This inner for() loop works great. It creates a SINGLE row with 7 columns
of
> data (one column for each day of the week). However, the outer for() loop
> does not work like it should. I want it to display 32 rows of 7 columns
per
> row. But what happens is that on every row after the first row it appends
7
> more columns at the end of each row. So row 2 will have 14 columns, row 3
> will have 21 columns, row 4 will have 28 columns, and so on. I can't
figure
> out why this is. Either it's something new in PHP5 or I'm doing something
> really stupid. I am sending a PDF attachment of a snapshot showing a hint,
> made purely with HTML, of what I am trying to achieve. If anyone can help
me
> it would be greatly appreciated. Thanks guys.

I seriously doubt that php has problems to execute for loop correctly, you
are probably missusing your template system. Say what does "a" stand for in:

  $template->parseTemplate("guest_NameRate", "a");

if it stands for append, than maybe in second pass through the loop you add
7 fiends to allready existing 7, in 3. pass you add 7 more to 14 existing,
etc..

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Retrieving Stored Values for Dropdown Menu

2004-07-29 Thread rush
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all.
>
> I'm trying to retrieve values from a previously selected dropdown menu.
For
> text I simply use value="$Whatever"

here is small example on dynamically cretaing listboxes, and selecting the
items.

http://www.templatetamer.org/index.php?SimpleListboxExample

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Template Question

2004-08-14 Thread rush
"Jonathan Haddad" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
eval takes a string and evaluates it as PHP, which I also thought would
work.  But this is a file of mixed PHP and HTML.

I've designed it this way because I work with guys that are dreamweaver
crazy and want to do all their layout there.

Maybe I should parse the file, and eval() the PHP and echoing the HTML?
  Or is there a better way?

well, maybe you could search for php opening and closing tags (http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Compile

2004-08-16 Thread rush
"Watty" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is it possible to compile a PHP script? And if so, how?

there is a roadsend php compiler, but I have not used it myself.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Templating engines

2005-04-29 Thread rush
"Clive Zagno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I dont mind seeing php and html together, but designer generally hate
> it, so I would want to seperate php code from html as much as possible.

if this is your objective than it could be worthwile for you to look at
TemplateTamer, since it has very clean separation between those two, the
designers get their html template file, and you get your .logic.php file,
and it would rarely if ever happen that you edit each others file, or stomp
over each oders code.

In addition to that, not only that TT would separate php from html, it will
also not introduce new progaming constructs in template, as many "fat"
template systems do.

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Templating engines

2005-04-29 Thread rush
"Mattias Thorslund" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> (On the subject of templating engines, again.)
>
> I wonder what you folks think of the following:
> http://www.massassi.com/php/articles/template_engines/

hi!

It is nicely written, but actually, I think completely oposite from you. The
way I see it, the statement that "template system purpose is to separate
bussines logic from presentation", is the biggest missconception about
templates :)

Not that I think that bussines logic should not be separated from
presentation logic, it is only that I think that it shold be separated in
your php code design, l, not by the template system. And html, and code
should be separated, one is used to model static and visual concepts, and
another to model  dynamic concepts. And they usually get defined by people
with completely different skills and even mindsets.

Anyway, I do not think there is "One Right Way", of looking at templates. I
for one would never be satsfied with "fat" temlates like they are in Smarty
for example. But on the other hand I understand that there are people that
would never trade their Smarty templates. So as we do not get to exclusive
about how thing must be done, we could get along nicely :)

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Templating engines

2005-04-30 Thread rush
> You also need to recognize that you are going to need presentation-layer
> logic.  You simply can't get around that and you shouldn't confuse
> presentation-level logic, which can be quite complex, with the business
> logic behind your application.  I often see people make the mistake of
> trying to separate their PHP code from their HTML which the article you
> referenced hinted at as well.

Yes, I completely agree that business logic should be separated from
presentation logic. Only problem I have is that from there people go on to
conclude that html does not need to be sseparated from presentation logic.
As far as I see It is a very good idea to keep all 3 of them separated.
Bussines logic from presentation logic by proper organization and code
design in php, and presentation logic from html by template engine.

> My main issue with general-purpose templating systems is that they
> always end up inventing a new language.  It may start off as a subset of
> some other language, but eventually it turns into a new language.  In
> Smarty, for example, you now have stuff like:

They have to define markup language, (begin/end of template, free variable
marker), but we are not talking about that.

What usually is the problem is that template systems define its own
programming language, with constrructs for loops, if's and whole other bunch
of stuff to model dynamic behavior. And I agree with you that this makes
diffrence between using such template system, and just php as template
system much, much smaller.

Where I do not agree, is that "fat template" syndrom is common to all
template engines, and that it is inveitable. For instance my TemplateTamer,
is now almost 5 years old, and it never had any sign of becomming
programming language in it self, and it never will. It has a markup language
of only 6 idioms:





{VARIABLE}
{#TRANSLATE}

and there is no single sign of presentation logic inside html template, no
ifs, no loops, no calls to the methods or functions, nada. All presentation
logic is written in php, and in nicely separated logic.php file.

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Building array ?

2005-05-18 Thread rush
"Paul Nowosielski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> HI All,
>
> I'm trying to build an array of user id's. This is the code I've written
> that does not work.
>
> while($row=mysql_fetch_array($result)){
>// put user ID's into an array;
>$uidToAdmin .= array ("$row[user_id]");
>
>// for debugging
>echo "UID $row[user_id]";
>echo "AUID $uidToAdmin[0]";
> }
>
> So how can I continue adding to this array in the while loop?

 while($row=mysql_fetch_array($result)){
// put user ID's into an array;
$uidToAdmin[] .= $row[user_id];
}

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] OOP, Classes, Sharing Code

2004-06-29 Thread rush
"Joel Kitching" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What generic class name would be appropriate in this case?  I just
> can't see how I would link the two together.  Also, they would have to
> use fairly generic variables names if I were to do this.  Like using
> the variable $items for the array of classes of either albums or
> photos.

I am using AbstractItemList, and then subclass PhotoList, and others form
it. Abstract item list takes care of repeating items, pagination, and
displaying navigation between listing pages. Concrete classes know how to
display item in list (itemAsListElement()), know how many items there are in
total, and getNextItem iterator. There is a bit more but this should be
enough to get you started.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Storing website templates in sessions

2004-07-08 Thread rush
"Joe Harman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey everyone...
>
> I was curious if anyone out there has some pros and cons to storing a
> website template that is extracted from a mysql db and stored in a
> session... is this an efficient way to do it?
>
> also... does anyone know what the size limitations for a session would
> be?

I guess you could stuck them there if you really wanted to, but there is
some broken feeling about that. Like keeping your motorcycle in dining room,
you can do it, but it is a bit odd.

Keep templates in files, or if you are using Smarty or TemplateTamer in
generated php code.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Dynamic to Static

2004-07-16 Thread rush
"Ed Lazor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it
> statically in order for pages to display more quickly when visitors access
> the site?  If so, what solutions are you using to achieve this?

well, mysql query result cacheing is great preformance booster, and so is
any kind of php accellerator )which basically cache compiled byte codes).
Often turning on html compression has great effect on performance.

As for application level cacheing, if needed, I cache parts of the page that
repeat often menues, toolbars, articles, and store resulting html for them
in db, so that the do not need to be recalculated each time page is
displayed. (I use TT support for cacheing).

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Echoing Results in a Table

2004-07-16 Thread rush
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've managed to develop a query which pulls a finite number of records
from
> a table based on a query.
>
> What commends do I now use to present these results in a table...?

There are plenty of such advices, I assume google will find them nicely.
Here are few from TT site:

http://www.templatetamer.org/index.php?SimpleMySqlRowList
http://www.templatetamer.org/index.php?MySqlRowList
http://www.templatetamer.org/index.php?AlternatingListExample

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Book Required

2004-07-17 Thread rush
"Harlequin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> There's loads and loads of books available on the subject of PHP & MySQL.
>
> Does anyone have any recommendations...?

here are some:

http://www.templatetamer.org/index.php?RecommendedBooks

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: template and file read

2004-07-21 Thread rush
"Ee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Would this slow down the site?

yes, but in most cases this is not important since bandwith to the client,
and database queries have usually orders of magnitude larger bottlenecks.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Cacheing data form PHP script

2004-01-28 Thread rush
"Vincent Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi all,

At the moment, I store the HTML code to display the menu in the
$_SESSION['menu_cache']['menu_id'] var. And this works well! The pages are
displayed faster when the menu is in the cache, which is the expected
result!

What is your opinion about this?
Do you see any other way to 'cache' some content?

Could I use the $_ENV variable (or any other) to cache the menus accross ALL
visitors/users?

It depends if your menu is unique per user, or it is the same for all users.
If it is unique for each user, than storing it i session makes sense. If not
than you can store it in some file or table in the db. Beeing in one place
would make it easier to invalidate the cache since you would not need to
poke around all sessions.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PEAR] Re: Cacheing data form PHP script

2004-01-28 Thread rush
"Pierre-Alain Joye" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> ps: Rush can you use quotes in reply?

until this morning I was pretty certain that I can, however this last reply
and OE proved me wrong :)

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?

2004-02-02 Thread rush
"Cf High" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Having a good problem -- our hockey report site has jumped from 10
> gigs/month to 30+ gigs/month & growing.
>
> We're getting killed in bandwidth fees at the moment; barring switching to
> another host, will utilizing ZLIB compression significantly reduce
> bandwidth?

well it depends what uses most of your bandwith. If it is for images, then
compression will not help much since images are allready compressed. In that
case, you may save much more if you can put images in some directory and
tell apache to allow cacheing for that directory.

On the other hand if your bandwith goes mainly on thransfer of html source
for the pages then compression can shave up to 80% of your bandwith usage.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?

2004-02-03 Thread rush
"Cf High" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Question is, how to implement compression?
>
> Is it enough to just ini_set() zlib compression to ON? i.e. will all
content
> be automatically be compressed, or do I need to ob_start() &
ob_end_clean()
> at the start and end of each page?

I am not sure about ini_set, I am doing it manually, here is the article
which gave me directions:

http://www.phpbuilder.com/columns/argerich20010125.php3?page=2

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?

2004-02-03 Thread rush
"Ammar Ibrahim" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if this works for you, could you please post your story in the group. this
> is very interesting if you could save 50% of your bandwidth just by
turning
> the zlib flag :)

if you check amount of data that gets transfered from
http://www.moj-posao.net/ (once that images are cached, which is usually
imediately after the first page is loaded) you will see that amount
transfered is is in region of 10k, while the html source of the page is
about 50k. You do the math :) It is also has a great effect on page loading
time for dial-up users.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Zlib Compression || Implementation || Bandwidth Savings?

2004-02-04 Thread rush
"Cf High" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My lord, this rocks!
>
> Our pages load at least twice as fast now, and bandwidth will likely be
> reduced by at least a factor of 2.
>
> I would strongly recommend utilizing zlib compression functions to anyone
> looking to speed page delivery & reduce bandwidth!

I agree on that. It is funny that you often find people spliting hairs on
optimizing code like "but templates are slow" or even to the extreme "should
I use single or double quotes for strings?", while things like this affect
user expirience much, much more.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: multilingual website

2004-02-06 Thread rush
"Julien Dufourcq" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Or is there an other possibility?

with TemplateTamer, you will receive call back in method translate($key) for
places marked in template as {#SOMEKEY}, and the translation you return will
automatically get applied to the page.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Working with a Front Page developer

2004-02-11 Thread rush
"Chris De Vidal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can anyone recommend some template engines?  Or tips on using PHP to parse
> an HTML doc, replacing it with real data?

You could also try TemplateTamer, and I would be glad to help you out if
with it if needed.

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHp Books

2004-02-11 Thread rush
"Rajani Anand Iyer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can someone recommend some good books on PHP Advanced topics.

here is my (amazon) list

http://www.templatetamer.org/index.php?RecommendedBooks

rush
--
http://www.templatetamer.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Capturing phpinfo()

2004-11-24 Thread rush
"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> How can I stick phpinfo() at the bottom of a page in such a way that
> it doesn't display the data in the page, but instead creates a log file
> and dumps everything in there)  The log file should either be appended
> to every time, or if not, a unique one created every time (one per
> transaction.)  Is this even possible?

you can use ob_ (output buffering ) familiy of functions to capture result
of phpinfo() in string, instead of outputig it to browser. Saving that
string into file is left as an excercise for reader ;)

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   >