Leaderboard
Popular Content
Showing content with the highest reputation on 01/19/2014 in all areas
-
jQuery DataTables 1.9.4 This module adds the great jQuery DataTables plugin for use in ProcessWire. You can load the module in the admin from any of your module using: $this->modules->JqueryDataTables; This will load the module and add CSS and Javascript from DataTables. This mostly would be used by a custom admin Process module. Note: Loading this module will just attach the necessary files to the admin. To use it you would need to add your own jQuery scripts and init the DataTables with something like. $("#mytable").dataTable(settings); For more informations on the DataTables options and API refer to http://datatables.net/ Download: http://modules.processwire.com/modules/jquery-data-tables/ https://github.com/somatonic/JqueryDataTables I included only the necessary files, and removed examples and docs from the package. NOTE: To avoid confusion, THIS module has nothing to do with my ProcessDataTable module for ProcessWire! ProcessDataTable was a proof of concept integrating it in a admin page. It included the jQuery DataTables plugin, but unfortunately it may wasn't a good way to. JqueryDataTables is a special js module like Fancybox. It is a "integration" of the jquery plugin for developers to use datatables in their modules. It won't be loaded unless you do so. An example would be the ModulesManager. They can coexist if you will.8 points
-
Just for the record; I, a MODX Ambassador, don't agree with this tweet at all. Already told the MODX core team not to do this again. I love both MODX and ProcessWire and hate tweets like these. These two CMSs should work together to improve both products and not start fighting each other...4 points
-
I'm proud to announce a "major" update to 2.0.0. I spent most of the weekend to make some changes, that makes it more convenient to browse, download, update, install and edit module from within ModulesManager. Change log 2.0.0 added jQuery DataTables to list modules. This enables convenient browsing with pagination, live search filter and sorting. State saving via cookies is enabled so if you come back it shows the table how you left it. added iframe modals for download, update, edit and install links. So you can now install modules without leaving the ModulesManager page. This is using Magnific lightbox by default, if installed, otherwise it will take the older Fancybox. some more translations added Update Note: This version requires you to install JqueryDataTables module before you will be able to use the new 2.0.0. I hope I haven't forgot something on the way. My tests so far went well and everything still works as before, just a little more awesome Thanks and enjoy the rest of the weekend.4 points
-
4 points
-
Cool, combined with Repeater Table you can setup a nice ordered table within 5 minutes4 points
-
3 points
-
I middle click all the time, I'm proud to be a middle clicker!3 points
-
Hi Hajo, Welcome to PW and the forums. You've made a good choice deciding to use PW These threads should help with your query http://processwire.com/talk/topic/15-how-do-i-create-a-page-that-redirects-to-its-first-child/ http://processwire.com/talk/topic/2561-hide-landing-page-keeping-children-visible/ I think you can modify the code there to fit your needs...using "if"... tip: Best way to search forum is Google... "my search terms" site:processwire.com/talk3 points
-
That was just a proof of concept back then that included the datatables plugin which doesn't allow other modules to use it. This now is a plugin integration so everybody can use it without including datatables on their own.3 points
-
Welcome Paul! Check out the Page field type: http://processwire.com/videos/page-fieldtype/ /Mats2 points
-
Hi all, today I finally managed to get everything working together properly. Now here is my Foundation 5 dropin template: https://github.com/gebeer/pwfoundation5. It uses Foundation 5 SCSS files. There's a quite extensive readme file with instructions. The template is based on Ryans FoundationSiteProfile. My approach takes advantage of the SASS/SCSS/Compass technology. So the output of the final CSS is highly customizable and only one file (style.css) is put out. You have full control over which modules of the Foundation framework you want to include in your project. This results in smaller CSS files that can be minified upon compilation with Compass. You can use the template as is. But if you want to modify the CSS, you need to have additional software (Ruby/Compass/Zurb Foundation gem) installed on your machine. In the template's Readme.md you will find instructions on how to do this (for Mac and Linux machines - Windows: sorry I don't know). If you are familiar working with SASS/Compass you will find your ways around easily. I have setup a structure that allows for updating the Foundation framework independently and that separates the project specific css from the Foundation css. This is a work in progress and I'm planning on using it for the relaunch of my own website. If you find any bugs, please let me know here or on the github bug tracker. I will try to fix them. Everyone is welcome to contribute or ask questions. Cheers gerhard2 points
-
I am also using dsnmasq on my local dev setup and I think all you should have to do is uncomment this line in the standard PW htaccess file: RewriteBase /2 points
-
http://processwire.com/talk/topic/3426-search-not-returning-3-letter-words/ http://processwire.com/talk/topic/2342-selector-issue-and-differences/ http://processwire.com/api/selectors/2 points
-
Been voting for Processwire on Bitnami since November so great to see some traction at last and processwire at the top. My only reservation is that each month since I requested Processwire to be listed on Bitnami contest is that there seems to be some funny business at the end of the month. I found that on the last day or so of the month that suddenly hundreds of votes come in from nowhere on one or 2 of the applications in the contest. I am sure it is all legit though. Just get ready to bring in the troops on the last couple of days.2 points
-
Thanks for the feedback guys! I agree on the serif typeface (replacing the Georgia with another serif face), but it's not my call. I'll suggest it though. I already communicated concern about using a geometric face for body copy (Avenir) but it doesn't seem to be a major issue in the end. I'll check with the client to see what I can share on the workflow side. But essentially, this site involves 1 PW installation for managing the inventory, and another PW installation for presenting it, and they use web services to chat back and forth all day.2 points
-
Do you hate dislike TinyMCE and heart Markdown? Or Textile? Or HTML? Do you wish there was better way to create content than textarea? Well there is! Content creation oriented, syntax highlighted and easy on the eyes, that is this new plugin I made. And I know you'll love it! And did I mention it supports HTML, Markdown and Textile? Download/fork/star here: GitHub PW Modules Your local modules manager Features Syntax highlight your text, for easier preparation of content Nice light, readable theme Supports Textile, Markdown & HTML Auto selects mode, based on field's textformatters (last found is used) Works with multiple fields on page, each with different settings Features inspired by iA writer Blue Cursor Focus mode We are still kind-of in beta, so please, test your browsers and let me know… Thank you! <3 PW1 point
-
1 point
-
if(!$this->modules->isInstalled("JqueryDataTables")){ $this->error($this->_("ModulesManager requires 'JqueryDataTables' module since version 2.0.")); return; } The one who can read is clearly advantaged1 point
-
Adrian, did u install the new DT module (1.9.4) or the old one? (1.0.0) That looks like the old one ? Edited for clarity: In case you didn't know, these are different modules (one does not replace the other!)1 point
-
Looking more closely, there is this box shadow which is actually used in foundation to create the menu icon, but seems to adding an unwanted additional effect on the word "menu" which is wrapped in a span (I just copied this bit of code) Removing the span from round Menu resolves the issue. I will update the download later.1 point
-
@ Joss, Thanks once again for being overly generous and providing another front-end framework profile. You, Ryan, Soma and many others have aided greatly in my understanding of front-end profiles, PHP in general and overall good practices for web development.1 point
-
Just saw this https://twitter.com/smashingmag/status/4248879791703326721 point
-
Oh, I never intentionally middle click - probably my upbringing.1 point
-
Thought I should actually put the demo up on my site: http://foundation5.stonywebsites.co.uk/1 point
-
1 point
-
Hi Gebeer The main scss is foundation.scss in the scss folder. That in turn imports all the various foundation.scss files. This is then output to foundation.css using whichever method you want. Other than that, there are four other css files: editor.css has some basic foundation typography styles that can be used by whichever RTE you wish foundation.min.css is just the normal foundation download and is not linked - it is just there for reference. normalize.css - this is the normalize script included with foundation site.css - this includes some PW styles and any oddments that you want to have at your fingertips - for instance I have used it for some header styles and row styles. The reason I have laid it out like this is so that the foundation framework is distinct from anything else. If a dev then wants to combine elements, that is up to them, but their starting point is the same as if they had imported foundation straight from the zurb repository. They should be able to replace my foundation.css file with the original from Zurb and the site will still work, other than some colours. After that, they can bend it as they wished, but in this particular version, I did not want to add too many surprises for people who have used Foundation elsewhere1 point
-
Martijn in that case you will love Tomatito (music can't get much better than this) https://www.youtube.com/watch?v=cCYR-E7IpSk https://www.youtube.com/watch?v=UelQSMmW0741 point
-
I also did not know that Source code of ProcessWire is Joyful to read.1 point
-
Thanks Martijn, I did not know that method exists, happy now I can clean up my code...1 point
-
1 point
-
One more solution: http://www.resumablejs.com/ Browser support is not great, though (only FF and Chrome).1 point
-
I thought I should also clarify that if you use Soma' approach, you will still need to iterate through the $images array like this: $images = $page->imageK1->slice(0,3); foreach($images as $image){ echo "<a class='fancybox' rel='gallery1' href='$image->url'>"; echo "<img src='$image->url' height='150'></a>" }1 point
-
Oops! I am also doing a fuller Foundation 5 demo profile. I am using the SCSS files for minimal modifications - it is more or less the standard Foundation css with just some colour and font changes to make it more PW. It demos just a couple of bits of Foundation functionality such as dropdown, the top bar menu, orbit and tabs. Nearly finished....1 point
-
Hey Ryan, Thanks for the great feedback. I have incorporated the first two of your suggestions: $page->phone now generates the same as $page->phone->formattedNumber The country code and extension input fields are disabled by default, but can be enabled from the field's Input tab I am not really sure how to make your last suggestion work consistently. Given the large variety in the number of digits in phone numbers around the world, I don't know how I could reliably parse a number entered in one field. How would I know what digits to separate out into which of the subfields? It would be do-able if they always entered in the same format - eg a space between each component of the number, but I think it might cause more problems than it solves. Do you have an idea I am missing? I have also added a few new features: Ability to define an override format when filling out a phone number - I thought this might be useful for organizations with international offices where they want to format different phone numbers on their web site using different local formats. This option is off by default, but can be enabled on the Field's Input tab. Ability to edit all the formats available from the format selector, along with comments at the end of each entry. This was needed to make feature 1 work so the developer can define multiple custom formats without modifying the module's core code. This is found on the Field's Details Tab. Ability to change the numbers used in the formatted examples in the format select dropdown. I thought this would also be useful for international users so that they could make the numbers look more familiar - eg Australia has two digit area codes that always start with a '0'. This is found on the Field's Details Tab. One issue I am having with new feature 3 is that I can't seem to store values with leading zeros in the input field config field (ie the values in the data field of the "fields" table). I haven't yet dug into the source code to see where the leading zero is being removed - any ideas how I can solve this? Ok, I see the problem is in the core wireEncodeJSON function. Only trouble is I am not sure how I can override this since I am not actually calling it directly. EDIT: Also wondering if I should maybe move the Phone Output Format Options and Example Number Options to the modules config settings, rather than for the field. Obviously reduces flexibility, but simplifies setup. Any thoughts? As a side advantage, it would seem that it would allow me to solve the (int) problem mentioned above because I could hook into saveModuleConfigData (http://processwire.com/talk/topic/1849-clearing-cache-on-module-save/). I don't seem to be able to find a way to hook into the saving of ConfigInputfields - is that possible? I am going to attach the revised version here for the moment. I would really appreciate your feedback before I update the code on Github and update the docs. I am worried that I might have overcomplicated things with all these new options. Thanks! InputfieldPhone.module FieldtypePhone.module1 point
-
Adrian, it looks to me like you've done a beautiful job coding and documenting this module–nice work! I really like what I see here. I had once starting building a phone Fieldtype and gave up after discovering the crazy number of formats out there. So lots of respect to you for sticking with it and producing something complete and very well done here. Here are my only suggestions (minor): It might be nice to add a __toString() method to your Phone class, so when someone does "echo $page->phone"; they get a formatted (default) string. I'm thinking the country and extension inputs may not be applicable to all potential users–maybe there could be a way to turn them off? Related to input again, it's a little unusual (in my locale) to split out the components of phone numbers into separate fields. Though the coder side of me likes that you've done that here. But wonder if there might be some alternate input option that lets you populate it in one field and have a processInput that separates it out into the parts with a preg_split('/[^\d]/', $phone) or something.1 point
-
I have done an iso for the raspberry pi with processwire installed with the basic profile, if anybody is interested in a copy just let me know.1 point
-
Almonk, Here's one way you could do it (below), using ProcessWire's WireUpload class: <?php $page->setOutputFormatting(false); // instantiate the class and give it the name of the HTML field $u = new WireUpload('userfile'); // tell it to only accept 1 file $u->setMaxFiles(1); // tell it to rename rather than overwrite existing files $u->setOverwrite(false); // have it put the files in their final destination. this should be okay since // the WireUpload class will only create PW compatible filenames $u->setDestinationPath($page->files->path); // tell it what extensions to expect $u->setValidExtensions('jpg', 'jpeg', 'gif', 'png'); // execute() returns an array, so we'll foreach() it even though only 1 file foreach($u->execute() as $filename) $page->files->add($filename); // save the page $page->save(); Another way to do it would be a more traditional PHP way: <?php $page->setOutputFormatting(false); // we run the $name through $sanitizer to make it PW compatible... // ...this prevents the possibility of it getting renamed on the add() call below $name = strtolower($sanitizer->name($_FILES['userfile']['name'])); // prepend underscores to filename until it's unique... // ...this is just one possible way to handle duplicate filenames while(is_file($page->files->path . $name)) $name = "_" . $name; // validate the file extension $pos = strrpos($name, "."); if(!$pos) throw new WireException("File is missing extension"); $ext = substr($name, $pos+1); if(!in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) throw new WireException("Invalid extension"); // determine the final destination and store it in $file $file = $page->files->path . $name; // move the file to it's destination using PHP's function if(move_uploaded_file($_FILES['userfile']['tmp_name'], $file)) { // add it to the page $page->files->add($file); /// save the page $page->save(); } Btw, no need to turn outputFormatting back on unless you are rendering parts of that page in the same request. Neither of these examples perform much error checking, which you may want to add. Though the WireUpload class will populate PW's "$notices" API var with any errors: <?php foreach($notices as $notice) { if($notice instanceof NoticeError) { echo "<p>Error: {$notice->text}</p>"; } } If you are using the PW's admin templates, then it already does something like the above snippet.1 point