Leaderboard
Popular Content
Showing content with the highest reputation on 11/23/2018 in all areas
-
This week is the Thanksgiving holidays here in the US and it’s one of those weeks where there’s no school for the kids, so it’s a little hard to get work done. I don’t have any major core updates to report this week, so I’m not going to bump the version number up today. However, look for a new dev branch version next week. We will also release a new master version before the end of the year… sometime within the next month. Before releasing the new master version, I’m primarily interested in resolving any issues present in the current dev branch that are not present on the current master branch. Meaning, issues that have arisen due to some recent change only on the dev branch (if there are any). So if you are aware of any issues experienced on the dev version that are not on the master, please let me know. Thanks for your help in testing. Even though it’s been a vacation week, I’ve been waking up early every morning to work on the new PW website. Lots of continuing progress, and I should have another update on that next week along with a new dev branch version of the core. Thanks for all the feedback from last week’s post. Among other things, I caught that folks don’t like the skyscrapers anymore (as a visual element), so I’ve taken them out and agree it’s better without them. I’ll have some updated screenshots next week. Off topic, but was so excited I had to tell someone. I got a computer upgrade this week after 4 or so years of working off the same laptop. A few keys on my laptop keyboard recently stopped working (letters in the word “ProcessWire” — I wore them out), so I’ve been using an external keyboard plugged in. That’s been working alright, but made it hard to see the screen since I can’t sit as close with an external keyboard in front of the laptop. It was getting a little tiresome to work on, the keyboard wasn't repairable without rebuilding the whole laptop (costly), and it was basically time for an upgrade, but computers are expensive and I was resigned to waiting another year. Over these Thanksgiving holidays I found out a family member had bought an iMac a year or so ago and didn’t like it, so they were going back to a PC. I said, “hey why don’t you sell that iMac to me?” We came to an agreement. Now I've got it here and am moving my development environment over to this newer computer, and have been working off it for a couple of days and loving every minute of it. It's going to help out a lot with developing ProcessWire.14 points
-
This is a textformatter module that will automatically replace titles of other pages on your site with links to those pages. For example, if you have a template glossary-term, and mention the exact title of one page using that template in a textfield, the title will be automatically linked to that page (if the textfield uses that formatter). This is good for SEO, and saves you some manual labour. You can configure which templates should get automatically linked, and of course the formatter is only active for the fields you add this formatter to. Note that if you need more manual control over when and where titles are automatically linked, you're probably better of using Autolink from a Glossary by @mr-fan. Features Allows you to limit the automatic links by template. Only includes published & visible pages by default, with an option to include hidden pages. Automatically excludes the current page, with an option to change that behaviour. Allows you to configure the minimum title length for linked pages. Doesn't overwrite existing links, and detects most edge cases (titles inside other tag's attributes, titles inside existing links et c.). Supports multi-language sites. Titles will only be linked if a title in the current language is set. Can add configurable attributes to all automatically created links. This includes the ability to use page fields as replacement patterns for attributes. For example, you can create CSS classes that include the name of the template of the linked page. Extensive options and hooks to change the generated markup completely. Need <mark> elements with a title attribute based on a page field instead of a link? No problem. See the example project below. Prefer oldest or newest page in the case of duplicate titles. Queries the database directly for improved performance. Has options to switch between case sensitive and case insensitive modes, and force case sensitive behaviour even for case insensitive database collations. Allows you to overwrite the module configuration via the API to call the module with different settings for different requirements on the same site. Download & Documentation The module is now available in the modules directory: https://modules.processwire.com/modules/textformatter-page-title-links/ You can download & install it through the backend using the classname TextformatterPageTitleLinks. To install it manually, download or clone the module from the Github repository into your site/modules folder and install through the backend. The complete documentation can be found in the README in the repository. Make sure to check out the module configuration page after installing the module. Requirements PHP 7.1 or higher ProcessWire 3+ (it will probably work in older versions, I haven't tested those though). This is my first module, I hope it may become useful to some of you ? If you find any errors or have some other suggestions or feedback, let me know!5 points
-
I do have a script that trawls github and packagist for projects that are not in the PW repo. It's poor quality, but it does the job. In the screenshot below, it's found 1,224 projects - only 557 of which are in the PW Repo. Filtering of results is pretty nice, too. By adding some timestamps (when project is first seen and then last modified) this could be used as the basis for detecting changes to unregistered modules and projects.3 points
-
3 points
-
I think this might be one of those cases where a little debugging saves a lot of head-scratching. Try dumping the value you are trying to match: Now it's obvious what the cause of the issue is. The title field has the entity encoder textformatter applied (like all text fields should), so the formatted value that is prepared for display on the front-end is different than the unformatted value that is saved in the database and that you are searching against with $pages->find().2 points
-
It is quite common to use one or two characters for "translate functions", since they are typed and used a lot. Some examples: https://codex.wordpress.org/I18n_for_WordPress_Developers https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7.x https://docs.joomla.org/Making_templates_translatable Underscore appears to be a popular one.2 points
-
@icietla Maybe you have set Page::statusSystem for some pages, in this case removing the status flag in the 'Settings' tab should make it work. What PW version do you use? There have been some updates to ProcessTrash class in 3.0.116, so probably it worth to update to dev branch.2 points
-
Hello, Currently I'm hunting for IT deals, so I thought I'd share what I find interesting. If you happen to find more IT and webdev related offers, please share it. VPN: Cheapest VPN with P2P, streaming (Netflix, BBC, etc...) support, multi device (routers too), 5 simultaneous device connections, 5 year deal: https://www.purevpn.com/ I did purchase it. MAMP Pro, I've been waiting for this ? new licence and/or upgrade: 25% by using a coupon https://www.mamp.info/en/store/black-friday/1 point
-
My objective is to avoid needing to mouse to and click anything in the "Field widths" field. Right now I can use the tab key to move through all the fields, but if some fields are inside a hidden tab content div then I suspect it may be quite difficult to keep this functionality. If it were just a matter of showing the tab content with the focused field that would be fairly simple, but I suspect the browser will refuse to focus an input inside a hidden div (I haven't checked yet). In the PageEdit/WireTab example, PW will not move focus from the last field in Tab A to the first field of Tab B using the tab key.1 point
-
Hi Robin, I originally envisioned PW Gems as casting a wider net than it currently does, with search methods for additional PW sources including Google, github gists, code snippets embedded here in forum posts, as well as public gitlab and bitbucket repos. I only got around to doing the PW repo, github and packagist searches in the end and, of these, only the PW Repo search extracts version information. There's no reason these searches couldn't dive deeper and look for versions from well known files, but I've not done it. Of course, not all the projects turned up are modules. Many of the repos are people's PW site boilerplates for example, though they may have a published tag or release that contains a version number.1 point
-
Looks cool! Does your script parse out the version number from the getModuleInfo() method / ModuleName.info.php file / ModuleName.info.json file? If so, would you be willing to share the code from that part? I have an idea in mind for how to do this but it would be no surprise if your idea was better. ?1 point
-
@lenoir - I think all those old themes should be removed from the modules directory - hopefully with the imminent site rebuild they will be. I think the problem with PW's admin theming approach is that new functionality doesn't make it into 3rd party themes. I have always said that we need a skinning approach, rather than (or perhaps in addition to) theming. That said, the approach that AdminThemeBoss takes is in effect a skin, rather than a separate theme and I think this is great and is perhaps a model for others to follow.1 point
-
@ryan - this issue still exists on 3.0.119 - any chance of a fix please?1 point
-
1 point
-
You mean the header height? As I see it's only a matter of adding min-height: 54px to height: 54px to the CSS.1 point
-
That's good to know about MAMP Pro, thanks ! About PureVPN, if you feel concerned by privacy things, check this website for a short - bad/sad - review about PureVPN : https://restoreprivacy.com/purevpn-review/1 point
-
After upgrade to 3.0.118. The AdminUiKit become a mess. It losses all the CSS styles. Chrome gives me this error: By the way, this happens with botm Chrome and Firefox. Gideon edit: upgrade to 3.0.119 solved this problem.1 point
-
1 point
-
Or if you need to be more sophisticated (and/or multi-language) something like: https://punic.github.io/#Misc-class1 point
-
true, i dont like them either. but due to GDPR is a european law to have them. technically you still have them even if they are blocked. only problem are clients who do not understand this ? but maybe you add a note into the module, that it might get blocked by adblockers.1 point
-
What do you think about having fieldsetTabs actually separated out into tabs in the editing interface - I think this would be a really helpful addition.1 point
-
Seriously brilliant @Robin S - this is going to be an absolutely huge timesaver! I think this deserves a screencast in the first post showing the layout change dynamically as percentages are adjusted - so cool!1 point
-
Not sure but I think @netcarver has been doing some work along the lines of finding unpublished modules, so maybe there is some crossover or code that can be shared?1 point
-
Very nice ? I used to have a separate template and output everything in a HTML table. Just to get an overview of it. But this is much better! How about putting the original with in a light gray somewhere? I am always interesetd wether I changed the value in template context or not.1 point
-
Thanks for your replies clsource and szabesz! I'm glad there's plenty of material to study. This looks like a great CMS! Regards, Carel.1 point
-
Welcome to the PW forum, We have similar discussions, you might want to learn tips and tricks there: https://processwire.com/talk/topic/14587-mixing-pages-and-fields-in-a-page-list/ https://processwire.com/talk/topic/16886-linking-pages-to-each-other-without-being-parents/ https://processwire.com/talk/topic/15001-solved-reciprocal-fields/ I recommend reading @clsource's blog post, found here: https://medium.com/@clsource/understanding-processwire-templates-fields-and-pages-201aecd0a1a41 point
-
1 point
-
1 point
-
Are you talking about the backend or frontend? ProcessWire has https://github.hubspot.com/vex/docs/welcome/ on board.1 point
-
1 point
-
I upgraded PW to the latest dev using the upgrade module from Ryan (I normally upgrade by hand) and got the message that Upgrade files are already present. Please remove them before continuing. Clicking on Remove button didn't help, had to manually delete /site/assets/cache/ProcessWireUpgrade folder. I'm on windows, I think this is important. Anyone else?1 point
-
1 point
-
Hi guys As a @sforsman's coworker I'll let him know about this. We do use namespaced version of this module ourselves.1 point
-
@szabesz any progress on this? Decimal is a fundamental data type of most dialects of SQL for the reasons that have been outlined in this thread. Over three years and it's still not in the core seems to be a rather long time for what should be a standard fieldtype. It's great someone has done a third-party module, but it would be nice if it were in the core.1 point
-
This works for me: $pages->addHookAfter("ProcessPageEdit::buildFormContent", function($event) { if($event->object->getPage()->id !== 1016) return; $wrapper = $event->return; if(!$wrapper->has('body')) return; $wrapper->body->collapsed = Inputfield::collapsedHidden; }); I have included a check for the ID of the page being edited. So in this case it will only hide the "body" field on a page with ID 1016. Hopefully you can modify that for your needs. BTW, I just put that code in my site/init.php file - no need for a module for something so simple.1 point
-
You're welcome. Here's a good overview how Hook works: http://processwire.com/api/hooks/ Also checkout the captain which shows you all the hooks available: http://somatonic.github.io/Captain-Hook/ And here an example, written in the browser and not tested: // Inside your autoload module you have installed... public function init() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'hideFields'); } public function hideFields(HookEvent $event) { // Do nothing if we don't edit a user if ($this->page->template != 'user') return; // Get the form instance returned from the hooked method $form = $event->return; // Define fields to hide per role $hideFields = array( 'role1' => array('field1', 'field40'), 'role2' => array('field5', 'field2'), ); // Hide the fields foreach ($hideFields as $role => $fields) { if ($this->user->hasRole($role)) { foreach ($fields as $field) { $f = $form->get($field); $f->collapsed = Inputfield::collapsedHidden; } } } $event->return = $form; }1 point