Jump to content

Lance O.

Members
  • Content Count

    283
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Lance O.

  1. 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.
  2. 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.
  3. After a bit of digging, I found more granular control over user permissions here: https://processwire.com/api/user-access/permissions/#user-admin-permissions
  4. Is there a way to hide specific users on the Access > Users page from other PW admins that are able to administer users?
  5. 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; }
  6. 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?
  7. adrian, are you suggesting that the username and the page names should be the same?
  8. That would be the ideal method. I've updated my original post to make the example clearer.
  9. But each user needs to have access to only one of those 100 pages.
  10. 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.
  11. 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.
  12. I'll try these suggestions. Thank you!
  13. I've checked the forums for an answer that works, but I can't seem to find one. Sorry for having to post this question. Upon dragging and dropping an image into a file field in the PW admin, I receive a "Filesize 11594 kb is too big. Maximum allowed is 8192 kb." error. I've updated the PHP ini settings to the following, yet I'm still receiving the error: file_uploads = On max_execution_time = 120 max_input_time = 120 max_input_vars = 1000 memory_limit = 512M upload_max_filesize = 50M I'm using PW 3.0.33. What am I overlooking? Is there a PW config setting that I need to set?
  14. I should have mentioned that I already have those two lines commented out before I posted my question. But now that I check the sitemap.xml file again, the "www" has been added to the urls. Looks like it may have just been a caching issue. Thanks for your insight!
  15. Is there a way to force "www" on the links generated in the sitemap.xml file?
  16. @cb2004 This is exactly what I needed. Thank you!
  17. Is this module compatible with PW 3.x? I just installed it but the Help tab isn't displaying for the designated template.
  18. These are great suggestions! I'll have to play around with each to see which one is the most promising. Thanks, everyone!
  19. Does anyone know of an alternative to fancybox? http://fancyapps.com/fancybox/ I've been using fancybox for years, but am finding issues with Google Tag Manager, so I'm looking for a "modern" replacement. I need the alternative to support images and hosted videos. I'm curious to know what experiences you've had with the other options out there.
  20. I have a site that is included in the "Sites Running ProcessWire" section of the PW site. How do I go about updating information on an existing entry?
  21. @teppo, thanks for the very quick response. I've implemented these changes and everything is working smoothly now. Thank you!!!!
×
×
  • Create New...