-
Posts
1,835 -
Joined
-
Last visited
-
Days Won
21
Everything posted by Nico Knoll
-
Looks fine for me with both Chrome and FF, too.
- 29 replies
-
- issues
- processwire forum
-
(and 4 more)
Tagged with:
-
Should $Page->Image Depend On An Option?
Nico Knoll replied to Yannick Albert's topic in API & Templates
At first it looked like a good idea to me but I think teppo is right. How would you output all of the images if this is enabled? Normally it goes like: foreach ($page->images as $image) { // output image } But now $page->images (or $page->image) would be a string or object and not a WireArray anymore. -
Integrity Constraint Violation When Adding Child Page [Solved]
Nico Knoll replied to Macrura's topic in General Support
Solved. -
I wrote a little troubleshooting guide for htaccess + pw stuff: https://gist.github.com/NicoKnoll/3c96a3d42f69b21ff923
-
Well the default ones above your image are normally like Pete wrote, but you can change them in your Profile settings (like I did ). The group is below your image shows your permissions. Members is the default one, Moderators and PW-Moderators are .... moderators and Administrators are ... Administrators. I think that's all.
- 13 replies
-
- pw-moderators
- member title
-
(and 1 more)
Tagged with:
-
Repeaters Not Saving Consistently / Odd Behaviour
Nico Knoll replied to sharpenator's topic in General Support
Well.. I never heard about this error before. But I think it's always a good thing to stay updated because of compatibility and stability reasons. And I think Processwire kind of releases a huge updated only once a year this shouldn't be as annoying as with WordPress which offers an update like every day. And I think that repeaters were more like in a beta stage in 2.2 or at least really buggy as this search will show: https://www.google.de/search?q=processwire%202.2%20repeater%20bug&rct=j -
I still think I don't understand it completely ...
-
Do the newsletter pages always look the same? Because if this the case I think you should handle it a little bit different then having to subpages with the same content.
-
Repeaters Not Saving Consistently / Odd Behaviour
Nico Knoll replied to sharpenator's topic in General Support
I think you should make a backup and try to upgrade it. Shouldn't break anything and repeaters should work better afterwards -
Shop-for-ProcessWire (@Apeisa)
Nico Knoll replied to Nico Knoll's topic in Module/Plugin Development
I think it's more likely to be completely new as it is more a bundle of different modules which combined are making a great shop "module". -
Some additional support for this is also on the roadmap for 2.6+: "JS session monitoring to handle multiple users editing the same page. "
-
Session Login Problems In Ie With Chromeframe Plugin Installed
Nico Knoll replied to Tyssen's topic in General Support
Just wanted to mark this topic as answered because you found a solution yourself- 1 reply
-
- chromeframe
- login
-
(and 1 more)
Tagged with:
-
You mean with ryan's Service Pages Module?
-
Bootstrapping outside PHP app directories
Nico Knoll replied to Christian's topic in API & Templates
I would may create a custom API template inside pw. Just create a page called "api" using a template "api". In the api.php template file just get all the data phalcon needs put it in an array and use json_encode before "echoing" it. You could add a access restriction with something like "yoursite.com/api/?pass=loremipsum" and a check at the beginning. This way you can offer palcon all the data it needs but don't grant directly access. This way processwire stays save and you don't have to tap the database. -
Release: Rudimentary knowledge base site profile
Nico Knoll replied to marcus's topic in Themes and Profiles
It's not a module - it's a site profile. You're using site profiles for custom installations and not like modules to extend a already installed site. -
Looks like you have to set a RewriteBase (just delete the # in front of the first line "RewriteBase /" or if your installations lays in a subfolder change it to "RewriteBase /subfolder/") And please check if modrewrite is installed on your server: http://stackoverflow.com/questions/9021425/how-to-check-if-mod-rewrite-is-enabled-in-php
-
Edit: Not sure if it works with PageTable but it works with the traditional way. Should work: <?php class SingleUseTemplate extends WireData implements Module { static public function getModuleInfo() { return array( 'title' => 'Single use template.', 'summary' => __('Single use template.'), 'version' => '100', 'author' => 'Nico Knoll', 'singular' => true, 'autoload' => 'template=admin' ); } public function init() { $this->addHookBefore('ProcessPageAdd::execute', $this, 'validateTemplate'); } public function ___validateTemplate(HookEvent $event) { if($this->input->post->submit_save) { $chosenTemplate = $this->config->input->post->template; $parent = $this->pages->get($this->input->post->parent_id); // enter the template for the "parent" page. Like in your example "movie" if($parent->template->name != 'movie') return false; // check if a sibling (same depth level) already uses this template foreach($parent->children as $child) { if((string)$child->template->id == $chosenTemplate) { throw new WireException('Template already used. Chose another one.'); } } } } } SingleUseTemplate.module
-
I think I understand it now. I would go with a custom module hooking into ProcessPageAdd::execute and check if this template already exists. If this is the case throw an error. Or alternatively check if the template is already set and if hide it in the drop down select.
-
I think I still don't understand it - what do you have to maintain if you don't have to create new pages... you can edit the created pages anyway...
-
So you want to have like 20 templates and 20 pages? Why don't you just do it manually then?
-
-
Ah okay. Now go out and have fun with PW