Leaderboard
Popular Content
Showing content with the highest reputation on 01/30/2015 in all areas
-
InputfieldChosenSelect This topic (https://processwire.com/talk/topic/71-categorizingtagging-content/) showed the need for a Inputfield that would provide a real tagging UI to be useable with FieldtypePage. It uses the chosen library, which can be found here http://harvesthq.github.io/chosen/. It's meant for MultiPageFields and works kinda like asmSelect, but with a different skin. Features: Inline adding of new tags, which will then generate the corresponding pages. Sortable tags. Usage Install the Module Edit your pagefield and choose InputfieldChosenSelect as inputfield. Use Enter or Tab to create new Pages with the currently typed name. Enter will fill in the tab currently selected in the dropdown. http://modules.processwire.com/modules/inputfield-chosen-select/ https://github.com/LostKobrakai/InputfieldChosenSelect8 points
-
Yeah I found a few github repos with that feature added, too. Updated all those snippets to work with the new version of chosen and here we go. Inline adding and sorting is now working.5 points
-
This week's dev branch updates include a new Fieldtype (FieldtypeOptions): https://processwire.com/blog/posts/new-options-fieldtype-processwire-2.5.17/ (blog post about it) and documentation https://processwire.com/api/modules/select-options-fieldtype/4 points
-
Don't get me wrong, the last time I used any kind of tool like this was the original Dreamweaver in 1997, and I don't use any of the major frameworks. I do like Foundation though. I think it's important to evaluate new tools. Are they worth adding to your toolbox? In the case of an application like Blocs, I could see using it to build something small and quick. A lot of projects don't have the budget to hand code a fully custom design. Tools like Blocs could be a good alternative to using a pre-made template. Of course, you can also invest some time in creating snippets, setting up macros or using toolkits like emmet.io in your code editor. You can build sites pretty quickly that way. Joss mentioned a few of these above — if you haven't already, checkout bourbon, neat, bitters, refills. Those thoughtbot folks make good stuff. I agree with the idea of focusing on something and becoming an expert—but just up a few levels from the topic of tools. Specialize in web design/development. The tools you use to accomplish that are going to constantly evolve. You don't have to trade your tools for the latest shiny new fad, but you should explore things — sometimes they aren't just a fad.4 points
-
Here is very simple abstract class that I hope would get ideas and contribution from community, so that different PW projects could use same payments methods in generic way: https://github.com/apeisa/Payment Currently Payment modules just assume it's found from /site/modules/Payment/Payment.php, but I would love to get it autoloaded somehow (I went with PW module dependencies and transformed the base class into PW module also). Also I have tried to keep this as minimum as possible - hopefully I have not left anything too important out. I have also created one two payment modules, that use this base class: https://github.com/apeisa/PaymentStripe/ https://github.com/apeisa/PaymentPaypal/ Please visit their repos for examples.3 points
-
Wow, so many options - amazing! I knew it would be somewhere, just hiding from me I'll go with InputfieldPageAutocomplete for now as I have to select a few out of many. Just installed and works like a charme - Thanks guys! HerTha3 points
-
Not sure it was mentioned somewhere, but I can't find a "cancel" button when on the Editor. I know you can just close the tab/window, but hey I had to think about.3 points
-
@LostKobrakai Ever heard of Aesthetic Usability Effect, Scanning, or Visual Hierarchy? 'Look and feel' is central to usability. They cannot be separated in practice (although people do it in theory all the time). @Joss when you put it like that, I bow to your superior laziness.2 points
-
@kathep Well, I like to have a little bit of work to justify getting up in the morning. My workflow kind of goes like this: I copy my default of installation of processwire. It has SEO built in, a half built mini-blog/news system in there and the complete tool kit (that list is only the minimum, there is lots more). I then have a folder called elements which has bits of layout ready to go - wide panels, multiple boxes and that sort of thing. It gains bits occasionally. I start up sublime and Prepros and a web browser. I then sit down, pour a coffee and say, "what am I going to copy and paste today?" Then I go and write some music for someone. I think I might have concentration issues.2 points
-
@everyone wow, there are some great js resources listed here so far. Thanks for the tips. I am off to check them all out as soon as I finish this post. @Sephiroth Full disclosure... I have been hand coding html and css for over a decade (yes, css2 was terrible - moving on...). I know what I'm doing with them. The advice to learn HTML is noted, but not relevant in my case. I know my way around js better than php, but that is not saying much I can make js work, but I can't hand code it. I'm not looking at these tools as a way to get around poor coding knowledge. I'm looking for lazy tools. I love coding, but its not part of my main job, so I don't work on sites regularly (except my PW one, because it turns out I've become obsessed), and I don't remember every little trick I did last time to get everything to work together super smoothly. The main things I like about these kinds of software and frameworks is: 1. They handle browser compatibility & responsiveness issues for me - excellent for lazy coders 2. Default templates on the good ones (Foundation & Blocs) incorporate a bunch of UX recommendations by default, meaning that you have to actively go out of your way to create a website that is hard to use. I value UX standards, but I don't have anywhere near the amount of time I would need to honor them in every hand coded site. Another win for lazy. 3. All the js works together all the time without me thinking about it. 4. Speed of prototyping. Some of the things I hate about them relate to the things I love: 1. Ugly, ugly, div-riddled code. 2. Overkill on the js - all the frameworks include at least one script that I cannot imagine anyone using well. What I like about the Blocs proposal is: 1. Fast prototyping 2. Not ridiculous code - therefore I can easily and painlessly work with it after prototyping 3. Extra hard to make something unusable - this software is made by a guy who is VERY into UX standards. And I like that. He is into them so I don't have to be @Joss, I like your system, but I'm kind of disappointed. From your excellent lazy field suggestions, I was hoping you would have tracked down some really lazy, perfect front end system. It sounds like you have.... but you had to build it yourself! Not my idea of true lazy @renobird I'm with you. I like to peruse the new offerings - sometimes you find a gem.2 points
-
I wouldn't reinvent much, I would just add the ability to add new tags and in the background, as this works kinda like asmSelect, it would just add items to a select input. To the request of sorting these. It's not possible out of the box, as the library is meant to be a progressive enhancement for selectboxes, where you're normally not able to sort stuff. I'll see if this would be addable with a little jQueryUI's sortable.2 points
-
There is also this - paint hasn't even dried on it yet https://processwire.com/talk/topic/8955-inputfieldchosenselect/ You can type or select and it has autocomplete. Surprised you didn't mention it @LostKobrakai2 points
-
I really like: http://modules.processwire.com/modules/inputfield-select-multiple-transfer/ It is kinda like an ASM, but with a built in live filter bar - works pretty nicely, although the search bar could do with some css tweaks to make it a little larger.2 points
-
The only thing remotely like your wish is the InputfieldPageAutocomplete. It's in the core but by default it's not enabled. It's like the PageListSelectMultiple, but instead of a pagetree you've only a autocomplete textfield to add pages to the field. Edit: You can take a look at it here: http://modules.processwire.com/modules/inputfield-page-autocomplete/2 points
-
Check the settings of your csv file. Make sure it is UTF-8. The module has no problem importing special characters if your csv file is saved with the correct settings. Someone has asked the question already on this topic here2 points
-
Have used the Dev on most of my projects without any problems. There's a great little Module called CoreUpgrade which allows me, within a few clicks, to upgrade my PW installations to the latest Dev branches. I know I shouldn't be so eager to have a site running several versions ahead of the Stable version but it's just too addictive.2 points
-
DISCLAIMER: The Blog Module already provides an in-built Cleanup Utility that enables you to remove all its components. As per the instructions in the module's README, which must be thoroughly read before using the module (as instructed in the first post in this thread and in various other places), in case you wish to uninstall Blog, you FIRST have to run the Cleanup Utility whilst logged in as a Supersuser. Further, as of this writing, a clear warning text is now visible right above the uninstall button in Blog's module configuration screen reminding you of this fact. Failure to follow the correct uninstall routine means that you will not be able to reinstall Blog until you (often manually) delete all the leftover components (that the Cleanup Utility would have removed for you) - a tedious, frustrating and painful exercise. In case, for some reason, you did not adhere to the above instructions, I am providing in the link below code to help you automatically remove any Blog leftovers in order for you to reinstall the module (if you wish, of course) or in case you just want to clean up. On install, Blog stores the IDs of its main pages in its configuration settings. Uninstalling Blog means those settings are lost. Hence, if using this code, the only way to find Blog pages is by their templates which in some cases, may not be very foolproof. This and others issues are documented in the utility code linked to below. This code is provided as is, with no obligation on my part, without any warranty, implied or otherwise. In plain English; whilst I have thoroughly tested the code, you will be using it at your own risk for which I will bear no responsibility . The code should ONLY be used in case you reversed the uninstall procedure; otherwise use the normal procedure (see README) to uninstall Blog. Link: blogCleaner Instructions: Back up your database and template files Log in as a Supersuser Copy and paste the Cleaner code in the link above at the very top of a template file Save the template file On the frontend, visit a page that uses that template file The Cleaner's screen will be loaded Tick the checkbox to agree you 'know what you are doing, etc..' Complete the questions about the type of Blog you had before the uninstall Run the Cleaner If no errors found a success message will be displayed In your Admin, check that things went OK (and if need be re-run the Cleaner) Restore the template file in #3 to its previous state Save the template file Reinstall Blog (optional ) Screens ------------------------ PS: I hope none of the above comes across as rude or forceful. I'll read this again in the morning just to be sure or in case someone PM's me, whichever is the sooner . I will then amend as appropriate.2 points
-
ProcessWire is an interesting one in that the dev branch is usually really stable to be honest. I would say that most of the issues tend to be really minor usually, but Adrian's advice is good (as usual) - see what's been updated and decide whether you want to wait a few days or not. So many of us are using the dev branch that things get rectified pretty quickly and unless you're using brand new functionality that's literally only been out for 24 hours you shouldn't run into too many surprises - even then it's usually pretty solid. Usually2 points
-
@renobird I'll keep the forum posted on progress with my front end experiment.2 points
-
I would say that in general starting a new site with the dev branch is a decent approach. I typically update my local test sandbox install with the each new set of commits and depending on Ryan's comments about the commit I will sometimes even update live sites after seeing that everything looks stable for a few days. Occasionally he will mention that a commit contains lots of changes and to be cautious - in that case I may hold off on updating live sites a while longer so I am sure things are ok.2 points
-
2 points
-
ElasticSearch does a lot, but the part that is most interesting to me is that it does an amazing job of fulltext search. It's also crazy fast. It can be a bit scary at first so hopefully this module will make it more accessible. I threw together this module pretty quickly, it's more of a proof of concept than anything else at this point. I tried it out on a site with 400 bilingual pages and the search results are much improved over the normal search you would get doing like queries or fulltext queries in mysql. Github page: https://github.com/jdart/ElasticSearchProcessWire I'd love to hear some feedback on how it works for you. It's very new so expect bugs, in particular the mechanism that turns pages into data to be indexed by ES might have some surprises.1 point
-
You shall not objectify people, but you could objectify Textfields!!! Github: https://github.com/owzim/pw-fieldtype-yaml Module page: http://modules.processwire.com/modules/fieldtype-yaml/ Summary Field that stores YAML data and formats it as an object, when requested. Setup After installation create a new field, let's say called "people" and assign it to a template, or just edit an existing text-based field and choose Yaml for the type, save! In the Details-Tab you have an additional option, the Texformatter option is removed, because it does not make sense in this case. Parse as Default is WireArray/WireData, the data can also be parsed as Object or Associative Array. Associative Array is the fastest and the default output by the used Spyc parser, WireArray/WireData might be the slowest, but it's also the most feature rich. You can access properties like you are used to with pages or fields, like $page->person->get('title|name') or $page->people->find('age>30'). Usage Now, in your just created field you can put in some YAML like this: - name: Jane Doe occupation: Product Manager age: 33 hobbies: - running - movies - name: John Doe occupation: Service Worker age: 28 hobbies: - cycling - fishing In your template, or wherever you are accessing the page, you would use it like any other ProcesssWire data (if you set the parse option to either WireData or Object): $out = ''; foreach ($page->people as $person) { $out .= "Name: {$person->name} <br>"; $out .= "Occupation: {$person->occupation} <br>"; $out .= "Age: {$person->age} <br>"; $out .= "Hobbies: <br>"; foreach ($person->hobbies as $hobby) { $out .= "- {$hobby} <br>"; } $out .= "--- <br>"; } echo $out; More info about YAML: Complete idiot's introduction to YAML Specification Wikipedia Acknowledgements I've used a namespaced version of the Autoloader class from Template Data Providers The YAML parser is a namespaced version of Spyc Edit: updated the repo link1 point
-
1 point
-
I am thinking it must be my mimetype checks. Can you please try replacing: if(($csv_file_extension == 'csv' || $csv_file_extension == 'txt' || $csv_file_extension == 'tsv') && ($csv_type == 'text/plain' || $csv_type == 'text/tab-separated-values' || $csv_type == 'text/csv')){ $this->session->{$fieldName . '_csv_data'} = file_get_contents($_FILES[$csv_filename]["tmp_name"]); } with: if($csv_file_extension == 'csv' || $csv_file_extension == 'txt' || $csv_file_extension == 'tsv'){ $this->session->{$fieldName . '_csv_data'} = file_get_contents($_FILES[$csv_filename]["tmp_name"]); } and see if that allows the csv upload to work.1 point
-
1 point
-
I understand your point, and I understand that you don't see a point to visual rules in frameworks. That doesn't mean that there isn't a point though. There are standard principles of color use, color combinations, contrast, typography, font matching, spacing, and composition that, when incorporated into frameworks, can save the discerning designer a lot of time and effort. It's ok that individuals may not value these things, but there are a lot of people who do. I do agree with you that frameworks are not plug-and-play in terms of 'look and feel' - but then they are not meant to be. It's fine with me if there is a visual style in place that I change for every site. *slaps forehead* Oh, I see! Yes, agreed. These tools are really better for people with good front end coding knowledge to start with.1 point
-
Never heard of OOCSS but I use Stylus and LESS (CSS Pre-processors) not really a designer just a developer who can manage to design. I think Bootstrap 3 is awesome. @Kathep I didn't mean you shouldn't use it I meant, if you already know HTML then its no problem as it would increase productivity.1 point
-
Web development is moving fast, well more than fast, lightening speed. I think the days of hand coding everything from scratch will soon come to an end if it hasn't partly already. Not that it is not the best way to do things but when dealing with clients it is about time and money unless the client wants to pay for something really unique and doesn't mind waiting. When I first started out I wanted to hand code everything even if it already existed but as soon as building websites turned into something that I made a living from then money divided by time pushed me to find new ways to be efficient and if a tool helps me to do that then great.1 point
-
Sure $slug = $sanitizer->pageName($str, Sanitizer::translate);1 point
-
No offense kongondo, but I would actually really like to see the inline way of adding new tags/pages - Since they are already typing, I think that is what many users would expect to be able to do, rather than needing an additional field. Nico's https://github.com/NicoKnoll/TextboxList works like this, but of course it would be great to have this in this module so everything is connected to the page field.1 point
-
Both of those are good options. If you just need to select a few pages (1-3), the I would go with autocomplete. If you need to select more, then the multiple transfer is great.1 point
-
This is in-built in ProcessWire and it already works with your Inputfield. I have tested and it works fine unless I am missing something? A request: Do you know if it is possible to sort the tags by drag and drop like in asmSelect? In your case this would have to be horizontal, of course..1 point
-
@LostKobrakai - just playing with this now and I like it - thanks, but there is a bug In InputfieldChosenSelect.js you have: $(".InputfieldPageTags select[multiple=multiple]").each(function() { I am not actually sure how that would ever work since that approach would need the name of the field, eg if your field name is: tags $(".Inputfield_tags select[multiple=multiple]").each(function() { but this also works and won't be dependent on the field's name: $(".InputfieldChosenSelect select[multiple=multiple]").each(function() {1 point
-
Please ignore my last post, i renamed the templatefile on the server and everything is ok.1 point
-
Moderator note: @Linda789 I am treating your post as spam unless you can prove otherwise. You joined the forums today, and submitted 2 posts with a link to an outside resource which suspiciously looks like unauthorised advertising on your part.1 point
-
I must admit that I have moved away from using fully fledged frameworks and instead have created myself a sass based toolkit. So,,,,, I have a default templates folder I use with the following jammed into it:# scss directory filled with things like Pocketgrid, bourbon, meyer-reset, mq.scss and so on. I have little sub directories in there where I have created some of my own starters like typography, colorscheme, a handful of useful grid bits to go with pocketgrid and some blank files for custom functions. I then gather that lot into a site.scss file. I also have a selection of javascript like respond.js. response.js, enquire and some other bits. Lastly, I have a lot of this included into head and foot scripts. When it comes to developing, I have it all enabled, but then chuck out what I don't end up using. Because it is all individual bits, that is easy to do. So, my started templates folder is pretty well stuffed, but unless I have gone mad, the production version is cut right down. So, that is the way I am going .... for the moment!1 point
-
Wow i really love the concept, I don't mind using it however I have to agree to what @pwired is saying but I will add my opinion, I don't fancy drag and drop systems, why ? most of the time the issue is flexibility, however it seems this gets exported in HTML and Bootstrap 3.0 so it would only increase productivity and save me time. But if you don't know HTML my advice is grasp that and use this to enhance your productivity. There would be times where this app won't be able to handle much specific layouts by clients but for simple site it suffices. and Yes you can use this with Processwire, Processwire is an API driven platform, it gives you the data, its up to you to reformat that data the way you want it. This is no different than using a basic site to Processwire. Disclaimer: The views of Sephiroth on the forum does not reflect the views of Sephiroth in real life.1 point
-
Update: Blog version 2.3.3 In addition to the very clear instructions on how to uninstall Blog (README), I have added an even clearer textual reminder/warning in Blog's module configuration screen to first run the in-built Cleanup Utility before uninstalling the module. Committed to master...(including the new renderRelatedPosts()method discussed a couple of posts up.) See next post about a utility to help when disaster strikes, aka, despite the very visible new warning text and despite the clear instructions you somehow find yourself with Blog components left in your hands having made the mistake of first uninstalling Blog and now you can't reinstall it without going through some very tedious manual cleanup....1 point
-
I've figured this out, for anybody searching it is under... Setup -> Fields -> field_name -> Input -> Visibility -> Show this field only if... It is now doing what I wanted it to do1 point
-
1 point
-
Soma, is that German? Looks like a Finnish word actually.1 point
-
If max files = 0, then your images fields is an array and also needs to be looped or grab an image using $image->first() or $image->eq(2) if you only want a single image. Am surprised that the url was output though...hmmm.. Try the following... //Loop through Carousel repeater on this page foreach($page->Carousel as $Slider){//note that repeater items are just pages. So $Slider is a page 'with fields' //loop through the images array foreach($Slider->Slider_Graphic as $graphic) {//foreach image field in each $Slider page... echo $graphic->url; echo $graphic->description; } }1 point
-
@nghi With ListerPro module you can make as many presets for search as you want. Like that:1 point
-
Here is a paste that shows how the entire sidebar gets built. There's really nothing too fancy here. Pulling in specific FormBuilder entries and allowing edits that in turn update the associated page gets a little fancier, but nothing all that complicated really. There are certainly other ways to build that sidebar, but I needed to have a lot of control over the settings, and the template has a lot of other fields that are specific to another part of the process, so I can't just foreach the fields.1 point
-
Just thought I'd share my git hook (post-receive) that I've been successfully using for a few months now to update my beta site and production site via git (no more ftp!). Might help someone else. As you can see, I only have the "site" folder under version control. But now when I'm thinking about it, site/templates should probably be enough. #!/bin/bash while read oldrev newrev ref do if [[ $ref =~ .*/master$ ]]; then echo -e "Master ref received. \e[42mDeploying master branch to production site...\e[0m" WORKTREE=../site # define your work tree, where you want to push the files cd $WORKTREE # navigate to the work tree GITDIR=../mysite.git # in relation to the "cd" command above # update the working tree git --work-tree=./ --git-dir=$GITDIR checkout -f master git --work-tree=./ --git-dir=$GITDIR clean -fd master # return to git directory cd $GITDIR else echo -e "Ref $ref received. \e[104mDeploying $ref branch to beta site\e[0m" WORKTREE=../beta/site cd $WORKTREE GITDIR=../../mysite.git # in relation to the "cd" command above # update the working tree git --work-tree=./ --git-dir=$GITDIR checkout -f stage git --work-tree=./ --git-dir=$GITDIR clean -fd stage # return to git directory cd $GITDIR fi done1 point
-
One for my wishlist An Inputfield & Fieldtype that lists from every found page the first Image thumbnail. So the input fieldtype should look like an album & browsing the tree should show the first found image or the image field thats configured. This field can be used to build photo albums, select photo's with meta data etc.1 point
-
Thanks for all the prompts to get this updated and out on GitHub, everyone. My apologies for not doing it a long time ago! Here's the modules directory entry: http://modules.processwire.com/modules/fieldtype-templates/ Out on GitHub: https://github.com/Hani79/Processwire_FieldType_Templates Shout out to @adrian for fixing the bug reported by @Raul and @lisandi1 point
-
1 point
-
Sounds great, I look forward to seeing it. As promised, here's a full example of a simple contact form. This is bare bones, but safe. I've left out spam prevention measures, which I'll be happy to follow-up with if you'd like. Below is an entire template file. I figured it was simpler to show this way rather than splitting into multiple files. Though when forms get really large, I tend to split them in multiple files (and include them). But for smaller forms, I do it like the example below. /site/templates/contact.php <?php $sent = false; $error = ''; $emailTo = 'nikola@company.com'; // or pull from PW page field // sanitize form values or create empty $form = array( 'fullname' => $sanitizer->text($input->post->fullname), 'email' => $sanitizer->email($input->post->email), 'comments' => $sanitizer->textarea($input->post->comments), ); // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($form as $key => $value) { if(empty($value)) $error = "<p class='error'>Please check that you have completed all fields.</p>"; } // if no errors, email the form results if(!$error) { $msg = "Full name: $form[fullname]\n" . "Email: $form[email]\n" . "Comments: $form[comments]"; mail($emailTo, "Contact Form", $message, "From: $form[email]"); // populate body with success message, or pull it from another PW field $page->body = "<h2>Thank you, your message has been sent.</h2>"; $sent = true; } } if(!$sent) { // sanitize values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // append form to body copy $page->body .= <<< _OUT $error <form action="./" method="post"> <p> <label for="fullname">Your Name</label><br /> <input type="text" id="fullname" name="fullname" value="$form[fullname]" /> </p> <p> <label for="email">Your Email</label><br /> <input type="email" name="email" id="email" value="$form[email]" /> </p> <p> <label for="comments">Comments</label><br /> <textarea id="comments" name="comments">$form[comments]</textarea> </p> <p><input type="submit" name="submit" value="Submit" /></p> </form> _OUT; } // include site's main template which outputs everything include("./main.php");1 point