Leaderboard
Popular Content
Showing content with the highest reputation on 09/28/2016 in all areas
-
Another proof-of-concept module: JsonNativeField Leverages MySQL >= 5.7.8's native JSON column type for key-value storage. This gives us the opportunity to store arbitrary (textual) fields in the database and allows us to search for them with plain subfield selector syntax, including wildcard operators. Possible applications are storing submitted form data or adding user-defined properties to their profile. Currently, the module is still really, really alpha, but I wanted to get input early on. Let me know what you think. Download from GitHub. Here are a few screenshots for anybody interested but unable to try for themselves: 1. First page with json field and custom subfields: 2. Second page with json field and custom subfields: 3. Searching through all subfields in the json field: 4. Searching only in a specific subfield: The interface is really rather crude still. The "delete" buttons only work after saving (have to attach listeners to the newly created entries yet), and I've got to straighten out supported operators for Lister to pick up. I'll see if I find some time tomorrow to work on these issues and brush up the visual side a bit.8 points
-
Hi guys, Just launched my latest project, The Tourists' Affairs: http://www.thetouristsaffairs.com/en/ This one was a pleasure to build. It's based on a tours catalogue, features a tour finder, and for the first time I based a gallery on Instagram embeds. You can see those working on each tour. I'm using my basic ingredient set here: Languages, AIOM+, MarkupSEO, and not much more. Not big or complicated, but neat.6 points
-
Would you be available for Freelance work on a Processwire site? Starting ASAP, about one week work estimated by me (that is, someone who is not very proficient at processwire, but has 15 years experience programming). We have a pretty good spec. I'm very tempted to do it myself because the API is so damn nice, but I know I would be slower than a decent processwire guy. I don't even know PHP. The site is on a vagrant box, proper version-control, etc. Ideally, you should take care of deploying it too (we have SoftLayer, but we could go anywhere else if it's any easier). If you see yourself more of a designer, but know someone who can deal with the deployment, feel free to ping them. Deploying PHP is also something I would rather not do. It looks easier than pretty much any other tech stack, but I'm sure the devil is in the details. Details on the site: It's a two-sided platform, where devs meet companies, similar to hired.com but with a big difference: training. I want to combine plain recruitment with education. Companies don't have budgets for training (or have say 500eur/person/year)... this is scary because the fast-changing tech world will leave you behind, unless you spend time improving yourself. If the company doesn't spend money on training, then you have to find ways to catch up, probably over weekends and evenings. But companies do have big budgets for recruiting. Everyone assumes that you have to spend money to get good guys, and recruiters charge a good chunk of the first year salary for the hire. Companies budget for this. I want to get around the fact that there's no budget for training, by taking it from where the companies do have budget: hiring. So it's mostly budget relocation. But there's a clear benefit for the company: they get training 'for free'. And they get onboarding partially solved. It's common to hire someone and the assume that the first month is wasted, with the person getting used to the tech stack the company uses. We remove a big chunk of the problem. The core 'pages' are Dev, Company, and Course. There are user roles to limit access of companies to developers (for example devs that work for the company logged in). There are courses and devs can pick courses. It's a bit more complex than that. Please contact me only if you can start immediately on this project. The steps: - You contact me (on this profile, with a pm). - I will look you up, and if I like what I see, I will send you the spec. - You review the spec and send me a quote, both in time and in money. I may well be off thinking this is a week of work - We sign a contract, and you start work. No NDA silliness. You can open source any part of the site that you consider valuable as a PW module. We are in Berlin. Timezone : CET. Ideal if you are in town because we could work side to side, but remote perfectly ok.5 points
-
If you're logged in you have no template cache, unless you enable it for logged in users. That's enough most of the times. There's also whitelist for POST and GET for template cache. So simply adding "nocache" to the GET field when enabling template cache would let you see non-cached version by simply adding /?nocache to a url. The only way to disable template cache via a config, the only way would be to make a hook before Page:render() and set the "allowCache" render option to false. Somewhere in an autoload module public function init() { $this->addHookBefore('Page::render', $this, 'hookRenderPage'); } Then the method to set the arguments for "allowCache" to false if config disableTemplateCache is true public function hookRenderPage($event){ if($this->config->disableTemplateCache){ $args = $event->arguments(1); $args['allowCache'] = false; $event->setArgument(1, $args); } } Now one can add to the config $config->disableTemplateCache = true;4 points
-
You could use a replace hook on renderAddable(). But, based on your screenshot above... You are not using a core Page inputfield. Looks like the InputfieldChosenSelect module, which has it's own method for adding new pages and does not render the core "Create New" link. And I believe your "New" button is not core either, but actually rendered by the AdminPageFieldEditLinks module. These details do matter.3 points
-
FIXED: The images I was uploading were 5184x3456 and I didn't realize that. So I was killing the memory load on a crazy large image.2 points
-
Live search to the rescue: https://processwire.com/blog/posts/pw-3.0.23/#new-phrase-search-for-language-translation2 points
-
v1.3.2 is uploaded with a tiny but useful addition: middle-click on the edit link opens the admin in a new window. This can be handy if you want to see the "big picture" or eg. when you have AdminOnSteroids' fixed CKE toolbar ON and the CKE field is too high. We have also made the initial steps towards an "Add new" button so it will appear in a future release.2 points
-
2 points
-
2 points
-
Okay, here we go. FieldtypeDatetimeAdvanced with database and PageArray filtering support and descriptive naming. Possible subfields: day month year (4-digit) hour (0..23) minutes seconds day_of_week (0..6, 0 = Sunday) day_of_year (0..365) week_of_year (1..53) Examples: // Database search: $pagelist = $pages->find("mydatefield.year=2016"); // Filtering PageArray in memory: $maypages = $pagelist->filter("mydatefield.month=5"); // Back to our starting point: $start = date('z'); $end = $start + 7; $sevendays = $pages->find("mydatefield.day_of_year>=$start, mydatefield.day_of_year<$end");2 points
-
As I've been pondering that same task a few times before, I've drawn up a quick&dirty proof-of-concept module that extends PW's regular FieldtypeDatetime, adding (database) search functionality by using date_format. It's lacking sanitizing and not really thought through all the way, but I'd love to get some thoughts on whether this might be worthwhile to pursue. <?php /** * Advanced Datetime Field * * Allows searching for datetime fields by passing a format string * to MySQL's format_date function as a subfield (only one format option * and without the % sign). * * A list of all format strings can be found at * http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format * * Examples: * $pages->find("my_date_field.e=27") * // Searches for all pages having the 27th in my_date_field * * $pages->find("my_date_field.Y=2016") * // Searches for pages with year 2016 in my_date_field * * $start = date('z') + 1; // PHP starts at 0, MySQL at 1 * $end = $start + 6; * $pages->find("my_date_field.j>=$start, my_date_field.j<$end") * // All pages in the seven day period starting today **/ class FieldtypeDatetimeAdvanced extends FieldtypeDatetime implements Module { public static function getModuleInfo() { return array( "title" => "Advanced Datetime field", "summary" => "Datetime field with extended search syntax", "version" => "0.0.1", ); } /** * Match a date/time value in the database, as used by PageFinder * */ public function getMatchQuery($query, $table, $subfield, $operator, $value) { if($subfield != "data") { $value = $this->_sanitizeValue($value); $database = $this->wire("database"); if($database->isOperator($operator)) { $table = $database->escapeTable($table); $value = $database->escapeStr($value); $query->where("DATE_FORMAT({$table}.data, '%{$subfield}'){$operator}'$value'"); $this->log->message($query->getQuery()); } } else { $this->log->message("Regular query"); $value = (int) $this->_sanitizeValue($value); if($value) $value = date('Y-m-d H:i:s', $value); else $value = ''; $database = $this->wire('database'); if($database->isOperator($operator)) { $table = $database->escapeTable($table); $subfield = $database->escapeCol($subfield); $value = $database->escapeStr($value); $query->where("$table.{$subfield}{$operator}'$value'"); } } return $query; } }2 points
-
Attention: please don't install this module at the time being! It is not compatible with current PW versions, and it will be some time until I can work in all the changes. Due to a discussion here in the forums, I was inspired to finally have a take on datetime fields and see if I couldn't get them to be searched a little more conveniently. Here's a small module - still in alpha state, but I'd be happy to get some feedback - that allows searching for individual components of a date like year, month, day, hour or even day_of_week or day_of_year, and also returning them. Github repo: DatetimeAdvanced Current version: 0.0.5 Tested in: ProcessWire 2.8 + 3.0 Possible subfields: day month year hour minute second day_of_week day_of_year week_of_year Examples: // Database search: $pagelist = $pages->find("mydatefield.year=2016"); // Filtering PageArray in memory: $maypages = $pagelist->filter("mydatefield.month=5"); // Back to our starting point: $start = date('z'); $end = $start + 7; $sevendays = $pages->find("mydatefield.day_of_year>=$start, mydatefield.day_of_year<$end"); // Nice side effect: subfields are now directly accessible $blogentry = $pages->get('blog-entry-1'); echo $blogentry->title . "(" . $blogentry->publishdate->year . ")"; // New in 0.0.4: shorthand methods echo $blogentry->publishdate->strftime("%Y-%m-%d %H:%M:%S") . PHP_EOL; echo $blogentry->publishdate->date("Y-m-d H:i:s") . PHP_EOL; ToDos for the future: See if there's a possibility to specify ranges more conveniently Check if this can perhaps wiggle its way into the PW core Changes: example for direct subfield access and shorthand methods to strftime() and date() added.1 point
-
This module helps you dynamically create schemas for improved SEO & SERP listings from within your templates. Each schema can be configured to meet your requirements. You can even add your own ProcessWire schema classes to the module. Read about the module on github: https://github.com/clipmagic/MarkupJsonLDSchema Download from github: https://github.com/clipmagic/MarkupJsonLDSchema/zipball/master Download from ProcessWire modules: http://modules.processwire.com/modules/markup-json-ldschema/1 point
-
Thanks, looks even better I often have a need for a WordPress "custom fields"-like field in PW and this module has this.1 point
-
Hi There are about 10 projects I know that use Padloper (although license sales are 100+). I haven't asked promises to showcase those, but I will soon focus on that (asking showcases and putting them up to padloper.pw).1 point
-
As discussed in this thread it would be great to add alternate link text for the add new page links to the AdminPageFieldEditLinks.module. So we are able to add a custom label text.1 point
-
the master branch / version from pw module directory wasn't PW 3.x ready. Previously you had to use branch develop. But I just released a new version 1.0.0 which supports ProcessWire 3.x (only). Just update the module to the latest version and everything should work as expected.1 point
-
Interesting to see someone else using PW + Vue.js. Building components in Vue and using things like webpack and hot reloading has been kind of eye opening for me. I've just finished a small website/shop that uses Vue to render some elements. Things like the cart made a lot of sense, calculating/updating prices as quantities are edited for example. The cart in this instance is essentially a popover and doesn't need to be rendered immediately or visible for SEO purposes, which was a primary concern with this site. Where Vue was used to render actual content, I ended up writing duplicate templates in both PHP and using Vue components (the latter overwrites the former) which is obviously not ideal. I'm looking to eventually transition to using Vue/Vuex/Vue Router, moving away from writing PHP based templates and just using PW to expose JSON data via some kind of custom API. But as I almost exclusively build websites and not apps, things like SEO have always been a bit of a concern. I need to read a lot more about how to handle server side rendering with Vue for example. I wonder if there are enough people here who would be interested in some kind of PW/Vue/Webpack project template for use with Vue CLI or similar?1 point
-
You probably did not replace the whole wire folder, but only replace existing files, because JqueryFancybox is no longer part of ProcessWire.1 point
-
@Robin S Actually, although considered bad practice, ProcessWire will still be able to retrieve that input. But even with $input->post it still didn't work for me. I should have been clearer..1 point
-
Have you already translated the string then? Because the core Page inputfield renders "Create New" by default, not "New": https://github.com/processwire/processwire/blob/master/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module#L6211 point
-
You could do this by JavaScript using custom admin files1 point
-
You need to enable UTF8 URIs in your htaccess file. I assume you are using ProcessWire 2.8 or 3.0, and so you can simply comment out rule 16a and uncomment rule 16b (if I'm not mistaken). This should enable the URIs you would like to use.1 point
-
ok right, well my technique uses 2 redirects, but does guarantee that every page on the site gets redirected to it's new counterpart without having to do anything extra.1 point
-
Really stoked about the new module! For the OP's issue, the below won't work as expected across the year boundary. Like, if this runs on 28th of December. Hence the need for switching between two find queries...1 point
-
Hi everyone, I just added multi-language support to this module. I use it with alternate language file fields for translated versions of PDFs. In my example, I have these two fields: document_pdf document_pdf_portugues I am using this filename format setting: {$page->title} Now when I upload, the PDF gets renamed to match the title of the page based on the language suffix of the field, eg. a page with these multi-language titles: My Document Title (default) | Meu Título do Documento (portugues) results in pdfs named: my-document-title.pdf | meu-título-do-documento.pdf Please note that I am still pretty new to this multi-language stuff, so let me know if you have any problems or have ideas for improvements.1 point
-
@antpre - Tracy has an easy and safe way to disable all autoload modules for testing if there is some interference: https://processwire.com/blog/posts/introducing-tracy-debugger/#module-disabler-panel That might help to narrow it down for you. Also, with Tracy on, you don't really need debug mode1 point
-
Hacktoberfest is right around the corner this year. A great opportuniy for contributing to open source and specially Processwire ecosystem https://hacktoberfest.digitalocean.com/1 point
-
Hi @Milo, Welcome to PW and the forums. Where is the post request coming from? If from the frontend it will be rejected if you try to post to an /admin/page......What exactly are you trying to do? Maybe if we get some clarity we can help you better...1 point
-
wireshell 1.0.0 Compatibility: ProcessWire 3.x Prepares wireshell for ProcessWire 3.x, adds namespace support, only supports ProcessWire 3.x Updates Github Repository: github.com/processwire/processwire Improves module:upgrade command, if no argument is provided it just checks for upgrades Extends new command, adds option --src=path/to/source to be able to use a pre-downloaded tgz/zip/folder Extends status command, only shows database password if --pass option is provided, shows if an upgrade is available Updates upgrade command, removes options dev and devns1 point
-
Calling arbitrary MySQL functions would be nice, but I think these date features should probably be a different topic, as I'd prefer it if they also worked for filtering PageArrays. That would AFAIK mean using a wrapper class in place of the plain timestamp that is currently used as the unformatted value though. Got to fiddle with that when I have time in the evening.1 point
-
The reason for this is explained in the "code internationlisation" docs page. Small hint: It's because of the parser and the ability to have comments for translation on the same line.1 point
-
you would need something like this in your old site's root folder htaccess RewriteEngine On RewriteCond %{HTTP_HOST} www.thepaleofix.com.com [NC] RewriteRule ^(.*)$ http://www.dranthonygustin.com/$1 [L,R=301] Once the URLs are all forwarding from the old domain, you would then use a combination of htaccess 301, and Jumplinks (module) to handle the differences. because with the above rules if someone requests http://www.thepaleofix.com/resource/purepharma-m3-review/ they will definitely be redirected to http://www.dranthonygustin.com/resource/purepharma-m3-review/ so then your local 301 or Jumplink would do the 2nd 301 to the new page1 point
-
Anybody tested this on v3 yet? Looking at purchasing for a new project. Also @apeisa - may I ask what is on the roadmap? As the last release was in January.1 point
-
As soon as one is using essentially any external php library you've to deal with namespaces and it's really not that complicated after some time using them. At least from my experience.1 point
-
Works perfectly ! I sometimes use 'file based' url segments. Then I create for every URL segment a (nested) folder. // urlsegments folder in the templates folder, when the urlsegment is there, load it! if ($input->urlSegmentStr && $page->id !== $config->http404PageID) { $segment = './urlsegments' . $page->url . $input->urlSegmentStr . '/segment.php'; if (!is_file($segment)) { throw new Wire404Exception(); } return include($segment); }1 point