Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Joe

  1. Yeah, right. I was aware of that post, but when I had tried I could not get the list to work. I will check it out again though and also look at Wanze's link. Thanks.
  2. Hi Martijn, that looks interesting and I may try to use it in another context: To allow people to test anonymously with a "test" user name and password. They could test a little, but without being able to save. I suppose that should be secure enough.
  3. Is it possible to block another user from logging in when someone else is logged in already? The reason I am asking this: I'm setting up a test site for prospective clients. I have arranged it so the site gets set back to the original state every time someone logs in (DB gets restored from a backup copy). If someone else tries to log in at the same time though, things get messed up and have to reset things manually. So I would like to make it impossible to log in if someone else is logged in already and show a message to that effect. My problem is I haven't figured out how to detect if another user is logged in before logging in. (I am using the PageEditSoftLock module, but for this it is not the right thing, even with the hard lock turned on. I need to keep other users from logging in, not just from editing pages.)
  4. Ah, well no, using Google to search the forums hadn't really occurred to me. Thanks for the hint, adrian and kongondo!
  5. @kongondo: No man, I just come to the pub, order a beer and ask the barman.... Cheers! @adrian: Thanks for the link!
  6. Hi all! This doesn't really seem a pub topic, but since I haven't seen a thread that seems more suitable, I figured I might as well post it here: The forum search engine here only wants four letter words or better: It ignores word with less than four letters. For example a search for "PHP version" is apparently not possible. I wonder if this is really the best setting for it and what the reason behind it might be... Oh, sorry, in quotes it does accept it...
  7. That thread is here https://processwire.com/talk/topic/5598-production-site-all-admin-view-links-showing-to-localhost/?hl=localhost . I just hadn´t seen it before - I don't remember now what search terms I used the first time when looking for a solution here on the forums
  8. Hi kongondo, that was by mistake, the name, sorry, I fixed it (though konkondo does not sound so bad either, I think...) What might Teppo be thinking, how do you know?
  9. Thanks for the quick reply kongondo! That was the reason of course! My fault for not reading 'the manual' (again;-)
  10. Can someone tell me how/where the links to view pages are created in the admin page overview? I've developed a site locally and uploaded it to the server. Now the page list view links in the admin area all point to localhost/pagename/. All the rest of the links seem to be correct, both on the front end and in the admin area. The site was developed based on the Zurb Foundation 4 Site Profile (though I don't think that this has anything to do with it). I did some customization on the back end and I thought that this is where the bug came in. To see where I have tested by successively replacing sections of the site with original out-of-the-box PW files, but so far no luck. (It is not in templates-admin/default.php, I've checked that.) I have transferred sites from the same local server to the same hosting environment before with no problem, so that should not be the cause either.
  11. Thanks a lot Adrian! I followed the link you gave, https://processwire....n-form/?p=15919, and there I saw a link to https://processwire.com/talk/topic/107-custom-login/?p=735 and that was pretty much exactly the solution!
  12. With a login link I am either sent to the Admin > Pages view ({$config->urls->admin}) or to the edit view of the page the login link is on ({$config->urls->admin}page/edit/?id={$page->id}) after logging in. I would like to set up a login link that points to the home page instead (the public home page, but as a logged-in user). Possibly also a login link on other pages that sends you to the page itself rather than to its edit view. I havent´t been able to come up with of a way of setting up such a link yet. Does anyone know offhand? Thank you!
  13. Joe

    New Logo

    I love the clouds drifting by! ...I mean on the page background, in case anyone was thinking I was stoned out or something. I hadn´t seen them before, maybe they have been there a long time. But looking at the logo I guess I was paying closer attention to the whole page design...
  14. Thanks kongondo, so I got myself an account on GitHub now and posted the issue: https://github.com/ryancramerdesign/ProcessWire/issues/383
  15. But on Github you have to become a member to be able to leave comments I think, because I didn´t see any place to leave any when I looked. And, well, I don´t think I am up to contributing there (yet?;-) with my own modules and such, so I haven't joined.
  16. Cleaning up my code I came across what appears to be a tiny error in /wire/modules/Process/ProcessLogin.module. Validation of the PW login page of a PW 2.4 stable install on http://validator.w3.org/check produces: Line 77, Column 99: No p element in scope but a p end tag seen. …ef='/processwire_2.4stable_pure/'><i class='fa fa-home'></i> Home</a></div></p> Changing line 157 in ProcessLogin.module from: if($links) $out .= "<p>$links</p>"; to: if($links) $out .= "<p>$links"; fixes this issue for the login page (and I believe that is the only place this module is used). This probably does not matter in any browser, but since I've come across it, I thought I'd post it. I'm not really sure if this is the right place but didn't see any forum for bug reports.
  17. Thank you adrian! ...a bit embarrassing, as one of the threads was started by me. I will see if I get my head around it this time, now that I know PW a little better than back then, when I´d just started with it. I then came up with the other solution (just replacing certain parts of the content string in default.php, but it has always felt like a hack). Well yes, thanks, Soma. @Joss: that kind of seems similar to what I´ve been doing. Works, but feels kind of hacky;-) Thanks. So I did it the way Soma describes, with a modified helloworld.module. Yes, that´s easy, it just hadn´t appeared as such an obvious way to go about it to me at first. Now the code in my default.php looks much cleaner. Thanks again everyone!
  18. What a big dog! Nice one Well, actually I remember now, I´ve tried the approach you describe before coming up with the idea of string replacement in default.php. I tested again just now. I can create a role which will be the only one that has access to the site settings page and assign this role to a user. I only grant view and edit permissions to that role. That takes care of the delete option. However I can not take the "edit pages" permission away, otherwise the user can not make changes on the site settings page. That leaves the "Settings" tab in place however, leaving the options for renaming or hiding/unpublishing the site settings page. I would also like to remove those, as they will be at least confusing to the user.
  19. Thanks Joss, I will look into that (a little later on today, gotta walk the dog now).
  20. For certain views I want to remove some items on the admin page (for non-superusers). For example I have a site settings page (accessible to non-superusers). They should be able to edit all the fields there. But I want to remove the "Children", "Settings" and "Delete" options tabs. So far I have been removing unwanted items in site>templates-admin>default.php, simply replacing them by an empty string or some replacement (<span style="display:none"> etc.). It works, but can be rather tedious, especially when trying to avoid additional validation errors for the admin view. I was wondering if there is a better approach without changing anything in the wire folder...
  21. Thank you Dragan! A bit more infos would be nice. How do your current selector / API calls look like? What's the relation? Is there a hierarchy (parent -> children), or just "all pages with template X"? What does your logic for the frontend look like? Well, I have a general settings page. There you can make a choice, in this case mark a check-box. This value is then read and applied in the page template (all pages that use this template). In the page's edit view you also have a field (could be a drop-down) which overrides the general setting if set to another value (also applied in the template when outputting the page and overriding the general setting). A simple way would be to create another field in the parent (if you have a hierarchical structure) acting as a flag. If your admin wants to override all pages with a general setting valid for all pages, that flag would be changed from 0 to 1 (or whatever you choose). In your frontend / tpl logic, you'd first read that flag value, and only respect individual page settings if it's set to 0. Well, I'm not really sure. The site settings page is not the parent of the other pages. I still have to work out how to set this flag... Anyway, I have now resolved this actual issue in a different way: I'm doing without the automatic reset - an individual choice per page will be retained regardless of the general setting. Probably just as useful. It would still be interesting though if there is an elegant way of setting all fields of the same type to the same value on all pages, for example if a template contains a choice like "use a blue background" (yes or no) to reset that to "no" for all pages using this template.
  22. I have a site settings page, where the site admin can make general settings that will apply to all pages that use a certain template (most pages on the site). Additionally I want to allow for a choice per page that will override the general setting if selected. Example: choice to have a one or two column layout. Now if the admin changes the setting for all pages the individual page settings should be reset to the general setting's value (which would from then on be their default value and could be changed on pages that should be exceptions to this.) I have looked at the API, but so far not come up with the solution (though I suspect it is a fairly obvious one). If the user changes the value of the field (check-box in this case) that represents the general setting, at the same time the corresponding fields for all individual pages should be set to the same value. I hope this is clear, thanks for your help!
  23. I like the clear, uncluttered design! Readability is very good! When I looked at it, the video under "Appointments" did not load. There may me some glitches on some smart-phone screens - sometimes the menu covers part of the page only, have a look, not sure whether this is intended - it´s still functional. Nice site!
  24. Thank you Soma! Your information is helpful, also in as much as it confirms that this is fairly difficult to achieve and not just some small thing I have missed. I will look more closely at the admin source code, though it might prove beyond my capabilities to duplicate that functionality in a page template ;-)
  25. Hi everyone! I´ve been struggling to use CKEditor as a front-page inline editor for quite a while now. I´ve so far been able to integrate it so logged in users can edit texts right on the pages. (I´ve asked some questions and got some answers about it here before, thanks to everyone!) However for the life of me I can´t seem to get the PWimage and PWlink plugins to work from there: I got the latest version of the CKEditor module installed. From the page template I´m conditionally calling "/modules/InputfieldCKEditor/ckeditor-4.3.2/ckeditor.js" (only "if($user->isLoggedin()"). Now CKEditor and all the plugins work fine, except for PWimage and PWlink. I have the line "CKEDITOR.config.extraPlugins = 'pwimage,pwlink';" in the template and I´m also referencing both plugins, so they show up in the toolbar. They are visible there, but when I click their buttons nothing happens. What I do get when I look at the console in Firebug and click the button for PWimage is: ReferenceError: config is not defined var modalUri = config.urls.admin + 'page/image/'; plugin.js?t=E0LB (line 106) I can fix that by putting in the full path there (in /modules/InputfieldCKEditor/ckeditor-4.3.2/plugins/pwimage/plugin.js - line 106), only to get the next ReferenceError. I am really out of ideas about what to do here. I´m just not clear about why these modules don´t work here when they work perfectly in the admin area. If someone knows how to reference them correctly in this context I will very much appreciate the hint. Thanks!
  • Create New...