-
Posts
2,236 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
Module Module: Matrix Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
Partial reply... Looking at this some more I don't think this will be a major concern for most small combinations that people were suggesting (like {S, M, L, XL} crossed with {Red, Green, Blue}) but I am interested in how this might scale if people start specifying a set of pages for the x-axis with a larger number of members - say 30 options and a set of pages for the y-axis with another 20 options. Or perhaps if a user mistypes a selector and end up with 1000s of pages in one of the axis - would there be issues? (I'm kinda asking as I'm hitting an issue with a module of my own that needs a safe fallback position if something goes wrong.) When I've looked at memory usage in the past, I've tended to use the memory_get_usage() function to track this kind of thing. -
Module Module: Matrix Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
@kongondo, is there any need to store the empty results? Just wondered as once you get into the world of combinatorials things quickly get memory hungry big; and PHP associative arrays aren't exactly the world's most efficient storage format. Any idea how this fieldtype works out memory wise? -
Module Module: Matrix Fieldtype & Inputfield
netcarver replied to kongondo's topic in Modules/Plugins
Looks great kongondo!! Very impressed. How are the intersection values being stored? (Sorry, I've not dug around in the code.) -
Minor updates pushed. @Joss Thank you for update and the link! I wanted to go for a solution that didn't involve hosting the data myself (either in DB tables or flat files) - but it does leave the site at the mercy of the service's availability. I may investigate a locally-hosted auto-updating version at some point though.
-
@Teppo I tried using db-ip.com with HTTPS and it didn't work. I wonder if they reserve that for one of the paid plans. Also, they had an example client class so I took some inspiration from that when calling through to their service and that's why WireHttp wasn't used. Doesn't mean that couldn't happen in a later version. @Joss Thanks for the link. I had a very quick peek but didn't see the answer to this: do they offer a live restful service or is it a lookup in a self-hosted DB?
-
A module that uses the db-ip.com IP Geolocation service to fetch geolocation information when given an IP address. I wrote this quickly to help anyone who might be stuck with the #VATMOSS mess and need a way to geo-locate a customer's IP address. You will need to register with db-ip.com in order to get an api key but they have a pretty generous daily-query allowance even for the free key (2000 lookups a day.) Here it is on github. And in the module repository.
-
@apeisa, that changes on the first of next month for digital products and services. Local exemptions no longer seem to apply to anything other than domestic sales. At least, that's the case here. We can keep our domestic VAT threshold for sales to UK customers but sales to other EU citizens have to be taxed. If we want to use the MOSS system to handle disbursement of the collected tax then we have to register for VAT and do all the accounting and paperwork even if the submitted total for the domestic VAT is a big fat zero.
-
@Claus Forgot to mention that the date for compliance is ... 1st Jan 2015. There's a lot of Brits are up in arms about this as it impacts what micro-businesses here will now have to deal with more than a lot of European friends as most of us didn't previously have to deal with VAT returns at all. Now they all have to VAT register and (presumably) put up prices as a result. This is slightly exaggerated but sums up the options as a lot of small sellers here see them... Regardless of the above mentioned UK perspective, this legislation will change the way a lot of other Europeans trade and, consequently, there's now an EU-wide petition to have a threshold introduced for all this. Please consider signing this and joining the #vatmoss and #vatmess discussion, in your local language, on twitter or facebook and share it.
-
@apeisa It probably hits the Brits harder than anyone else but it is pan-European (the EU also wants it to be Worldwide.) Even Philipp from Conclurer has posted about it. Basically it shifts VAT calcs from the VAT rate charged in the nation of the seller to the nation of the buyer. Business-to-business sales are unaffected but business-to-consumer sales are covered by the rules. As @Claus points out, the sales process will have to be more complex as the point-of-sale systems will now need to be able to collect, prove (how, I don't know) and retain information about customer type (business or consumer) and their location for 10 years (security implications anyone?) and use that information to charge the correct rate of VAT - which will change across 28 authorities now instead of just your local one. The retention of potentially valuable customer location data (like a billing address) is worrying to me as a lot of places are probably going to leak it or have it stolen over that 10 year period. Data can only be held on servers/sites based within the EU. Depending on local interpretation of the legislation keeping this data may also require you to register with your local data-protection registrar/authority (it does here in the UK - with the attendant responsibilities and liability for audit etc.) So now we all have to... Migrate Servers/Sites inside the EU if they were hosted outside. Complicate the order process (=> fewer conversions to sales) Match at least 2 data points about customer location and store them for 10 years (security anyone?) Perhaps register with local data protection agency. Keep up with VAT rates in 27 additional countries. (probably) charge the customer more than before (though some customers in low tax locations may see price decreases) Submit quarterly VAT returns. Disburse tax collected to the correct member state (though there is the mini-one-stop-shop system that can help here) If you weren't previously liable to submit a VAT return then you will also have to register for VAT in at least your local jurisdiction and use the MOSS -or- VAT register in, and disburse funds to, every EU state in which you have a consuming client. Updated to add this missed paragraph: It also means that sellers can be pursued for tax by any and all EU tax authorities now, not just their local one. I guess a lot of people are going to switch from self-hosted solutions like using the PW shop module over to services that act as resellers as that means our relationship with them is now business-2-business and they take care of all the new compliance issues. Sorry to be the bearer of bad news but I hope that helps clarify a few things.
-
English Name Sanitiser (Commercial Module)
netcarver replied to netcarver's topic in Modules/Plugins
Updated the last post to change the date to the 20th Dec. - no need to act quite so soon. -
English Name Sanitiser (Commercial Module)
netcarver replied to netcarver's topic in Modules/Plugins
It is with regret that, due to the new draconian EU VAT laws that are coming into force from 1st January 2015, I will cease to trade digitally from QBox.co from the 20th December until I can see a clear way forward through this mess. Let me assure existing customers that I continue to develop and support this module and you will continue to receive updates whenever they are released. I'm currently considering my options about how to go forward with this. I can still sell to anyone outside the EU directly - just send me a private message via the forum and I'll do my best to accommodate you. For folks in the UK and the EU I may have to revert to selling my code as a paper printout mailed to your physical location and everyone who purchases the listing/license getting free access to online erratta (in installable format.) Whatever I do I'll have to make some changes to my processes so QBox will be closed over the Christmas/New Year period at the very least. If you are interested in getting this as an instant digital download before the changes come into force, please order before the 20th December as if, and when, I do start selling this product again the price will be higher and it will probably be less environmentally friendly too. -
@Deltanic, I've just been stepping through the ProcessWire code and spotted a potential lead for you. Try commenting out line 205 and then 217-227 of index.php in the root of your development site install.
-
@Deltanic, It sounds like you are doing after-the-fact debugging using the call-stack shown in the browser. I try not to do that as I don't find it as helpful as using breakpoints or single-stepping new code in my IDE of choice (chrome + xdebug helper & vim + vdebug.) In an IDE you get the full call-stack, variables, code, execution location and can use breakpoints etc. Regarding cleaning up the format of the xdebug callstack output - have you tried the xdebug stack-trace documentation? (There's plenty of good documentation for xdebug.) Like I said, I don't use xdebug the way you seem to want to so I can't help any more than that. I would recommend giving some kind of IDE a go - as I find it so much more convenient for debugging than in-browser stack traces.
-
@Deltanic, I use xdebug with PW almost daily. It works great and I don't need to disable any PW exceptions to get it working. In my case, I use xdebug along with the vdebug plugin for vim and the xdebug helper extension for chrome (similar ones exist for FF) and they do take some configuration to get right - but none of it in PW. Could you explain exactly what problem it is you are having with using xdebug?
-
Hide pages/branches of the page tree for users with certain roles.
netcarver replied to netcarver's topic in General Support
Congrats Kongondo. Looks like your link has solved this for me. I'll just take a few minutes to verify and hopefully post a full solution later. Edited to add: Yes, the solution was found in Soma's post here. He links to a module he posted to gist and that works great for me. -
If mod_rewrite is enabled and you still have an issue then you may need to edit the config files and/or check permissions on the files you uploaded. In particular, in the past, I've been caught out by there being an "AllowOverride None" set for the place where I installed PW. Could you please confirm that you've worked through the post I linked to in my reply above?
-
Hello Elijao, Welcome to the PW forums. Sounds like you need to check if apache's mod_rewrite extension is enabled on your server. There's more information here.
-
Is it possible to hide pages/branches in the admin's page tree view for users with certain roles? I know I can hide the whole tree but this is a little different. There are a few select parts of the tree that I want to hide from certain eyes in the admin interface yet not have the corresponding pages inaccessible on the front of the site. Is this currently possible without resorting to a module?
-
@Ryan What's the current best practice for checking up on module dependencies upon PHP extensions? Can this be done using the requires field of the module info array? Or should I be checking for the extensions as part of my ___install() method and throwing an exception if they aren't present and active? If I do throw an exception, is that caught and reported to the user doing the installation of the module via the admin interface? Thanks in advance!
-
I'd probably take a shot at this by assigning the kiosk a fixed IP address and then adding a check to the top of each template file that looked at the $_SERVER['REMOTE_ADDR'] variable and compared it with the known kiosk IP. A match should be coming from your kiosk so you could then serve content (eg. different style sheets) just for that machine.
-
@changwuf31 I'm working on a touch screen club check-in kiosk at the moment. It's a fusion of Bootstrap 3 and uses the just-released MarkupCrossfade module to handle a full-screen background crossfaded slideshow where each slide is simply a page in ProcessWire. Because it's a kiosk I have control of the browser being used so I don't have to worry about cross-the-board browser compatibility.
-
Module now available. Opening post updated and expanded. I added a couple of media queries to the home.php template code but I can't seem to add them to the opening post code - weird. Updated to add: not so good using FF on android.
-
Thank you for the feedback Horst. According to another article, the CSS used should work in IE10+ (along with FF5+, Opera 12+, Safari 4+ & Chrome) but the quality may vary. Even on a new-ish chrome browser on a fast Android tablet the animation quality can vary a little between loads of the page - sometimes there is a little stall here and there. With regard to per-slide transformation settings: yes, it is possible. The example code I posted sets a simple scale-up for the image and a translation for the overlay text for all slides but you can specify a slide field for the image and/or overlay transformations making them configurable for each slide. Having said that, I've not tried to duplicate the effects used in that site so I can't say a positive "Yes, it can do that" even though you can customise things on a per-slide basis. Edited to reflect the removal of the image scale-up from the opening post - FF on android was stalling with the image scaling.
-
Markup Cross-Fade On Github. In the Module Repository. Thanks to the good people at Lightning.pw for hosting the demo for free! Demo no longer available. A full-screen cross-fading background animation module with optional, per-slide, overlay text. It's based on an article by Mary Lou over on codrops. Here's the home.php template code for the entire site... <?php $cf = wire('modules')->get('MarkupCrossfade'); $settings = array( 'pages' => wire('pages')->get("template=slides")->children(), 'title_xforms' => "scale(1.0) translateY(300px)\nscale(1.0)\nscale(1.0)\ntranslateY(300px)", ); ?><html lang="en"> <head> <meta charset="utf-8"> <title>MarkupCrossfade Demo</title> <style> @font-face { font-family: 'BebasNeueRegular'; src: url('<?php echo wire('config')->urls->assets; ?>fonts/BebasNeue-webfont.eot'); src: url('<?php echo wire('config')->urls->assets; ?>fonts/BebasNeue-webfont.ttf') format('truetype'); font-weight: normal; font-style: normal; } body { background-color: #333; overflow-x: hidden; padding: 0; border: 0; margin: 0; } <?php echo $cf->renderCss($settings); ?> .markup-crossfade li div h3 { font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif; font-size: 80px; letter-spacing: 2px; } </style> </head> <body> <?php echo $cf->renderHtml($settings); ?> </body> </html> The only other work involved was adding a 'slides' and a 'slide' template ('slides' having children of template 'slide') and adding an image field called 'image' (NB. not "images"), a text/textarea called 'body' and a required integer field called 'duration' to the slide template. Add a parent to the page tree called 'slides' using template 'slides' and add as many manually sorted children as you need, setting the image, body text and duration for each. After that, the only thing left to do was to upload BebasNeue from fontsquirrel to 'assets/fonts'. That's it. There are a number of parameters you can configure and pass in to the render methods. Here's the list of settings and their defaults taken straight from the source code... array( 'pages' => $pages, // WireArray of pages defining the slides of the slideshow. 'duration_field' => 'duration', // Field of the slide page that provides the duration (in seconds) 'overlay_field' => 'body', // Field of the slide page that provides the overlay text 'image_field' => 'image', // Field of the slide page that provides the image (url) 'title_xform_field' => '', // Textarea field of the slide page that provides the title transformations 'image_xform_field' => '', // Textarea field of the slide page that provides the image transformations 'title_xforms' => '', // Default title transformations - one per line (\n separator please) - leave blank for none. 'image_xforms' => '', // Default image transformations - one per line (\n separator please) - leave blank for none. 'html_class' => 'markup-crossfade', // What class to apply to the owning list 'z_index' => '-10', // z-index of slideshow container and its spans 'li_id' => 'slide_', // What id to use for each slide. The slide # will be appended to this 'browsers' => array( // Array of browsers extensions to render CSS for '', '-webkit-', '-moz-', '-o-', '-ms-' ), 'skip_css' => false, // only generate the keyframes, don't output a modified copy of the module's static css file. 'mask_image' => '', // location of mask image relative to the site root. Leave blank if none. ); In order to use per-slide image and/or title transformations you need to add either one or two textarea fields to your slide templates. Each textarea should have a maximum of five lines of text. Each line of text is used to define the transformation(s) applied at each of the 5 stages of the animation that gets generated. The following (used for the global title animation on the demo site)... scale(1.0) translateY(300px) scale(1.0) scale(1.0) translateY(300px) ...defines the start keyframe with the title scaled at 1.0 and translated along the Y axis by 300px. The next keyframe is not translated so the browser animates it up into the visible area. It stays there in the next frame and is animated back out in the fourth frame. The skip_css setting lets the renderCss() method know if it should include its default css scaffolding file (included with the module) in the output. If set to true, only the CSS for the actual animations is output and you'll have to supply your own scaffolding CSS in your page templates. Whilst this works great in Chrome on linux, could you let me know what the experience is like for you on your OS/Browser combination. Thank you!
-
Hello @Philipp First of all, thank you for this great service! Trying it out today as a demo platform for a new module I'm getting close to releasing. I'm having some trouble logging in using ftp. I'm pretty sure the credentials I'm using are correct but I keep getting '530 Login Incorrect' errors when I try connecting using gFTP. Are there some limitations on the daemon's ability to accept non-ascii characters in passwords? Login with the same password to the admin interface is just fine. Thanks in advance!