Jump to content

kongondo

PW-Moderators
  • Posts

    7,479
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by kongondo

  1. For the sake of people searching for modules, you might want to consider renaming the module. I doubt somebody would search for 'Happy' ...; not very descriptive for a module....Just a thought...
  2. Is the name of the module HappyClasses or DynamicCSSClasses? Congrats on your first module.
  3. Maybe abstract different tasks to different (sub)modules? Something similar to the tools module by netCarver et al. (can't remember its name atm). Then one could add only the bits they need or use other third party tools for some tasks. As for the monitoring system itself, I would probably install it on a ProcessWire site with no frontend traffic, basically, only backend whose only work is to monitor, inform and issue commands to the sites being monitored. Oh, welcome to PW and the forums petejones
  4. OK, thanks. I'll let it marinate a bit more then merge to master, probably next week.
  5. Looks like you are in a template file rather than a module. In that case, PHP does not know what $this is. Turn debug mode on to catch such errors...Change code as follows: $session->CSRF->getTokenName(); $session->CSRF->getTokenValue(); Edit: ..and you also need to echo out your token name and values
  6. There's an example here as well: https://processwire.com/talk/topic/6562-sending-email-after-moving-page-from-one-parent-to-another/?p=64588
  7. I'm glad you find the module useful
  8. Yes...there's the (commercial) module Padloper... You would have to do some work to get your shop to look just the way you want but Padloper comes with very good documentation Welcome to the forums
  9. I think what you are looking for are chained/dynamic/dependant selects. ...http://www.appelsiini.net/2010/jquery-chained-selects There's been some talk before in the forums, e.g. this one: https://processwire.com/talk/topic/8729-how-to-create-a-form-with-dynamic-select-list-filtering-available-values-by-multiple-fields/
  10. Have you seen this as well? https://processwire.com/talk/topic/4451-menu-builder/?p=95415. For such sites, you can also pass the $page object or an array of menu items. This is also mentioned in the readme PS: Moving this topic to MB support forum...
  11. @adrianmak Currently that's not supported. I might consider it in future versions, depending on demand.
  12. That code won't work... First, grab some pages, then check if they are selected in the current (or some other) page's pagefield: $pagesPotentiallySelectedInNameOfYourPageField = $pages->find('template=products, limit=50'); $someOtherPageWithNameOfYourPageField = $pages->get(1234); foreach ($pagesPotentiallySelectedInSomePageField as $p) { if($page->name_of_your_page_field->has($p)) echo 'yes, am right here, wohoo!<br>'; //if($someOtherPageWithNameOfYourPageField->name_of_your_page_field->has($p)) echo 'yes, am right here, wohoo!<br>'; else echo 'not in here!<br>'; } http://cheatsheet.processwire.com/?filter=has
  13. if($page->your_page_field->has($p));// // if that doesn't work. if($page->your_page_field->has($p->id)); Typing from memory so there could be errors..
  14. Hi @Snd, Welcome to PW and the forums. Can you confirm you have install.php on your server? (assuming you FTP'ed new files for a new installation)...Otherwise, what @rick said... Edit: Beaten be @rick
  15. Thanks for testing. Please look out for any PHP errors (debug needs to be on => but not if you are testing on a live site ), thanks.
  16. Hi @Asmordean, Welcome to the forums. Until yesterday, not it was not possible. Given your question (and previous requests), I have gone ahead and added an option to enable CKEditor in Quick Post (see demo below). This is currently in the dev branch only (version 2.3.6). To enable, follow these steps: Update Blog to version 2.3.6 from Dev branch (either download the zip or use url to pass to PW to upgrade the module) Scroll to the bottom of ProcessBlog's module configurations (via /modules/). Check the box to enable use of RTE in Quick Post. NOTE: This setting (unlike the others) is available both before and after installing Blog). I decided to keep it here so that only Superusers can control it Head over to /blog/posts/ and reload the page. You should see CKEditor loaded Note: If you are on an older ProcessWire install without CKEditor, you will not see the RTE, of course. You cannot insert images in your post using this option. To do that, edit your post in normal 'page-edit' mode Please test and let me know how it goes.
  17. Why not? If those 1st and 3rd links need to be grabbed only once, then first grab them using normal PW API, outside the foreach. Use a counter with your loop: $myFirstLink = 'http://www.google.com';// however you got it $myThirdLink = 'http://www.bbc.co.uk';// however you got it $out = ''; $i = 1; foreach($page->selectHeader->pageSidebar as $sideNav) { if($i == 1) $out .= "<li><a href={$myFirstLink}>{$whateveYouWantHere}</a></li>"; if($i == 2) $out .= "<li><a href={$myThirdLink}>{$whateveYouWantHere}</a></li>"; $out .= "<li><a href='{$sideNav->sidebarURL}'' >$sideNav->sidebarTitle </a></li>"; $i++; } echo $out;
  18. Then your path must be wrong. I tested and it works fine. Normally, $this->config->paths->ModuleName should give you the path on disk to a module's folder but I've found out that for Fieldtypes that live inside their own folders (such as FieldtypeComments), it doesn't work. For those 'outside' such as FieldtypeDatetime, you will get the path on disk, e.g. F:/vhosts/k.dev/wire/modules/Fieldtype/ So, you need to try something like this (hard-coded, I know ): public function init() { $path = $this->config->paths->modules . 'Fieldtype/FieldtypeComments'; require_once($path . '/Comment.php'); }
  19. The Comment Class is not a module. It is a PHP file. You would have to require/include it first in your module, e.g. init() or earlier before you can call on it
  20. Hi Jonathan, Thanks for taking time to pen your thoughts about how this module could be improved. Although the module is primarily for building menus, out in the wild, its probably being used to build other navigational lists as well. True, many sites have 2 - 3 menus at most, but I want the module to remain as flexible as possible. The create new field is collapsed by default so I don't think it looks like its inthe way? That field is hidden by default and secondly, one can control what actions appear via permissions. In addition, my point above about how people are using this module is still applicable here. I have not been able to find out how the 2nd tab can be selected by default. Fieldsets do take some vertical space. I tried this in the first version of the module and I didn't like the results. I think providing choice is a good thing; let the user decide what best fits in their workflow. In the first version of the module, it only used a 'page list' (actually, an InputfieldPageListSelectMultiple) and the results were not very pretty. I (and others) found it a bit tedious, especially with long trees. To offer more choice though, I have gone ahead and added an option to select pages using PageListSelectMultiple (MB version 0.1.2). Since version 0.0.4, there is already a permission 'menu-builder-selector' that hides the selectors field, hence prevents non-superusers from adding pages to the menu using selectors This is also about flexibility. You add a menu item including CSS Classes/IDs and you forget about it ....Until when you have a need to edit them, then you head to their settings. I think this a good feature Using the PageListSelect to add items to the menu in that way will require some (JS) work which TBH, I can't spare some time to learn how to do, test and implement. I am afraid I don't see any real benefit to removing the ability to add CSS Classes and ID to custom links at the point of creation . As stated previously, it allows you to do things once, and only edit them later if needed. You 'hacked-together' version looks interesting. I would find it confusing if there were many items though. It wouldn't have that 'menu-items-look' to it, IMHO. Having said that, I prefer the current Menu Builder look I like the idea about renaming the 'Main' tab to 'Settings' and moving it to second, possibly 3rd tab. I am not sure how much impact renaming would have on any tabs out there that have already been translated (non-English sites). I'll have a think. I have found the 'Items Overview' tab quite invaluable. Even on a menu with, say, just 3 items, if I only wanted to find out their CSS IDs and/or Classes, it saves me from clicking to expand and collapse each menu item's settings just to have a quick glance about their CSS attributes (+ new tab setting for custom links). Again, thanks for taking your time to review the module. Although I take a different view to many of your suggestions, I appreciate that you took time to think about and write down your thoughts. How's the screencasts coming along? Cheers, kongondo
  21. Update: Version 0.1.3. Fixed bug where on uninstalling the module, menu pages in the trash would not get deleted, hence throwing an error when the uninstall routine tried to delete their template
  22. Thanks for catching this. The error there meant you had some menu pages in the trash. On uninstall, the module was trying to delete their template, hence the error. Fixed in the latest version, 0.1.3.
  23. Update: Version 0.1.2 Fixed bug whereby 'new tab' setting for new custom menu items would not work reliably In addition to the existing AsmSelect and Page Autocomplete options of adding pages to menus, you can now also use a PageListSelectMultiple. This is similar to the original version of MenuBuilder (not in styling but function ). Personally, I am not a fan* of the option....the tree jumps all over the place and can be unwieldy. Anyway, the feature is there for those who prefer it . Logged in as a Supersuser you will see the whole tree, of course. Not other users though. So, no 'danger'(?) of them adding admin pages to the menu! *I might rethink this and remove PageListSelectMultiple as an option..
  24. And for some unbeknown reason such 'invalid' fieldnames still work! Have tested several times. The latest one was last week.
×
×
  • Create New...