-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
There was posts about this already. Search with Google. I'm on mobile.
-
Multi-language support for module config fields
Soma replied to mach's topic in Multi-Language Support
Still nope. There was same question some time ago. Module config is stored as json and you use Inputfields not Fieldtype. There's the pager module I think where Ryan has text per language . Maybe worth a look. Sorry I think its in LanguageSupportPageNames module. -
It's on purpose so you have to think a little and not just blindly copy paste! Seriously I fixed them a while ago I thought, must have messed up something with having various versions. I'll correct them. Thanks (I'll remove you're code as it's not interesting to leave a copy of it here)
-
Guess this will follow us for the next years to come This setting that is.
-
But master do i more painting. Avatar is done a self portrait using my bug (you call mouse) in photoshop 17 years ago actually. So i look little older now.
-
I'm probably not the slowest but by faaar not the fastest. I have my own finger system and writing English and code half blind and writing on computer since 26 years now may helps a little. But by no means do I master coding or using all potential of editor. I'm a creative who loves coding.
-
Just corrected a few names on the last one, as it was copied.
-
Here's another one that does the "same" with a different hook on Page::addable. It's basicly the same, but this time we just set Page::addable to false and since the page list tree actions do check for this permission to add the "new" button, they simply won't get rendered anymore. So two ways, same result. The difference is that Page::addable is also used by ProcessWire in other places not just page tree. So will not be able to add a page and see an error when you try to add a page manually with a link like /processwire/page/add/?parent_id=1001. So this may the better solution here. Here the example module on my ever growing gist archive (hmm btw are those limited?) https://gist.github.com/somatonic/9494427
-
Well it requires some knowledge and understanding of ProcessWire, so I lied when I saids soo easy. It's the where to hook what and how and when and what is returned and what are the arguments. Some are rather simple to figure out and some are very hard. Some even took me long time to get right, try and error But nonetheless the basic concept is easy to grasp and some good and simple hooks are in the HelloWorld.module, that's where I started too 2 years ago. This is example module that does remove the "new" on second level basic-page pages in the page tree. This only modifies the actions and does not prevent adding child pages via API elsewhere. This hook is tricky as it also is all called via ajax in the page tree, so you can't simply echo something to debug. ProcessPageList.module is the module where the actions are done, but it contains 3 classes actually, and you need to hook into ProcessPageListRender::getPageActions, catch the $options array this method returns which contains all actions as a nested array. If a method returns something you can catch it with the $event->return. So all you need to do is to remove the "New" action from the array and set it back to the $event->return. Easier said than done. Here's a basic example module https://gist.github.com/9493877
-
Hooks are sooooo easy that I have hard time seeing what people are afraid of. Once I get a minute ...
-
Enable advanced mode config. Select fieldgroup underneath the fields from the original template instead of adding them again. It then references the fieldgroup. Or have a hook into the page list action to remove or don't allow 'new' from those pages that have certain level.
-
Just use $input->whitelist(key,value) to store get vars and pager will auto include it.
- 3 replies
-
- 4
-
-
- pagination
- getVars
-
(and 1 more)
Tagged with:
-
Or just use $array = wireDecodeJSON($json);
-
I looked at some things and pushed some changed to 1.3.1, I think you'll be able to do what you need Changes in 1.3.1 Minor refactoring and optimizations Added support for having placeholder in inner_tpl's opening tag. So you can now also add dynamic values to the opening tag like, much like in the item_tpl 'inner_tpl' => "<ul id='{name}' class='drop-down'>||</ul>", That will result in {name} being replaced by the name of the page (containing the inner childs) To hook into the parsing of the the list opening template you can use the "MarkupSimpleNavigation::getInnerStringOpen" and do you're own conditional replacements.
-
I don't know Bootstrap well and what extraordinary unnecessary complicated data's and id's and classes it needs. Also I don't want to add features just for Bootstrap. I'm not sure I can follow. What Id is needed where and don't now if it's all possible.
-
no comment
-
Use $config->ajax see cheatsheet.
-
How does it come that some files that are translatable are not shown in the select, and since I can't enter one manually after this module is installed I have to deinstall it. For example wire/modules/Fieldtype/FieldtypeComments/CommentForm.php isn't in select. EDIT: Stupid me didn't see that CommentForm.php was already added, so it doesn't show...
-
You're right. "process" is a field on the "admin" template, to select the module that defines the process for the admin page. So it's simply saying "make the process of this page this module". And yes the execute() is used as the default method to return the content for the admin page, basicly what you see when you open an admin page, for example /processwire/myadminpage/. Further urls segments can be used by adding other executeName() methods, where Name is the urls segment appended to the admin page url. Like /processwire/myadminpage/save/ would map to a executeSave() method in the process module. If it does exists, it will use it instead of execute() /processwire/myadminpage/mymethod/ would map to a executeMyMethod(). I think it's case insensitive.
-
On an inputfield on front end form you use $f->maxFiles = n
-
pageStack
-
http://processwire.com/talk/topic/3551-small-tip-for-pages-that-will-be-used-with-render/
-
That would be Ryan's task
-
Sorry, Teflon is currently not compatible for 2.3+/2.4 I think the module page on modules.processwire.com was updated for all in one step and it's module developers task to check our modules. Just haven't come around to make it, I think it would be a good time now Sorry for the inconvenience this may caused. I will update the info. Also ModulesManager need to somehow account for that (installing admin themes in 2.4). Just give me some time to think how and when. Since there now multiple changes going on old and new theme is a big step
-
$array = json_decode($jsonstring)