View previous topic :: View next topic |
Author |
Message |
ptonev Smarty Rookie
Joined: 21 Apr 2003 Posts: 13 Location: Bulgaria, Sofia
|
Posted: Tue Apr 22, 2003 8:33 am Post subject: comments in compile files |
|
|
hi,
if is not a break on copyright please, add posibility to removed comments from compile files.
I talk about this comments:
<?php /* Smarty version 2.5.0, created on 2003-04-22 10:54:25
compiled from footer.thtml */ ?> _________________ dev@ptonev.com
www.ptonev.com |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Apr 22, 2003 7:29 pm Post subject: |
|
|
Any reason why? |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Tue Apr 22, 2003 8:28 pm Post subject: |
|
|
didnt know people even look at the compiled files i just let them do there thing _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
alan Smarty Regular
Joined: 17 Apr 2003 Posts: 43
|
Posted: Tue Apr 22, 2003 11:06 pm Post subject: |
|
|
Perhaps it could be a simple switch in the Smarty class, defaulting to on (true) to keep compatability with anyone who re-processes their templates?
Say, a "$smarty->embed_smarty_version variable" for example? |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Thu Apr 24, 2003 7:31 pm Post subject: |
|
|
err.. this leads me to a question: are we allowed to remove these comments? I personally tend to setting $smarty->compile_check to FALSE after I have finished a page, and let a script run over compiled templates to remove newlines and comments. And maybe I (or anybody else) might want to use a obfuscator or even a encoder (like Zend Encoder, SourceGuardian (DONT BUY IT!), IonCube Encoder)...
David |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Apr 24, 2003 7:42 pm Post subject: |
|
|
i wouldn't object removing these comments. the templates you write are copyrighted to you. smarty does not seize copyright to them by compiling them.
they are handy for debugging.thats all.
since smarty is lgpl you can even replace lines 338 and 339 of Smarty_Compiler.class.php-v2.5.0 by "$template_header = ''" (@ptonev: hint! hint!) and you don't have to share your modification with anyone. only if you *distribute* your modified smarty you have also to distribute is's source.
it's considered a derivative work then and that's good.
[1 typo fixed, others left as is] |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Thu Apr 24, 2003 7:46 pm Post subject: |
|
|
err... no... are you sure with that, messju?
As far as I understand the LGPL license (they are hard to understand, aren't they? *g*), I HAVE to publish the modified Smarty version, if I distribute my application. And if I implement a feature into Smarty which is dependent on my application, my application automatically gets licensed under LGPL... |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Apr 24, 2003 8:02 pm Post subject: |
|
|
yes, *if you distribute your application*. i didn't say that. i just said you can modify it for you and don't have to share your achievement. |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Thu Apr 24, 2003 8:06 pm Post subject: |
|
|
:>>>>>>>> |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Apr 24, 2003 8:27 pm Post subject: |
|
|
Sorry if this is the wrong place to ask, but I get so confused by all of this gpl stuff. Sometimes I almost think I think I understand bsd. but I never feel that way about gpl!
okay, I figure that if someone makes a change to Smarty in their own basement for their own amusement (or personal use) and they don't distribute it...well, why shouldn't they and who can stop that anyhow?
For argument sake, lets say a single developer builds a cool web appliance of some sort but does not release it as an application; instead they use it to run their own public service. Is the developer encumbant to release the source in that case? What if the developer is working on a "private" team (and thus is sharing changes with other developers)--does that constitute "distribution" and therefore demand that the changes be made available publically?
Say it is an internal app at a corporation--do they have to release? Say it is a corporate app that is used to host a public service?
Lucky for me, I prefer "drop-in" libraries and would rather write adaptors than change library code |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Thu Apr 24, 2003 8:31 pm Post subject: |
|
|
As long as its a compiled library in this case its not. You MUST distribute your changed source code ONLY if you distribute the program OUTSIDE your corperation/organization _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Apr 24, 2003 8:40 pm Post subject: |
|
|
thanks Aztek.
One more thing out of curiosity? Do people cheat? Say my app "links" the smarty source--ie. there is a subdirectory in my project that contains the smarty source. I allow users to replace that directory with updated smarty source if they wish--my app simply uses it as a library. EXCEPT, say my app patches the smarty code at runtime (and perhaps removes the patches after it finishes executing...) In other words, does this just cover static code? |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Thu Apr 24, 2003 9:11 pm Post subject: |
|
|
If you modified the source in any way shape or form you must say you have and distribute it regardless of how you link to or use it _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Apr 24, 2003 10:07 pm Post subject: |
|
|
AZTEK wrote: | If you modified the source in any way shape or form you must say you have and distribute it regardless of how you link to or use it |
but only *if* you distribute it. i think that's the point.
i have some kind of 5-6 cvs-checkouts on the machine i am writing this. all with different modifications of the original. i have 2-3 more on another machine in the office. the lgpl does *not* force me to distribute any of these modifications (useless ones or not) in any way. |
|
Back to top |
|
AZTEK Smarty Pro
Joined: 16 Apr 2003 Posts: 235 Location: Purdue University
|
Posted: Thu Apr 24, 2003 10:14 pm Post subject: |
|
|
Yea thats was just extending what I said above when I said if you distribute it outside your org _________________ "Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane |
|
Back to top |
|
|