Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Textile Textformatter still uses deprecated syntax public function format(&$str) { New is public function formatValue(Page $page, Field $field, &$value) { So you can't hook into and check for the field Just add a second textformatter already in core "TextformatterPstripper" (wich uses the old syntax too btw) after the textile formatter on your text field. Easy.
  2. It's not possible (as far as I know) to limit the levels via a find selector. If it's for listing output you have to write nested traversal function (see sitemap code in default profile) or use a module like MarkupSimpleNavigation
  3. Yeah I dont even know what to respond.
  4. Wire holds the api vars not a module. Like wire('pages') etc. You get or load the module with $mymodule = wire('modules')->get('ModuleName'); Or same $mymodule = wire('modules')->ModuleName; Or on templates $mymodule = $modules->ModuleName; What you have is correct, but get or load a module will load it explicit whether autoload or not. It will even install the module if it's not. Where not doing a call via API, an autoload module will get loaded still. So you dont need to or cant check to see if the module is loaded, at least I haven't been able to.
  5. Shame both videos show you guys and I dont see the slides. And mademyday: nice talk but before the next presentation go make pee. so you can hold still. Yellowled nice talk, some little details were not correct and me as a hardcore noticed of course but otherwise great, big thanks for spreading the word. Enjoyed watching them.
  6. Reality is what make out of it.

  7. Soma

    Dead Simple Grid

    I use pocketgrid which is the same basicly. I use it all the time. On mobile so no link.
  8. @bwakad It's simple.. if you think about it, your separate structure won't work cause it's not nested and thus parent=selected_parent. Isn't working there. You would maybe need some different selector then, but not possitive it's possible. You need to be able to make some connection like the parent > child.
  9. Yea I remember Ryan mentioned it somewhere but didn't remember it was already in and working dynamicly without saving page. That's a useful feature, just a shame nobody knows.
  10. Field dependencies, .. not sure if that would work, as this would require to reload the second select. And field dependencies isn't able to define what the page field has for the parent. As kongondo mentioned not a trivial thing, and may require some magic ajax. But maybe not. EDIT: My bad, I completely forgot this is possible in new version 2.4 with using a custom selector (as described in next post) I forgto about it and remember now Ryan mentioned it in some thread and to be forgotten... There's currently no out of the box UI solution. But you could kinda can make it happen with selecting the first select, save page, selecting the second. You can use the "custom php code" of the page fields "Input" settings tab. Instead of a parent or custom selector you would have this kind of code in the second select and read the saved value of the first. So reading again your post... If you have them nested as pages like: - state1 - city1 - city2 - state2 - city3 Then the first select: "states_select" = is the page field single select to select states, using a parent or template. Then in the second select let's say "city_select", you would use such a code to populate the page select: if($page->states_select) return $pages->find('parent={$page->states_select}'); "$page->states_select" is the first select field on the current page. So if a page is selected there we will use a selector to get all children of the parent and return the page array to populate the second select. Edit: with some clever hooks you could add some javascript to the admin that handles the updating, either via ajax or adding an event listener for an on change of the first select and save the page by triggering the save button. Don't try this as it can corrupt your page.
  11. Ah diogo is right if($page->url == $page->url) is not same if($page->url == $_SERVER['REQUEST_URI']) in the context of being rendered by render()
  12. Sorry to dive in late. Diogo's code would be equalent to: if($page->url == $page->url) throw .... Just looks cooler, but however I would simply not create the php template for those pages and create a separate template file. If your template would be "subpage", create a partial-subpage.php And render the subpages on home with echo $subpage->render("partial-subpage.php"); And since you don't have a subpage.php those won't be viewable anyway. Redirect: What you also could do is have the subpage.php redirect to the home with a hash /#yoo appended, so you could scroll to the panel and also use that url for indexing. $session->redirect("/#" . $page->name);
  13. As for installing modules. In PW 2.4 you don't necessary need Modules Manager to download and install modules. Instead of donwloading and put folder in modules folder, you could've done it via PW module page. Go to the modules page in admin and go to tab "New", enter name "ModulesManager" (class names are always unique and in this kind of format "SomeName", you'll see that name on module details screen on modules.processwire.com) and submit. It will look for the module and if found allow you to download and install it directly from within admin. This you could've done with the "JqueryDataTables" module too. Just copy and enter the name and go to "New" tab. If a module has all required modules installed it won't show the "requires" note. To make sure that you don't have the module already downloaded you could search the module screen and look under "Jquery" section.
  14. No problem. I'm glad you actually brought this up. By saying "it's probably wrong thread", I meant that the problem you had there isn't directly related to Modules Manager but installing modules in PW core module manager in general. For me and others it seems to be clear that if it shows "Requires: SomeName" means that it's a module that is required to be installed (since you can't install it) This is always a module, and never something else. The requires dependency is something handled by ProcessWire and not Modules Manager. So Modules Manager isn't responsible for it, I just tell ProcessWire what Modules Manager requires as a "JqueryDataTables". I don't have influence on how this particular feature shows and works within admin core module page, since Modules Manager it isn't even installed yet at this point. After all it's fine, at least you posted something (a concern) that maybe helps us improving it. We are all for improving things, but this hasn't really come up for anybody, but that doesn't mean it couldn't be improved. It shows... ... it may not clear for some what "requires: SomeName" really means. Along with that you can still click on the module name and opens an alert, that doesn't say much. I think this is a "bug" that needs to be addressed by Ryan. So please file an issue (or someone else) on ProcessWire github, explain it or link to your post. ...Modules Manager readme needs an update with a note about requirements. I think some more, clearer "newbie-friendly" instructions could be implemented by Ryan for the module installing process. So will I need to for Modules Manager (kinda same story) I also just updated the readme and this threads first post. Thx.
  15. This is wrong thread for this to be discussed. For me I assume you know what a module is and how to search for it, and finally install it. But as said this has nothing to do with Modules Manager.
  16. Soma

    SEV-Online Relaunch

    This doesn't depend on resolution or em, it's because you don't have the google font typekit loaded for some reason. And the fallback font is wider, I'm aware of this.
  17. RT @yellowled: Apropos: Meine Slides http://t.co/Vw0YLclQSO - Video ist (glaube ich) noch nicht verfügbar, kommt aber. #wke2014

  18. How about settting up custom CSS classes in TinyMCE to select from in a more controlled way? It's more that the font and fontsize feature in TinyMCE is kinda left over and not recommended to use. http://www.tinymce.com/wiki.php/Configuration:style_formats What you think is just wrong from a best practice stand point of how to create and design content on the web. This is not Word or Indesign. Although there's even styles format in those that is similar to CSS, so you don't go and edit text formating manually for each text, but select a predefined format. If you consider that editing font size and color is a basic editing ability that needs to be, reconsider it please, as every web designer and developer will tell you different. It's like "just don't do it, ever". But still you can of course, cause of a old Wysiwyg editor that causes headaches all over the planet. We strive to have controlled output that is portable, and once you relaunched a website that had allowed content of inline styles and font's or whatever propietary code inside editor, you'll maybe understand even better. Further it's agains consistency of code and design on your website content. Just imagine the client gives hardcoded styles to all headlines, and afterwards you or her decides to make the headline bigger. So you'd have to go through all articles and edit them manually, versus CSS where you edit one value. Even if it's for only 5 pages, it's not worth it.
  19. Soma

    SEV-Online Relaunch

    The hoster is http://nine.ch There's also template cache enable for parts of the website. And also it's optimized, the navigation is chached too.
  20. A new project went live this week. We've been working hard the last couple month to redesign and relaunch the new SEV-Online site. It's now live at http://www.sev-online.ch (The non www. version is still the old site due to complications on company that handles the DNS.) The biggest challenge was to transport the old site from webEdition to ProcessWire. There was a lot of content that had to be taken care of. There was put a lot of work into importing articles and documents and also make sure most of the links and function still work, so some mapping had to be done using ID's of documents from the old system. This was especially tricky as the old system had a separate structure for the 3 languages in the old system, and is now handled with multilanguage feature of ProcessWire where each page contains the 3 languages. Nonetheless it was a pleasure to work with PW and it took everything I've thrown at it Although there were hard times were some bugs was found during the process, especially with multilanguage features. But the good thing is they're fixed. The site maintainers are very pleased to work with PW. Some general infos: The site is in 3 languages. Using built in ML, LanguageSupportPageNames. There's a register/login for members to see additional sections on the site. Members are synced from a CRM they already have. There's ~43K members that can create a account using their Member Nr and birthdate. Once they're registered they can change profil data that will then get back to the CRM. There's a calendar for events and courses that also visitor/members can send in new ones. There's a simple online shop using apeisa excellent shop module. We use Fredi for frontend editing. So almost all content can be directly edited via browsing the site. There's a simple widget system using page references, so they can build homepage and sidebar elements as they wish. There's many forms on site, that are all built using PW Form API (Inputfields), along with using jQuery Validation for better user experience. The navigation is quite large (number of entries) so I cached the markup generated by MarkupSimpleNavigation and use client side JS to highlight entries. Some modules used on this project: - LanguageSupport modules - PW Comments - Markup RSS - Hanna Code - MarkupSimpleNavigation - AdminTemplateColumns - EmailObfuscation (EMO) - FormSaveReminder - PageEditSoftLock - Fredi - CustomPageList - ModulesManager - Shop Module (apeisa) - Schedule Pages - Template Decorator - Template Notes - Video Embed Textformatter - MarkupCache Some custom site specific modules created along the way - Custom LinkAbstractor - Lots of custom hooks for doing things on save, indexing, page name and ocntent manipulations - Some custom Textformatters for LinksLists etc - Some custom Admin pages for managing member mutations etc.
  21. <font> tag is deprecated maybe since around 14 years. html 4.
  22. Yeah I see that too, now that you mention it. Well I'm not surprized really, as such gradients get posterizes real quick and with GD lib it's almost certain. This is kinda nit picking for me, as I wouldn't expect a better quality from a "GD resize" for a thumb of that type of image having dark, subtle gradients (I'm kinda expecting it). ImageMagic would be better in that regard, though could imagine you would get a poster too. But that's not supported anyway, so I'm not sure what to tell as I'm no expert with image resizing on server software. Best bet would be to resize them with a program and upload them at the right size already. Or does commenting out those lines you guys tell help in that regard?
  23. Look both the exact same on my Android. Though d little different orange on my MAC book. Could it be that there is color profile in original? And resized has not?
  24. This is known that on a 404 there's was or is problems with LanguagePageNames module that add localUrl etc to page. THe 404 error on site/sdads is fixed just recently: https://github.com/ryancramerdesign/ProcessWire/issues/399 It's always best to report issues on github and not in the forum, as Ryan isn't always scanning the forum, but sees issue reports in github immedieately.
  25. I don't do this, PW does this. https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeTextarea.module#L114
×
×
  • Create New...