-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
You loose the tinymce input when you change. Yiu need to select tinymce or fckeditor for the textarea under input tab.
-
Yes the error doesn't occur with stable 2.3. What you mean with normal login practice? Is there also a non normal? The code Ryan posted is as good as it gets. A login is so simple and only one API call is needed to login. So it's not the script thats the problem but PW latest dev version.
-
1 + 2 = 3? I understand what you mean but can't really see what the problem is and why not just serve images with a maximal width or height depending on what ratio width and height you have. Hard to explain for reason, there's no bulletproof way, what if you resize the viewport from landscape to portrait?
-
I just took your code and tested (removed the die() in the init) and it works the "foo" gets displayed after submitting. No idea what problem you got, but there's nothing special about it really. Does the comments and rating work at all for you? Caching?
-
I get the same error when using custom login form no matter what. Even when using ProcessLogin execute to make the form.
-
Float works in one installation and not in another, so I avoid it and use integer. (means on one server it saves 10.3 as 10.3 and on the other 10)
-
No idea, but it works for me. I use same code as yours, can you post your complete module?
-
This must work, only thing would be if your module isn't autoload.
-
I havent used this with cache but it should work. You might want to consider using the LanguagePageNames core module that add the loaclized url support more integrated as this module will not be developed further.
-
Funny thing is I can't even get LoginThrottle to work as there's a bug/logik that won't save the attempts to DB, well it does but they get deleted immediately afterwards I filed a issue on github. https://github.com/ryancramerdesign/ProcessWire/issues/198 Back to your issue. You don't need to do anything if you use custom login form. Regarding the code in SessionLoginThrottle. When there's 3 failed attempts within the defined seconds limit it does: ... if(wire('process') == 'ProcessLogin') parent::error($error); else throw new WireException($error); // ensures the error can't be missed in unknown API usage ... Which means if you don't use ProcessLogin to login, it will throw an Exception not an notice! You know you also can render a login form using echo $modules->get("ProcessLogin")->execute(); But this will also result in a Exception thrown, as it's not really the ProcessLogin process running.
-
It's just a 404 message. I'm with that the editor doesn't need to edit that text. That's why it's set in the core (page id) to be only listed in the page tree for superusers. The 404 is just a regular page that is defined in the config via page id. You can overwrite that with $config->http404PageID = 1024; But this will just that page also. SOmething like kongondo would be a solution to still make it. You could add a settings page or even better a custom 404 page with the same template as the 404 page and have it in the tree set hidden. To replace the rendered page of the 404 page with your own created page, you can add a hook with a autoload module. Look at HelloWorld.module which is such a module that autoloads on each request. ... public function init() { $this->addHookAfter("ProcessPageView::pageNotFound", $this, "hook404Page"); } public function hook404Page($event){ header("HTTP/1.1 404 Page Not Found"); $page = wire("pages")->get("/404/"); // get your 404 page $this->wire('page', $page); $event->return = $page->render(); // render and return that page }
-
yeah definately something like this.
-
If you look at FieldtypePage getInputfield() it's only InputfieldPage. Then in InputfieldPage you see protected static $defaultInputfieldClasses = array( // default options 'InputfieldSelect', 'InputfieldSelectMultiple', 'InputfieldCheckboxes', 'InputfieldRadios', 'InputfieldAsmSelect', 'InputfieldPageListSelect', 'InputfieldPageAutocomplete', ); InputfieldCheckboxes is only for InputfieldPage alternative input. InputfieldCheckbox is only the input for FieldtypeCheckbox. It's a single checkbox input while InputfieldPage can be multiple. It looks like you are mixing a lot of things up, and looking at your module, your "role_permitted_templates". You have a text field with comma separated values but want to use InputfieldPageName for sanitizing like a page name but which will remove ",". This wouldn't work anyway apart from that you can't use InputfieldPageName here. Just stick with a InputfieldText or InputfieldTextarea, to enter templates comma separated or per line. It would be cool to have a ASM select to select templates, but this would only work if you only use the InputfieldPage with a ASM select, and add templates as options with templateid=>templatename. This unfortunately isn't possible when using a real custom field added to a template, it's only for use when adding it through a hook to a fieldset and on saving take the selected option(s) to save it somewhere.
-
Ah ok I looked a little closer and of course PW doesn't allow special chars in urls. So if you want to use url segments, you can with a little workaround. I updated my code to allow for url segments or GET. Set the variable at the top. Also made some changes to not have lower case the tag. But if you use url segments the $alltags array is used with key=>value to get around it. So it would store "fruehling" => "Frühling", and then take that to get the original value in the image tags find. The sanitizer method $sanitizer->pageName(string, Sanitizer::translate); Sanitizer::translate can be used to convert special chars as you configured in InputfieldPageName module settings. There you can specify that 'ü' will convert to 'ue'. This way you'll get url segments like "fruehling" instead of "frhling" or "fruhling". After all the using of GET urls parameter may be the easiest as you don't have to take care if using cyrillic chars.
-
Have you even tried it?
-
The sanitizer selectorValue does that I think. Try using another sanitizer like text. But have to look at the laptop. Maybe its the urlsegments.
-
Put the method in the hook in "".
-
In peocesswire we have the collapsed option.
-
I eat them.
-
Give three programmers individually the task for a specific application and you'll get three complete different solutions. Ask them to look through each others code and all will correct each others.
-
That's a dangerous question. Nothing wrong but it's a though combination I don't really like. Especially the background is very standard green and almost impossible to use in this combination. I looked on a movile. And the big font is playful but horrible It's a little barebone yet and and hard to get a feeling of the direction.Sorry for being harsh. The great is often close.
-
Index template aspecific of 'sub' template? // Hello!
Soma replied to jtborger's topic in Getting Started
Welcome! Just quick. Theres plenty of template settings to use. If you want to share template files you can define alternative template filename under advance d tab. So you can have multiple share same file. -
Superuser will always bypass see three posts above pete explains. The guest role is for public visitors.
-
Ah no not at all. All you do with api on front end to add or save content is non access aware and it does what you tell it to do. You could take roles and permissions into account and most likely this is what you do. PW has those checks also implemented same as you would do on your front end. The edit page screen wont load and throw an error if you dont have permission but you're not using the admin processes in your frontend so you take care through api on your own.
-
Well this code is from the PW core. It has some API methods to search for tags like for Pagefiles $images->findTag("tuggy") or $image->hasTag("taggy") etc...