Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. You're on the right track, but not sure what all would be required to make ckeditor work on front-end. There's many js config vars used in the backend for certain fields like TinyMCE or CKeditor. If you look at admin source code you'll see the var config = { .... } in head, that can then be read by js scrpts and plugins. All this stuff is dynamic and pulls configs needed from the field configurations. This is populated via $config->js(); and output in the admin theme (default.php) before any scripts are includes. Also the scripts and styles needed for a particular Inputfield is loaded via $config->scripts and $config->styles, this is then again output in the admin theme (default.php) in the head. All these play together to make admin backend work in it's modularity.
  2. What do you expect? Well it does only set the current user for this request and not log in.
  3. @stefan, Just wanted to mention that it's generally not a good practice to use the title for such things. marke=Masita|Kempa May cause trouble depending where and how you use it. If for forms and filters you could just use id or name instead of titles. marke=2133|2134 There's many ways to do this stuff and depends what you want/need. //some form ... $options = $pages->get("/marken/")->children(); $select = $modules->InputfieldSelect; $select->attr("name", "marken"); foreach($options as $opt) $select->addOption($opt->id, $opt->title); echo $select->render(); // and later maybe $markenids = implode("|", $input->post->marken); $products = $pages->find("template=product, marke=$markenids); // marke=1231|1231|1233 ...
  4. It would be correct: $sanitizer->pageName("Größen", Sanitizer::translate); No it's not dependent on special thing. It's used to translate titles to the name. Nothing to do with translations. This was added at some point around 2.3 after lots discussion and isn't documented on API section (yet) but on cheatsheet http://cheatsheet.processwire.com/?filter=pagename.
  5. What "is not working" ? That means? It works for me fine if you mean the setCurrentUser(User). Only thing I can say is make sure you're having a user actually there with $u. If not, id='42' looks wrong to me and should be id=42
  6. Thanks for the reminder. I'll have a closer look again when I get bandwidth.
  7. I'm using this a lot and it works also with latest PW, even with TinyMCE (multilang textarea). Though I'm not sure if there's any potential issue.
  8. Actually $page does resolve to the id here anyway so no difference.
  9. RT @Joss_Sanglier: Help get @processwire packaged by Bitnami. You can vote at http://t.co/eWJAlsJKsa

  10. Small correction to Ryans example, it would be $users->setCurrentUser($u); and maybe not use $user var but $u, since you would overwrite the $user var: $u = $users->get($id); .. $users->setCurrentUser($u);
  11. You can also just create a new admin page without this module. It would be a simple process module.
  12. RT @minimizepw: Say hello to minimize.pw - Our new, image compression module/service. for @processwire : https://t.co/GdwCLsl4pA

  13. Ryan, what about the behavior I'm getting that breaks the file protect system? Above post mine. I'll file an issue on github.
  14. Or maybe the Finns have no arms (hands).
  15. I figured this also. There seems to be a difference. Set filename then render and render then specify template file. Calling with render with that option seems to try see if its viewable and It's not. Thus the error... there's not file.. and attaching your template would come after that. Only my guess without study code.
  16. Ah just read end of post again.. mobile. So just to clarify. This hook only modifies the url returned from a $page->url. Not handle the request of that url. You only half way there. To catch that url which doesn't exist you would need enable url segments on home template and write a handler in template file. Check for first segment and if a name found render that page instead. For any other you throw a 404.
  17. Can you clarify 'not working' ? If you do echo a url of a page with the template what do you get? Also sometimes a exit; in your method can help see if its really getting called.
  18. Soma

    Hanna Code

    Just a little tip when working with hanna code. I for some project prefer to have the code on file system and not db. This can be achieved simply by including the php file in the hanna code. For example a Hanna code: include($config->paths->templates . "hannas/archive.php"); And have your Hanna code in archive.php.
  19. And have you installed it in core?
  20. This module is now in core languages module section and shouldn't be installed in site anymore!
  21. Do you save with the top save button?
  22. I make a lot of custom admin pages and don't need to change anything, it automaticly uses admin template.
  23. If rendertime is between 0.3 and 1.3 seconds for the same page? Then it's definately your server that is slowing down not ProcessWire. Could be the server being busy or the database connection is slow and latent. My guess it's a cheap shared server hosting? You could test a little more and maybe find more details, that you could tell the hoster. If they can't do anything I would change hoster.
  24. It's coming from ProcessWire also set in .htaccess. I'm not sure depends where you set your redirect rule. It would be at the top before processwire ones. If that's already the case, I think you'd maybe need a different rule to sort that out.
×
×
  • Create New...