Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/04/2015 in all areas

  1. FieldtypeStarRating Module for ProcessWire - Field that stores an integer by using a star rating interface. Current version: 1.0.0 Module page: http://modules.processwire.com/modules/fieldtype-star-rating/ Github: https://github.com/Rayden/FieldtypeStarRating To install Copy to /site/modules/ and go to Admin > Modules > Check for new modules. Tested on ProcessWire 2.6.2 dev Usage back-end Create a new field with the fieldtype Star Rating. Set the amount of stars you want to show, by default it is set to 5 stars. Assign the field to any template. Now you can set the field value by selecting any of the 5 stars. The number saved to the database equals the number of stars that are highlighted. Hovering the stars will show a reset icon, which will reset the value to 0 by clicking on it.
    11 points
  2. The biggest difference, is the pain in your arse, if you come in a project, where tools are used that you don't like. So, just learn to love them all! I use gulp and love it However, from time to time I have heard(german) that gulp feels a bit weird, if the project gets larger and your list of tasks growth. But, I have never reached this scale. Another point is speed, gulp uses streams (for parallel execution of tasks), what makes things pretty fast. While grunt does not did. Since v0.5 or so, grunt supports piping data, so the speed could be nearly "the same". If you do it right, the result is the same, really. Do you like neither? It is ok/Es ist ok, try npm or use both!
    5 points
  3. I have not much experience with mobile apps. But the route I think I would take is the route of HTML CSS and JS with a 'simple' framework. Currently i'm building a Kilometer registration app for my self using Ratchet and I must say I love it. The simplicity of using ajax loading pages (push.js) fits nicely the way I work with ProcessWire. The 'app' doesn't have to be wrapped up in an app layer, but should be possible when I later wish to do that.
    4 points
  4. My preference for app development is for ionic. Like onsen.io (thanks for that link - hadn't seen that one) it is based on Angular, which is an awesome option IMO. Here is a comparison thread: http://forum.ionicframework.com/t/pros-cons-vs-onsen-ui/8177 Here are some useful links about setting up and publishing with Ionic and Cordova (the open source codebase that phonegap runs on). http://ionicframework.com/docs/guide/publishing.html https://coderwall.com/p/vvkyra/getting-started-with-ionic If you're on Windows, Phonegap Build (build.phonegap.com) should get you through all the issues of building for iOS without a Mac.
    3 points
  5. The better way of excluding the admin is this: $matches = $pages->find("has_parent!=2"); This excludes every child of "Admin", which has a hardcoded id of 2. That's more flexible than just excluding admin as for example users ("template=user") are also part of the admin.
    3 points
  6. If you're on a Mac, CodeKit is a hassle-free (as in open it and you're pretty much ready to go) alternative: https://incident57.com/codekit/ Bonus: Overview of version 2 on CSS Tricks: https://css-tricks.com/codekit-2-0/
    3 points
  7. PhoneGap - > is just a container to write HTML apps in Native Containers so you can use PhoneGap with Rachet Android Stuido is for Native Apps all the best
    2 points
  8. Hi there Are you implementing this search inside a funciton or in the admin? If either of those is the case, try wire('input') and wire('sanitizer'), wire('pages') etc. If you're writing the code inside a module you can also use $this->input and $this->sanitizer If neither of those is the case, could you post the full code that you've got for the search page please?
    2 points
  9. Which is the one all the coolest kids are using? Yes, the coolest kids are you all, ProcessWired Friends. They've been around for a long time and I never was intrigued or interested in using either. I did some reading up and they sound pretty cool. What are you using? Why? Can you give me some newbie-advice?
    1 point
  10. Currently there is no way for an editor to change those fields. Both are static. Even from the API. But sometimes – especially when using a news site or some kind of blog – you have to use those fields a lot. It would be nice if the fields become editable, so you can change the creation date for example.
    1 point
  11. Very, very nice. Thank you! Is this in the module directory yet?
    1 point
  12. Version 0.8.3 fhValue() bug fix I found the bug during update the FrontentContentManager (FCM) module.
    1 point
  13. Give Onsen.io a spin, it's way better, I use it for a financial institution for the company i work for, however it's in Angular assuming that's a bottleneck
    1 point
  14. For comments, this thread is useful: https://processwire.com/talk/topic/7145-is-it-possible-to-add-a-comment-programmatically/ Since you're importing pages AND comments for those pages you will probably have created the new page further up in your code and saved it already. You seem to have found all the relevant topics (well, now with the one I linked to) but if you don't know much PHP this may seem a daunting task - we're here if you have any questions though. The main things you need to learn are how your data is stored in Drupal - getting it out is probably the hardest part, putting it into ProcessWire will be easier I think and also will be an excellent learning experience in terms of the functionality in the API. My solution for managing articles is pretty similar to Ryan's. His is more suited to your needs though I think. Once you get your data imported, you'll know enough about the API that you can create custom admin pages such as dashboards showing articles pending approval etc - that sort of thing is really easy in ProcessWire so you're limited only by how fast you can learn and your imagination I'm not sure if anyone else has done a Drupal conversion recently who could help you further, but I could take a look later next week if you were willing to supply a copy of the site? It's hard to go into much more detail without seeing exactly how things are set up in the DB etc.
    1 point
  15. Ratchet and Phonegap sound like they would play togther nicely. I always wanted a way to have the mobile web app look native and Ratchet looks ideal for that. All Phonegap adds is the ability to wrap it into an app and gives you access to some of the device APIs too (camera, contacts etc) whether iOS or Android, so I'm sure together they would be able to load the correct stylesheet for the correct device.
    1 point
  16. Don't take this as personal offence, but that's not a fair statement to make about ProcessWire. The problems you had with updating your backend are inherit to using relational databases and not specific to the cms. You could've used any of the nosql databases out there, but that's a whole other story and quite different in terms of content management. Stating that the system was never designed for registrations, a great user base or for mobile api's is a plain wrong accusation. The system was not designed for plug-and-play, that's true, but it gives you the full freedom of implementing registrations and api endpoints just like you need them. At the core ProcessWire is more like a cmf, so what you do with it is up to yourself.
    1 point
  17. You could create a module, that inserts a hook before page save for article pages, that creates such pages programmatically. They say, creating modules is easy.
    1 point
  18. If you do not insist on doing it all by yourself, you could just use this usefull module for building menus.
    1 point
  19. It took me some time to find how to use Selector Inputfield, so I think this post just might help someone else. As it should be obvious from the word Inputfield (was not for me ) it is not a fieldtype. That means you should create a field with fieldtype "Page" and then select "Selector" inputfield on the "Input" tab. But it can't be done without some customization. You need to go to the Inputfield Page module config in Modules and add it to the allowed inputfield list. After that all works as expected. Thank you, Macrura! Without you topic I wouldn't even know this awesome inputfield existed in the first place.
    1 point
  20. kixie, he's not looking to modify the field options but to save an options selected in his form. It should be simply adding the key (id) to your field: $page->form_type = 1; or using the value (title) $page->form_type = "Yes"; or if it's a multiple options you set an array using id's: $page->form_type = array(1,2); or titles $page->form_type = array("Yes","No");
    1 point
  21. Thanks again! I used and modified your code to fit my needs and it works nicely. Here is the code I ended with: / In Admin area, create Refundering btn on cases. $page->addHookAfter( 'ProcessPageEdit::buildForm', null, 'addButtons' ); /** * Add a button besides "Save", which lets the user accept the application * */ function addButtons($event) { $page = $event->object->getPage(); if( $page->template == "credit-log" && $page->id && !$page->isTrash() && !$page->is( Page::statusUnpublished ) && $page->credit_action->id === 1 ){ $refunded_page = wire('pages')->find("template=credit-log, product=$page->product, partner=$page->partner, credit_action=2"); if( $refunded_page->count() == 0 ) { $form = $event->return; $refund = wire()->modules->get('InputfieldSubmit'); $refund->attr('id+name', 'create_refund'); $refund->class .= ' ui-priority-secondary'; $refund->attr('value', wire()->_('Refunder')); $event->return = $event->return->insertBefore( $refund, $form->get("id") ); }else{ // echo out a message that this case has been refunded. $form = $event->return; $refund = wire()->modules->get('InputfieldMarkup'); $refund->attr('id+name', 'create_refund'); $refund->attr('value', wire()->_('This case is now refunded!')); $event->return = $event->return->insertBefore( $refund, $form->get("id") ); } } // When submitted save new page and update user. if( wire()->input->post->create_refund ){ if(!$page->id){ wire()->error("Invalid case to be refunded."); return; } // Create credit log $credit_page = new Page(); // create new page object $credit_page->of( false ); $credit_page->template = 'credit-log'; // set template $credit_page->parent = $page->parent; // set the parent $credit_page->title = date( 'd-m-Y-H-i-s' ); $credit_page->credit = intval( $page->credit ); $credit_page->partner = $page->partner; $credit_page->product = $page->product; $credit_page->credit_date = date( 'd-m-Y H:i:s' ); $credit_page->credit_action = intval( 2 ); $credit_page->save(); // Subtract case credit from user credit. $partner = $page->partner; $partner->of( false ); $partner->credit = intval( $partner->credit + $page->credit ); $partner->save(); } }
    1 point
  22. Folks, I just uploaded a new test branch for this module to github that adds the ability to spit out alternative texts on each parse. The idea comes from products like spintex and allows you to use one text block to generate different output on every view. Basically you write stuff like "Dear {{mum|dad|grandma|grandpa|Ryan}}, ..." and the textformatter makes a choice from the listed alternates at every point in your text. You can control the degree of randomness and I'm playing with setting it based on a cleaned up version of the referrer URL to make visits from different places have different versions of the text but repeated visits from the same place see a consistent version of the text. In other words, people coming from google will see something like "Dear dad, ..." each time they visited whilst those from Yahoo would see "Dear Ryan, ..." when they visited the very same URL (at least, that's the plan.)
    1 point
  23. Hi, I've just uploaded the HelloBrowser module via ftp to test it on a demo website (version 2.5.3) and am getting a blank page with the following error message after having hit the Refresh button to find new modules: Parse Error: syntax error, unexpected 'script' (T_STRING) (line 83 of /*****/****/*********/var/www/****************.web4me.fr/htdocs/site/modules/HelloBrowser/HelloBrowser.module) This error message was shown because you are logged in as a Superuser. Error has been logged. I've had to remove the module's folder via ftp in order to be able to access the Module administration again.
    1 point
  24. Finally got a use for your fieldtype Raymond. Works really nice.
    1 point
  25. That is the beauty of ProcessWire - you can do so much without a single extra module if you really want to. But I think the five that I tend to add first are things like: XML sitemap Hanna code (I use it loads) Procache Lister Soma's Help notes thingy
    1 point
  26. Fieldtype File from folder I “needed” a module to select a file from a folder, using an <select> and store the filename. There's only 1 setting: The path to the folder to list. The Path is relative to the templates directory. So if your files are located in /site/templates/scripts/, type scripts/ in the `path to files` setting. here's the gist, enjoy. This module is released because it was useful for me in several projects.
    1 point
×
×
  • Create New...