Leaderboard
Popular Content
Showing content with the highest reputation on 03/21/2019 in all areas
-
Are we talking about dynamically updating the menu on client side (AJAX driven site) or producing different output from your template? In the template code you simply do not output the a tags for the "current" item to make an entry not clickable. Something like: foreach($languages as $lang) { if($user->language == $lang) echo "<li class='ActiveClass'>{$lang->title}</li>"; else echo "<li><a href='...'>{$lang->title}</a></li>"; }3 points
-
@flydev I just found this (https://www.phpclasses.org/package/10950-PHP-Compress-files-and-create-archives-in-Zip-format.html), maybe it is of interest for you? zipfly-2018-12-21.zip3 points
-
I was actually a financial systems developer before building my first website using Processwire. Actually, if it weren't for the community, I'd be in Sheeeeet creek. I've been passed up a few times for some great jobs/contracts because I just lacked the requisite <Insert latest JS framework>, so I can't afford to put my head in the sand and ignore it any longer. My opinion about JS (It's slightly better than my opinion about Donald Drumpf, POTUS) does not matter. If I want to stay in the game, I gotta play the game too.3 points
-
Here is GoodKidsClothes.com, a blog about kids clothes - news, style tips, sale alerts, and more. GoodKidsClothes.com originally ran on Wordpress, and I moved it to Processwire recently, the new Processwire version is shown above. There was a fair amount to change over, since it had 4 years on Wordpress before switching! I kept the colors, background, etc in line with what it had been before - a soft, friendly look. I wasn't seeking for it to be identical to its previous appearance, just similar but updated/better/more fun. The html I did from scratch, although I used the W3CSS framework. I love W3CSS because they handle all the responsive breakpoints, and the default styling is a clean flat modern look with plenty of great pre-sets. The reason I moved this site over to ProcessWire was not looks but actually functionality: the new Wordpress editor (Gutenburg) had just come out - one of its quirks is that it couldn't keep up with my typing, so I had to literally slow down my typing, which really defeats the purpose of WP as a blogging CMS. (Processwire's editor keeps up with me just fine). Also it was anyway time for me to manually go through and update old articles, put in new affiliate links etc, so I decided to do everything all at once and switch over to ProcessWire. In case anyone is wondering, the switch-over was manual since I was going to examine every article I'd written to either a) update it, b) move it to another of my sites, or c) trash it. This was not time-efficent but this way I wound up with being certain everything was up to date content-wise, plus no unwanted bloat (like extra WP fields) could make its way into my Processwire database. I simply installed Processwire via 1-click Softaculous install in a subdirectory of the original Wordpress site, with the original site still running. Then after I had the Processwire version fully finished (this took several weeks), I simply uninstalled the Wordpress version and moved the Processwire site into the document root. This way I had less than 1 minute downtime. UX/UI The first menu link is an all-abilities-inclusive version of "skip to content". The actual text displayed depends on which page template is being used ( this text is assigned in _init). For example, the Article template will display "Scroll to article", while Search Results template will display "Scroll to results". Link styling in the body of article content is designed for both the desktop and mobile user, with simultaneous underlining and highlighting showing the entire link region to aim for when tapping on mobile. On the home page and some other templates as needed, skip links are available within the page. They offer the option to skip past a series of links such as social sharing links, pager navigation, etc for a) the screen reader user and b) the fully-sighted keyboard-only user (no mouse). These links only become visible to the eye when focus comes upon them via tabbing. Tab through the home page to see it in action - this is the template where the most skip links have been needed. Cookie manager - originally I used a slider for turning Google Analytics tracking on/off but changed to checkbox because I could not work out a way to manipulate slider without mouse. Newsletter - field, and feed One feature of this site is its newsletter, and you'll see here how Processwire shines. The setup was (and still is) that on days when a new blog post relevant to children's clothes is published, subscribers get a brief email notifying them of the new article and linking to it. This is all handled by MailChimp, which I highly recommend. Under the old Wordpress system, I had to use categories to classify which of the posts wound up going into the newsletter (kids clothes) and which posts didn't (other topics like parenting etc). There was always the chance that under default WP behavior, things would be classified incorrectly if I forgot to specify categories. Under Processwire, I've set up the article template to have a field called "Newsletter" which is a simple drop-down choice of "For newsletter" or "omit from Newsletter". There is no default value, and it's a required field, ensuring that I do remember to specify it one way or another. It's such a relief to do it this way! My newsletter feed was easy to customize under Processwire: I created a feed template that selected a) all the pages using the article template that also had b) the "For newsletter" field selected, and those are listed at /newsletter in feed format. Please note that this feed may be empty right now - I omitted my existing articles from newsletter feed as subscribers have already seen them, and haven't had time to write new articles yet. To clarify, I'm expecting the newsletter feed at /newsletter to only ever be read by MailChimp, although it's certainly possible to be used by feed readers or read by humans. XML sitemap Under Processwire, I was able to generate a list of articles in XML format at /sitemap.xml that I can then submit to Google as the XML sitemap for this site. Best of all, unlike web-based crawler-type sitemap generators which generate a static sitemap that you then upload to the document root, my Processwire /sitemap.xml auto-generates each time the page is loaded, so it's always auto-updated - any changes in back office like article deletion, unpublishing, adding new articles etc are reflected automatically in /sitemap.xml. Some advantages of Processwire features when templating 1. _init.php file - my theme was designed for subsequent use in my other sites, so selected pages for use in nav menu (About, Privacy Policy) are automagically "found" in _init.php as follows: $pp = $pages->findOne("template=BN-infopage, sort=created, title*=Privacy"); $ab = $pages->findOne("template=BN-infopage, sort=created, title*=About"); 2. Made use of Processwire's built-in retina-friendly image resizing class, class="hidpi" to ensure social sharing icon links render at a decent resolution on mobile screens. Other info To check my html and to help identify problems that are not visible to the eye, I found it incredibly helpful to use the "audit" feature available on Chromium and other Chrome-based browsers. (F12->Audit-> select options you want). The order of the blogroll looks a little odd at first glance but it's ordered based purely on publication date. However, I updated some articles and they display the last updated date, which makes the blogroll look like it's not in date order even though it's in publication date order. Also some dates (the older article dates) reflect a user-specified date field, to show the article was valid at the time it was written (e.g. time-sensitive info such as reviews, sale alerts, etc). I'd be happy to explain further if anyone's interested. Moving forward as I write more articles, there should not be an issue, since I usually update only on or very soon after the publication date, so we should not expect to see wildly different dates on sequential articles from here on in.2 points
-
2 points
-
2 points
-
I have been searching a while for pre-made UIkit 3 themes that I can download in some form and use. But I have not found much. I work with variables and compile most times, but sometimes I would prefer working with a "finished" theme as a starting point I have found the following resources: https://github.com/zzseba78/Kick-Off https://github.com/uikit/awesome-uikit Do anyone else know of UIkit 3 themes that you could list?1 point
-
Thanks @jmartsch! It seems that a regex in FilterBox allows only specific characters to use for filtering. I don't remember why I did this but I think it's too restrictive. Could you try replacing the line at 552 with this? var i, aStr = str.match(/[^\s]+|"[^"]+"/g); I think I'll need to revisit this sometime but in my quick tests it works better then the previous.1 point
-
How to speed up laragon Open php.ini of laragon Find "realpath_cache_size" Remove the semi-colon at the beginning of the line and change the value you see there to 32M or 64M ================================================================ Still not happy ? Try these for a change: http://www.uniformserver.com/ https://www.easyphp.org/ https://www.usbwebserver.net/webserver/1 point
-
@jmartsch, that's a public discussion on Adrian's profile page. So no, not really direct message -- two different things ?1 point
-
Thanks @Macrura Taking a peek under the hood: These look like UIkit3 themes: https://themeforest.net/item/lovely-corporate-creative-multipurpose-html-template/19515847?s_rank=11 http://themedemo.indonez.com/?theme=Fina http://torbara.com/demo/?theme=HTML-GB Looks like UIkit2: http://demo.42theme.com/?theme=Acamar.HTML Looks like this one is custom css based: https://themeforest.net/item/omio-html-portfolio-template/22846488?s_rank=11 point
-
Here are some: https://themeforest.net/item/lovely-corporate-creative-multipurpose-html-template/19515847?s_rank=11 http://themedemo.indonez.com/?theme=Fina http://torbara.com/demo/?theme=HTML-GB1 point
-
As far as I know there are these: https://yootheme.com/themes They are built for WordPress but I'm sure you could extract the CSS.1 point
-
is there a 'not' missing? You still may use a repeater for your purpose, there is no need to output repeater's content in consecutive blocks. Never tried it, but a repeater effectively is a WireArray and should provide the method getIterator(). So in your output code you may fetch the first element whereever you like to place it, fetch the second later etc. If the content of the separators repeat over pages, you may also use a completely different approach and manage those separators as individual pages (with an own template) in some hidden section of your pagetree. On your "content" template you simply place a field of FieldtypePage (named Page Reference) and point to the separator to use. You still need two such fields, one for the header and one for the footer. Downside is, that the separators are managed separately. There are so many options, but I'd still prefer RepeaterMatrix for such purposes. And when I say "for such purposes" I don't mean to only define the separators with a RepeaterMatrix but the complete page layout (including text content, images, rows of blocks etc.. That way you are able to control layout, section order etc. from the GUI and do not need to modify PHP code for each change.1 point
-
@FrancisChung Sure, we quite understand the situation, technology moving forward has ups-and-downs and if someone wants to work in a team then there is no choice but to follow the requirements. A team of good developers and a nice salary is worth the effort, of course. It is just that most active ProcessWire forum members work solo or in a tiny team of a few devs, and while some of them has already posted about using Vue (for example), most of us do not use these frameworks. By the way, Vue.js looks to be the sanest of all but for most sites – developed by a freelancer or a small team even – Vue can still be a bit of an overkill. That is why I started using jsViews instead, as it is very versatile and requires only one JS file which covers all the "technical requirements". But this is off-topic because jsViews is not a CMS anyway, I know. Sorry for that.1 point
-
You cannot use the same field multiple times in one page. What you'd need to do is use a field, which allows you to add multiple "sub-pages" like repeater / page table / pro field matrix. You could also simply use the pages children if you want. There are a few other multi value fields in processwire, but those don't seem to fit what you're describing.1 point
-
Yes, @Autofahrn is right. The data-attributes are converted into real attributes from lazysizes1 point
-
Ask your hosting provider to see if a mod_security rule is being hit.1 point
-
Just wrote the same... ? Sadly the ProFields description currently miss screenshots, so its probably little difficult to get an idea about how RepeaterMatrix works. https://processwire.com/store/pro-fields/repeater-matrix/ With the RepeaterMatrix you basically define a sequence of elements producing content for your page. Each element has one or more field(s) containing stuff like images, text or whatsoever. Items may also have a "depth", which could map to div containers, for example. Here are two screenshots how this may look in the backend: : The second one generates this page: https://www.team-tofahrn.de/en/projects/organ-story/1 point
-
Repeater Matrix sounds like a good fit for this. Believe me, the Pro Fields module is worth every cent.1 point
-
Not a completly serious tip for listening during developing, but maybe a good one for listening before starting. ? or1 point
-
A small news about Duplicator. There is a work in progress on a development version (v1.3.10-ATO) - nothing which can harm your server and could be already tested on different setup. You can download this dev version on GitHub : https://github.com/flydev-fr/Duplicator/archive/dev.zip or at the end of this post. The module still contain minor issues but the overall processing is faster than before and packages can be built and restored as well. Thanks to @Autofahrn for putting his hand in the module! Autofahrn also added a great feature which give the possibility to exclude file through regular expression. Also, image variations created by ProcessWire are now excluded by default. Duplicator-dev-1.3.10-ATO.zip1 point
-
Note that end of life for ubuntu 14.04 is either passed, or in next month, depending on the variant you have. If you're installing a custom version of PHP, at least go for 7.1+ - I don't see any reason for not going with 7.3. So you know, 7.0 has already reached end of life: http://php.net/supported-versions.php If you decide to stay with Ubuntu 14.04, check out this guide for installing PHP 7.3: https://www.rosehosting.com/blog/how-to-install-php-7-3-on-ubuntu-16-04/ - it refers to ubuntu 16.04 but it should be the same. Also, check your phpinfo (via Tracy is easy) to make sure apache is using the new version, because sometimes the CLI can be using a different version.1 point