Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. In the interest of transparency, I would like to state that I made a mistake in editing @Tomasz post. I have personally apologised to him and advised him to use an appropriate board here to air such views. We hope this incident doesn't keep him away from the forums. We are a friendly bunch here but we do make mistakes sometimes. Cheers, Francis
  2. @gebeer...in case it's still of interest to you, I have released a commercial dependent select module.
  3. Dynamic Selects Released 27 July 2016 Dynamic Selects is a commercial module that enables the creation of dynamically related/dependent ajax-driven chained dropdown lists (aka cascading selects) for display and storage of multiple types of data. The module can be used both in the front- (display only) and backend (display and storage of data). Setting up Dynamic Selects is very easy. With minimal effort, site developers can set up simple or complex chained selects. By making a selection in a trigger dropdown, via ajax, values are fetched and dynamically populate options in the dependent select. In turn, making a selection in the now populated select triggers the same action further down in a dependent select. The module only uses/stores ID references to selected options in the selects meaning the most current/up-to-date data will always be displayed in the selects. Currently only ProcessWire managed data are supported. If there is enough demand, we may incorporate external data sources (typically JSON). The module consists of 4 modules ProcessDynamicSelects MarkupDynamicSelects FieldtypeDynamicSelects InputfieldDynamicSelects Video Demo: https://youtu.be/wkhx8xQ5ue4 Documentation: http://dynamicselects.kongondo.com/ Shop: https://processwireshop.pw/plugins/dynamic-selects/ Requires: ProcessWire 2.5 or newer and jQuery if using the frontend module (MarkupDynamicSelects) Features Easily create powerful ajax-driven cascading/chained selects/dropdowns Unlimited number of select dropdowns per field Data-mapping made easy thanks to multiple possible combinations of data relationships, triggers and sources Mutlipe data relationships to chose from ID-based data referencing ensures your data values always stay fresh Remote and local caching to speed up data access and reduce ajax-requests to server User-friendly, intuitive and easy to set up IMPORTANT Before using this module in the frontend, you will need to thoroughly read the security section in the documentation.
  4. ...in addition to the comments above, I am not sure anyone attempted to compare RC to ProcessWire. At least, I don't see this in the OP.
  5. @Bryson Brilliant. Glad you got it sorted. Forgot to mention, in case you missed it, the (almost) complete documentation for Blog is here.
  6. Nice one @heldercervantes. Looks like a good candidate for a case study write-up
  7. Hi @Bryson. Welcome to ProcessWire and the forums. Thanks for using Blog. At the moment, the Blog module is not compatible with version 3 of ProcessWire. Once we have a stable release of PW 3, I'll work on making them play nice together. The missing dependency is Fancybox which has been dropped in PW 3/2.8 in favour of Magnific. As for the double/two pages in one, I think you are seeing that because you tried to use one of the site profiles that ship with PW (e.g. default or beginner profiles) together with the demo template files that ship with the Blog module. They will clash. If you want to use one of those profiles, I suggest you copy and paste code from Blog demo template files into the profile's template files. It might be easier though, when installing ProcessWire, to instead use the blank profile. I recommend this to whoever wants to learn from scratch since you are starting off a clean slate. However... Let's start with the basics first. ProcessWire allows you to build your websites exactly how you want them. This means no one template file approach is forced on you. There are different ways to structure your template files as explained in these tutorials. The template files that come with the Blog module and the code in them are just examples to get you started. They use the so-called delayed output. Of course you can choose to use the examples or even start from scratch. What you see in /Blog/template-files/ are its demo template files I refer to above. On install, if you selected to install Blog with the demo content, they are copied over to /site/templates/ Default Name: For security reasons, Blog does not output your name (which is actually your ProcessWire log in name) as the author of Posts. Instead, you need to edit the user and use the Title field to input your author names...e.g. 'Prince Charles'. Sorry, my answer seems to be a bit jumbled up. Here's what I'd advice you though: I suggest you get to know how ProcessWire works first by reading the basic docs, especially how to use the API. Using the Blog module to learn about ProcessWire may be a bit advanced for people new to the system. Secondly, have a read about the various templating strategies. You will then be able to tell where $content comes from :-). Finally, if you have some knowledge of PHP, I suggest you install ProcessWire with the blank profile. It will help you learn better IMHO...I know this is not for everyone, but I like starting from a clean slate. You can then use whatever templating strategy you wish. Let us know if you need further help...
  8. Thx to @Pete, I've managed to restore the content of this post (about complex menu structures) that got lost during the upgrade.
  9. Yes...Devs tend to use VARCHAR or Blob. I use VARCHAR. Note that as of MySQL 5.7, there is a native JSON data type. Here's some articles/references about the data type + advice on when/if you should use it. https://dev.mysql.com/doc/refman/5.7/en/json.html http://lornajane.net/posts/2016/mysql-5-7-json-features https://www.sitepoint.com/use-json-data-fields-mysql-databases/ http://stackoverflow.com/questions/5544749/what-column-type-should-be-used-to-store-serialized-data-in-a-mysql-db http://stackoverflow.com/questions/33660866/native-json-support-in-mysql-5-7-what-is-the-pros-and-cons-of-json-data-type https://benjaminlistwon.com/working-with-json-data-in-mysql-part-1-of-3
  10. Thanks Soma. I have been doing it the 'hidden-admin-page-way'...as you suggested way back in this thread . Good to know there's other ways too.
  11. Unfortunately there's not enough docs at the moment. Isn't that why you are writing docs? . Joking aside... 3 Tips Due to the paucity in documentation most (all?) of us learned by looking at other modules. Simpler core modules, custom modules such as Batcher, Trashman, etc. The module Blog creates fields on the fly during installation. Have a look at the code here. Also have a look at ProcessBlog phpMyAdmin: have a look at the table fields. You will see a list of all the installed fields. Look at the column 'data'. All field settings are stored in there as JSON as key=>value pairs. Why is this important you ask? All (?) the keys in the strings correspond to the field properties that can be set...e.g. $field->description, $field->derefAsPage, etc. Also have a look at the column 'label'. The trick here is to open a field for editing and add and remove settings and save while keeping an eye of the field's 'data' column to observe changes. In respect of templates, same trick can be used on the table 'templates' http://kongondo.github.io/ProcessWireAPIGen/dev/class-Field.html
  12. @benbyf Mod Note: Please post such questions in the module development sub-forum. The main module forum is only for support of released modules Thanks.
  13. Thanks Benjamin. That's how I am doing it at the moment but was worried I could affect other fields in that short instance I do the check..before reverting back. I was probably being paranoid...
  14. In a module-context, as we know, stuff like single file or image fields return 'arrays', i.e. become iterable. This means that directly using WireArray::Iterable() to check whether a field is iterable can be misleading. Other than to temporarily set a page's output formatting to true (still within a module context), checking iterability of a field on the page, then reverting the page's output formatting to false after the check, is there another/a better way to achieve the same feat? Thanks.
  15. Hi @Soma. Could you please elaborate on how to do this? I don't quite follow what is being sent where . Thanks..
  16. @all, @johnteaksf. I just noticed that the forum upgrade seems to have cannibalised some of the content in my post about the new getMenuItems() method which allows for building of complex menus. I have contacted @Pete to see if I could get the content restored from an old backup. Part of the missing content addressed the advantages of returning menu object items rather than array items...
  17. @SoccerGuy3, I'm not sure you've seen this, in the Tab Settings, right under 'Pages selectable in menu'? There's also a note on line #486 to the same effect. The normal practice is not to directly edit modules. Your 150 will get overwritten next time you upgrade Menu Builder and all will not be well . What you want to do is to use Page Auto Complete or Asm Select and add limit=150 to the setting above ('Pages selectable in menu')
  18. Hi @johnteaksf, Welcome to the forums. Currently, it is not possible and I see no easy way of doing it within the module. My suggestion is that you try (and adapt to your needs), the approach outlined on page 7 of this support board, specifically this post or this gist See the example array of the $key => $value pairs you'd be working with here. The important things to remember are that Custom Links will not have a 'pages_id' $key. So, that's one way to identify such links in your loop You will have to code the inclusion of the children yourself
  19. It would be good to also work on some Modules that do not 'autoload' Thanks for your efforts....
  20. Same here @adrian, unfortunately Tracy has always led to very slow page loads for me. I also don't use the sessionhandler module. I only switch Tracy on when I need to debug a specific error then switch it off again. I am only mentioning this to confirm the reported behaviour but have no further info to help you debug the issue, sorry .
  21. This might also be of interest...ProcessWire 2.8! https://processwire.com/blog/posts/processwire-3.0.21-and-2.8.21/
  22. @cmscritic Hey Mike, The fact that you can drop in and share with us so much about your reasons for the move says a lot about you. I like that; I respect that. As others have said, we've also gained a lot as a community from your collaboration with Ryan: Hanna Code, the awesome CMS Critic development write-up, and who knows how many people have found ProcessWire because of your site . So, thanks for the ride... Best wishes for the future.
  23. If all you want is to save the page IDs, then maybe it is easiest just to just use a page field, the only difference being your Inputfield. So, you would create an inputfield that renders InputfieldSelector from which pages can searched for and selected. Like @LostKobrakai mentioned, all you would need is to make sure on hit save your selected pages are sent. PW will handle the rest. So, something like class InputfieldYourModuleName extends InputfieldSelectMultiple implements InputfieldHasArrayValue { } In there your would have ___render()// here render your inputfieldselector + your multiple selects (i.e. list or show and/or store selected IDs) ___processInput()// for processing sent values...basically looping through an array and sending those to PW for saving... @edit: thrice my code disappeared! New forum, grrr! I'm not typing again, sorry...Have a look at some custom Inputfields
  24. Short answer: you can't. Fields that save to the db each come with a defined database schema. In your case that would be FieldtypePage. As you can see, its db schema only saves integers , i.e. the ID of the pages selected in the page field and only has the one db column in the table it creates. Your best bet is probably to extend FieldtypePage and create your own schema. There's an example here by @Raymond Geerts. Have a look at the method getDatabaseSchema(). Of course in your case your db type will be something else, maybe varchar(255) or text... Welcome to the forums btw..
  25. Update: Version 010 Changelog Following up on the last commit, made message to show if no base image found configurable.
×
×
  • Create New...