Jump to content

arjen

Members
  • Posts

    1,222
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by arjen

  1. Nik, I've updated the module and it works great! Thanks for updating the module.
  2. No worries. It's getting late here. I will try to find out more tomorrow.
  3. I've seen the bitwise operates before, but I don't totally understand this soma. I've narrowed it down a little bit more. Changing a template which doesn't result in the deleting of any fields doesn't throw an error. Replacing line 62 with your code results in an empty page (double checked no output at all). It seems getting stuck at: http://domainname.com/processwire/page/edit/saveTemplate I'll try and disable some other modules which might be infering with this one.
  4. Line 65 seems to include a single &. Changing this to && doesn't matter.
  5. When switching templates (it doesn't matter which or of the page reference tab has been enabled) on pages I'm getting errors: Notice: Trying to get property of non-object in /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module on line 65 Notice: Trying to get property of non-object in /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module on line 71 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 358 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 359 Warning: Cannot modify header information - headers already sent by (output started at /home/x/x/x/site/modules/PageReferencesTab/PageReferencesTab.module:65) in /home/x/x/x/wire/core/Session.php on line 360 Any pointers why this error might occur? It does save the chosen template on the page. I'm running 2.3.0.
  6. You're absolutely right antkinght. Didn't test the code so thanks for pointing that out. For more arguments and reasoning on the closing tag do a little research on Google.
  7. You can also ditch the ?>. You don't want any (invisible) characters after the >. I.e. trailing whitespace can lead to "headers already sent" errors. Those are notoriously hard to debug. Another thing you might consider is using a function. This way you can re-use the function in other templates. This might seem trivial or even more work, but in the long run you benefit when you want to change someting. function newsList($newsItems) { if (!count($newsItems)) return "There are no news-items found."; $out = ""; $out .= "<ul class='list'>"; foreach($news as $newsitem) { $out .= "<li class='list-item'>"; $out .= "<section>"; $out .= "<h5><a href='{$newsitem->url}'>{$newsitem->title}</a></h5>"; $out .= "<em>{$newsitem->news_date}</em>"; $out .= "</section>"; $out .= "</li>"; } return $out; } echo newsList($pages->find("template=news-item, section={$page}, sort=-news_date, limit=5")); Written in the browser, so not tested but I think you will get the idea.
  8. Thanks soma! I've read this too and should have added this, but since it's still not production ready I wouldn't recommend this.
  9. Forms aren't translatable. Do you have access to the Form Builder forum yet? You can ask ryan, but I guess he is pretty much enjoying other things at the moment.
  10. The Form Builder can be bought. Check out this video on how it works.
  11. 0 means it isn't set so you might want to look in another direction since it doesn't seem to be caching that is causing your issue.
  12. Thanks for responding titanium. I know you don't want to turn ProcessWire into a messy pile - you wouldn't be here otherwise I agree that an editor should have an option to place certain stuff like galleries and I think the approach of SiNNuT is really fine. It keeps most logic out of the editors reach. In my opinion the line is really thin and often pandoras box is opened. That's why I think newspaper sites are really difficult to design. But I've seen cases where this type of content will work for an editor. It comes down to the project and the client.
  13. Have you enabled caching? I've ran into some issues before comments not saving when I enabled cache on the template.
  14. Thanks for the feedback. Glad you sorted it out!
  15. @Martijn, I always use .tar of .tar.gz since I've learned tarring respects the permissions. Zip does that too? I have some mixed experiences using zip.
  16. It isn't too hard. Make sure you add a limit selector and output the $completeListOfItems->renderPager() function somewhere in your template.
  17. Why do "the clients/editors would like to combine them as they wish"? In my experience this is mostly a type of "I need to control" things. There are some exceptions but usually this doesn't benefit the reality (or goal) of a page. Offcourse, regular content like bodytext or images need to be controlled, but in my opinion every type of page has a goal. A designer (UI, UX or visual) determines (offcourse in cooperation with the client) what that goal is. Most of those goals I can be held accountable for since I'm designing or proposing a design to a client. When you give an editor options to create pages as they wish I've seen two scenarios happen: 1. They hardly ever use it (The client is not to blame since they are focussed on other things like running their business) 2. They overuse it (The client is not to blame since they want it "all" and we need to decide what is really important - the goal) It's both a maintance (from client perspective) and a user (the visitor of the site) issue. I always try to make this as clear as I can. That said I realize some content blocks can come in handy but I hardly ever see a proper use of using content blocks/widgets (like WordPress). As always you should test this in reallife scenarios/use cases, but from my experience I've learned that this is hardly ever really needed. I think you should talk about using content dynamically — where ProcessWire is really awesome.
  18. @apeisa, you're welcome. @yellowled I've been experimenting this for a client (some default lightboxing and ajax forms) and I really like the css customization and the fast load. Most lightboxes seem sluggish after using this.
  19. Have you enabled page numbers? It seems you need to render the pagination.
  20. Just found another really interesting lightbox. Magnific Popup is a free responsive jQuery lightbox plugin that is focused on performance and providing best experience for user with any device. It's build for speed and seems highly customizable through css (and not javascript like most).
  21. Will this work? $pages->find("template=certain, created>=$firstdayofthismonth, created<=$lastdayofthismonth, sort-=created");
  22. And then there is Susy. Imho the ProcessWire approach to creating layouts. It does not force anything upon you except good coding
  23. Great Soma! Really helpful and much stuff to learn from. Thanks!
  24. I ran into this too. See the code and explanation if the other post. Basicly you have to merge all $pages->find and include them again in a find. This feels very hacky (and potentially has issues with performance), so it would be preferred to use one $pages->find. $latestPosts = $pages->find("template=post, frontpage=1, max_date>=$today")->add($pages->find("template=post, frontpage=1, max_date=null")); $pages->find("id=$latestPostsMaxDate, limit=3, sort=-created");
×
×
  • Create New...