« first day (270 days earlier)      last day (4903 days later) » 

00:05
:-P
that should have been pecl, not preclude, dam auto-completion
 
5 hours later…
04:54
hi all...
Tek
Tek
05:15
hi
 
2 hours later…
07:28
G'Morning
08:10
does anyone know... how to add rss entries to a joomla site..
like the one in this site: demo.joomlaworks.gr
look at the bottom left for a link: "Feed entries".. it enables google reader sharing
@dskanth there is likely a plugin for that then
apart from that reading an rss feed is as simple as reading any other xml document
ok... i am still searching for that module / plugin
08:49
monin' gangstaz :-P
09:00
@KamilTomšík afternoon..
Hello @KamilTomšík
hey guys
few month ago i asked here about best way for implementing authentication in MVC-like structure
the answer that was best suited was Decorator , IIRC
Hello @teresko
( something like Controller which is extended by SecureController , where the the new class used __call() for checking user's credentials )
well .. does anyone has a working example of this ?
09:25
something like this?
class FooController extends Controller
{
    public function someAction {}
}

class AclDecorator
{
    private $controller;
    private $currentUser;
    public function __construct(Controller $controller, User $currentUser)
    {
        $this->controller = $controller;
        $this->currentUser = $currentUser;
    }
    public function __call($method, $args)
    {
        if ($this->currentUser->isAllowed(getType($this->controller), $method)) {
            return call_user_func_array(
                array($this->controller, $method),
yeah , something like this
why isn't there syntax highlighting in chat? :(
@theguywholikeslinux good question
though in case of Model it might be a bit different , because has a quite specific constructor arguments
.. well .. controller might too
i really would love to avoid abuse of func_get_args() =]
@teresko decorators decorate an already initialized instance, so you create anything that is decorated up front. you are not instantiating the decorated instance through the decorator. you can use a builder to create an object graph from the inside out
09:30
oh
i suspect my brain has began to rot , because of Yii
horrible
I've been looking into various php frameworks and I thought it looked quite good
have you used anything else?
why horrible?
09:32
The cake is a lie!
i used before Kohana , and a variety of different frameworks for short period (mostly as support )
The cake is a lie!
I just tried cakePHP :P
and how does Yii compare?
ahh :)
it is better then Cake , though im not sure how much of a praise that is =P
09:36
lol
is it better than no framework?
contains a lot of magic , documentation is poor ( a lot of text , only few lines of code ) , no code comments bad design
@teresko You're talking about cake or Yii? :P
what do you mean "contains a lot of magic"?!?
I'm guessing Yii
@theguywholikeslinux Magic : true === TRUE // false
do you consider documentation to be poor unless it contains the entire code itself? or are you referring to example code?
that's weird
goes to test no it doesn't!!!!
09:40
morning
Hello @NikiC
@ircmaxell ah, I see. didn't know that spltypes wasn't in core ^^
<?php
echo true === TRUE;
?>
gives: 1
@NikiC they are not, are they? they are still marked experimental and have to be enabled last time i checked
09:41
@NikiC huh?
@Gordon Yeah, that's why I've written "wasn't in core". I probably meant to say "aren't" or something like that. Currently they are pecl ;)
what are these grey dotted lines for?
i think they show up if you haven't been in the chat window ;)
yup
probably, that way you can see what you haven't read up till
09:44
like in irc
@theguywholikeslinux codepad.viper-7.com/BLB0AP
well isn't that what's supposed to happen?
@Robik that aint magic but wtf
@Robik That looks bad
@Robik Especially as one normally can't redefine true (e.g. const TRUE = 'foo' doesn't work even in a NS)
This one looks better :P
09:50
@Gordon Hey your doc change finally landed: docs.php.net/oop5.patterns Probably took so long because somebody broke the build ;)
Beware of namespaces!
yay! hopes it wasnt me
@Robik that's disgusting
@Robik That thing's called Symfony (with m) ;)
@Gordon it was several people, including you and me
09:51
You can define constant outside NS too :P
@Robik is viper-7.com your website?
@NikiC hm? I still dont see the update though :(
@salathe what did I do wrong?
@theguywholikeslinux Nope.
apparently the docs build method that I use helpfully doesn't validate the xml against the schema :/
09:52
[removed]
@Gordon constructor prototypes don't have <type> elements
@NikiC Copyrights :P
@NikiC thanks. that worked
@salathe which one is <type> ? The public void before it?
@salathe for the return value? I copied that from another page
09:54
@Gordon in the <constructorsynopsis ...>
@salathe yeah. thats where i copied it from. i looked through the manual until I found one signature that says public void __construct instead of just __construct
@NikiC public void would be <modifier>public</modifier> <type>void</type>
@Gordon lots of constructors don't use the <constructorsynopsis> element
@salathe And one shouldn't do that for constructors?
@NikiC the visibility modifier is fine, just not the type (since we know what a constructor returns!)
@salathe i know. but im pretty sure i took it from a constructorsynopsis that had it
09:58
@Gordon if you could remember which one, that would need fixing (as it should be breaking the build)
but will keep it in mind for next time
lol, commit log is funny:
Reverted r313182 (fixing build)
Reverting commits r313137 and r313138 (fixing build)
Fixed build
:D
@salathe hmm, cant remember :(
happy with the red big fat warning
@salathe out of curiosity.. there is no ctor synopsis on the patterns page and you didnt commit the iteratator changes yet (right?), so how did we break the build? :D
@Gordon It were the iterator changes ;)
@Gordon I committed the iterator changes already
10:07
@Gordon They were commited and reverted (and now recommited)
eih.. i dont see the updated pages for the iterators either :(
@Gordon That's because salathe commited them again just minutes ago :)
oh. okay
thought i was caught in the mirror labyrinth again
@Gordon they broke the build, so you wouldn't see them online
@salathe i guess the validator only validates for well formed XML but not against the schema
or is there a schema?
or dtd ftm
10:24
@Gordon it should validate against the dtd, will have to see what was going wrong
@salathe ok
10:40
I buy a domain and web-hosting,I am new in this field.My question is how to make site searchable?
@ManjotSingh the easiest would be to implement a google search
I got this one
I don't have an idea of Search Engine Optimization :(
@ManjotSingh SEO isnt making your site searchable
Oh! I was not knowing,I came to know from my friend
Add your site to various catalogs
10:45
@ManjotSingh SEO is making your site rank high in search engines for specific keywords
@Robik That is for self satisfaction only thats it
if you need SEO, hire a SEO consultant
What would be a procedure,if keywords are specific?
Can't I learn SEO work,it will take time.Is it complexed or simple?
it is complex
there is onsite optimizations and offsite optimizations and you have to know how the various search engines rank sites. its not something you can learn in a day or two.
It will take month,6 month,an year.
10:51
depends on you
Thanks,no issues my luck ,I'll manage :-)
start here
Search engine optimization (SEO) is the process of improving the visibility of a website or a web page in search engines via the "natural" or un-paid ("organic" or "algorithmic") search results. Other forms of search engine marketing (SEM) target paid listings. In general, the earlier (or higher on the page), and more frequently a site appears in the search results list, the more visitors it will receive from the search engine's users. SEO may target different kinds of search, including image search, local search, video search, academic search, news search and industry-specific vertical s...
Anonymous
ahh gday @Gordon
Anonymous
:)
How would I connect my webhost with domain?
10:57
@SkippyChalmers yo!
I set DNS
@ManjotSingh contact the company that you bought the domain from. They should be able to tell you how to do it.
Hi @ircmaxell
11:02
morning
@ircmaxell thats a horrible book list :)
yes it is
Oh, I will be a web-developer without any book readed :P
/me refrains from commenting on that
So bad?
11:13
posted on July 13, 2011 by Thomas Weinert

papaya CMS got a new class PapayaObjectCallbacks recently. The class can be used to define and handle callbacks for other classes and relies heavily on the magic methods. It addresses several problems. Code duplication if you have several callbacks in one class Validation before you can use the callback Easy to use, self speaking API for callbacks PapayaObjectCallbacks is defined as a sub

read something, you may learn something
I'm reading awesone PHP docs
the docs leave a lot to be desired
not to mention contain blatently wrong information
11:15
@Gordon :)
@ircmaxell If you find blatantly wrong information please say so ;)
@ircmaxell patches welcome
@Gordon I've been
@NikiC No, I'll fix it.
the security section is rather... blah
@ircmaxell Right, forgot that you have an svn account too ^^
:-P
ok, off to work
later
By now I think being a CI fanboy should be classified as a disease. Something like Compulsory CodeIgniter Barking Syndrom CCIBS. Symptoms are: when you hear the word framework you have to bark CodeIgniter.
11:19
@Gordon You know, you could well get that through as a psychological disease ;)
@NikiC well, at least there is significant empirical evidence on SO for it ;)
11:32
1
A: PHP OOP; independent getter/setter methods, or combined?

GordonI consider this bad practise because it violates CommandQuerySeparation. Setting a value is changing state (Command). Getting a value is asking for state (Query). A method should not do both, but one thing only. Also, it's not really obvious what a method does when it's just called username, e.g...

that should make @KamilTomšík happy
11:44
óÒ
I think that user tried to mix globals with singletons :D
global $db; ... $db::getInstance()
12:00
@Gordon wooot :)
@KamilTomšík reference error
btw: anyone saw nike parallax? nikebetterworld.com
interesting effect, imho...
@KamilTomšík yeah, pretty cool
arewefastyet.com/?a=b&view=regress TI seems nice. That way FF is faster than Chrome not only in Sunspider, but in Kraken too :)
damn.. bob just said inheritance is not an is-a relationship
rewires brain
12:27
@Gordon yeah, it is behaves-as ;)
well, that was an interesting podcast
@KamilTomšík what do you actually think of Python?
12:45
@Gordon I've never written any app in it so I don't really have idea about its capabilities. The only thing I can say is I like that whitespace restriction. @ircmaxell promised me to say something about python and its oo, but we've both probably forgot about that :-)
what do you think?
i dont know. i think i like python and based on the tiobe index id give it a better future than for instance ruby but thats about all i can say about it.
i was just wondering because fowler and martin mention ruby a lot but they dont mention python and i wondered if there was a reason, especially since tiobe lists demand for python so much higher than for ruby
I think ruby will be here for a long time - it's ultimate dsl language, if you don't have time to mess with lisp, ruby is probably the best choice for everyone. but exactly same thing makes it wrong candidate for serious stuff - there is lot of optional syntax
@Gordon that's why fowler mentioned ruby - he loves it because of internal dsls
yeah, probably
though i wonder if/why you cannot have those with python as well?!
@Gordon as far as I know, you can leave almost anything in method call syntax:
object dosomething param
with builder pattern you can for example parse ini file as internal dsl
I haven't heard about much dsls from python camp, but I have from ruby one.
IIRC, there's even zen coding plugin for rails
well, you know i dislike rails :)
12:54
I don't quite like it, however it clearly shows, what ruby can do
@Gordon me too :)
well, technically, it's just ruby gem, but it works well with rails.
if you like dsls as fowler does, you will probably love ruby, and one day, you could eventually try even st :-P
13:19
hi everyone
hey anasanja
Is there any one who have used cakephp
?
Hi @anasanjaria
hi @Robik
n imsky
@Gordon 9 ppl think u r old :(
13:24
@Robik i do think so,too
Anonymous
old !== experienced
4
@SkippyChalmers Thanks :P
Anonymous
:P
@SkippyChalmers never claimed that :P
Anonymous
never claimed what?
Anonymous
13:33
:P
hello, need help with building the right query. Using codeigniter as framework: i need to get all rows from the database that contain any of the items in an array. how do i do it? I obviously need to use the active record class so that all excaping and security is taken care of. there's get and get_where that seem to be what i need but not clear how i would do it.
here is a link to the codeigniter docs on db methods: codeigniter.com/user_guide/database/active_record.html#select
14:00
@KamilTomšík It's awesome. That's what I'll say. The white space thing seems troublesome, but it's really not in the least... In fact, it's helpful
Anonymous
"active record class" lol
Anonymous
this is actually a first...
Anonymous
OP has linked us to the docs..
Anonymous
:)
Anonymous
@mgPePe make sure your db settings are all set up in application/config/database.php
Anonymous
14:03
then load the db library in application/config/autoload.php
Anonymous
then create your model
Anonymous
load it
Anonymous
(into your controller)
Anonymous
in the model method do something like: $q = $this->db->query($sql, $bindings);
Anonymous
$sql is your sql, with '?' marks in place of your parameters,
Anonymous
14:04
and bindings is the array of values you want bound to the question marks in order of their occurrence.
Anonymous
eg : $sql = "SELECT * FROM people WHERE type = ?;";
Anonymous
$bindings = array('very tall');
Anonymous
$q = $this->db->query($sql, $bindings); return ($q ? $q->result() : false);
Anonymous
any questions just ask
@ircmaxell yeah, I like that whitespacing, I was curious about that oo model :)
how is that different from ruby modules?
14:13
not overly familar with ruby
btw: interesting!!! uxrehab.com/…
it's brilliant idea - advertisement instead of shopping mall (less workers, less money spent on building, etc.) even electricity is actually free (subway has to be lightened anyway)
posted on July 13, 2011 by Stubblog - Planet PHP

Today the new 0.9.0 release of vfsStream was shipped to our PEAR channel. This release ships with a new feature that allows (unit) test scenarios which make use of file access time and file attribute modification time. While there is no restriction on usage of the file access time, support for file attribute modification time is still quite limited due to the fact that PHP's stream wrapper

@SkippyChalmers I have the db and all working and loaded models. my current line is: ` $this->db->get_where('table_name', array('id'=> $item_id), $limit, $offset);` but instead of having only one $item_id, i need to be able to have many id's. I am specifically avoiding to use db->query() because i want my data to be escaped properly, and i can't do it manually, i will mess up and leave security issues, i am not good enough.
Anonymous
query will escape your data properly
Anonymous
but okay
Anonymous
14:22
hmm
Anonymous
you are looking for a WHERE IN statement.. lemme check something
Anonymous
$this->db->where_in($field, $array_of_values);
Anonymous
done.
ouuu that simple? :)
wonderful! I am off to putting it in. thanx a bunch @SkippyChalmers
Anonymous
@mgPePe no probs
14:27
@KamilTomšík But what happens if your train comes and you haven't finished shopping! :O
@Aether you'll finish it in your dest station :-P
14:44
Ah, good point. That is, assuming your destination has a shop-wall, too. From my general perception of the London underground, things like this are more likely to be implemented at the busier stations (the central-city ones - where people tend to work), and less likely for the quieter stations (the peripheral ones - where people tend to live).
Obviously, I have no idea what the Korean subway system is like, or what the availability of the shop-walls is like.
You could always just finish your shop online without using the shop-wall.
Maybe it's not intended to be real shopping area - it's could be pretty smart and viral advertisement of mobile mall - at least if it were me, I'd leave ability to buy everything even without qr code... it would be just smart shortcut
Yeah, that's what it sounds like, hence my last comment.
15:21
hey, I'm looking to implement openid for a new application - is this library janrain.com/openid-enabled a good choice?
@Radu its one of the better known
I dont know which OpenId version it supports though.
@Gordon, thanks, I'm just wondering if anyone has horror stories
 
5 hours later…
20:45
evening
"5 hours later…", hm, seems to be much activity in here today ^^
 
1 hour later…
Tek
Tek
22:00
...one hour later @NikiC Why yes, yes indeed.
interesting. MSDN has incorporated StackOverflow into their site search: social.msdn.microsoft.com/search/…
22:13
Hardly surprising. Of the top 36 users, 5 are MVP and are 2 MS employees
well, given the bad reputation SO has in some circles I find it surprising
Does anyone know of a good tutorial/info for implementing a bitwise UAC on PHP? or point me in the right direction if bitwise is now the way to go.
@Gordon: What circles would these be?
@JamesWiseman PHP community for instance. I know a lot of people from it that dont like SO.
@Lizard you mean a bitmask?
yeah possibly
22:28
not so much a tutorial but maybe this helps: stackoverflow.com/questions/2131758/bitwise-operations-in-php/…
maybe thats why i am not finding good results in google i will try searching for that
unless you are in an environment with very restricted resources I'd use a regular ACL though, like Zend_Acl
@Gordon What, there are people that don't like SO?!
@Gordon: Any links? Always interested to hear both sides.
@JamesWiseman nah, go to a conf and talk to people ;)
22:32
@Gordon: What are the common threads of dislikes?
@NikiC: Yeah, shocking - they dislike SO AND like PHP !!!???? <realises he's in a PHP chatroom>
:-)
@JamesWiseman mainly the vast amount of recurring newbie questions
should have been "<realises he's in a PHP chatroom on SO>"
@Gordon Yeah, well, but there are some good answers around here, too ;)
@NikiC - It was really the mock incredulity at them liking PHP alongside the genuine surprise at the dislike of SO. :-)
@Gordon thanks
@NikiC sure. its mostly bias anyway.
@Lizard np
heading to be now. laters
22:38
@JamesWiseman nah, this chat already concluded that both "PHP sucks" and "the manual sucks" ;)
Jul 4 at 14:19, by salathe
PHP sucks.
that got 13 stars ;)
@NickC: I take it that's good. Everyone likes to see a good rant now and again!
@JamesWiseman and that gets us to the next one:
Jul 6 at 16:16, by rickchristie
> There are only two kinds of programming languages: those people always bitch about and those that nobody uses.
12 stars :D
That kind of put me in mind a comment by Eric Lippert, principal developer on the C# compiler team:
"If you think you've found a C# compiler bug, please, by all means bring it to our attention...."
"Don't be one of those people who sends me angry, profane emails about a problem that you caused yourself; that's just embarrassing."
Hello. If i have uploaded a image file and are working with it (scaling the image, while it is in the temp path) can i also change the name of it before i move it to my saved/ path? Or would i have to save it as the name it uploaded with and then make imagejpeg with new name and then unlink the old ?
Oooh! A proper question! Over to you @NickC - you have a tag score of 942 for PHP. I, however know nothing (in comparison)
22:50
anyone to answer me ?
@Karem If you're using GD, can't you specify a path as second argument when calling imagepng/imagejpeg or whatever you are using?
@JamesWiseman And you got 380 on jQuery :) and 250 on JS
how do I set my domain as a git repository?
@NikiC thanks i forgot
going to sleep now, gn8
good night
23:01
Look! It's tomorrow! Night all.
i was tomorrow 1 hour ago
:- D

« first day (270 days earlier)      last day (4903 days later) »