lpa
Members-
Posts
212 -
Joined
-
Last visited
Everything posted by lpa
-
Well, it seems to work if I leave the parent of the subtree documents to the old path like this: Move the subtree under the new parent path2: /path1/subtree1/article1/ -> /path2/subtree1/article1/ article1 (path: /path1/subtree1/article1/) is redirected to /path2/subtree1/article1/ if /path1/subtree1/ is not removed. If that is removed, /path1/subtree1/article1/ is shown in the browser address even though the page shown is /path1/subtree1/. And no 404-error is shown even though the page /path1/subtree1/article1/ does not exist any more.
-
Thank you for the suggestion. I know we could do that and maybe we do. But if we still need to keep something under /canines/, that option won't work. And if the moves of the documents are done by editors, they don't know about or have access to redirect rules in .htaccess.
-
I have a need to move a whole subtree of pages at once to another path. I would like the Page Path History -module to take care of the redirection of the old path locations to the new parent. But it seems to me that I have to move every single page individually for the move to register in Page Path History. Should this module handle the whole subtree or just the top level? Do I need to move the pages using API for the history to save with the move?
-
I would like to replace the Ryan's original MarkupGoogleMap with this module. I installed this MarkupLeafletMap and tried to change the Map Marker fieldtype to Leaflet Map Marker. But it seems these fieldtypes are not compatible with each other. What should I do to change the old field with its over 200 pages to use this fieldtype?
-
@adrian has a great support on his modules! All the problems solved with his help a long time ago! Thank you very much! And this module is great for cases where the PW template based access rights scheme is not so flexible.
-
You can find my other message on the issue here on the HelperFieldLinks thread. It is supposed to give quick access to the templates and fields for superusers.
-
1. I'll send you a private message on this. 2. Thanks, the $page->prohibited works just as I wanted based on a quick test. 3. At the moment I have a login.php file that is included on every page in _init.php. That page has my own logic without PageProtector. There, if I need the login form, I can format it just like I want and even use the getRandomPict()-function which is in _func.php. But if I use the PageProtector I use the $page->loginForm, as show above, where I can't use my getRandomPict()-function, because it is not a PW template. I get errors like: "Call to undefined function getRandomPict()". I don't want to add the image to every template.
-
1. No, the protection is not taking in account the role at all. Even if I change just one page without child protection to be protected, I can access that page after login with a user account that does not have the required role! 2. Yes, $page->protected works, but it does not make any difference on who is accessign the page. Should it give different results based on the users roles? I would like to make it to not show the navigation item if the page is protected for that particular user. 3. What is actually the message the hook returns? I would like something like this: // Give me a random picture to the login page $image = getRandomPict($homepage); $content = " <div class='row'> $page->loginForm <div class='large-12 columns'> $image </div> </div> "; $event->return = $content;
-
I have pages like this: Page1 - page1.1 - page1.2 Page1 has been given access to roles: musician, assistant. Page1.2 has been given access to role musician only. When logged out, both pages ask to be logged in. When logged in as the user with only assistant role, I still can see the page1.2. I can't figure out why the roles based restrictions don't work at the moment. How should I debug this? Second question: can I hide the page1.2 from the user with assistant role in my navigation somehow? What should I do in my navigation script to hide the pages that the used doesn't have view access to? Third question: I need to customize the login-form by including some content from PW, but now when the customized login-form is not a PW form, I can't run any functions from the PW templates. How should I customize the login-form content when I need something more than just the form?
-
Great, I think that will be enough for my needs.
-
Thanks! Off course one option could be to use the normal user admin, but can it be restricted to allow editing users or creating new users with only a restricted set of roles?
-
I have tried to use front-end editing using the <edit> tags. It seems, that I always get the history tab below the fields I am editing even though those fields are not under version control. Is there any option not to show the history tab with front-end editing modals?
-
I need a solution to give some admin users a front-end page where they can create new users and edit existing ones. The existing and new users should only belong to a restricted set of roles. Is there some ready examples or modules to do this?
-
Module HelperFieldLinks - field and template edit shortcuts
lpa replied to Soma's topic in Modules/Plugins
I have always liked this module, but now found out that using this together with AdminPageFieldEditLinks-module there is a problem with the links alignments. I don't know which one should be fixed, though. Normal view: Broken view: -
Hi @adrian, this seems to work now! But I didn't need the include '_main.php'; -line. When having that, I got the _main.php content rendered twice.
-
I tried this too, but it seems to me the intermediate templating doesn't work with this module having defined my own login-page. I get errors pointing to undefined variables that are defined in _init.php. If I try to require the _init.php first, then add $loginForm to $content and then require_once _main.php, I get other errors that result from login.php template not being a PW template: Class 'FilenameArray' not found in site/templates/_init.php Have you really used login.php template with intermediate templating?
-
I have defined a login-handler shown below to print the login-form on each page that requires access when the user is not logged in and is under some parent-page: if ($page->parents->has('name=memberpage') { $section = 'memberpage'; } if(!$user->isLoggedin() and $section != '') { # print the login form } elseif ($user->isLoggedin() and restrict_content($section)) { # user doesn't belong to the required group } This way I can show login-form on the same page that is restricted and not redirect the user to a separate login-page. Now I tried to use CustomPageRoles module for simple access control. But the module redirects me to the 404-page when I don't have access, when not logged in. How could I just check whether to print the login form or show the page with CustomPageRoles handling the access control roles? Can I somehow read with the api that the user doesn't have access to the page without redirection to 404?
-
Great, now I got it. Thanks!
-
Howto change Textarea field to CKeditor field and keep formatting
lpa replied to lpa's topic in General Support
So based on your suggestions the change in any case needs a conversion from Markdown to HTML by copying the content to another field and then using the new fields. Thanks for this. -
Thanks, I will give this a try. Just asking what do you mean with "Custom page label format"? The players default instrument in the user template could be considered as fixed, I think. But there are always exceptions...
-
I have some problem with this module when also using the HelperFieldLinks module. I don't know which one of the modules is causing this, but it doesnt look very nice.
-
Nice module, but I don't get how that would solve my problem. I need in each concert a list of the players with their instruments in that concert like this: Concert A: Violin: Adam Smith, Joe Bush Viola: Mark Taylor Bass: Kate Jones Concert B: Violin: Adam Smith, Mark Taylor Viola: Joe Bush Bass: Henry Wilson Mark Taylor has Viola as his default instrument on his user-page. But in concert B he playse the Violin and should be listed under the violin players. His default instrumnet should not change from Viola to Violin. How would you store the list of players grouped by the instruments under the concert template?
-
I have a site for an orchestra. I would like to keep track of the players participating each concert. The players are kept as users in processwire. Each player has a default instrument as a user-field, violin, bass, flute etc. But some players play multiple instruments. Each concert has a page in PW. The players for a concert would be selected from a list of users. The list would then be used for sending email to the players of that concert and keep track of the players salaries etc. This would be easy to accomplish with Page references and ASMselect to the users-pages. BUT because the user might have an other instrument from his/her default instrument in one particular concert, I have to keep track of both the user and the instrument in that concert he plays. How would you do this? Make a repeater for the players of the concert and change the instrument for the player in the repeater? PageTable? Some other fieldtype that I don't know or remember? How to make a nice interface for selecting the players and attaching them to correct instruments?
-
I have some fields defined as basic Textarea fields with htmlspecialchars, Newlines to XHTML Line Breaks and Markdown/Parsedown Extra textformatters. The content is maintained as plain text with line breaks and some simple Markdown coding. Now the editors would like to use CKeditor for those fields. What should I do to convert the current newlines and Markdown formatting to HTML formatting shown properly in CKeditor?
-
@apeisa, do you think you would have time to check my questions above? Could this be some PW3 compatibility issue?