-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Create comment inside a module
kongondo replied to Frank Vèssia's topic in Module/Plugin Development
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'); } -
Create comment inside a module
kongondo replied to Frank Vèssia's topic in Module/Plugin Development
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 -
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
-
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
-
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.
-
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..
-
ProcessSlider - Image sliders for ProcessWire
kongondo replied to mauricius's topic in Modules/Plugins
And for some unbeknown reason such 'invalid' fieldnames still work! Have tested several times. The latest one was last week. -
Update: Version 0.1.1 And, we are back! Thanks for waiting! Fixed bug relating to getLanguageValue() (issues #22 and #25). Thanks @all who reported, tested,and fixed the issue. Fixed bug where 'has_children' would not be applied to a menu item whose children were included 'natively'. Switched to $this->wire('pages') from wire('pages') (and similar). As per request at issue #18, added option 'default_class' to enable application of a default CSS class to every menu item at API level. Thanks @jlahijani. You can use this API-level option to add custom CSS class(es), e.g. Bootstrap or Foundation ones.
-
They don't have to be configured as hidden/unpublished. It all depends on your use case. You may want to show them (i.e.. Year, Model, etc) as menu sub-dividers for instance. Other than hiding them, If you don't want them to show up in menus, you could also remove them from the returned PageArray prior to outputting your menu.
-
Don't know if that is possible (I know one can view their liked content though)...How about doing it the 'old-fashioned' way, ctrl-D . I do that often (not just bookmarking threads but posts as well) but also use SearchMark to search through contents of my bookmarks. Edit: Welcome to PW and the forums
-
Useful to know: http://processwire.com/api/arrays/
-
Worked as expected in my testing (PW 2.7.2). Are you getting any errors? Btw, you are naming your fields using upper-case first letters? It still works but it's a good idea to follow the recommendation about naming fields:
-
Seems you got your modules confused This is the module you want: https://github.com/ryancramerdesign/MarkupLoadRSS. MarkupLoadRSS: It reads feeds. http://mods.pw/W What you have above (part of the core) is: Markup RSS Feed. It generates feeds. Install #1 and you should be fine. I tested your code and it works.
-
PW 3.0.4: Repeaters Revisited + ProFields Matrix
kongondo replied to ryan's topic in News & Announcements
I am guessing both since ProFields will continue to work for both... -
Whaa? ....I used Win10 for about 30 minutes and couldn't stand it. Switched back to 7
-
Previewing Audio & Video...
-
Or maybe search in a /site/somefolder/ first for a favicon and use that if one found?
-
Update: Version 4 Up on GitHub Changes In addition to the using a custom selector to filter for selectable page markers, you can now also use custom PHP Code. NOTE: (a) Custom PHP code will only work with the Asm Select page selector option. (b) Custom PHP code overrides custom selector if set Will submit to Modules Directory once I have done the README (might take a while...) ps: Updated first post to reflect current status...
-
Cool! I didn't have a chance to test in the frontend.
-
Update: Version 3 Unified markers working fine (thanks @heldercervantes) Fixed position differences between the 3 marker styles; (thanks @heldercervantes) Unified look, so that all marker styles feature the same kind of border and colors; (thanks @heldercervantes) Improved the way markers are highlighted; (thanks @heldercervantes) Added a higher z-index to the highlighted marker, bringing it on top of the others; (thanks @heldercervantes) Tweaked draggable event to remove the snapping that happened when user started dragging the marker. (thanks @heldercervantes) Callout markers display referenced page title instead of marker number Confirmed testing OK with Reno Theme Ready to grab from Github Pending: ReadMe/Docs...+ long coordinates table..
-
Done, works fine! Tested with Reno Theme as well (see screens). Thanks. Updating repo now... Reno Theme view
-
OK, done.
-
@heldercervantes, Brilliant! I have amended code with your changes. I am not sure about the 'Page Titles' on the callout and teadrop styles => long names are extending outside the 'red bounds'. See screens below and let me know what you think. I've added you as module co-author in the next version
-
Thanks. I suggest we all work from the same unified markup.