Adam Kiss
Moderators-
Posts
1,303 -
Joined
-
Days Won
7
Everything posted by Adam Kiss
-
find() by property or similar way to combine recurring selectors?
Adam Kiss replied to thomas's topic in API & Templates
I don't think I ever had something like this, but I imagine I'd do it with small module; // module class MySelect { public function __construct(){ // } public function findFiltered($selector){ return wire('pages')->find('limit=1,'.$selector); } } // template $mySelect = $modules->get('MySelect'); $pages = $mySelect->findFiltered('template=subselection'); -
Incidentally, there seems to be many reasons why 'MySQL has gone away': http://dev.mysql.com/doc/refman/5.0/en/gone-away.html'>http://dev.mysql.com/doc/refman/5.0/en/gone-away.html But then again, maybe you just treated it like it's six years old, and it didn't like it, so it ran away.
-
Module Stable version: The ACE Editor, your new favorite Inputfield
Adam Kiss replied to Adam Kiss's topic in Modules/Plugins
Hm, I haven't really tested it with other than Latin-1 extended (and there might be the problem ); Let's deal with this on GitHub. -
ProcessWire conference, Switzerland (central europe)
Adam Kiss replied to Soma's topic in News & Announcements
huh, summer full of meetups? I'd travel there, I've never been in Switzerland. -
that's surprising.
-
"Continuous integration" of Field and Template changes
Adam Kiss replied to mindplay.dk's topic in General Support
Yeah, but veeeeeery slowly and what I try to do is less auto-magical and more like rails migrations (i hope). -
Next time, just say no to legacy code and hang out with the cool kids (us)
-
"Continuous integration" of Field and Template changes
Adam Kiss replied to mindplay.dk's topic in General Support
I am a little closer to 'kind of' this, but it's… not done yet -
Hm, I now have the same 'it gets stuck' error with js error 'Unexpected "<" in JqueryCore.js'?
-
Slightly off topic, have you seen Dylan Moran's description of how GB owned the world? it's brilliant! [NSFW, language]
-
Stop it you bloody wankers! --- Would I pass for english guy?
-
Not better.
-
By the way… Smiley philosophy?
-
Tools* – modules group for API only modules
Adam Kiss replied to Adam Kiss's topic in Module/Plugin Development
Woohoo! Re:API; What I meant is that you interact with these modules with pure PHP, and you use them for non-PW tasks (or subtasks, like formatting time, importing different format, exporting to different formats, etc.). Api* would be good for something that extends PW API itself maybe? -
Tools* – modules group for API only modules
Adam Kiss replied to Adam Kiss's topic in Module/Plugin Development
Yeah, every TextFormatter is a Tool/Lib. Not every Tool/Lib is textformatter though. Hm, doesn't it sound too small? Like "HelperExcel", Export to excel - that's more then only one-function helper, that's basically whole behemoth class wrapped as PW module. -
Tools* – modules group for API only modules
Adam Kiss replied to Adam Kiss's topic in Module/Plugin Development
Would be Lib* better? -
:-O --- Edit: Oh well.
-
Wow, that's really going for ABC of business. (always be closing)
-
I myself am a static man - I love Middleman, Jekyll, Stacey & Kirby. I'd really love it if there was some crossover, something where you'd write your website, build it and then upload it having some tiny PHP router for doing tiny bits of runtime changes, like including different files based on $ajax, sending forms, etc.
-
DateTime() takes a string argument when creating new object - it takes the very same arguments as strtotime() does. It's a natural date parser, so if you want to tell it that 'this number is a timestap', you have to prepend '@' before it. That means, that you could theoretically do this: $tf = $modules->get('ToolsTimeFormat'); echo $tf->ago('2012/12/24 18:00'); Edit: +bonus tiny english lesson 'learn' is a word you use when you gain information ('I'm learning'). When you give information, the verb is 'teaching' (e.g. "I am teaching you, you are learning from me"). Hope that helps. (as an absolute off-topic, if I ever make a mistake, you are absolutely free to correct me, so I can learn something new )
-
Tools* – modules group for API only modules
Adam Kiss replied to Adam Kiss's topic in Module/Plugin Development
But then again TextFormatter is slapped on text areas/inputs and is a pass-through for formatted text (automagically from PW) This is only a mixture of functions/libraries packaged neatly as a module programmer might use while working in the 'model' mode . -
This module has been renamed to ToolsTimeFormat to accomodate future funcionality better. Sorry for any inconvenience.
-
Ah, you've misunderstood. I wasn't talking about directory, but rather page domain.com/tools/ajax-dispatcher/{urlParam} and based on urlParam, you'd call different ajax code (in this case, the code being neatly wrapped as module)
-
Isn't this like uber-hacky way to do stuff? If I had to implement this, I'd probably do something like /tools/ajax-router, which would then in return go to modules and get stuff by some rules, you know: <?php /* ajax-router.php */ $function_name = $this->input->get_sanitized_value(); //obvious pseudocode is obvious $function_name(); function MyModule(){ $myModule = wire('modules')->get('MyModule'); $myModule->serve_this_request($parameters); } and be done with it. I might be wrong though
-
Is there any other way to use Joomla? Note: this jab at Joomla is my personal opinion