Leaderboard
Popular Content
Showing content with the highest reputation on 10/18/2016 in all areas
-
Still very fresh, but I thought... what the hell... spread the PW love and give you guys a first look... https://music-room.com This was a huge project. Still lots of debugging to do, but early feedback most welcome! Don't look at the code (particularly the js)... it's a bit of a garbled mess! Ha ha! Need to, ahem, refine it over the coming weeks and months. Haven't made the jump to PW3 yet as I'm using a few modules which don't work out of the box. Thanks again to Ryan for everything. Also, big thanks to Antti for his wonderful PadLoper module. Cheers and happy browsing! Douglas.6 points
-
So there's good news and bad news, as I'm almost done testing. The good news is that I'll be able to wrap up the content nesting code some time tonight. The bad news is that fixing the problem of subject lines > 76 characters is basically impossible, since PHP's mail() function messes up all attempts at wrapping the subject header, mb_encode_mimeheader or not, on my system. This is likely a Windows oddity, but it's reproducible across PHP versions. Strike the bad part, fooled myself there. So chances are high there'll be a working, thoroughly tested git branch by this time tomorrow.6 points
-
Thought I'd show some work in progress modules. Subscribers https://github.com/benbyford/Subscribers has functions for logging in new users, added with new subscriber role bulk export the subscriber users to comma delineated SubscriberList (submodule) module adds an admin page to view your subscribers and page through them, or export WireMailChimp https://github.com/benbyford/WireMailChimp (though I need to change the name on github) Implements https://github.com/drewm/mailchimp-api adds any user save to a mailchimp list settings for API and List id only adds users that have a checked email_subscribe field to true5 points
-
Hi all, I have a couple of custom modules that are not made public (for in-house usage only). Is there a way to have these modules updated through the Module Upgrades even if they are housed in a private repo? How do other private/commercial modules get updated aside from uploading them manually? Thanks Rudy3 points
-
Of course that would be a good idea! I am going to be away for the next two weeks, but I'll add it to my list to do when I get back. Thanks for the suggestion!3 points
-
$pages->find("template=template_name, name*=whatever"); This should do it https://processwire.com/api/selectors/#operators3 points
-
Think i mainly needed a good grounding in HookEvents, and I've now read this (which is ace): https://processwire.com/api/hooks/ I'm using your method above of public functions to access my variables and works well, thanks @horst3 points
-
Thanks @adrian for this module. It would be great if it supports multilanguage depending on the browser language. F.e. if the browser fits one of the installed languages then show the message in this language, otherwise show the default language.3 points
-
COMPOSER ELLIOTT CARTER (December 11, 1908 - November 5, 2012) is internationally recognized as one of the most influential American voices in classical music, and a leading figure of modernism in the 20th and 21st centuries. https://www.elliottcarter.com/ This site was launched some months ago, and was one of the larger projects I completed so far. It took about 4 month to build. (PW 2.7.3) This was the first project I used the wireRenderFile() pattern on, and it consequently allowed me to reuse a lot of output code, as well as do a lot of markup/object caching with wirecache. The site uses DataTables for all of the major listing pages, Works, Discography and Events, allowing users to filter and search with no page reload. This probably has the most advanced caching setup that I've done so far, and one example of how it works is on the discography page: https://www.elliottcarter.com/discography/ That page has to hold all 264 albums (json object which is rendered by dataTables), and each album takes a bit of processing to render (formatting of works, artists etc.). The json for each album's list view is wirecached individually and is generated on visits to the individual album pages, so that they never get generated all at once when visiting the discography page. The complete json object containing all of the albums is also wirecached, then the final page is pro-cached. The album covers are lazy loaded so as to not affect page size or load speed. The selects on the left are also all wirecached as page or regular arrays. This results in a 1.6s page load time and a page size of 1.12 MB. Without the data being wirecached the load time is around 9 seconds to generate the page, probably longer if it had to regenerate all 264 albums, but the album info never changes, so they are permanently cached unless someone edits one. Also should note that since there is so much use of wirecache, @Soma's Clear Cache Admin was pretty much indispensable for managing all of the caches. Other features of the site include extensive use of Schema.org microdata, an events submission system, and a lot of custom stuff in the admin for managing the content, such as automated fetching of album covers from Amazon, converting formbuilder submissions into events, a custom admin dashboard etc.. There are probably 60 modules in use overall, but these in particular saved the day: MenuBuilder AdminCustomFiles AdminPageFieldEditLinks All the Selectize modules URL checker PrevNextTabs WireMailMailgun SetupPageName Changelog AdminCustomPages Twitter Feed Social Share Buttons RSS Enhanced Chosen Select Runtime Markup Batch Child Editor Tracy Debugger As well as all of the pro modules (ProFields, FormBuilder, ListerPro, and ProCache). More info, screen shots etc will be gradually posted here...2 points
-
I'd like to see an officially supported way to do this, too. Now that PW3 is integrated with composer, there is probably an indirect way to do this via composer's ability to link into private repositories via the composer.json file. You could probably use this plus composer's update command to pull the latest versions of modules from the private repos. The module repositories would need to be setup to be compatible with composer for this to work. I've used this feature of composer before and it does work - but I've never tried it with PW.2 points
-
That is a nice question that has been risen a few times in a context of paid ryan's and apeisa's modules. I do not think there is a solution to this yet.2 points
-
I see, but there's no sense initializing the same SimpleMDE field several times (clicking on tabs back and forth). I would add a "data-mce-loaded" attribute on first load and return from the initSimpleMDE() function on second (and consequent) runs if this tag exists on the field in question.2 points
-
2 points
-
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.1 point
-
If you are using the great PagePathHistory module in core, this one might be helpful: Page Path History Manager https://github.com/boundaryfunctions/PagePathHistoryManager General This modules allows you to easily manage past page URLs tracked with the PagePathHistory module. It extends the settings tab on the page edit form in the backend and allows you to: view past URLs of the current page and parent pages, delete past URLs, and create new fallback URLs. How to use Use the form in the settings tab on the page edit form of every page in admin to view and manipulate past URLs. See Screenshots to get a better idea of what you can do. Installation Install the module PagePathHistory from within the Processwire admin. PagePathHistory is included in core but not installed by default. Grab the module from its Github repository. Install this module from within the Processwire admin or copy the file content to/site/modules/PagePathHistoryManager. In Admin, click Modules → Check for new modules to refresh module directory. Afterwards install the newly registered module PagePathHistoryManager. You can now manage past URLs from within the settings tab when editing any page. Screenshots Notes This module doesn't install or require PagePathHistory because I'm currently working with a fork of it that is language sensitive. I'll try to publish this one here as well, but I'm not done with final testing. Links You can grab this Module from Github: Source Releases Download latest release I would be glad if some of you could give this module a quick test drive and comment with some feedback here.1 point
-
Hey everyone, Max from Snipcart here! We just published a full tutorial showing how to use ProcessWire + Snipcart (our dev-first HTML/JS shopping cart platform) to enable e-commerce. It was pretty much my first time playing around with the Apache/MySQL/PHP stack, so I'd love to get some feedback on the demo code. Oh, and also, if you feel like the Snipcart integration could have been done in a different/better way with ProcessWire, let me know! > Blog post tutorial > (Very) simple live demo > GitHub repo Cheers folks.1 point
-
We had to add this to our latest project and I am happy to share here. I couldn't find anything on the forums for this so apologies if it has been done before. But there are always different ways of doing things: $firstEntry = $pages->find("parent_id=1037, sort=date_1, limit=1"); foreach (range(date("Y"), date("Y", $pages->get("$firstEntry")->date_1)) as $year) { $start = strtotime(date("$year-01-01")); $end = strtotime(date("$year-12-31")); $count = $pages->count("parent_id=1037, date_1>=$start, date_1<=$end"); if ($count > 0) echo '<li><a href="' . $page->parent->url . $year . '/">' . $year . '(' . $count . ')</a></li>'; } So what is going on: first of all, our pages were children, so we set the parent_id, and our date field is called date_1 we need to get the year of the oldest entry, so that happens with $firstEntry and a simple find next we create an array using a range of years, we start with the current year, then we get the year from our $firstEntry (note: if you have an output format for your date set in the field settings you will want to use $pages->get("$firstEntry")->getUnformatted("date_1") within the foreach) next we create a start date and end date for the year we count if there are any entries for that year if there are display them in a list Your next step would be to create the $input->urlSegment code to display your pages.1 point
-
yes, you can create the shopify_embed field for example, a textarea (can use plain or ACE Extended). Then for each product you have you just need to grab the code and paste in that field. then you can just echo the embed code... <?php echo $product->shopify_embed; ?>1 point
-
1 point
-
Shouldn't you choose a more telling title for the homepage? Somebody might bookmark it and would find just "Home"... Edit:1 point
-
First of all I would like to say: Great job @Jonathan Lahijani for bringing CMS Critic back to ProcessWire. I first discovered PW through CMS Critic, so I'm thankful, that they awarded 2014 ProcessWire as Best Free PHP CMS. But I recently wondered, that a so-called "CMS review" site hasn't covered the release of PW3 at all? Is there any particular reason for this or am I just missing something? Regards, Andreas1 point
-
Well, you haven't tried what I did to the code yet But if you want, just grab the newest WireMail.php here. It would be great if you could give me some feedback.1 point
-
Great work! Out of curiosity as I have paid for PadLoper but never used it (as I haven't had chance) how long did a project like this take you?1 point
-
Welcome to the forums @DarkwaveSurfer, Glad you are finding the module useful. The template would be 'blog-post'. But you already have an image field in that template, so why add another? In addition, Blog already has a featured image feature. Sorry the docs are not up to date. Please have a read from this post forward..You have fine-grained control where to show your featured image, whether it comes from the image field or the RTE.1 point
-
I wouldn't ignore it completely just yet. Any chance the error comes back if Tracy is disabled? I am going to be away for the next two weeks, but let me know what you find and I'll take a further look then.1 point
-
Here it is. Looks like dodgy images from the client which worked everywhere else (PS, ID, Affinity, Preview etc) except in PW. Thanks for the help everyone. Carry on.1 point
-
yep - ok thanks for checking that - will have this all in the module asap. @tpr thanks for the advice, yes, will add the the data attribute so it doesn't keep initing1 point
-
Just clarifying - you actually need 3.0.37: https://github.com/processwire/processwire/commits/dev1 point
-
@jmartsch: is your source file that sends the mail definitely saved as UTF-8? I'm just doing some really extensive testing (including running mails through different sorts of mail servers along the way). I've spotted one issue with the position of quotes in the from: and to: fields but that is only triggered when there's a comma in the name, and there's a slight problem with HTML mails with attachments which should have nested parts since text + html should always have a multipart-alternative parent for the HTML to get displayed. I couldn't reproduce your or @Juergen's issues yet, though.1 point
-
Hello @mer! Just a quick css fix to check/test: #skel-panels-defaultWrapper {height: auto !important;} I can't find for the moment the difference(s) between your website and the demo website that makes height: 100% not working.1 point
-
1 point
-
1 point
-
<?php // only render output if there is something set in field json_ld_alternateName if(strlen($page->json_ld_alternateName) > 0) { echo " <script type='application/ld+json'> 'alternateName: '{$page->json_ld_alternateName}', </script>\n"; } I wrap "doublequotes" around the php string and use 'singlequotes' for strings within the markup. If you run into situations where you also would need doublequotes within the markup, you can use them if you escape them with a backslash: <?php echo "<p>A string with 'singlequotes' and escaped \"doublequotes\"!</p>"; // will output: <p>A string with 'singlequotes' and escaped "doublequotes"!</p>1 point
-
1 point
-
Love this module. Using it in 2.7. It would be great if I could upgrade to 3.0.36 without issues. Any new workarounds?1 point
-
Can also be the difference of mac and windows or version difference. Microsoft is really not great at keeping things in sync :D.1 point
-
An email's source code has nothing to do with the message being html or not html. Html might be used in the message, but that's about it. In outlook (at least for mac) I can do right click on an email and choose "open source" ("Quelle anzeigen" in german) to open the raw email in a texteditor.1 point
-
@Christophe, once I have hacked a module (in an early version) of adrian to add exactly what you are looking for. GET http://fua.pw.nogajski.de/ [HTTP/1.1 503 Service Temporarily Unavailable 187ms] Date: Thu, 13 Oct 2016 20:14:54 GMT Retry-After: Sat, 22 Oct 2016 11:22:00 GMT So, if you like, I can upload it here as is, in a zip. Maybe, @adrian gets inspired and can add this into the current dev of his module as a maintenance feature, additonally to the site protect feature!? very old, hacked version of protect with maintenance.zip1 point
-
Hhm, don't have time to check this. But if you are not comfortable with the magic get ATM, you may also add a separate method for every property you need public read access to: public function getUserSaved() { return $this->userSaved; } public function getUserEmail() { return $this->userEmail; } ... From within your hook function you may call this f.e. with $userSaved = $event->object->getUserSaved();1 point
-
I know this is ancient, but I just had to do this and discovered a very simple way $pages->emptyTrash(); Maybe this is newish?1 point
-
Hello adrian, I will test it tomorrow and post the result here. Best regards1 point
-
@Juergen - If you have a few moments, I think it would be helpful if you could test @BitPoet's changes to confirm they work so that these changes might be incorporated into the core. Thanks!1 point
-
Nice and clean! Thanks for the insights. I've used a same approach on my very first PW site with the difference that I saved the json on saving the page (and it was for filenames for a JS slider with many images).1 point
-
I admit I haven't thought too much about nesting, and the wiring around the field's json data would obviously need to be completely different. InnoDB does support searching in nested structures, but PW already treats subfields on the left side of a selector in its own way and throws away anything starting at the second full stop. A different syntax would be necessary, e.g. $pages->find('jsonField=/subField/field:foo') There might be issues where search expressions need some kind of escaping (e.g. searching for literal text "/subfield"), but this would allow for wildcard queries. $pages->find('jsonField=/subField/*/name:foo') Or even searching arrays (any element or by index): $pages->find('jsonField=/subField/fields#*/name:foo'); $pages->find('jsonField=/subField/field#12/name:foo'); Here's a tiny adoption of my module to allow this search syntax. There's no back and forth conversion though, just a textarea containing the JSON. <?php class FieldtypeJsonDocument extends FieldtypeTextarea implements Module { public static function getModuleInfo() { return array( "title" => "Fieldtype Json Document", "summary" => "Fieldtype utilizing native MySQL support for searching JSON documents.", "version" => "0.0.3", ); } public function getMatchQuery($query, $table, $subfield, $operator, $value) { $database = $this->wire("database"); list($path, $value) = explode(':', $value, 2); if(empty($value) && !empty($path)) { $value = $path; $path = ""; } $path = '$' . ((empty($subfield) || $subfield == "data") ? "" : ".$subfield") . (empty($path) ? ".*" : str_replace('/', '.', preg_replace('~/?#(\d+|\*)~', "[$1]", $path))); $table = $database->escapeTable($table); $value = $database->escapeStr($value); if($operator == "=") { $query->where("JSON_SEARCH({$table}.data, 'one', '$value', NULL, '$path') IS NOT NULL"); } else if($operator == "*=" || $operator == "%=") { $query->where("JSON_SEARCH({$table}.data, 'one', '%$value%', NULL, '$path') IS NOT NULL"); } else if($operator == "^=") { $query->where("JSON_SEARCH({$table}.data, 'one', '$value%', NULL, '$path') IS NOT NULL"); } else if($operator == "$=") { $query->where("JSON_SEARCH({$table}.data, 'one', '%$value', NULL, '$path') IS NOT NULL"); } $this->log->message($query->getQuery()); return $query; } public function getDatabaseSchema(Field $field) { $engine = $this->wire('config')->dbEngine; $charset = $this->wire('config')->dbCharset; $schema = array( 'pages_id' => 'int UNSIGNED NOT NULL', 'data' => "JSON", // each Fieldtype should override this in particular 'keys' => array( 'primary' => 'PRIMARY KEY (`pages_id`)', ), // additional data 'xtra' => array( // any optional statements that should follow after the closing paren (i.e. engine, default charset, etc) 'append' => "ENGINE=$engine DEFAULT CHARSET=$charset", // true (default) if this schema provides all storage for this fieldtype. // false if other storage is involved with this fieldtype, beyond this schema (like repeaters, PageTable, etc.) 'all' => true, ) ); return $schema; } public function getInputfield(Page $page, Field $field) { $inputField = $this->modules->get('InputfieldTextarea'); return $inputField; } public function install() { if($this->config->dbEngine != "InnoDB") { throw new WireException($this->_("InnoDB database engine needs to be used for native JSON support")); } $dbver = $this->database->getAttribute(PDO::ATTR_SERVER_VERSION); if(version_compare($dbver, '5.7.8', '<')) { throw new WireException(sprintf($this->_("MySQL Server version needs to be at least 5.7.8 for fully working JSON support, installed version is %s"), $dbver)); } } } There would probably be a bit of recursive shuffling necessary in sleep-/wakeup-/sanitizeValue to build nested structures based on WireData/WireArray so accessing subfields and filtering PageArrays is possible, but that should be doable too. How difficult the backend input + display parts get depends solely on your exact requirements.1 point
-
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.1 point
-
A new band website for the German electronic avant-garde band DEINE LAKAIEN. The idea was to make this an introduction website for media and new listeners. For in-depth information, the website is accompanied by another new ProcessWire website (with an integrated xenforo forum) for the fanclub: colour-ize.com. and the label website chrom.de. All three websites use the same UI and re-occurring elements (while preserving a unique look), so people find their way around easily. Design/programming details: It was tried to make the dark look (which is the band CI) feeling modern and artistic (avoiding a Nineties look which so many dark themed websites have). The website is built in my spare time in 5 weeks thanks to the ease of ProcessWire 3 and is fully responsive (using uikit and Hype). ProcessWire's new language features were more than welcome to make language management a breeze (People coming from WordPress know what I mean). The backend is build in a way that non-techies (band, volunteer translators, fanclub, booking) can handle the CMS without needing much support and knowledge of SEO. Everything is explained or almost self-explanatory. And the complex internal link-building is done either fully automatic or half automatic.1 point
-
Good news. PW 2.8.x and 3.x already support whitespace. I didn't realize those versions were in separate repos: https://github.com/ryancramerdesign/pw28 and https://github.com/processwire/processwire. Ryan said 2.8 repo is probably moving to the processwire org github shortly.1 point
-
I'm far from being a ProcessWire guru (think of me as PW hobbyist who sometimes even develop sites for clients...), but have a general understanding of "WordPress concepts" so I'm really keen on this. Thank you for the update on this!1 point
-
Somewhere between 60-80 hours, which includes the general consulting, coding, communication and other issues that came up. I didn't track time like I normally do so this is an estimate. Superusers have full access as usual. General users, authors and vendors have access to the pages they are creators of (posts, products). In Ryan's case study from a few years ago, he implemented a hook that prevents users from accessing other user's data in the admin. That part is key. Some CSS is also being used to hide what's not necessary for non superusers to see (along with permissions enforcement). It's easy to load a custom CSS file in the admin based on whatever condition you want it to meet. For example, the following in /site/templates/admin.php if($user->hasRole("author")) { $config->styles->append($config->urls->templates."author.css"); } Thanks for catching that typo. I also updated the chart to link to the various PW modules.1 point
-
With the new 3.0 api docs this could potentially be auto-generated, so I'm hoping1 point