Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. A 404 exception will interrupt the render process and render the 404 page instead of the requested one along with a 404 header and url stays the same. So the render of the 404 page in the background calls the _init.php again. When using the prepend file _init.php you always have to keep in mind that it's called on every $page->render() (you might also do manually in a template to render another page). Depending what you do in the _init.php it may cause trouble cause it's called multiple times for a request.
  2. OK ,its was $config->debug = false and it's not enabled. Still I don't consider this feature that useful. I would prefer a HelperFieldLinks type integrated in core.
  3. This install is in a subdirectory. But don't see why it shouldn't work then.
  4. Updated again core and tried different browsers, no luck.
  5. Just a plain install, nothing special, no multilang...
  6. I have latest dev and not working. Chrome here. No errors.
  7. Just tested with a ModulesManager 1.1.1 installed and updated (using ModulesManager) ModulesManager to 2.1.2, no problems. Still wondering what is different, or when this errors occurs and if it has to do with your server, https nginx or whatever. There's hasn't really changed anything of the core stuff just minor tweaks and JqueryDataTables added.
  8. I don't understand. Does this happen when updating, after updating... I don't see any problems and working/worked fine here. I did some changes on 2.1.2 but don't think that's doing anything you see here. I have problem understanding where and what happened, let alone understanding that error as I don't know exactly when it did happen.
  9. I don't see what could be the problem. Did you install JqueryDataTables module too?
  10. Anyone have also problem with that? When hovering over the ">" on a field (right side) it should show the field name beside the field label. Ryan implemented this couple month ago and sometimes it's working and sometimes not. Sometimes it does work for some fields and not others, sometimes not at all. Apart from that, regarding this feature: This is sort of Ryan implementation of what I did with HelperFieldLinks module (one of my first modules). But I'm not really happy about what Ryan did here... It's not helpful at all and showing only the name on hover doesn't help me anything that much, when then I have to go to search the field anyway. It is also hidden feature, so that you don't really get it without knowing it. What I would like is some better solution to see name and a link to go edit the field directly. This should be in core and visible to superusers. Current implementation doesn't really help me, and I still need to install my HelperFieldLinks module, which I'm not really keen about supporting and updating it all the time cause it's broke already a few times. What you guys think about it? Edit: Since Template label can also be different than the template name, I would welcome it to also show the template name along with the template label. So I don't have to search for it.
  11. There's also a way to add day to page on the fly. foreach($result as $res){ $res->day = strftime("%d",$res->getUnformatted("date")); } $results->sort("day");
  12. Nope but you could store the weekday to a field and sort by it. This could be saved with a save hook.
  13. I think he needs also edit access to articles to add children. I'm not sure I test and works fine here. Same as you set up but no page-publish permission, but works also with using it.
  14. Finally. This was needed sooner or later.
  15. No need for blank profile. Just replace site folder and import db. There will be no fields or templates from default... you replace them.
  16. They set a index for the field in table. It's for optimizing when query database. Indexed field are faster to search.
  17. How about $u = $users->find("roles=utente, roles!=superuser|guest");
  18. Adrian already gave answer. Apart from you should know what templates have a file/view. foreach($resultpage->parents()->reverse() as $parent) { if($parent->viewable()) { // we got a viewable parent } }
  19. Maybe the most natural and just general would be foreach($page->fields as $f) { echo "Type:$f->type Name: $f->name Label: $f->label<br>"; } $page->template->fields, $page->get("fields") etc A more deep hook into fields would be to hook formatValue(page, field, value) of Fieldtype. It will replace every title fields rendered on page also from other pages. $this->addHookAfter('Fieldtype::formatValue', $this, 'hookFields'); public function hookFields($event) { $page = $event->arguments("page"); $field = $event->arguments("field"); $value = $event->arguments("value"); // not sure this is needed here, and won't prevent from exec in admin. You better set module config to "autoload" => "template!=admin" if($page->template == "admin") return; if($field->name == "title"){ $event->return = "ohhhhhhh"; } } You could also just hook into specified field type like page title field $this->addHookAfter('FieldtypePageTitle::formatValue', $this, 'hookTitle'); You can also create your own property as per HelloWorld.module. But not overwrite already existing fields. $this->addHookProperty('Page::hello_world', $this, 'example4'); I'm not sure what you're trying to archive and if there isn't another approach, just mention ways... For example: You asked how to modify the page title. I showed you how and it's working. Fieldtype::formatValue will get called only when output formatting is on. And it's called when using TextFormatter modules on a field.
  20. Works fine $this->addHookBefore('Page::render', $this, 'renderHook'); public function renderHook($event) { $page = $event->object; if($page->template == 'admin') return; $page->title = "ohhhhhhh"; } Now the rendered page has always title ohhhhhhh. But this does not change the title for page in navigation or other places.
  21. So there will never be a 404 for those links? Seo?
  22. Yeah you can now have all themes installed at once and also get all problems from all themes in one install. Yeah you can now have all themes installed at once and also get all problems from all themes in one install.
  23. Soma

    New Logo

    No it was fine until you changed something.
  24. Can we please remove this module from directory already? Every other installs this instead of the core one and runs into problems!
  25. Edit: Ah or something like this? $page->parent("template=basic-page")->url; Will return the first parent found with the template "basic-page" going from from $page
×
×
  • Create New...