Jump to content

owzim

PW-Moderators
  • Posts

    490
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by owzim

  1. I updated an installation from 2.4.9 to 2.5.10 and now on every page in admin the update messages fill up the whole screen and won't go away. I simply replaced the wire dir, the .htaccess and the index.php. Any Ideas? Thanks
  2. Wow, haven't known about Fontello, just tried it, super sleek. Thanks! And I agree with Soma, Icon Design is hard, even for experienced designers, so ...
  3. Ha, tiny enhancement, huge benefit. Thanks!
  4. @netcarver thanks on the insight, I'll try this chrome extension. Currently I use xdebug but the stack trace (without the break points you mentioned) is rarely of any real use. I also us the Chrome Logger module by soma, which is very useful most of the time, but it uses html headers which are sometimes too big because the objects it tries to log, are too complex.
  5. I don't know if it's possible (I doubt it), can't test right know, but don't do it! The user is a reserved object in PW. Edit: you can overwrite the user, but PW throws and Exception if it's not an instance of the User class. So if you want to pass a custom user object, extend the class and add your custom stuff to it. Or extend the user class with hooks. Marcrura wire('user') only returns the user object so you cannot assign it this way, and it's the same as $this->wire('user') if you want to set it do it like described above, so: $this->wire->set('user', $userExtended);
  6. I don't ever use the ternary operator for stuff with more condition level, if that's what it's called. It's just not readable at all, and I think without setting brackets properly the result can be unexpected. Only ever one ? and one :
  7. @pwired, I don't get your post. @hettiger, thanks for the module, looks interesting, have to look into it at a later point in time though.
  8. Welcome to the forums! The $user variable is already taken in the globally accessible wire/fuel object, so don't use that. from your module you can set the var as follows (in your before page render hook): $this->wire->set('foo', 'bar'); in your template you can call it like any other wire/fuel variable (like $user, $page, $session etc), since the they are passed to templates automatically: echo $foo; // 'bar' More on THE fuel/wire: https://processwire.com/talk/topic/3876-using-fuel/ Soma:
  9. Smells like a ProcessWire Recipe Or make a module out of it?
  10. Dzień dobry girlz n boize! One thing just came to my mind, when reading Marcrura's new Module post: https://processwire.com/talk/topic/8477-processpageselectlinks/ There are many little helper modules out there that enhance the admin in neat little ways. Perhaps there should be ONE Module (say ProcessWireAdminHelpers.module), which provides hookable methods, so that helper modules can hook into them to be shown on the ProcessWireAdminHelpers.module settings page. There you could enable/disable or apply settings for each. Then there would be a single entry point for stuff like this. I don't want to manage the settings for 20 different modules on 20 different module setting pages. One person should take charge and design such a module, and module devs should then use it's hooks when creating little helpers schmelpers. Any thought's on that?
  11. Can you describe in more detail what this does/is for? And perhaps some use cases. I have no clue. Edit: Guess I got it (dead tired), links to the edit page are added to the asm select field items. The Module name is misleading, I think, because it is NOT a Process module. Wouldn't the JqueryMagnific scrips and styles be loaded automatically if you just load the module? $this->modules->get('JqueryMagnific');
  12. Don't know why it is not working, can't test right now. You could to it manually, though: $desc = $image->description; echo $modules->get('TextformatterMarkdownExtra')->format($desc); Edit: just tested it, can confirm the Textformatter is not applied automatically. Still don't know why Edit 2: Just tested further, the Texformatter is there, checking via $fields->get('image')->textformatters but the format method is NOT called. Probably a bug.
  13. Macrura, nice. Please be aware of some possible YAML parsing pifalls. It's always advised to wrap strings, that are more than just one word in quotes, or prepend them with a pipe symbol. Commas are interpreted as array separators, so your example should be looking like this instead: - author: William role: Client text: "Integer eu libero sit amet nisl vestibulum semper. Fusce nec porttitor massa. In nec neque elit. Curabitur malesuada ligula vitae purus ornare onec etea magna diam varius." - author: James role: Hippie text: "Posuere erat a ante venenatis dapibus posuere velit aliquet. Duis llis, est non coeammodo luctus, nisi erat porttitor ligula, egeteas laciniato odiomo sem." or - author: William role: Client text: |Integer eu libero sit amet nisl vestibulum semper. Fusce nec porttitor massa. In nec neque elit. Curabitur malesuada ligula vitae purus ornare onec etea magna diam varius. - author: James role: Hippie text: |Posuere erat a ante venenatis dapibus posuere velit aliquet. Duis llis, est non coeammodo luctus, nisi erat porttitor ligula, egeteas laciniato odiomo sem. or multi line - author: William role: Client text: > Integer eu libero sit amet nisl vestibulum semper. Fusce nec porttitor massa. In nec neque elit. Curabitur malesuada ligula vitae purus ornare onec etea magna diam varius. - author: James role: Hippie text: > Posuere erat a ante venenatis dapibus posuere velit aliquet. Duis llis, est non coeammodo luctus, nisi erat porttitor ligula, egeteas laciniato odiomo sem.
  14. Thanks for the info Soma, I am surprised, because I never read anything about that anywhere here in the forums. I guess there are not too many use cases for that, since you'd be better off with hooks to add functionality to Pages I guess.
  15. WTF? I just discovered that you can assign a custom page class to a template in the system tab in ProcessTemplate and via API. Since when is it in there? I gotta play with that ... this opens tons of new possibilities, MAN!
  16. Currently to change the 'summary' description in context of 'basic-page' we would have to do this: // get the template $t = $templates->get('basic-page'); // get the field in context of this template $f = $t->fieldgroup->getField('summary', $useFieldgroupContext = true); // value of the field $f->description = "'basic-page' summary description"; // save new setting in context $fields->saveFieldgroupContext($f, $t->fieldgroup); What I'd like is something like this // get the field $f = $fields->get('summary'); // value of the field $f->set('description', "'basic-page' summary description", $context = 'basic-page'); // save new setting, perhaps optional, because behind // the scenes `saveFieldgroupContext` has been called already? $f->save(); Similar for getting in context: $f->get('description', $context = 'basic-page'); Not only is it more intuitive, but less verbose, in my opinion. What do you think?
  17. Macrura, thanks for testing/using the module. The current master branch only uses WireData on object like structures and regular arrays for numeric key structures. I renamed the module to FieldtypeDataStructrue (because it now supports more than YAML) and have a separate repo for that, what you want is all there on the dev branch. Check it out, I added a bunch of features (including your wanted WireArray output and a couple of new input/structure types, beside YAML) and the whole thing is unit tested, so it SHOULD be pretty stable: https://github.com/owzim/FieldtypeDataStructure/tree/dev More detailed info on the new version: https://github.com/owzim/FieldtypeDataStructure/blob/dev/README.md For now you should create a new field and not change the fieldtype on your existing one to the new FieldtypeDataStructrue I think it now became pretty powerful, I am planning to make a video to cover it and all it's possible use cases. Please (all) share your thoughts on how else it could be used.
  18. @netcarver, I haven't investigated it yet. I know the module is messing with a lot of things, because it is not an own field but just a bunch of hooks. I'll make a separate Inputfield, or fieldtype out of it out of it, this will fix much and makes it also configurable. But I got little time at the moment.
  19. That's why I use a different browser for dev than for web browsing
  20. This should work if the file is really there. Try to inspect the html output and check if the path is generated correctly. If so, copy the url into the address bar and check if the image is really loadable. Perhaps something with SVG having the wrong mime type from the apache? Other than that I'd just create a new config setting: $config->urls->icons = $config->urls->site . 'assets/images/IcoMoon/Icons/SVG/'; And include the icons like so: <img src="<?php echo $config->urls->icons; ?>globe.svg" class="logo"> Your code is very unreadable, try to organize it better. Don't mix the output methodologies too much. EITHER you echo out php in your html OR you echo out HTML in you PHP, don't use both methods at the same time, or at least avoid it at all costs. I would not want to be maintaining this, and neither should you Just advice.
  21. owzim

    Social networks

    "Ello, goodbye": https://aralbalkan.com/notes/ello-goodbye/ I despise Facebook and only use it every now and then when a friends groups discussion makes it necessary. I almost exclusively use Twitter, but not too much for networking but for news on politics, webdev, web/tech in general and to share links or the occasional rant.
  22. Cross post: https://processwire.com/talk/topic/4604-template-data-providers/?p=80541
×
×
  • Create New...