@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33



Comments:

<0> NoBeard: i don't want logic in my presentation
<1> hax: what logic?
<2> but yet logic is neede in presentation
<0> NoBeard: the **** that invariably makes its way around the 'echo'
<1> <html><body><?php echo 'foo'; ?></body></html> is not logic
<2> othewise your logged in users and your admins and your joe user will see the same content no matter what
<0> NoBeard: no, that's not
<0> NoBeard: okay, i was wrong
<0> NoBeard: how do you propose we don't let logic into code like that?
<1> hax: I made my own template for seperation of program logic and content
<2> there is a fine line on logic vs. what to display
<1> still has php in their, but the program logic is maintained in the template cl***
<0> NoBeard: you have to admit that smarty is a step in the right direction
<1> hax: I could do 90% of smarty in a single regex
<1> 87% perhaps
<2> you can do without smnarty



<1> zircu: somehow I have managed, its been a torrid 8 years
<3> smarty, 1000 lines of code to parse "hello world"
<2> if you move to smarty, you will have to teach the person editing the output smarty, if you use php you have to teach them a bit of php,
<4> what is Interbase support?
<2> keep in mind taht php is a template in its self, adding smarty you add yet another layer
<1> AfroTurf: interbase database
<5> re
<2> AfroTurf: support for interbase
<4> ah ok
<3> death to smarty
<4> thanks
<2> lig: where the hell did you go?
<5> had to take care of some business in the lobby
<5> did ya miss me zircu :D
<2> so, no you have php being cached with a system like APC, then smarty caches your output
<1> if you want _real_ caching, use squid
<5> woohoo
<2> NoBeard: ouch
<6> zircu lig was topless when she kissed you!
<5> ;)
<3> lets talk about reptilians
<7> hello
<3> hi reptilian
<7> lol thats me
<7> and your the mineral i hide under
<3> ouch.. dont kidnap me please
<7> I have a phrase error in this line and cant seem to spot it can i use your eyes to see if you find one. http://pastebin.com/652937
<7> Parse error: parse error, unexpected ';'
<8> does Google use Python to serve its content?
<9> ratman: looks like you're missing a parentheses at the end
<9> err, maybe not
<10> ratman: you are missing a closing )
<9> okay, yeah
<3> heh, reptilians
<7> lol
<11> can ne1 recommend a resource for programming php full OOP?
<10> after the " should be an ) to close the mysql_query(
<10> flaccid: php.net/manual/en/language.oop5.php
<7> so like )"); correct?
<10> ratman: yups
<10> the first is inside the query, the second closes the mysql_query( call
<7> wow see i didnt realize that. i been scared of
<3> flaccid: pear.php.net
<7> the rock and now you helped me get out
<10> ratman: using an editor with syntax coloring really helps :)
<3> ratman: sir please dont touch my ***.... im virgin
<11> ty
<7> therock: I ran before you knew it was I. THE RAT MAN
<7> thanks Remi_Woler for the help
<11> trying to work out what object cl***es i should define for a script that starts with a form to enter values, then searches the database with the $_GET values and then returns the results
<3> ratman: just i hope you didnt touch my pizza
<7> therock: you know what i didnt touch it i ate that shiznit
<11> ... and i want it to use the one script from the client side eg. wizard.php is the only page that the browser uses
<2> flaccid: so make it so
<11> hehe yeah
<11> i think i'm going to need to use a templating engine
<11> to separate the markup



<11> probably use tinybutstrong... i'm just not sure how you are meant to make a template that has a table of results that can have different number of rows
<2> hmm.. i give up.. theme's are not accidental
<11> themes?
<2> i just gave my lecture on template systems
<12> flaccid: use php, and use foreach to loop through an array to generate the table rows.
<3> the conclusion was, use regex, and death to smarty, etc
<2> the basics php == template system.
<2> therock: not exactly
<11> CryWolf: but that won't separate the markup from the php
<12> flaccid: it will if you put it in a separate file
<12> include('template.php');
<1> flaccid: why do you want to seperate markup from php?
<12> NoBeard: separation of logic and presentation is always a good idea
<1> separation of what logic?
<11> CryWolf: but ur saying p*** the results (with embedded html) to the template?
<12> the parts of your program which decide what to do, such as what to display.
<12> flaccid: no. p*** variables, which the template uses.
<1> CryWolf: ok, so how to p*** variables to the template?
<11> but u don't know how many rows to put in the template...
<1> oh, embed it in the markup
<12> !tell flaccid about u
<1> vicious circle
<12> flaccid: that's why you use a foreach to loop through an array.
<12> NoBeard: find me a template that doesn't use loops and variables.
<11> but then you would be putting php logic in the template
<12> flaccid: there's a big difference between a loop and complex core logic.
<11> its still logic
<1> CryWolf: so, whats the big deal about having <html><body><?php foreach(range(1,100) as $num){ echo $num; }?></body></html>
<11> TBS does it without logic: http://www.tinybutstrong.com/examples.php
<12> NoBeard: nothing, but it's a pretty dull page.
<12> flaccid: do you mean there's no logic in the conditional display?
<12> It looks like there's variables there too
<11> CryWolf: no logic in the html template
<12> flaccid: ah, so it's just plain html. What's the point, then? Why not just use a plain html file?
<1> CryWolf: so, whats the big deal about having <html><body><?php foreach(range(1,100) as $num){ echo if($num==50){ echo 'halfway'; { else {$num; } }?></body></html>
<1> CryWolf: sup with that?
<12> NoBeard: do you have a point?
<1> CryWolf: well, there is logic in there, whats so bad about it?
<12> NoBeard: with that simple example, nothing.
<11> the point is there is no logic in the html template...
<12> flaccid: any loop, any conditional, any function, anything other than static content, is logic.
<11> CryWolf: no its not. a variable or placeholder is not logical
<11> this is not logical: [blk1.res_name;block=tr]
<12> flaccid: You're right, a variable is not logic. So how do you handle not knowing how many rows are needed in a template without logic?
<1> flaccid: thats just fugly :)
<11> well thats why i looked or a template engine cl*** that does that
<11> the example in the url i posted demonstrates it
<13> datasieve are you still around
<11> it might be fugly, but it does the job
<12> flaccid: which example on that page?
<11> * Data - mysql
<1> flaccid: so does simply writing the code
<1> its gotten so people are afraid to embed code with an embedded scripting lang
<1> the logic police with come down on them
<14> hah
<11> NoBeard: simply writing the code does not separate logic from presentation. this is the point of having a template engine
<14> that's not hard -- just put html and output-related code in one file, and other code in another
<11> its easier to break the program if you put code in the html template
<14> i tend to make a framework of sorts
<1> flaccid: whats so bad about having a simple that has the logic within?
<14> but i never touch anything like smarty or tbs
<14> PEAR or nothing
<14> heh
<11> this is why frameworks are made
<1> Jmax: you _need_ a framework/mvs
<11> i'm just starting to use them
<1> Jmax: php just useless with out it
<14> NoBeard: what?
<12> How curious. I've found PHP to be quite useful without it.
<1> Jmax: without 1000 lines of code for 'hello world' your script is worthless
<1> Jmax: install smarty NOW!
<14> oh, you're being sarcastic heh
<1> Jmax: indeed
<14> i'm a bit stoned atm :P


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

#perl
pivot_root: No such file or directory /sbin/init: 432
opensuse netinstall ip address
boot from flashdrive
mount: block device /dev/sdc1 is write-protected, mounting read-only
opensuse The crypto plugin
dapper libfam
best-prono-movie
#debian
wx.Button loop



Home  |  disclaimer  |  contact  |  submit quotes