-
Posts
4,956 -
Joined
-
Last visited
-
Days Won
100
Everything posted by LostKobrakai
-
There's a similar module by nico, that does work for textfields: http://modules.processwire.com/modules/textbox-list/
-
Maybe the output formatting is randomly enabled? That's the only reason I can imagine, that would change the fields' data output.
-
I just installed the profiler on a local vagrant machine without problems. Yesterday after installing xdebug my site even timeouted for load intensive sites, which drove me nuts, but the profiler really does not intervene in load times at all. I've a profile from an edit page in the backend for anyone interested in how these profiles look like: https://blackfire.io/profiles/ed0fddee-769f-469d-9776-d1172445217e/graph Edit: Might be gone in 24h as the free plan does store profiles only for a day.
-
It should normally add itself in the list of usable page inputfields, but could you please take a look at the module configuration of InputfieldPage if those two are in the list or not.
-
Question about page save hooks and fields
LostKobrakai replied to thetuningspoon's topic in API & Templates
How about simply hooking saveReady and saveFieldReady and call the same function? -
$pageArray = $pages->find("id=3922|2394|2341"); Should've reloaded before posting, but both ways work
-
Handle a file upload from an InputField module
LostKobrakai replied to Aaron Ahearne's topic in Module/Plugin Development
I'm not sure about the current state of your module, but one thing you need to concider is that files are never part of neither $_POST nor $input->post. Uploaded files can be retrieved from the $_FILES superglobal or you just use the WireUpload class. -
The thing is, if those sites will be available in different countries you shouldn't even use language support fields. So I'd try it with just removing the "data" column of each field table and renaming "date_langID" to "data". Remove all other language cols and the modules and you should be good to go with a single language site for each language you created. But keep in mind that you'll still need to have the LanguageSupport module installed to be able to have backend translations, but no other language module should be needed.
-
Handle a file upload from an InputField module
LostKobrakai replied to Aaron Ahearne's topic in Module/Plugin Development
You can use hooks by creating a custom property in the inputfield object and in the hook just check for that property. You're writing you cannot set a value so I would conclude that the upload does already work. Am I right that way? For setting the value to the inputfield make sure the value is a page pagefiles object or at least an array of pagefile objects. -
You can fake the PageArray, that the pagination is based on. $pa = new PageArray(); $pa->setTotal($total)->setLimit($limit)->setStart($start); $pager = $this->modules->get('MarkupPagerNav'); $pagination = $pager->render($pa);
- 2 replies
-
- 4
-
- pagination item limit
- pagination total page limit
- (and 1 more)
-
I think the best bet would be something like phantom.js.
-
Handle a file upload from an InputField module
LostKobrakai replied to Aaron Ahearne's topic in Module/Plugin Development
Just to prevent misunderstandings. You're already using the "correct" InputfieldFile as the FormBuilder custom one is even more specific. Also the add() method didn't fail because of a missing table, but just because of the missing page. The page itself doesn't necessarily need an file field, as Ryan also stated, but mostly it's id is needed to determine the folder to put the files into. -
In the processwire htaccess look for these lines # ----------------------------------------------------------------------------------------------- # If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTPS} off # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L] and just add yours after those, as this must certainly be the right place to put those redirections # ----------------------------------------------------------------------------------------------- # If you only want to allow HTTP # ----------------------------------------------------------------------------------------------- RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]
-
What's the reasoning behind going through the admin interface and then back to the frontend?
-
Handle a file upload from an InputField module
LostKobrakai replied to Aaron Ahearne's topic in Module/Plugin Development
You'd need to do it manually e.g. as part of the module or a tad more sophisticated. The InputfieldFile does actually handle only the "input" stuff, e.g. everything till you hit submit on the form (or ajax). Everything after that is handled by FieldtypeFile, which saves the file for a specific page. That's the reason why FormBuilder does have it's own File field, as there's neigher a FieldtypeFile to be used nor a page to save images to. With that being said, have a look at Ryan's reply here about how to handle file uploads even without the Fieldtype: https://processwire.com/talk/topic/11314-inputfieldfile-in-forms-its-just-not-working/?hl=file#entry106503 -
Pagetree: moving pages in very long branches
LostKobrakai replied to horst's topic in General Support
Ryan could be asked to abstract ProcessPageSort::execute out a bit, so the sorting logic is also usable without faking the ajax data coming from ProcessPageList. -
Can $page->message() be invoked by javascript?
LostKobrakai replied to Marc's topic in General Support
There's nothing in the processwire core besides the system notifications module, no matter if php or js code. If you need additional logic in it you'd need to extend those files or use a fully custom solution. -
Any PHPStorm users here who uses phpUnit? Setup question
LostKobrakai replied to FrancisChung's topic in General Support
Essentially it's the same as bootstraping processwire in any other php file. But you'd need to make sure the host, which runs phpunit does have access to the mysql database, which processwire does connect to. -
Pagetree: moving pages in very long branches
LostKobrakai replied to horst's topic in General Support
Maybe an ajax loaded pagelistselect (like children), where one can select a page, where the current page should be sorted after on save or when some own submit button is clicked. -
Image field - select image from another page
LostKobrakai replied to cb2004's topic in Wishlist & Roadmap
That's a usecase where the one-page-per-image is certainly useful as most images will have further information like dates, technical infos and so on. This would let you use simple page fields. -
If you only need to keep google (searchengines) away just use a robots.txt (google and others are legitimate bots / crawlers) User-agent: * Disallow: /
-
How to validate a date range in the back-end?
LostKobrakai replied to Neo's topic in General Support
There's no "core"-implemented way to validate this, as processwire does validated on a field by field basis. But you could hook into Pages::saveReady and clear or swap those dates if the end is before the start. -
Can $page->message() be invoked by javascript?
LostKobrakai replied to Marc's topic in General Support
How about this in the execute function? if($this->config->ajax && $this->input->post->message){ $this->message($this->input->post->message); return; }