Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. See options #1 (post to script outside PW directories) and 3 (post to same page) here: https://processwire.com/talk/topic/407-processing-contact-forms/?p=3106 If you go with option #3 you can intercept right within same page, call your module, do your stuff and return the data Btw, in case you were not aware...https://processwire.com/talk/topic/225-how-to-work-with-ajax-driven-content-in-processwire/ if($config->ajax) { // page was requested from ajax // can optionally include external php scripts // call your module and do stuff }
  2. @Kixie, Nice effort! Thanks. Not sure you know we already have a similar module? http://mods.pw/2y - ProcessPageHidden and one for un/publish - http://mods.pw/2z - ProcessPagePublish Btw, both yours and the ones I linked to are not really Process Modules
  3. @Raymond - if that's what happens then it is working correctly . Blog does not automatically associate permissions and roles. That would be assuming too much. It is left to you to set up. To help you, it creates the role 'blog-author' and a permission 'blog'. The role 'blog-author' is used to find and list, uh, Blog Authors' posts. The permission 'blog' is used to grant view access to the Blog Dashboard. So, as per normal PW access control setup, you will need to assign roles/permissions to your users at both the access and template level. You can still create additional permissions/roles to fine tune who can post, publish, edit, posts, etc. So, if you want your user to view the dashboard you can add the permission 'blog' to the role 'blog-author' (or any other role you create) and give your user that role. If you want them to access the Blog pages tree, you can do that at the template level. E.g. create a role 'blog-editor', and use that to control template-level permissions for Blog pages (view, edit, delete, etc). You can take advantage of PW's cascading permissions feature (i.e. children inherit parents'). Please note that if you do not want users to be able to delete Blog posts at the template level then you should also not give them access to the Blog Dashboard since they will be able to delete posts anyway. I have not had the need to add such an access control at the Blog Dashboard level beyond checking if they have 'view permission' ('blog') and for the 'Cleanup' utility, that they are supersusers.
  4. Are you looking for an affirmation or a code example?
  5. About renaming the module...(it isn't a process module ) https://processwire.com/talk/topic/741-a-guideline-for-module-naming/?p=6267 https://processwire.com/talk/topic/1313-modules-process-and-the-difference/
  6. @Rob, Have you enabled URL segments in your template as Soma suggested? If you don't know how to do that, happy to explain..
  7. Ha! I didn't notice that . Well I hope I said something useful
  8. I recall this conversation here: https://processwire.com/talk/topic/1176-hiding-uneditable-pages-from-users/ Scroll down for the solution - See posts #7, 13-30
  9. div class='breadcrumbs'><!-- breadcrumbs --> <?php // breadcrumbs are the current page's parents foreach($page->parents() as $item) { //skip SideBarPages using id of the page. //You can also use $item->id=='1234' $item->title=='titleOfSideBarPages, $item->name, etc //using the ID, though less readable, is more foolproof if ($item=='1234') continue; echo "<span><a href='$item->url'>$item->title</a></span> "; } // optionally output the current page as the last item echo "<span>$page->title</span> "; ?> </div><!-- end breadcrumbs -->
  10. Glad you sorted it! However, RE PHP and the use of double versus single quotes, the below is not true. You can use either quotes with certain caveats. More info here: http://php.net/manual/en/language.types.string.php http://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in-php
  11. These are similarly useful WireArray: http://processwire.com/api/arrays/ PageArray: http://processwire.com/api/arrays/page/
  12. @Philipp - you forgot the img tags
  13. Hi invamped. Welcome to PW and the forums. I don't know much about AngularJS but maybe this module can help? https://processwire.com/talk/topic/8420-processwire-angularjs/
  14. Hi Dave, Welcome to PW and the forums... Glad you sorted it out but would like to suggest you do it differently...assuming I understood the question correctly... If all you want is to grab one random image from a coupon page, there is probably no need to find several pages first. Why not grab ONE random page instead (one containing your coupon images) and display its coupon image? Assuming that a coupon page contains other images as well but you are only interested in the coupon image (i.e. tagged 'coupon'), something like this maybe... //we only get one random coupon page (we use 'get' rather than 'find') $couponimage = $pages->get("template=service-pages, sort=random")->images->getTag('coupon'); Edit: This code assumes there will always be a coupon image in those service pages.
  15. @Matt, That _notes folder in your screenshot is new to me. Is that a custom folder you created? What's in it? Below are the 31 items that should be in /wire/modules/Inputfield/ folder:
  16. I have confirmed that the 'missing' file is in the zip file at the download link you have stated. Your unzipping must have gone wrong. I would start the unzipping all over (maybe using a different unzip programme ) in case other files are 'missing' too. Edit: Oh, how rude of me. Matt, welcome to ProcessWire and the forums! Sorry for the bad start
  17. Matt, You are probably missing some ProcessWire files such as /wire/modules/Inputfield/InputfieldSelectMultiple.module. What version of PW is this? Did you download the PW zip? Ensure the unzipping went OK Edit: Beaten by Horst...
  18. Yes. But it would also be worthwhile to first check if a similar issue has not yet been submitted. Welcome to the forums too
  19. Glad you got it sorted. Now that I think about it, this nesting level issue has come up before in respect of installing Blog. MarkupBlog docs are on my site here: I will need to update them soon with the latest changes as shown on post #207 and #244 here in the forums which you might want to read as well.
  20. Yes...Nothing this side of 2014 I am afraid. ETA February/March 2015 at the earliest...
  21. Your question is rather generic What exactly are we supposed to be looking at at the address you have provided? What exactly does "it doesn't appear correctly in Firefox" mean? How is it supposed to appear and what is "it"? Show us some code. E.g. How are you calling your images?
  22. @Hafa, I suggest you first rule out if MAMP/OpenSSL is the issue. I don't use MAMP myself so I don't know how to enable OpenSSL. Maybe others will chime in but meanwhile you can find out. Can you also confirm you are running the required PHP version? Additionally, to rule out the problem of your environment, you can test your site in lightning.pw....(when it's back online )
  23. Well that's strange. Can you please confirm: That you run the 'Cleanup' wizard before uninstalling the module itself? That after uninstall you do not have a field called blog_categories in your install/DB? That the uninstaller finished running - i.e. it did not hang and not complete? Your PW version?
  24. Actually I PM'ed you about the 'problem' on 5 November . Found out about Blog docs only yesterday?! I need to up my game!
  25. @Gazley, Thanks for trying out Blog. Nothing much to add to what Adrian has said. I can tell that you are using Blog version 2.x.x. As the error shows, it seems you installed Blog, then uninstalled it without first 'cleaning up', then tried to install it again. That's the only way that error could occur based on your explanation... Let us know if we can help further..
×
×
  • Create New...