Jump to content

Lance O.

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Lance O.

  1. First, let me say that I've been looking forward to a module like Login/Register/Profile. I think a module like this one helps to bring another category of projects to ProcessWire that otherwise would have been developed in another CMS. I've been playing with the module over the weekend and discovered the following: Opening "Fieldset in Tab" fields display as an option in the module's "Profile form fields" setting. Ending "Fieldset in Tab" fields display with the label "Close an open fieldset". I'm going to assume that "Fieldset in Tab" fields should not display as an option. If an image is added via the "Profile form fields" setting, the default display of that image on the public side displays the Edit functionality for the image. Can this be turned off? If an image's settings restrict the image's dimensions, the image does not display appropriate errors if a larger or smaller image is uploaded. I feel that images need to work well with this module since profiles on most services these days include an option for a profile image. Thank you for making this available!
  2. Because the client needs the ability to add or edit categories. Creating a "Select Options" field would mean that I would have to provide permissions to edit the field itself.
  3. Thanks for your quick response, abdus, and for providing a link to the earlier discussion. Rather than spend any more time on a solution, I think I'll just create two different templates based on your suggestion. Thank you!
  4. I'm working on a site that has both a "Blog" and a "News" section. I'd like to be able to use the same "Post" template for child pages of each of these sections. The catch is that the "Post" template needs to include a Page Reference field that should display categories specific to "Blog" posts -or- specific to "News" posts. In other words, the categories for these two sections are different. What is the best approach in displaying a "Categories" field on the "Post" template that would display the appropriate categories based on if the post is located in the "Blog" or the "News" section? Page tree looks like this: Blog Posts Blog Post 1 (Categories field should only reference blog categories) Blog Post 2 Blog Post 3 Categories Blog Category 1 Blog Category 2 Blog Category 3 News Posts News Post 1 (Categories field should only reference news categories) News Post 2 News Post 3 Categories News Category 1 News Category 2 News Category 3
  5. Thanks for the quick response!
  6. What about this module makes to specific to PW 3.x and above? I would like to be able to use it on site using PW 2.7.2.
  7. I just cleared the compiled files from the main Modules page and that seems to have removed defaults when adding new products manually.
  8. This is a site that I developed. I originally imported the products via the API. Only now default values are used when adding a product manually through PW. It seems to me that there is something cached that is causing defaults to appear. There are no hooks or modules that add defaults.
  9. I am using a "Page Reference" field to assign tags to products. The "Page Reference" field uses an input field type of "AsmSelect". In the "Settings specific to 'asmSelect'" section, the "Default value" is empty. However, there are four tags automatically added when I create a new product page. Every new product includes these same four tags. I'm using PW 3.0.62. Can someone confirm if this is a bug in this version? If it is, I need to let my client know that it will be fixed in an upcoming release. Or is something else at play here? Exported "tags" field is below: { "tags": { "id": 257, "type": "FieldtypePage", "flags": 0, "name": "tags", "label": "Tags", "derefAsPage": 0, "inputfield": "InputfieldAsmSelect", "parent_id": "/tags/", "template_id": "tag", "labelFieldName": "title", "collapsed": 0, "usePageEdit": 1, "icon": "tags", "allowUnpub": "", "defaultValue": "", "template_ids": "", "findPagesSelect": "", "findPagesSelector": "", "labelFieldFormat": "", "addable": "", "showIf": "", "columnWidth": 100, "required": "", "requiredIf": "" } }
  10. Has anyone had any recent experience displaying Facebook posts using the Facebook PHP SDK? I find the Facebook documentation to be confusing and I'm coming up short in finding recent information and code examples online. Any help is appreciated.
  11. I've created a Page field that uses a custom hook (included in /site/read.php) that lists all users with a role of client. $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name == 'client') { $event->return = $event->pages->find('template=user,roles=client'); } }); When I log in as the superuser, the list of users displays correctly. However, when I log in using an admin role that I created, the list is empty. I've given full permissions to the "admin" role. Why can't the admin role see the list of users? The ultimate goal is to create a user with a client role, then assign the user to a specific page in the site using the Page field.
  12. After a bit of digging, I found more granular control over user permissions here: https://processwire.com/api/user-access/permissions/#user-admin-permissions
  13. Is there a way to hide specific users on the Access > Users page from other PW admins that are able to administer users?
  14. I have a custom login page where a user should be directed to a members only page when the form is submitted and the user has been validated. What is wrong with my logic in the code below? Regardless of the user's role, the user is never authenticated and displays as a guest. if ( $input->post->user || $input->post->pass ) { // user submitted the login form if ( $session->login($input->post->user, $input->post->pass) ) { // user was authenticated and logged in // user has "admin" or "superuser" role foreach ($user->roles as $role) { $content .= $role->name . "<br/>"; } } else { // user is not authenticated // user is "guest" foreach ($user->roles as $role) { $content .= $role->name . "<br/>"; } } } elseif ( $input->get->logout ) { // page was accessed with ?logout=1 GET variable, so log them out $session->logout(); $content = $form; } else { // user arrived at login page for first time $content = $form; }
  15. I'm writing documentation for client training and I have a silly question. What is the "official" name of the default listing view in PW?
  16. adrian, are you suggesting that the username and the page names should be the same?
  17. That would be the ideal method. I've updated my original post to make the example clearer.
  18. But each user needs to have access to only one of those 100 pages.
  19. My client has a need to create a new PW admin user and assign permissions that restrict access to only one assigned page of the site on the frontend. Each user only has access to the single page that is assigned to them. Example: User #1 -> Page #1 -> Access User #1 -> Page #2 -> No Access User #1 -> Page #3 -> No Access User #2 -> Page #1 -> No Access User #2 -> Page #2 -> Access User #2 -> Page #3 -> No Access User #3 -> Page #1 -> No Access User #3 -> Page #2 -> No Access User #3 -> Page #3 -> Access etc. There may be 100 different users that all need access to just their page. Without having to create 100 templates and manage access through the template, what is currently considered the best method for restricting page access? All of these pages should use the same template.
  20. This issue may have been answered earlier, but I'd like a little clarification if possible. The site I am developing has one section that is translated into French Canadian. Only the pages in this section are translated. The site's Home page is only in English, which is the default language. The English name setting on the Home page is blank, and the French name setting is "fr". All of the pages in the translated section have the Active? checkbox next to the French name on the Settings tab checked. No other pages have this option checked, including the Home page. URL examples: http://domain.com/drainage-pipe-products/ http://domain.com/fr/drainage-pipe-products/ When viewing the http://domain.com/fr/drainage-pipe-products/ page, links included in the page's navigation automatically include the /fr/ in the url, even though those pages don't explicitly have the Active? checkbox selected. That's not the behavior I was expecting. Is this normal behavior? If this is normal behavior, then what is the purpose of the Active? checkbox? Have I configured something incorrectly? Any insight is appreciated. I feel like there is something I'm missing.
  • Create New...