Leaderboard
Popular Content
Showing content with the highest reputation on 12/16/2017 in all areas
-
Admin users: when migrating a live site to a new host, and you don't want users making changes to DB content during the migration. Front-end users: temporarily suspending member-only privileges for a user (e.g. because of some infraction).5 points
-
Hi guys, here is our most recent website http://patina-store.de/ Patina is a really nice vintage objects and furniture store here in Wuppertal. Pay a visit if you pass by We are aware of some flickering and strange scrolling (seems to happen with Safari on desktop and iOS) on the homepage initial transition. I'm looking into it, but if you guys could report how it's behaving with you, it would be a great help! A point of interest is the Lookbook page. For this we used the Image Marker module by @kongondo and @heldercervantes, which worked flawlessly. Thanks guys! Although the site is very simple, PW has a very important role, since we transitioned all the shop organization (mainly the products) from excel spreadsheets to it. We could say PW is acting as a small CRM, and Lister Pro is doing a great job at it.4 points
-
I really would hesitate to use or propagate the use of disqus. Some links: The Hidden Price of Using Disqus Why I killed Disqus Commenting on my site You can easily find more worth considering...4 points
-
@bernhard - I love the flexibility of pure SQL as well, but for those less familiar with it, I was wondering if you have experimented with findMany() ? The other option might be findIDs() - could you perhaps build an SQL query from the returned IDs to get the other requested fields? Maybe one of these options would still be performant enough and a little more user friendly? Maybe the option for SQL or a selector so users have the choice depending on their needs an skills? Just some random thoughts that might not be useful at all2 points
-
ok... i get closer it's definitely the best to build the tables by sql queries. so the module will get an easy sql editor with live preview like shown here: you see that the query loads 10.000 rows in around 500ms another huge benefit of writing sql queries is that you can group and sum your data easily, like in this example, where i build sums of "field3" grouped by month: thanks to @adrian 's idea i zipped the json response of the sql query making it shrink from 2.7mb in the first example to 121kb I'll add some helpers to make multilang queries easy and to query views (for kind of a modular setup)2 points
-
2 points
-
We're loading only the @ from Hind Madurai, notice the import line: @import url("https://fonts.googleapis.com/css?family=Hind+Madurai&text=@"); I know we're being picky, but we really really dislike the @ from Woodford Bourne. Anyway, thanks for digging in and telling me what you found. I appreciate it.2 points
-
We are getting very close to our next master version of ProcessWire 3.x. This week work continued on covering issue reports, but we also added a few items from our feature requests repository as well. This post contains a brief summary of what went into the core this week. https://processwire.com/blog/posts/pw-3.0.86/2 points
-
This feature come in handy for the project I am working on. As @Robin S said, in my case, it will be used to prevent the users accessing to our dashboard while updating it. I can see a small module which set this role to a group of users with a specific role to finally prevent frontend/backend login in two clicks.2 points
-
This is a question about using the system notices: $this->message(), $this->warning(), $this->error(). If I have a method that is is called by an AJAX request, I can't trigger a system notice immediately (would be great if this was possible). But is there some way to "queue" the notice so that it appears on the next admin page load? P.S. I know about the System Notifications module, but it's of no use if you need AJAX notices for a publicly shared module as there is no guarantee that the user will have System Notifications installed. Edit: found it... $session->message() $session->warning() $session->error()2 points
-
Thanks for the report @Macrura - I have a fix in place here and I'll commit later today or tomorrow - just in the middle of some much larger changes.2 points
-
I agree it would be handy, but that would be a completely different thing to what this module is doing. This module is essentially just using Pageimages::add() on the submitted URLs, and that method has no support for clipboard data. I don't think I want to disappear into the browser clipboard rabbit-hole with this module. I'll have a think about it. It would make the module significantly more complex and I'm not sure how much time I want to put into it. Maybe if I get bored sometime...2 points
-
If you want a free IDE with code completion and conditional breakpoints, it might be worth trying Visual Studio Code. It's considered more an editor than a full blown IDE, but it supports intellisense (Microsoft's version of code-completion) and It's cross-platform, and unlike Netbeans, it does support Xdebug's conditional breakpoints and quite a bit more. I think the full-blown Visual Studio supports PHP debugging too, but Visual Studio is a bit of a monster and Windows only, so you probably need to be using it for other development already to justify it.2 points
-
Unfortunaely no. Netbeans integrates with Xdebug which does support conditional breakpoints, but somehow it hasn't made it into Netbeans yet even though it's been a feature request for years. It seems like yet another open source project mismanaged by Oracle. Perhaps now Netbeans is moving to Apache there might be some progress on this.2 points
-
And the paid ones at: https://pixelarity.com/ Very nice designs but not used any myself though.2 points
-
I completely agree - I do think it's going to be a very nice improvement for many users - thanks for the suggestions!1 point
-
Good to know, and yep: "this approach seemed the simplest without messing with anything else". So, I'm happy with that solution. This last problem wasn't a deal-breaker, of course. However, it's great to have this new flexibility. You know, it's good to keep things simple for the ones who use those featuers to import just by copy and paste from Excel--even though they lack any experience in using CSV/TSV... Thanks again.1 point
-
Yeah, I could possibly refactor a little, but this approach seemed the simplest without messing with anything else. If you feel like optimizing things though, I always like PRs1 point
-
Adrian, just finished some tests, everything seems to work as expected now! I thought for a moment we could loop with a while instead of the foreach($data as $subfieldKey => $fieldValue), using $i (number of subfieldNames). But the array_push does it. Great response time, thanks a lot!1 point
-
Hi Adrian, works well when I import records like the one I sent. However, when I try to copy the two required columns only, I get the error I mentioned above. The expected behavior would be that just the two required columns were filled out, but again I got the word "Session" placed in the first empty column. Field: four columns, two of them required. CSV: two columns (for events that just needs a start and an end date set). 2018-2-25 12:00 2018-2-25 14:001 point
-
@rafaoski, I tried to install another profile of yours - site-bs4-master and it appears promptly in my PW 3.0.85 installation. So something else is happening and I do not blame the profile in no way, there is something else. It happened to me as well once I was exporting an old profile, I could not find it listed on the list during install. I even tried to move my files to the Default profile that was visible promptly, however, the install failed. Will test with your server out of curiosity to see how would that show the profile.1 point
-
1 point
-
I'm not aware of any additional work on this. Please give it a thumbs up at my GitHub request and you might also want to express why. New features are often added to ProcessWire when it is asked by lots of us...1 point
-
Thanks for pointing it out. While I think in most circumstances trimming is ok, in this particular case it is not ok. I want the file I like, not what PW thinks I like So I fixed it (hopefully) please try v1.7.41 point
-
Great site! This one does stands apart from what you normally find on themeforest I feel.1 point
-
Thank you for that - I wasn't quite getting the scenario correct, so that helped a lot. I have fixed it although a little differently - turns out I can't see a need to keep rows when the value is blank, so removed that check and everything seems fine. I have committed a new version. Would you mind checking at your end also please?1 point
-
Hi Adrian, I have a field with four columns: von (DateTime) | bis (DateTime) | session (Text, optional) | notiz (Text, optional) Import works with: 2017-10-11 8:00 2017-10-11 9:00 Session 1 Notiz zu Session 1 Error in Table like described when importing: 2017-11-10 8:00 2017-11-10 10:00 (CSV, replace comma with tab: date,date,,) Result is: 2017-11-10 8:00 |2017-11-10 10:00 | Session | Thank you. test_csv-import_171216_0119.csv.zip1 point
-
I've had this issue for a while but am just now getting around to posting about it – if i am seeing this correctly, minimizing the tracy bar is adding a 'hidden' class to the body, which makes any site using bootstrap turn completely white, since in bootstrap framework, there is this rule: .hidden { display: none; visibility: hidden; } would be great if it didn't do that, since it scares some people when they minimize the toolbar and lose the site;1 point
-
PS - I decided to see what Ryan thinks: https://github.com/processwire/processwire-issues/issues/4591 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
-
Module refresh will show any changes you make to the info without having to re-install it.1 point
-
@rick yeah, I can see the changes now on the page when I change things inside the ___execute() methods. The part that I was changing was here: public static function getModuleinfo() { return [ "title" => "Simple admin example", "summary" => "No need to be afraid of building custom admin pages.", "author" => SamC", "version" => 1, // page that you want created to execute this module "page" => [ // your page will be online at /processwire/simple/ "name" => "test", // <<<<<<<<< I CHANGED THE PATH HERE // page title for this admin-page "title" => "Hello", ], ]; } Had to uninstall and reinstall for this change to be reflected. Anyway, getting sidetracked as usual. I was thinking of just having the comments button, no need to load it up all the time. Not sure how people would even use it but I needed a reason to make a module, and here it is1 point
-
Hi @matjazp - I discovered a bug when you have blank lines at the top of your file. Because you are using a PW InputfieldTextarea, the blank lines at the top are trimmed, here: https://github.com/processwire/processwire/blob/aa1f7dbd4718532896e209d694db0340c2d30067/wire/modules/Inputfield/InputfieldTextarea.module#L119 The problem is that when you save, these lines are removed. This probably won't ever cause any issues, but I don't think it's polite behavior for this to happen unexpectedly. The other issue relates to my new feature in Tracy which allows opening up errors/files to an exact line number - the line number can be off because of this bug. I actually wonder whether maybe the PW textarea shouldn't do that in the first place. What do you think? I think blank lines at the top should be valid? If you think this is a PW bug, or if you think there should be an option to not remove them, I'll file it with Ryan. Otherwise, maybe ProcessFileEdit needs to use a standard manually coded textarea. Any thoughts?1 point
-
1 point
-
thanks kongondo, all valid points. the reason why i want to have all date loaded at once is because it makes the development of my module a lot easier and has some huge benefits over loading data paginated via ajax. when i have all the data available at the client i can use datatables' api to filter, sort, query, draw charts etc.; that would be very hard to achieve using server side techniques. i was also trying to avoid direct sql queries, that's why i took other approaches for my first two versions of the module. but it turnes out that all of that approaches have some really big drawbacks. actually building the queries via SQL manually is not as difficult as i thought (the genious api and the easy page->find() operations was one of the main reasons i fell in love with processwire). and i have some nice ideas how to make it even more comfortable and easy. I'm quite sure it will be really easy to use for everybody1 point
-
OK, I see. Maybe you've already discussed this elsewhere. If that's the case, apologies. Why would you need to query 10,000 rows at the same time? I suppose because you want to cache the data to make subsequent fetching faster. However, wouldn't pagination work better in this case (if you were to use a $pages->find() with limit)? You could even combine that with incremental caching, both server and client-side if you wanted. If you don't want pagination, you also have virtual pagination or infinite scrolling. I am just thinking out loud here. I haven't tested your datatables module yet. If I could avoid writing SQL queries myself, I'd go for it . Edit: I see you've already discussed this in your other module's thread. So, we better continue there.1 point
-
because it's a LOT more performant. constructing my datastring via pages->find() and a foreach takes 16 seconds for 10.000 rows and 5 columns (needing some extra seconds for every column added) whereas querying the database directly needs only some milliseconds. my other idea was to cache the table rows on the dedicated templates but that leads to problems when you have a "parent" or "category" column because then it would take several seconds to recreate the cache of the table when the name of the category changes (updating up to thousands of rows' cache). It also leads to a lot of redundant data. All of that problems are solved when the DB is queried directly1 point
-
there's a thread for phpstorm and vscode - feel free to open one for atom...1 point
-
@bernhard I tried PHPStorm, Sublime Text but these paid editor does not offer siginificant advantages to Atom, VSCode, and even Brackets. The issue with with the most unpaid one is which plugins to use for PHP some of them overlap. So does anybody know how to setup Atom Editor for PHP and PW correctly? If there is a better alternative to Atom please let me know.1 point
-
Not sure about repeaters, but to find all pages that use template basic-page, you could do this: SET @tid = (SELECT id FROM templates WHERE name='basic-page'); SELECT DISTINCT p.id, p.name FROM pages AS p, templates as t WHERE p.templates_id = @tid or this (include page titles) SET @tid = (SELECT id FROM templates WHERE name='basic-page'); SELECT DISTINCT p.id, p.name, ft.data AS title FROM pages AS p, templates AS t, field_title AS ft WHERE p.templates_id = @tid AND (p.id = ft.pages_id)1 point
-
What a stupid host... Well, in that case just remove those lines instead of commenting them out (perhaps make a backup copy for yourself first, in case you decide to switch to another hosting company sometime...)1 point
-
I've used https://themeforest.net/item/canvas-the-multipurpose-html5-template/9228123?s_rank=1 for a number of sites and found it covers most of my front end requirements. It has a heap of page templates that are easy to convert to PW templates and individualise for client site looks.1 point
-
1 point
-
https://themeforest.net/ https://templated.co/ https://html5up.net/1 point
-
Just had an idea: what if we created a module that creates some kind of static file that the IDE can read listing all fields of a given template. Maybe we could also extend this module to parse all hooks even for properties that where added via a hook does anyone need a challenge for christmas? to your question, pwuser1 (welcome btw): some use phpstorm, some vscode, some sublime, some atom...1 point
-
1 point
-
Don't be put off by what your competitors are doing. They can be wrong. Google gives lower ratings to pages that it sees as lower down the page tree... eg page abcd in the tree abcd.com.au/all/about/abcd would rate lower (probably 40%) than page all-about-abcd in url abcd.com.au/all-about-abcd (probably 80% as it's one page off the root) Google is also smart enough to recognise hyphens in URLs as spaces. The only suggestion I would make would be to rename the URL to abcd-is-about - that way abcd is up front Hope this helps1 point
-
Ok guys, I got some REALLY nice results today @dragan sorry, I was unclear in my previous post... I had to leave to a christmas party So here are some explanations and the new results: Table with 10.000 rows without cache: 400ms (see the screenshot) Table with 10.000 rows with cache: 200ms The key was to get the data directly from the database. Of course I knew before that this possibility exists, but I didn't know how to solve the problem of multilanguage and returning complex data (like $page->parent->title for one column) and still keep the setup of a table simple and straightforward. Now I found a great way and I'm really eager to start working on this What I meant by "stay on the client side" was, that I want all the data get transferred to the client and then rendered by datatables. The other option would be to use ajax pagination and load only junks of the data to the client. But having all the data on the client is a huge benefit for manipulating, filtering, sorting, charting etc.; and you where right about my "cache" wording: I'm talking about a cached string holding all the data for the datatable. So if the cache exists it just loads the string - if not it creates the string from the database and then loads the data into the datatables. Any wishes/ideas for features that I should think of when developing the next version of the module? ...see the feature list in the first post1 point
-
What @LostKobrakai said, but if you really want to do it, you can make use of these in the module info: 'permission' => 'page-view', 'permissionMethod' => 'permissionCheck', permisssionCheck() may look something like this: public static function permissionCheck(array $data) { $user = $data['user']; $wire = $data['wire']; // if in admin/backend, then require "my-custom-permission" permission if(strpos($wire->input->url, $wire->config->urls->admin) === 0 && !$user->hasPermission('my-custom-permission')) { return false; } // else in frontend, so allow full access to call actions via the API else { return true; } }1 point