Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/13/2019 in all areas

  1. Thanks to ideas and feedback from @tpr, the File Editor panel now has a recently opened files selector which shows the last 10 files you opened - much quicker if you need to navigate back and forwards between several different files. There is also a new config setting which lets you exclude folders. Previously for performance it was best to limit the Base Directory setting to "Templates", rather than "Site" or "Root", but now you can select an higher level and exclude what you don't need. Most users will probably want to select "Site" and exclude "site/assets" and "site/modules" - this lets you access site/templates, as well as config.php, init.php. ready.php, & finished.php - you get the idea. I also made some other speed improvements by excluding completely any directories with files that are not editable, so the payload for this panel is now much smaller. Hope this helps you out when an online editor is the only option you have. Don't forget the fullscreen toggle at the top left of the editor, or the normal "Maximize" toggle at the top right of the panel - makes life much nicer!
    4 points
  2. You can remove the permanent flag on the advanced tab of the field's settings. The other option is Tracy Admin Tools panel - open the field settings page for the problem field, and click the delete field button - this handles removing it from the fieldgroup/template and deleting it, all in one action.
    3 points
  3. It is interesting and because it is Korean, they support older IE versions ? Yet, we come to the question of "dependency rot" as for drawing SVGs, it depends on RaphaelJS, which is unmaintained. If the deps issue does not scare you, there is a WIP PHP class for feeding data to it.
    3 points
  4. No reason to worry there. rdbms.strato.de is big load balancing server that hands off the connections to other computers in the store.d0m.de domain. The error says that the individual backend server doesn't respond. That might e.g. be due to a high load there or a bad timing when a switch over to a different server occurs, so Strato support are the only ones who can shed some light on the real cause.
    3 points
  5. Hi fellow Seo Maestros, The next version 0.6.0 adds the ability to customize the canonical URL of a page: The canonical URL is part of the "meta" group. You must enable the canonical URL under the "Input" settings of your SeoMaestro field, if the content editors should be allowed to change it. This release also includes a new hook to add custom items to the XML sitemap, useful if you have pages using URL segments to present additional content. Cheers
    3 points
  6. Hi everybody, just found this one today by coincidence and it looks quite great: https://ui.toast.com/tui-chart/ Has anybody of you ever tried it? Even with nice export features! ? AND: Convert HTML Tables to charts: https://github.com/nhnent/tui.chart/blob/master/docs/wiki/import-chart-data-from-existing-table-element.md
    2 points
  7. Don't shoot the messenger – I know this is from WordCamp, not ProcessCamp, but there's plenty of quality material there not strictly tied to WordPress ? https://wpwoofi.com/wordcamp-nordic-paneelit-2019/ Sadly the recording misses the beginning of the UX for everyone talk by Piccia Neri. This was my absolute favourite in the whole event, there were so many good points there. She has the ability to explain scary-sounding concepts and processes in a way that makes them really easy to grasp, and actually makes them seem attainable even in relatively low-budget projects ? "Lessons from WordPress core on how to (not) write code" has some good pointers for anyone designing dev tools, "Cache is keeping you from reaching your full potential as a developer" contains valid arguments, and although "Continuous integration and deployment with WordPress" is definitely WP-specific, the basic principles can be easily applied to other platforms as well. Just to mention a few. Anyhow, I hope someone finds these interesting ?
    2 points
  8. I use Vega and its sister components. Under the hood, it uses D3js. It was created by some of the guys who originally developed D3js and its precursors. The beauty with Vega is that it is visualisation grammar. It uses a declarative language to build visualisations. The language is just JSON! with a few added strings that the parser will recognise as functions. Vega is actively developed at the University of Washington, so, it looks like it's here to stay. I started working on a Vega module for ProcessWire but never got round to finishing it. It's currently on the slow burner but will revisit it once we get to Padloper reports/analytics.
    2 points
  9. Hello, I support this: In other words I think supporting multilingual stores is a must and doing it the PW way is the easiest to use by those who will build stores based on Padloper 2. Regarding performance, custom db tables might have an advantage but – I guess – most Padloper 2 sites will never reach the point when it matters.
    2 points
  10. Some weeks ago I started developing a fairly simple multisite using Soma's module, so I was suddenly faced with the need to use "fake domains" locally. After a lot of digging I happened upon a setup that works perfectly with Docker. I was surprised about how smooth it was in the end, because I had read a crazy amount of topics dealing with weird acrobatic methods to achieve this with Docker. I used a tutorial on setting up DNS caching (they have an Ubuntu version as well). It worked fine with my Arch Linux. Later I noticed Arch wiki has a topic about the same thing. My /etc/dnsmasq.conf looks like this: listen-address=127.0.0.1 port=53 bind-interfaces user=dnsmasq group=dnsmasq pid-file=/var/run/dnsmasq.pid domain-needed bogus-priv no-hosts dns-forward-max=150 cache-size=1000 no-negcache neg-ttl=3600 resolv-file=/etc/resolv.dnsmasq no-poll address=/test/127.0.0.1 The last line allows me to use any .test domain. I copied the old contents of my /etc/resolv.conf to /etc/resolv.dnsmasq. I changed /etc/resolv.conf to only contain nameserver 127.0.0.1 Then just sudo systemctl restart dnsmasq to see the thing in action. Finally, I had to protect /etc/resolv.conf. There are various ways, but I found I only needed to stop NetworkManager from overwriting it. In /etc/NetworkManager/NetworkManager.conf I added [main] dns=none Now I just use this in my Caddyfile and enjoy life: mysite.test, anothersite.test tls off
    2 points
  11. At least you're not alone, @gebeer: but last event is 6 months in the past on my sites.
    2 points
  12. Hey folks. I want to resurrect this old topic and share my latest finding ? Source: https://www.jqueryscript.net/text/Fast-Word-Highlighting.html file: _main.php ------------------------- <style> .highlight { background-color: #FFFF88; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="<?php echo $config->urls->templates?>scripts/jquery.highlight.js"></script> <script type="text/javascript"> $('#content').highlight('<?php echo $q; ?>'); </script> And optionally, I added this to 'search.php' file: search.php --------------------- // did we find any matches? if($matches->count) { // yes we did $content = "<h2>Found $matches->count pages matching your query: $q</h2>"; // <<<<< ADD: $q // we'll use our renderNav function (in _func.php) to render the navigation $content .= renderNav($matches); } else { // we didn't find any $content = "<h2>Sorry, no results were found for $q.</h2>"; // <<<<< ADD: $q } ?
    2 points
  13. Glad you like the updates! Hope I didn't give the wrong impression, as I didn't intend to communicate anything about a "feature freeze" (as was stated in one of the messages above). At least nothing like that was, is, or ever will be planned, except maybe for a few days prior to a master version release. This is a stable project, but not a static one. There is no freezing or thawing, just the flow—I'll try to clarify... ProcessWire was originally built out of the needs of web development projects here, and that has always been a significant driver of what and when features are focused on at any point in time. When I add or improve something, it's usually because I'm going to be using it now and always going forward in actual projects, and by extension, can also support it in this project for everyone else. Of course, I only add/improve stuff that I know has significant benefit for all PW users, regardless of whether it's recognized in the short term or not. The other major part is features that arise from needs or contributions in the community here and on GitHub. My client projects are pretty similar to those of most PW users, which is good for the project. I'm always looking for ways to optimize and improve PW and its API, especially things that will save time in my and your projects, and this has always been the case. I'm driven by it. The feature focus is always holistic and never sacrifices backwards compatibility. And the product focus is on long term quality and sustainability, being the best tool for the job, not on being popular. The focus may largely be on issue reports right now, but this should not be interpreted to mean anything beyond resolving issue reports. I'm making continuous improvements and additions where appropriate along the way, as always. Perhaps they aren't big enough things to warrant blog posts now, but stay tuned — there is lots of good stuff on the way and currently in development. Every year there are a couple of important periods of good momentum in the issues repo, especially this time around, and so I'd like to continue that as long as possible and hopefully cover everything there. The difference this time is that we've got Netcarver expertly leading the effort as well as intelligently identifying which reports are still relevant. Plus there are a whole lot more "includes suggested fix" reports this time, thanks to people like Toutouwai and many others that know their way around the core extremely well, and often figure out how to resolve issues well before I do. It's a great community collaboration.
    2 points
  14. FieldtypeColor is on github Fieldtype stores a 32bit integer value reflecting a RGBA value. Input 5 types of Inputfields provided Html5 Inputfield of type='color' (if supported by browser) Inputfield type='text' expecting a 24bit hexcode string (RGB). Input format: '#4496dd'. The background color of the input field shows selected color Inputfield of type='text' expecting 32bit hexcode strings (RGB + alpha channel) Input format: '#fa4496dd' Inputfield with Spectrum Color Picker (Options modifiable) Inputfield type='text' with custom JavaScript and/or CSS (since version 1.0.3) Output Define output format under 'Details' tab in field settings. Select from the following 9 options string 6-digit hex color. Example: '#4496dd' string 8-digit hex color (limited browser support). Example: '#fa4496dd' string CSS color value RGB. Example: 'rgb(68, 100, 221)' string CSS color value RGB. Example: 'rgba(68, 100, 221, 0.98)' string CSS color value RGB. Example: 'hsl(227, 69.2%, 56.7%)' string CSS color value RGB. Example: 'hsla(227, 69.2%, 56.7%, 0.98)' string 32bit raw hex value. Example: 'fa4496dd'(unformatted output value) int 32bit. Example: '4198799069' (storage value) array() array( [0] => 0-255, // opacity [1],['r'] => 0-255, [2],['g'] => 0-255, [3],['b'] => 0-255, ['rx'] => 00-ff, ['gx'] => 00-ff, ['bx'] => 00-ff, ['ox'] => 00-ff, // opacity ['o'] => 0-1 // opacity ) The Fieldtype includes Spectrum Color Picker by Brian Grinstead SCREENSHOTS Input type=text with changing background and font color (for better contrast) Input type=color (in Firefox) Javascript based input (Spectrum Color Picker) Settings Output Settings Input
    1 point
  15. This module enables you to automatically create pages based on a ProcessWire page template, eg Calender detail page, that has calendar event recurrences. Download from GitHub: https://github.com/clipmagic/ProcessRecurringEvents
    1 point
  16. The hook code definitely needs to be in /site/ready.php or /site/init.php. It won't work in your template-prepended _init.php file - the page is already rendering by the time that code executes.
    1 point
  17. https://flaviocopes.com/page/ebooks/ I am in the middle of reading his The JavaScript Handbook which is great to get up to speed in the additions of the language added in the last few years. This is a no-nonsense, easy to understand, from-a-programmer-to-programmers book, highly recommended ? All six titles: The JavaScript Handbook (171 pages) JavaScript from ES5 to ESNext (84 pages) The React Handbook (220 pages) The Node.js Handbook (189 pages) The Express.js Handbook (61 pages) The Vue.js Handbook (122 pages) Happy coding ?
    1 point
  18. Awesome, thanks @szabesz ? I'm in JS land right now, this may come in very helpful, after I've completed the already massive todo list...
    1 point
  19. ha, good point amigo! This will most likely be my route.
    1 point
  20. I agree, Padloper should work the Processwire way, that's the whole point of it. Using multi-language fields and page objects for products is the way to go. I guess most of us who builds a PW store will expect it that way.
    1 point
  21. You could make use of http://modules.processwire.com/modules/process-admin-actions/ and build a custom action that lets you choose a Page Table field and then a page to add to that field. Or you could use http://modules.processwire.com/modules/fieldtype-runtime-markup/ and build a page selector field just above or below the Page Table field and on pag save, process the selected page and add it to the PT field. You could also hook into InputfieldPageTable::render and add the page selector interface there. Lots of options really ?
    1 point
  22. Nope, just sad that there was the unnecessary fork. The forker could have just waited for a moment. It does not seem the two projects will be merging in the future.
    1 point
  23. No problem here with your code. I'm actually not sure what to suggest at the moment. Do other hooks behave any better?
    1 point
  24. See at the bottom? I just realized that you need to have $config->advanced = true; set in your config.php file to see this. Perhaps that also affects Tracy's ability to delete it?
    1 point
  25. I continue the use of sexy Apex Charts. It is in the process of being updated to use SVG.js 3.0. It seems to have attracted a nice amount of attention and is getting patches from various contributors. C3.js had an unfortunate incident, where a developer thought it was abandoned and decided to fork it. Since the fork, the development of C3.js continued (slowly), so now there is the lovely situation of duplicated work and fractured user base typical in FOSS.
    1 point
  26. In addition..just in case you missed it: https://processwire.com/api/ref/fieldtype/get-inputfield/
    1 point
  27. To see all the places where a particular method is called by the core you would need to search the core code. In the case of Fieldtype::getInputfield the most significant places are in Field::getInputfield, which returns the inputfield according to the fieldtype of that field, which in turn is called by Fieldgroup::getPageInputfields, which loops through all the fields that belong to a fieldgroup (you can think of a fieldgroup as being sort of the same as the template) to get and populate their inputfields so they can be displayed in Page Edit (for instance). But you probably don't need to spend time working through all of that in order to successfully create a Fieldtype module. An important thing to understand if you don't already is that your Fieldtype module extends the Fieldtype class. This is called Object Inheritance: http://php.net/manual/en/language.oop5.inheritance.php So all the methods in the Fieldtype class also belong to your module, and the code for those methods is what you see in Fieldtype.php unless you override the method by including it in your module. To illustrate with an example, we can see that Fieldtype::getBlankValue returns an empty string: https://github.com/processwire/processwire/blob/cbfe97de207e3166451f16865429c02c081791e8/wire/core/Fieldtype.php#L494 If we look at FieldtypeText we see that it doesn't include a getBlankValue() method - it doesn't need to because the getBlankValue() method of Fieldtype already returns the right value for a blank text field. But if we look at FieldtypeCheckbox we see it does include a getBlankValue() method - that's because an empty string isn't the right type of value for a blank (unchecked) checkbox, so it implements its own method to return 0.
    1 point
  28. @Noel Boss Not sure that it's going to help, but you can play with the priority of your hooks. Language support is also added via hooks in LanguageSupport.module. So make sure your hook is going after.
    1 point
  29. Hi Brian, I wrote a tutorial about this some time ago: It's not complete and building Fieldtypes is not that easy... One important note: "Fieldtype" = the field, including all logic to save the value to the database, store it, etc "Inputfield" = the inputfield that is shown to the user (the UI) Often it is easier to modify an existing Inputfield or extend/modify one via hooks. You can see my first module for an example: Don't have more time right now, but maybe this already helps a little ?
    1 point
  30. Is there a chance to exclude files by regex? I'm thinking about something like "\.\d+x\d+\." to exclude any image variant created from the API, for example.
    1 point
  31. We are using the included in PW jQueryUI drag, drop, sorter.
    1 point
  32. It's jQuery UI! And the sidepanel is just an animated div, nothing fancy really.
    1 point
  33. Here's @Robin S code adapted to produce the following thumbnail navigation (semi-transparent thumb #98 is the current one): <?php // Number of thumbs to show $limit = 9; // Get the number of visible siblings $num_siblings = $page->parent->numChildren(true); // The default start value is zero $start = 0; // If the number of siblings is greater than the limit then we need to adjust the start value if($num_siblings > $limit) { // Get the halfway point of the limit $half_limit = floor($limit / 2); // Get the index of the current page relative to its siblings $index = $page->index(); // Adjust the start value to keep the current page within the sibling links if($index > $half_limit) $start = $index - $half_limit; if($num_siblings - $start < $limit) $start = $num_siblings - $limit; } $items = $page->siblings("start=$start, limit=$limit"); // Next page and previous page relative to current page $next_page = $page->next(); $prev_page = $page->prev(); // Next and previous SVG icons $left_arrow = "<svg role='img' aria-labelledby='previous-icon' class='icon icon--inline' height='24' width='24'><title id='previous-icon'>Next photo: {$page->prev->title}</title><use xlink:href='#icon--left-arrow'></use></svg>"; $right_arrow = "<svg role='img' aria-labelledby='next-icon' class='icon icon--inline' height='24' width='24'><title id='next-icon'>Previous photo: {$page->next->title}</title><use xlink:href='#icon--right-arrow'></use></svg>"; ?> <?php if($items->count > 1): echo "<div class='thumb_gallery'>"; if ($prev_page->id) echo "<a class='thumbnail' href='$prev_page->url'>$left_arrow</a>"; foreach($items as $item): $number = $item->index() + 1; $current = null; if ($item == $page) $current = " aria-current='page'"; echo "<a$current class='thumbnail' href='$item->url'>"; echo "<img class='responsive-images thumbnail__image' src='{$item->photo->size(150,150)->url}' width='75' height='75' alt=''>"; echo "<span class='thumbnail__label'>$number</span>"; echo "</a>"; endforeach; if($next_page->id) echo "<a class='thumbnail' href='$next_page->url'>$right_arrow</a>"; echo "</div>"; endif; ?> I hope this can help someone else. Thanks again @Robin S !!
    1 point
  34. Nobody's talking about bringing content builder stuff to the core. I guess only Ryan could)) But the request for content building is high. Content is king. And RepeaterMatrix + Hanna codes are not as user friendly as Gutenberg seem to be. SPA editing is way more pleasant than opening and saving things one after another and adding images only after 1st save. PageTable Extended showed a way true block editing could be done in PW. Frontend editing is another step that could revolutionize content editing, but I never read about any good implementation. RepeaterMatrix is cool and could be even better if it would be PageTableMatrix with a similar Inputfield))) I think we can and should find a way to solve this need in true ProcessWire way. And we have to look at competition. Gutenberg might be hard and messy for developers, but it is desirable for end users. Let's make good for both using our strong points. P.S. js page api was on the roadmap. Might be a good fit here once it's done.
    1 point
  35. @kongondo and everyone else ? I have just added caching for both the Tracy and PW logs panels so now they only read a log file if it has changed since it was last cached. This should make a dramatic difference to most page loads. Do note that if you have a large log file and a new entry is added, then the load time will still be slow for that first page load when the entry is logged, so you still may want to delete log files (or use the PW log prune function) if you notice a slow load. Hope that helps everyone.
    1 point
  36. News Update - 6 March 2019 Hi all. How time flies! It's been a while since I gave you an update on progress. Taxes Most of the current work has focused on Taxes. Although the last mini update talked about the GUI, the main work has gone into taxes. I went back and forth on this one but I think I've finally arrived at something I am satisfied with. Looking at other systems, I liked both the approaches of Shopify and Woocommerce, but especially the former. The approach we'll take will marry the best of both worlds. In a nutshell, taxes will involve/feature the following: You will first need to set up countries that you will be shipping to (this is done when setting up shipping zones). An overview of the shops tax settings. Tax Overrides: Use this feature to override the base tax rates and taxes on shipping per country and/or country state/province. You can create a product category (aka collection) to which a specific tax override will apply. Tax Exemptions: At each product level, you will be able to specify whether a product should be charged tax or not. However, you will also be able to exempt some customers from paying taxes on purchases. Currently, email addresses will be used to identify such customers. Option to choose if taxes should be charged on shipping rates or not. In cases where more than one tax can be applied, choose whether taxes are compounded (e.g. a country + province tax) or one used instead of the other. Specify whether digital products should be charged tax (e.g. EU VAT) or not. Evidence of buyers location for EU VAT. Specify if taxes are calculated based on origin (where you are shipping from/your shop location) or destination (where you are shipping to)[default]. Specify if stated/displayed prices include taxes already or not. Print out tax reports (how much tax you've charged over a given period). Taxes in the United States are a bit tricky to determine. We'll do our best to accommodate the needs of Padloper users in this country. Please note that although Padloper 2 will ship with base rate taxes for most/many territories of the world, including their states/provinces where applicable, and whilst we'll endeavour to regularly update tax rates, the responsibility to ensure that a shop/business is charging and remitting the correct taxes lies solely with the shop owner. Shop owners can use overrides to update their taxes in cases where Padloper 2 base tax rates are not up to date. We will not accept any responsibility for any wrongful tax deductions due to incorrect base rates and/or overrides. GUI i was hoping to have something for you to look at by now but I needed to sort out tax related logic first. I wanted the logic to guide the GUI design and not the other way around. So, you'll have to take a rain check on this one. Files We had a bit of a think on how to handle files (downloadable/digital products, site-wise assets, etc). No final decision has been made but the goal is to be as versatile as possible. Notifications We've started drafting plans on how this will work. More on this later but this will involve email notification to yourself, customers and shop staff regarding their orders. Some notifications will be (semi-) automated, e.g. sending order confirmation, order status change, etc. That's it for now. By next update, I'm hoping to have something for you to look at, however crude :-). Thanks!
    1 point
  37. Ah, the field is actually called "tags" not "tag", that's at least one reason why you can't find fields.
    1 point
×
×
  • Create New...