-
Posts
2,233 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
A big thank-you to the first customers to purchase through my PW merchandise shop - I very much appreciate it! Please let me know if there are any other products you want to see PW branded and what your experience in the SpreadShirt hosted shop was like. I'm also now curious about which phone/tablet cases folks here are using!
-
LOL diogo - nice !!
-
Ok, merchandise fans, please give my spreadshirt shop a visit. (I've not run a spreadshirt shop before so I am learning as I go.) @teppo, @All; you might find some designs in there that interest you more than the one I posted above.
-
Hi Teppo. I did try getting exactly such a shirt accepted by SpreadShirt's legal department but the p as an @ logo was rejected without reason. I guess it was too similar to others - but that is speculation. I will look into running a SpreadShirt hosted shop on my one of my own domains with exactly such a design in it as I believe the rules for product acceptance in such a shop are a lot looser.
-
Forgot to mention: I'm working on getting the designs into SpreadShirt Australia too. Will post again when done.
-
Hello folks. I'm not 100% sure this is the right place to be posting this but, well, here goes. With both Michael van Laar and Ryan's permission, I have followed up on the idea I posted in this thread for a simple PW merchandise design and made it available on both the European and US version of SpreadShirt. Let me know if you like it. I will split proceeds 50:50 with Ryan if anyone buys any of these. Here it is in the US SpreadShirt site. Here it is in the European SpreadShirt site. Edit: I have now setup a specific spreadshirt shop for these products... PW Geeks I've ordered one of these myself from the European store and the T-Shirt quality is good but I would recommend you double check the description of whatever colour you choose in the swatch picker as it isn't clear - I ended up with metallic silver for the word "process" instead of the grey I thought I was picking. Not a pretty result.
-
Thank you!
-
I'm looking forward to this!
-
https redirection not working / ingnored
netcarver replied to palacios000's topic in General Support
Hi palacios000, could you let us know if this problem is present in the 2.6 code for you? It should have been fixed recently and it would be great if you could test with 2.6.3 if that's possible. -
@geeber I'm not sure how the duplicate modules got into your filesystem but I've updated the module information to show compatibility with 2.6.
-
@Beluga, @Juergen Thanks for pressing me on this. I've just been testing this in PhpMyAdmin and there seems to be a problem with trying to set a blank value to MySQL time fields; MySQL itself sees the blank as an invalid time and sets it to '00:00:00'. There is some more detail about this in the MySQL Time type manual page. Here's a quote from the linked manual page... You could setup your own test table with a TIME field and try it yourself. Please let me know if you find a workable solution and I'll try and work it into the module. At this point in time I'm not sure how to prevent PW from trying to save a blank value into the DB if nothing is entered in the Inputfield.
-
Very, very nice. Thank you! Is this in the module directory yet?
-
Folks, I just uploaded a new test branch for this module to github that adds the ability to spit out alternative texts on each parse. The idea comes from products like spintex and allows you to use one text block to generate different output on every view. Basically you write stuff like "Dear {{mum|dad|grandma|grandpa|Ryan}}, ..." and the textformatter makes a choice from the listed alternates at every point in your text. You can control the degree of randomness and I'm playing with setting it based on a cleaned up version of the referrer URL to make visits from different places have different versions of the text but repeated visits from the same place see a consistent version of the text. In other words, people coming from google will see something like "Dear dad, ..." each time they visited whilst those from Yahoo would see "Dear Ryan, ..." when they visited the very same URL (at least, that's the plan.)
-
@Juergen Sorry that it is not working in a textformatter - I don't know why that is. Do you have any other textformatters working on the field before yours gets a go at it? By the way, the results may be the same in the regex tester but the way our 2 regular expressions work is very different. This does matter the more text that needs to be searched. Keeping text formatters speedy is always nice. Check out the number of steps needed between your regex (over 4000 steps to search 5 paragraphs) and the one here (66 steps.) I incorporated LostKobrakai's suggestion that allows whitespace between the '>' closing tags and the '<' starting the next tag in the link above. @LostKobrakai - thank you for adding the code block to my post above - the forum didn't give me the option to use a code block when I was on mobile!
-
Possible Addition of an OnVersionChange() method to Module class
netcarver replied to netcarver's topic in Wishlist & Roadmap
Bump... Added this as a github issue.- 1 reply
-
- 2
-
Would it be useful to any other module authors if there were some way of notifying a module that it had just been updated? So, when you do a module update in the core, to have an OnVersionChange($old, $new) method (or something else that hits the mark) in the base class that the core then calls. Modules could override the implementation to provide whatever udpate to their schemas they need? I know that some of Teppo's modules track their version numbers so they can detect changes and update their table schemas as needed but it seems to me that this would make a pretty good core-feature candidate. I've just had a most welcome pull request on one of my older modules but it will require me to manually add my own module version checking/schema update mechanism to handle things nicely (probably just a copy of the way Teppo does it) but I'd rather not do that if we can get something into the core that does it well.
- 1 reply
-
- 4
-
Hi Beluga, Do you need a configurable value or just a blank as a default?
-
I thought I'd start a thread where we could post links to kickstarters that we find interesting and that might be of interest to others. To kick things off I thought I'd post a link to the kickstarter for the Thunderbirds co-operative board game. For those of you outside of the UK who may not have heard of Thunderbirds before, it was a 1965 Sci-Fi show using puppets as actors that became very popular - I certainly remember it from my childhood. The kickstarter itself has a lot of backing already and is well into its stretch goals, but if anyone is interested in the show and the possibility of playing the game, then check it out and back it if you like it. Thunderbirds are go! Ok, what about kickstarters that interest you?
-
@Pete HTML tags can be a pain. You could try this... "#(?<popen>\<p\>)?\{showif (?P<field>[\w\.]+)(?P<op>$operators)(?P<value>[^}]*)\}(?P<body>([^{]*))\{\/showif\}(?P<pclose>\<\/p\>)?#i" ...but I can't recall of the top of my head if $m['popen'] and $m['pclose'] will be unset, null or just an empty string if they do not match. You may also want to allow for possible linebreaks between the open and the {showif} and between the {/showif} and the close. Finally, will there be stuff like classes on the p tag? If so then you need to use something more like... (?P<popen>\<p[^>]*\>)? ...to try and match the open tag Ok, got to go. Will look in on this again this evening.
-
Techy note... If you know the delimiter for any part of an expression then it's faster to tell the regexp parser explicitly when to end a run than have it try to work it out. So this bit... \{showif:.*?)\} ...can be speeded up by telling it to match until a '}' char... \{showif:[^}]*)\} ...and you don't need to worry about embedded line-breaks or greediness then either as that part will stop matching when it hits the first '}' with no backtracks. Edited to add: Actually the speed-up shouldn't be a lot in this case as you are using an ungreedy match - but it would potentially be big if you had greedy matches.
-
@Pete Untested and a little verbose, but you could try this... $m = array(); $operators = array('=', '!=', ... ); // expand as needed depending on your expected operators $operators = array_map('preg_quote', $operators); // preg_quote them all $operators = implode('|', $operators); // join as alternates if (preg_match("#\{showif (?P<field>[\w\.]+)(?P<op>$operators)(?P<value>[^}]*)\}(?P<body>([^{]*))\{\/showif\}#i", $selector, $m)) { $field = $m['field']; $op = $m['op']; $value = $m['value']; $body = $m['body']; // You could just access $m directly - but I've made it explicit } else { // No match stuff } I might have misunderstood the literals in your example though. If you want to capture possibly multiple occurances in a string then you could use preg_callback or preg_match_all - but I don't know the ins and outs of your use-case so I've left it at a single match. The actual regex may need a little tweak and can be simplified if you don't need to match anything in the text up to the {/showif}.
-
@MuchDev Here are my load timings for your site... Kind of surprised it took so long with ProCache, would have expected it to be faster.
- 38 replies
-
- 1
-
- webserver
- raspberrypi
-
(and 1 more)
Tagged with:
-
@MuchDev Seems pretty responsive, would fly with ProCache.
- 38 replies
-
- 1
-
- webserver
- raspberrypi
-
(and 1 more)
Tagged with: