Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

comments in compile files
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
ptonev
Smarty Rookie


Joined: 21 Apr 2003
Posts: 13
Location: Bulgaria, Sofia

PostPosted: Tue Apr 22, 2003 8:33 am    Post subject: comments in compile files Reply with quote

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
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Apr 22, 2003 7:29 pm    Post subject: Reply with quote

Any reason why?
Back to top
View user's profile Send private message Visit poster's website
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Tue Apr 22, 2003 8:28 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
alan
Smarty Regular


Joined: 17 Apr 2003
Posts: 43

PostPosted: Tue Apr 22, 2003 11:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Wom.bat
Smarty Pro


Joined: 24 Apr 2003
Posts: 107
Location: Munich, Germany

PostPosted: Thu Apr 24, 2003 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Apr 24, 2003 7:42 pm    Post subject: Reply with quote

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. Smile

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
View user's profile Send private message Send e-mail Visit poster's website
Wom.bat
Smarty Pro


Joined: 24 Apr 2003
Posts: 107
Location: Munich, Germany

PostPosted: Thu Apr 24, 2003 7:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Apr 24, 2003 8:02 pm    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Wom.bat
Smarty Pro


Joined: 24 Apr 2003
Posts: 107
Location: Munich, Germany

PostPosted: Thu Apr 24, 2003 8:06 pm    Post subject: Reply with quote

:>>>>>>>>
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Apr 24, 2003 8:27 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Thu Apr 24, 2003 8:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Apr 24, 2003 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Thu Apr 24, 2003 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Apr 24, 2003 10:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Thu Apr 24, 2003 10:14 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP