Leaderboard
Popular Content
Showing content with the highest reputation on 05/08/2018 in all areas
-
New website for Nexoc GmbH in Munich, Germany. NEXOC. GmbH was founded in August 2003 and sells notebooks and PCs under the NEXOC brand name. The products are characterised by a particularly beautiful design and high quality and are available at an attractive price-performance ratio. We spell Individuality with a capital I! Each notebook and each PC from NEXOC. can be individually configured and designed in line with customer wishes and requirements - there is no challenge - there are only solutions, and these are what NEXOC. offers! Features: Multilingual Page-Builder done with PageTable Download Center: getting the informations from the database of an external application, caching the resultes with WireCache and show the results via Ajax frontend login for reseller Frontend: uikit3 OwlCarousel2 SpriteSpin jQuery Lazy grunt-sass grunt-contrib-uglify grunt-contrib-cssmin Backend: Jumplinks Upgrades Checker Simple Contact Form Schedule Pages Pages2Pdf Email Obfuscation Range Slider Image Extra Sitemap Tracy Debugger PageTable Extra Actions Some "behind the scenes":5 points
-
After a project is finished... I don't do anything with my last working copies. One law of nature is... As soon as a project is finished and live the client finds bugs or wants things changed. Despite this: Cleaning up / merging / archive everything in... Asana Trello Bitbucket Github ... Creating local copies of everything that's somewhere in the cloud Archiving every piece into folders and ZIPs Backing up everything to various places Creating a calendar entry for a follow up call with the client - 2 to 4 weeks after release3 points
-
In our dev team, for each !important anyone uses in his code, he/she has to donate 5 bucks and stand in the corner for an hour, deeply ashamed. But back to the topic at hand: You should be able to inspect and see if all these framework-classes are actually there in your CSS. Are you compiling from SASS? Perhaps there's a helper/utility .scss that you don't include. this, however sounds strange. You really should give us more background infos about the big picture.3 points
-
There is a couple long trending repos with checklists on github: https://github.com/thedaviddias/Front-End-Checklist https://github.com/thedaviddias/Front-End-Design-Checklist ...and a whole lot more of alike here. I know, I 'm not sharing something of my own as you asked, but a something to start with anyway.3 points
-
Another hidden treasure in the PW Backend: PW 3.0.61 introduced the VEX library for dialogs: https://processwire.com/blog/posts/processwire-3.0.61-master/#admin-and-ui This is how you can use them in your custom admin pages: In your module's php load the vex library (eg in the ready() method of your module - init() might not work as it might load too early!) $this->wire('modules')->get('JqueryUI')->use('vex'); Then in your javascript: // show confirm dialog ProcessWire.confirm('Are you sure you want to delete this E-Mail?', function() { // on confirm $i.removeClass('fa-trash').addClass('fa-spin fa-spinner'); $.get('./trash/?mailid=' + $a.data('mailid'), function() { $a.closest('.RockGridWrapper').find('.rockgridbutton.refresh').click(); }); }, function() { // on abort grid.api().deselectAll(); }); Result: I opened a pull request with a little fix for handling clicks on the CANCEL button. If you want to support it, give it a thumb: https://github.com/processwire/processwire/pull/1082 points
-
Basically, a lot of what wbmnfktr says. If the project is a bit more complex, I do schedule a time to sit down and go over the backend to see if they are having any hang-ups, or if they have tried to "force" the system to work in a way it was not developed for. Sadly, this seems to be an ongoing issue, and I spend a lot more time trying to clean up areas of the page tree where they have just dumped pages and claim the system is broken due to their lack of understanding/forgetfulnes. If everything has gone smoothly and any scheduled change(s) are complete, I do send out an email with a url to a survey to gather a bit of information on how the project went and how the processes could have been better tweaked.2 points
-
Welcome to the forums, @hellboy! As I can understand, you want to store the content of the last (or maybe more than one) abandoned shopping cart in the db, so retuning customers can continue the purchase. This is all possible with ProcessWire. But PW does not have shopping cart feature out of the box, so I guess you either bought Padloper module or crafted something yourself. Not sure about all those terms you use like 'Userdatabase' and stuff. Could you explain a little bit, how are products stored within your ProcessWire installation, so we can suggest how to store information about them.2 points
-
@horst this is awesome!! Thank you, I will totally merge it in. It looks really great and is super helpful. I didn't even know, that this is possible via the module settings ? I also had a look at the issue mentioned by @Mikel . To resubscribe users (and I think this is indispensable) I had to add a getStatus method and change how the subscription method works. Now if a user resubscribes, he will get the double-opt-in mail again. I made a PR for this too, maybe you can take a look. I will merge both PRs than to version 0.0.3 (and hopefully don't mess it up .... :D) later this week. https://github.com/danielstieber/SubscribeToMailchimp/pull/22 points
-
Are you trying to hide the contents on the front-end or the back-end? Without being able to actually look at the site in question or the code, I can not really help. I would check your inspector and see what properties are being applied to the content. This will help you out in case you need to add !important (I hate using them) due to the framework.2 points
-
What I meant was whether PW was using the same basic flow: Converting a selector to an SQL select statement, getting the IDs of the matching pages, and then calling getById() to load the actual pages into a PageArray. I spent this morning doing a deep dive into the core and have confirmed that this is how it's working. I was also able to simplify the example by @LostKobrakai to the following: $pf = $this->pages->getPageFinder(); $query = $pf->find($selector, ['returnQuery' => true]); # Show sql //$query->getQuery(); # Modify query //$query->where($sql); $statement = $query->execute(); $statement->execute(); # Load the pages $ids = array(); while($row = $statement->fetch()) $ids[] = $row[0]; $myPages = $this->pages->getById($ids); I haven't solved the pagination side of things yet. Unfortunately PagesLoader::find() is doing quite a bit of work that we're not able to take advantage of due to the fact that we have to bypass it completely and go straight to PagesLoader::find() in order to get the DatabaseQuerySelect() object. I'm not sure if this problem can be solved without modifying the core or duplicating a lot of its code. For future reference, this is the basic flow of a Pages::find() call (sans various options and some intermediary methods): Pages::find() Does nothing on its own. Delegates to PagesLoader::find() PagesLoader::find() Checks for page in runtime cache, returns cached page if it's in memory Creates a selector object from your selector string (PageFinder::find() can also do this, as I discovered) PageFinder::find() Turns selector object/string into a ProcessWire DatabaseQuerySelect object (via PageFinder::getQuery()) Turns DatabaseQuerySelect into an SQL select statement and queries the database Returns a multidimensional array with the ID, parent ID, and template ID of each matching page (OR a ProcessWire DatabaseQuerySelect object if the $returnQuery option is true) PagesLoader::getById() Takes an array of IDs Creates a page object for each ID and populates it with fields from the database (an additional database query). This is where any autojoin fields are pulled from the database. PagesLoader::find() Sorts pages by template (?) Sets up pagination Returns final PageArray2 points
-
2 points
-
In ListerPro (commercial) you can add bookmarks so you can directly open one page as the root tree (as I know, I don't have ListerPro). You can achieve something similar with AdminOnSteroids module's NavItems tweak too.2 points
-
You'd need to put more of the markup inside the conditional, otherwise it will be output for each iteration of the foreach. But for more nested markup like this it will be easier to make sense of if you first loop over all the service pages and build an associative array to group the services by person, then loop over the array. <?php $services = $pages->find("template=service-a|service-b, sort=parent.name, sort=sort"); // Group the services by person $people = []; foreach($services as $service) { $people[$service->parent->title][] = $service; } // Take a look at $people using Tracy Debugger just to understand what is going on bd($people, 'people'); ?> <?php foreach($people as $name => $services): ?> <div class="user"> <h3><?= $name ?></h3> <ul> <?php foreach($services as $service): ?> <li><?= $service->title ?></li> <?php endforeach; ?> </ul> </div> <?php endforeach; ?>2 points
-
hi @thetuningspoon, my module is a companion module for RockGrid. Those grids always need an array of objects as data source. Using $pages->find() and then foreach() to create such an array is terribly inefficient when dealing with several thousands of pages. That's why I built RockFinder -> it creates an efficient SQL statement for you and it is almost as easy as using regular PW selectors. The benefit of using SQL is that it is incredibly efficient. The downside is that some pw-related tasks become a headache (like checking for published state, sort order, multilanguage field values, to name just a few). RockFinder takes care of all that. It returns an array of objects that you can easily pass to a RockGrid or do whatever you want with it. See this example: The first array item is this (first row in the screenshot): Reading your question again RockFinder might not be the best fit for you. It does NOT support any kind of pagination (as this is done by RockGrid) and it does not return a pagearray. Though there is the option of using closures (see here) for using the pw api to return values.2 points
-
I know you know about this now @bernhard but others may not and since I just stumbled across this post, I thought I post this which shows running a $pages->find in the console panel and then viewing the resulting SQL Query in the "Selector Queries" section of the Debug Mode panel (from the ajax bar). Hope that helps others who come across this thread.2 points
-
AdminOnSteroids Various admin tweaks to enhance ProcessWire admin. http://modules.processwire.com/modules/admin-on-steroids/ https://github.com/rolandtoth/AdminOnSteroids1 point
-
well, you can style them however you want: http://github.hubspot.com/vex/api/themes/1 point
-
I wouldn't call them beautiful. It does its job.. but beauty is in the eyes of the beholder etc.etc. I first encountered that vex thingie just a few days ago - and it didn't work. I'm still trying to find out why no one else was able to replicate that behaviour... I'll dig deeper when I have more time.1 point
-
Your installed PW version is from October 2014, while this fix / addition was a few months later. So I'd suggest to move up to 2.7. I recently upgraded an old site from 2014 to PW3 latest dev, and I didn't have to change that much. Mainly updating modules (or simply adding PW3 namespaces). Of course, with a live site, do it locally first.1 point
-
This page? https://www.su-sana.com/menu-diario/ It's not loading at all right now - it's a 500 Internal Server Error1 point
-
Updated PHPMailer to 6.0.5 Module setting singular: true Module setting autoload: true v.1.0.6 PHPMailer required PHP version is >=5.5.0 https://github.com/PHPMailer/PHPMailer/blob/master/composer.json#L22 I am using module with PHP 7.2.x and 7.1.x versions with multiple sites and didn't see issue like this. I hope module update will fix your problem.1 point
-
@ethanbeyer Got it sorted. Thank you for pointing that out. I got an instance of the module and then used $mail->attachments(array($filepath => $filename)); And that worked!1 point
-
https://github.com/processwire/processwire-requests/issues/1911 point
-
@alexmercenary Could you post your code? Chances are the variable you're trying to use the attachment() method on isn't an instance of WireMailSmtp.1 point
-
1 point
-
glad it worked. 2 things: TracyDebugger helps a lot when trying new code. You can use the console to execute code quickly and use d() to dump instead of echo. This makes things a lot more readable, especially when you are dealing with arrays and objects: As you can see, getJSON might also be nice to use here1 point
-
There is a stand-alone Zend application made only for all the drivers and documents. I just connect to the database and get the informations with a few queries.1 point
-
Thanks to @thetuningspoon reminding me of this thread I updated RockFinder to use the SQL portion of the $pages->find() operation instead of using findIDs() method. This has three main advantages: The query stays small even when querying thousands of pages (before this meant we where listing thousands of IDs in the WHERE statement) No need for $finder->sort = true/false; The returned results are always returned in the same sort order as defined in the selector RockFinder now also supports PW versions prior to 3.0.46 because it no longer needs the findIDs() method Before: WHERE `pages`.`id` IN (21245,........) ORDER BY field(`pages`.`id`, 21245,........) After: WHERE (pages.templates_id=54) AND ((pages.parent_id=21205 OR pages.parent_id IN (SELECT pages_id FROM pages_parents WHERE parents_id=21205 OR pages_id=21205))) AND (pages.status<1024) GROUP BY pages.id Version 6 is on gitlab1 point
-
hey @tpr could you please add "noAutosize" class support for textarea autosize feature? line 1766 in aos.js (and maybe also some lines below) autosizeTextareas = target.querySelectorAll('textarea:not(.noAutosize)'); Otherwise it does autosize on my custom textareas, thanks This does not seem to work Could you please add a way to exclude custom textareas from this feature? Thanks!1 point
-
1 point
-
thank you @bernhard Now work well ? This is the code if some one need <?PHP function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } return $ip; } $user_ip = getUserIP(); echo "ip: " . $user_ip . "<br />"; $http = new WireHttp(); $url = "http://ipinfo.io/{$user_ip}/country"; $response = $http->get($url, ['country' => '']); $country = filter_var ( $response, FILTER_SANITIZE_ENCODED); // the country have a hiddend code echo = $country; // This is the correct code to use ?> In both case that return the correct Country Code.1 point
-
1 point
-
Hello, I know this is not a course but a series of userful books https://goalkicker.com/ These are some that could become handy with ProcessWire https://goalkicker.com/PHPBook/ https://goalkicker.com/SQLBook https://goalkicker.com/MySQLBook https://goalkicker.com/GitBook https://goalkicker.com/JavaScriptBook https://goalkicker.com/jQueryBook https://goalkicker.com/HTML5Book https://goalkicker.com/CSSBook1 point
-
no geo ip api, but a HTTP api: get the users ip: https://stackoverflow.com/a/13646735 get location info: https://ipstack.com/ or http://ipinfo.io using https://processwire.com/api/ref/wire-http/get/1 point
-
I can totally see why "getting an API key" should be a thing the developers do, but "taking the responsibility for using a 3rd party tool which is likely sending private data to a company in a non EU country" is something clients will have to deal with by the end of the month – especially if you're just a limited-time contractor creating the website for the client to run on their own afterwards.1 point
-
Hey @Mikel, seams like with the original mailchimp subscribe forms, it is possible (and in my opinion it should be) to resubscribe. I will have a look on that! Thanks for the input. Meanwhile (e.g. for testing) you can use the delete method to completely delete and resubscribe a user. That is working for me with the current version.1 point
-
Hey, thanks for the feedback @giannisok and for the solution @wbmnfktr. I have just updated to version 0.0.2 with the ability to unsubscribe and delete users. I also removed the 'string' type declarations, hope it works now with your PHP version @giannisok . When I have the time I'll change my dev machine setup, so I can test with different PHP versions. But since I use Valet, I think I can only downgrade to php5.6 anyway.1 point
-
Sorry guys for all those posts... Found the performance-killer: It is the ORDER BY field(`pages`.`id`, 52066,52067,52068,52069,52070 ... ) part. Without retaining the sort order of the pages->findIDs it is a LOT faster (4s without sort compared to 60s with sort and 75 using findMany): 91300 items: rockfinder = 4385.5ms | findmany = 74213.9ms | 5.91% I'll add this as an additional option and switch sort order OFF by default since sorting will be done by RockGrid anyhow No problem at all. I need this stuff for my own work, so any help is welcome but of course not expected PS: again the tests without sort order 11 items: rockfinder = 4ms | findmany = 6.9ms | 57.97% 1000 items: rockfinder = 35.7ms | findmany = 744.2ms | 4.8% 5000 items: rockfinder = 165ms | findmany = 1675.4ms | 9.85% 10002 items: rockfinder = 327ms | findmany = 3359.5ms | 9.73% 35000 items: rockfinder = 1745.2ms | findmany = 28547.7ms | 6.11% 91300 items: rockfinder = 4385.5ms | findmany = 74213.9ms | 5.91% Now that looks a lot better, doesn't it?1 point