Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. I tested installIng ImagesManager and then ImagesSelect and works fine. Note both modules are WIP and proof of concept. I don't support them. They're not in the official modules directory. ImagesSelect is tailored to a project and while working it isn't meant to be ready to use and has many hard coded assumptions that all is easy to customize if you know what you're doing. So anybody can take it and study it and adapt it. I just shared it for others to see.
  2. In backend it works cause there's no outputformatting. Doing in a template you see the error cause front end template context has output formatting enabled. Not sure if pagetable causes issues with clone but can't remember if Ryan said something. So the solution is right there explained in the error if you read it! Try a $pages->setOutputFormatting(false) before your code.
  3. My example is right from Process.php comments. Not sure about status.
  4. Security mods on server. Max post inputs reached?
  5. Seems to work great here. Awesome tool! Thanks.
  6. Thanks for making this, great idea that comes in handy. Just for code: At a first glance at the code, why does it have to be a Process module that is autoload? Not sure but I think implement Module isn't necessary as Process class already has that? Instead of this: public function install() { parent::___install(); /* Create manager page */ if (!count($this->pages->find('name=' . __CLASS__))) { $p = new Page(); $p->template = $this->templates->get('admin'); $p->title = 'Page Path History Manager'; $p->name = __CLASS__; $p->parent = $this->pages->get(3); // Create as children of /admin/pages $p->status = Page::statusHidden | Page::statusSystem; // Hide in menu and prevent deletion $p->process = $this; $p->save(); } } You can also do now public static function getModuleInfo() { return array( 'title' => '', 'page' => array( // optionally install/uninstall a page for this process automatically 'name' => 'page-name', // name of page to create 'parent' => 'setup', // parent name (under admin) or omit or blank to assume admin root 'title' => 'Title', // title of page, or omit to use the title already specified above ) ), ...
  7. You could also do $current_lang = $user->language; $pages->uncacheAll(); $saved_lang = $user->language; $user->language = $current_lang; // reset So it will reload the user. But you have to reset it back afterwards. (And I'm not sure a $pages->uncacheAll() will make processwire reload all pages already in cache. So I'm not sure it's a good solution if not really needed. )
  8. What hook? Looks complicated.
  9. @horst in the LanguageSupportPageNames.module I guess. It's evaluated with some AI to get the right language and page. Once the language is determined by the requested url the user language is set on runtime. It's not saved in DB of course. This would load the cached user already with changed language. This is determined very early before page renders etc. So only way without adding your own field to manage this, would be to save the language to the user with a new property (at runtime) and this should happen before LanguageSupportPageNames does it's job. In template code you won't be able to do this unless you do a DB manual query. So an autoload module would do that with an added hook line of code in the init() (see HelloWorld.module) public function init() { $this->wire("user")->savedLanguage = $this->wire("user")->language; } and then use in templates: echo $user->savedLanguage->name;
  10. User language is tied to what language is requested. So it changes on runtime. User language set in admin is for backend primary. If you need user to set a language for frontend you could add a field to user and check that.
  11. Your post always read like this: You should not make line breaks.
  12. Summary belongs to it's own field.
  13. We at @update_ag recently relaunched the new http://t.co/XZeNioZ2nq using the great @processwire CMS/CMF #webdevelopment

  14. Hello there Yesterday we at update AG relaunched the new 1815.ch news portal of Mengis Medien AG. It's a big new portal of a local newspapers here in Wallis Switzerland. That's where the Matterhorn is also It was a thrill to work on this project using ProcessWire. We're still working out some details and adding more stuff in future. There's a lot going on and it has quite lot of traffic. 60k+ pages at the moment. Currently it serves 18k+ articles plus a lot of other data that are just pages. But will grow a lot. The portal has currently around 7k+ user registered. Lots of imports and exports are going on in the background. That mostly are XML feeds or data being uploaded to server. Some news are imported and automated. While they have different teams creating articles apart from the imports of their newspaper also via XML. http://www.1815.ch
  15. I'm not sure and in a hurry
  16. I for now filed an issue https://github.com/ryancramerdesign/ProcessWire/issues/1011 It's not fixed for dev version. After upgrading to latest dev the issues pop up again.
  17. A coworker just installed the 2.5.3 with language profile, and we have the exact same issue. LanguageTabs just disappears. Commenting out the "requires" in the LanguageSupportTabs module and doing a refresh fixes the issue. After that uncommenting the line it keeps works again. After doing a upgrade to latest dev via Ryans updater, the issue pops up again. I noticed a similar issue on a project where ProcessLoginHistoryHooks module disappears sometimes when installing new modules. The thread starts here https://processwire.com/talk/topic/2082-module-process-login-history/?p=88573 It also has a requires dependency, that when commenting out it fixed the problem and the module appears again. This issue should be tracked down and fixed ASAP.
  18. Looks like it happened again. I installed a module via url. After that the Login History module had the same issue as I mentioned. Edit: I have a local install (not same as the project) where I try to reproduce it but can't. Driving me crazy.
  19. @diogo it was but not everyone has flattr.
  20. I setup a little demo here to see using https://lightning.pw http://titanium-x77.lightningpw.com/ You see it one single on home sidebar and on the PollinoPolls page you see two. The expire time is set to 1 minute. via cookies
  21. Ah, I added some informations. Thx
  22. Just checked in a first beta version of a new module I'm working on. Feel free to test out and see what's up with it. Pollino (beta) A simple poll module for ProcessWire This module makes it simple to setup polls for your website. It is based on a simple page setup to create the polls. So each poll is a page, and its children are the answers. Pollino will create the templates and a PollinoPolls page in the root to start with. You can add fields to the templates as you wish and later use hooks to modify the output of the poll. This can be useful, for example, to use images as options or just some custom markup etc. It provides some API to render the poll form and the result. These methods are hookable and it's easy to customize the output if needed. It can be rendered on any page and even multiple on the same page. Pollino takes care of saving the votes and preventing multiple votes. It comes with some configuration settings to choose what method to use to prevent from multiple votings: using cookie and an expire time or by IP and optionally also the UserAgent with and expire time or by logged in User Pollino isn't 100% plug'n'play but it provides a solid foundation and comes with some premade theme and output for you to start. It takes care of the boring stuff and lets you concentrate on the front-end stuff and styling. That's what matters after all. It does support multilanguage, as all strings are translatable in the module. Also since it's using simple pages and templates you're free to add or change fields to make its output multilanguage without much hassle. ----- Read more and download https://github.com/somatonic/Pollino Online Demo I setup a little demo here to see using https://lightning.pw http://titanium-x77.lightningpw.com/ Have fun.
×
×
  • Create New...