Jump to content

kongondo

PW-Moderators
  • Posts

    7,374
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by kongondo

  1. In those notices, PW is complaining about line #807 in /wire/core/Page.php/ public function numChildren($onlyVisible = false) { if(!$onlyViewable) return $this->settings['numChildren']; return $this->children('limit=2')->getTotal(); }
  2. allanb, I have found what the problem is...you have lots of undefined variable notices and these are nested in <br> tags; those are pushing your menu down... <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> <br> /your/server/path/ <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> <br> /your/server/path/ <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> <br> /your/server/path/ <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> <br> /your/server/path/ <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> <br> /your/server/path/ <b>Notice</b>: Undefined variable: onlyViewable in <b>/your/server/path/new/wire/core/Page.php</b> on line <b>807</b><br> I have a feeling your didn't copy all of your files over...
  3. Hi allanb, Welcome to PW! I have had a quick look. Your ul.right seems to have a height of 345px. Did you change the default styles that come with the profile? It is definitely a CSS issue. I think that height is being inherited from somewhere... Btw, in your html source I am seeing 6 PHP notices (undefined variables...). You did not leave your debug on, did you? If yes, you need to turn that off on this live site.
  4. Ye, so versatile this PW, thanks Wanze... Problem for him though: He needs that Page Reference Field to use PageListSelect Edit: Silly me, of course, using the "Input" tab: Custom selector to find selectable pages...,he does not need to use PageListSelect; he can get all the pages he wants (and exclude those he doesn't want) using selectors..if he can live with lots of scrolling (Select rather than PageListSelect) if there are many pages
  5. Yes, other roles can edit pages if you give them the permission...otherwise it will be meaningless to only have superuser edit pages, hehe...But, you also have to give them (the roles) permissions under Template -> Access When editing a user, you see this at the bottom of the page: Btw, remember to remove those extra permissions you gave the Guest in your tests Edit: Visibility of pages for custom users depends on the permissions you give them (not really on "hide page" settings you see when editing the page) Edit2: One other thing, be mindful of role inheritance... http://processwire.com/api/user-access/roles/
  6. Come to think of it (am not thinking clearly hehe), in essence, what you are trying to do is limit access to a page (the Menu page). If your client cannot edit the page, he/she cannot add menu items(via Page Reference Field). So, you have at least two alternatives: Create your Menu page (the one with the Page Reference Field) under Admin. Only you will be able to Edit that page (don't let Client be superuser ). Alternatively, create the Menu page as normal, but limit access to editing it (the page) using roles and permissions + template access controls. Hope this makes sense.
  7. You limit what the client can do in the back-end using Access (roles, permissions, users)....You can even "hide" pages as children of "Admin" and that by default will limit access to them...E.g., create a settings page under Admin and throw stuff there In a rush, can't explain more now, but definitely, I think Access control can help get you there... Btw, have you tried PageListSelect logged as a user with less privileges? Were some pages hidden from select?
  8. I don't think it is possible right-out-of-the-box, I could be wrong. Exclude from lists and searches does not refer to the back-end but the front-end. A menu is a list after all I understand the confusion though... Do you want to prevent the client from adding menu items? What's your scenario?
  9. Hehe, wanted to try that but since the form says "field" names...I thought nah
  10. Zahari, Thanks for writing up about your experience, I have quickly read your post. One thing that sometimes confuses newbies is the so-called "the ProcessWire way of doing things". You will find out that in most things, there is no such way Yes, you will get advice about different approaches to solving a problem. One thing that is stressed though (by the way) is to sanitize your input (this has nothing to do with your post above) - that, perhaps, is one (of the few?) examples of the "ProcessWire" way . What am I saying? Feel free to experiment like you've done above, look at different approaches. The approach above by Ryan is one of the approaches available. When you have time, study also the default profile's template files, then look at the Blog profile and the Skyscrapers profile as well as code by other seasoned guys in these forums. You will see different approaches there. Choose what you believe makes best sense to you and ask questions. Finally, if you haven't already done so, have a read at the below link. This gem of a thread discusses various approaches to doing template files in PW: http://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ Happy coding!
  11. So you are saying, something like this?: Edit: No. see next post for clarification. Admin Setup Templates basic-page home my-other-tpl search-tpl etc-tpl Those would have to be child pages of Templates, I believe..The module would create a new child page under Templates in the Admin tree whenever a new template was created. Just thinking out loud here... http://processwire.com/talk/topic/1272-new-page-nav-in-admin/
  12. kongondo

    20.000 massages

    I thought you were on holiday? PW pull is irresistible
  13. Hi alkahest, Welcome to PW! If I understand you correctly, this is determined in Setup->Fields->Input....scroll down to "Input field type". Change that to PageListSelect rather than the default "Select" and you should be good to go . Seems with "Select" you can only select top level pages. You can still limit the page selections to children, grandchildren, etc of a particular parent using "Parent of Selectable page(s)" setting. If you want all pages, then leave that setting to "Home". Lovely site and portfolio you got there, btw.. @Ryan/Others...is this by design (haven't searched the forums ). I suppose it is, to avoid endless scrolling maybe?
  14. Andrew, Here's your demo for using SWFObject in ProcessWire. I reckon you owe me at least one free Russian lesson Hehe Here's the JavaScript code; the whole 3 or so lines of it <script type="text/javascript" src="<?php echo $config->urls->templates?>js/swfobject.js"></script> <script type="text/javascript"> swfobject.embedSWF("<?php echo $config->urls->templates?>swf/locomotive_poc.swf", "myContent", "900", "720", "9.0.0"); </script> And the HTML.... <div id="myContent" class="myflash" > <p>Alternative content if Flash doesn't work </p> </div> These code is placed in your ProcessWire template file. There is hardly any PHP in it. Of course, you can add your SWFObject parameters as you wish...Next you create a PW page and make it use that template file. I placed my swfobject.js file in /site/templates/js/ and the .swf in /site/templates/swf/ (I created the swf folder). That's all there is to it So, what do you say? ProcessWire rocks, right?
  15. Andrew, Place that code in your template file and I can promise you it will run... . It is just JavaScript; nothing special about it. If I have the time I will prepare a demo with your code and demonstrate this. What k07n wrote above was just an example about including flash in your site.
  16. OK, my Russian is getting better and better From this site: http://blog.deconcept.com/swfobject/#expressinstall You could place expressInstall.swf and the swfobject.js in your site/assets/ folder. You can then include them in your template file using PW API....You can then paste your JavaScript code above inside the template file. PW template files will accept HTML, CSS, JS, PHP..etc....Try this and let us know... Other refs: https://github.com/swfobject/swfobject https://code.google.com/p/swfobject/ - how to use documentation
  17. Nice one guys @Diogo...thanks for the reminder about user templates being editable. I usually forget that... Btw, you are missing the closing ")" in your selectors' code
  18. Quick one...will update later...(will check for errors) - Tested with PW Dev (version from a couple of days back) Trash Pages get(); - will NOT get anything from the Trash get("include=hidden"); - will NOT get pages in the Trash (even if their status there is hidden). get("include=all"); - will get ALL pages in the Trash (all pages - visible, hidden, published, unpublished) Tree Pages (non-admin) get(); Unpublished + Hidden Page => will return something like "for-page-1532" if you echo out the name of the returned document. Echoing title returns the name normally (not the title). get("include=hidden"); Unpublished + Hidden Page => will return something like "for-page-1532" if you echo out the name of the returned document. Echoing title returns the normal name (i.e. without the "for-page-1532"). get("include=all"); Unpublished + Hidden Page => will return page. Echoing out the name behaves normally (i.e. without the "for-page-id"). get (); Published + Hidden Page => will return page normally. get (); Unpublished + Visible Page => will return page normally. You can use has_parent in your selector Edit: Yes, you can use parent!=$config->trashPageID in your selector as well .
  19. +Teppo.... +Ryan's code is really well-commented and written
  20. Peter, You can easily exclude pages in the trash by using, for example, has_parent!=7. The ID of the trash page is 7 by default...OR...example code from Trashman (the module) if ($page->parent->id != $this->config->trashPageID) { //blah blah}//used in function/method context $config->trashPageID returns the Page ID of the trash page. Pages sent to the Trash have their parents changed to the Trash page (ID=7). They don't become orphan or lost pages Edited: Added Trashman code example
  21. Like Arjen said, $pages->get("gallery") will not get you anything; you will get an unknown selector operator since PW doesn't know what gallery is Lots of "get" examples here: http://processwire.com/api/variables/pages/ http://processwire.com/api/variables/page/
  22. Welcome hop_along_kid! You are going to enjoy this ride I can promise you that
  23. I have a feeling PW date selectors will obey stuff you can throw at PHP strtotime
×
×
  • Create New...