-
Posts
2,241 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
Retrieve The Type of A Field From Inside A Module
netcarver replied to bytesource's topic in Module/Plugin Development
@bytesource I know Soma has a perfectly good solution to this (adding the Paragraph stripper) but I'd like to support single-fields directly in textile so I have just checked code into the master branch to add this ability. I hope to do an update to the textileTextformatter soon that will let you get at this directly without having to strip anything using a second formatter. -
@Wanze I quite like the idea of having a hookable method that would allow consistent path manipulation. If it could rewrite the entire path for a resource then perhaps it could even be used to support things like image delivery from a dedicated sub-domain etc. Edit: Looks like Teppo & Ryan had a similar idea over here.
-
Retrieve The Type of A Field From Inside A Module
netcarver replied to bytesource's topic in Module/Plugin Development
Thanks Stefan, That gives me a better idea of what you are doing with these fields. I'll see what can be done to accommodate something for single fields in the next release. -
Retrieve The Type of A Field From Inside A Module
netcarver replied to bytesource's topic in Module/Plugin Development
Hi Stefan and thanks for the reply. Understood about the change of heading level - but part of my original post remains: are you using Textile on these single line fields purely for the typography changes? -
Retrieve The Type of A Field From Inside A Module
netcarver replied to bytesource's topic in Module/Plugin Development
@bytesource I'm one of the maintainers of Textile and I'm curious about your use of it for things like header fields (for which textile already has a syntax; 'h1.') Are you mainly trying to access Textile's typographic features such as automatic curly quotes etc in your fields? Do your fields ever hold more than a paragraph's worth of text? If you only need typographic features for single lines, then we really have a new use-case for Textile which has (to date) been focused on transformation of documents rather than just fields and hence why it treats your single line fields as paragraphs by default. I'm overdue updating the Textile textFormatter and hope you can get back to me soon as it may be possible to get this sorted out and included in the update should it prove relatively simple. -
Hi Antti, my wife crochets those - no joke. If you are serious about them, pm me your ear to ear measurements as measured from the top tip of one ear, then just under your nose and over to the top tip of the other side. I'll pass them on to my better half and get a qoute for you. I'll also see what can be done to mix in the new logo.
-
my .gitignore file is being ignored - Why?
netcarver replied to OrganizedFellow's topic in Getting Started
@OrganizedFellow, Question: Did you start off without a .gitignore file in your project root and add it at a later date? Possibly after an initial add and commit on your project? If so, git will continue to track what is already in the index - regardless of the content of your .gitignore file. More details here. -
my .gitignore file is being ignored - Why?
netcarver replied to OrganizedFellow's topic in Getting Started
The .gitignore file itself is being shown as modified because you've probably added it to the git index at some point - either directly using "git add .gitignore" or perhaps as part of a larger add - and then a git commit (or a "git commit -a ..."). That's OK if the .gitignore file is meant to be part of your project. Anyway, if that's the case then git is correctly letting you know about a change to the .gitignore file since the last commit you made. However, I'm not sure why other files that it's meant to be excluding are showing as modified. Got to run. Will post later if something comes to me. -
@Kongondo, I've used a few low-end VPS providers in the past (3 actually) for a redis-backed PHP app that I wrote to do things with Amazon's Merchant Web Services. By far the best service and stability I've had was from an Italian provider called Prometeus but I'd recommend looking out for their OpenVZ offers on lowendbox.com rather than going to their site directly as it's on lowendbox that you'll see their special offers - they tend to advertise more expensive KVM and Xen stuff on their own site. In fact, Prometeus is the only provider I've used that has been able to provide a 'stable' enough platform for my requirements, and the only one that was able to deal with DDOSs attacks in a way that meant I could keep my app running. Because I was running Amazon sales through that server I couldn't handle downtime but if I were only running a low-traffic website then the other providers might have been OK, and certainly cheaper (one of the hosts was £8/yr and perfectly able to host a low-traffic website if using nginx.) Prometeus did initiate one reboot during my time with them and that was to upgrade the control panel software as it had a critical security flaw. Total downtime was about 30 mins. The other two providers I tried had similar downtime due to patching the same flaw but were just not stable enough for merchant services for a variety of reasons and had much more unscheduled downtime (in one case several days worth.) One provider underwent two datacenter moves within a couple of months which means (in addition to downtime) IP address changes for the server, new certificates to verify, config settings to adjust etc. I'm not affiliated with Prometeus and no longer use their services. Cancellation was hassle-free and I've received no unsolicited communications from them. If I need a VPS again I'll be looking at Prometeus first. Edited to add: I've just been browsing for Prometeus offers on lowendbox and it looks like the owner (Salvatore) has split the OpenVZ hosting into a separate shell business called OVerZold and here's a recent advert on lowendbox for their services although it isn't for a low-end product. Both Prometeus and OVerZold are showing as having the same IP address blocks assigned to them so I'd be really surprised if this isn't still operated out of his Milan-based data centre - which was rock solid for me.
-
@Didjee, Sorry, but I don't know the answer off the top of my head. Have you tried google for possible solutions? One thought that did occur to me is to turn xcache off for your installation just to see if that got you up and running for now while you search. Try editing your PW .htaccess file and adding this... php_flag xcache.cacher Off ...to the section with the other php_flags. One other thing to think about: you can get a low-end VPS for about 15 Euros a year - and that would allow you total flexibility regarding installing what your site needs rather than having to rely on a shared hosting setup.
-
This is more likely to be a PHP/xCache config problem. You may have to get your host to check the php.ini files and make sure the memory limit is higher than that needed by xcache. Wish I could be of more help with this issue.
-
It sort of reminds me of the RAF insignia... https://en.wikipedia.org/wiki/File:RAF_roundel.svg
-
Agree with R2, this has turned out to be a far more interesting discussion than just having people post their rates.
-
@Manaus, What's the use case driving this necessity? Storage of plaintext passwords or even reversibly encrypted passwords is a definite concern. PW stores a salted hash of the password for a good reason.
-
@Marty, Does this link work for you? >>> https://github.com/FlipZoomMedia/ProcessWire-AIOM-All-In-One-Minify/archive/AIOM%2B.zip Edit: Strike that, read your post too fast. Your may well be right and I'm sure Soma will squish the problem in short order.
-
@diogo Short ternary operators were added in PHP 5.3 so your examples may not work for everyone (I think PW 2.3 runs on older versions of PHP.) Good examples regardless.
-
@mindplay I've been hacking at this on "teh playground" and quite like it. Here is a hacked take at extending your idea (with more of an Événement naming scheme as I'm more familiar with it.) - Functions return $this so you can chain calls. - Event sinks have an invocation lifespan - (you can setup a one-shot sink, n-shot or infinite sink as required.) - If a sink returns an event, it is stacked up for handling, allowing multiple sinks for an event. I'm not sure what you intended to happen in the case of multiple sinks for an event but I found that when the first sink returned a new event, it was preventing the second sink getting a chance to handle the initial event. That could be totally valid, effectively allowing the sink to mutate the event as it passes through but I decided to try it with a stack to give every sink the chance at seeing the event. Either way. this is pretty interesting. Thanks!
-
@mbrett5062 Hello, welcome to the PW forums, and thank you for posting! I am not personally familiar with Drupal but I have become familiar with PSR-0/1/2 in the last year, along with composer and packagist (nice mention @SiNNuT) -- both of which I highly recommend as they have really helped me kickstart various projects since I found out about them. @all Although my (now historical) personal coding style preferences were not reflected in PSR-1 and PSR-2 I have now adopted them for all my PHP work and it probably took all of a week after making the decision to adopt them to start using them fluently. It really wasn't hard once the decision was made. As one of the maintainers of the Textile formatting library I was starting to get feedback from users who were dropping textile because it wasn't PSR-1 and 2 compliant. This meant that including the textile library in their projects was causing their projects to fail compliance tests (many folks were using things like phpcs as part of a CI setup.) Going PSR-1 + 2 compliant fixed that, widening my experience in the process. Whilst I don't see PW being used in quite the same way as textile, having textile up on packagist has been a big win for our little project. As PW does come at things as a content management framework (not just a CMS) it may well reap some benefit from PSR-0 compliance and packaging for composer, as that will gain it more exposure and make it really easily accessible as a component in larger projects. Bottom line: I'd love to see PW move over to at least PSR-0 compatibility and available via composer. The other bottom line: My old preferences as to coding style were holding back textile - I'm now glad I switched.
-
Thanks for posting this!
-
@Ipa, are you wanting to be able to define something like a password policy for a site? If so, would a module be more suitable for this? Maybe Ryan could introduce a hookable "check password policy" method (if there isn't one yet) that gets called when setting/changing a password? Anyway, I'm not sure that the core is the right place to implement a password policy interface.
-
@n0sleeves Just following up on the idea of using git to control pushing from a dev to production situation (preferably via a test stage) and ignoring the DB sync issue for now. Caveat: Although I haven't exactly done all of what I'm about to suggest here, I have been using elements of these things for a while but never tied them together. I started using this model of linked github repos a couple of years back1. If you read the article, you'll see that it addresses a lot of what you want to do to a degree - pushing from one of the (possibly many) development copies to the 'hub' automatically gets reflected in 'prime' - his live site. If you also adopted a disciplined use of something like Vincent Driessen's Gitflow Branching Model2 (where the master branch in your repos is the only one representing releases) and make sure that the working directory on prime only ever has master checked out then you could even commit work-in-progress in other branches to your hub (thus backing it up) and not have it show up on your live site. Only when you pushed up a change to the master branch would prime's staging area change and hence the live site get updated. Anyway, hope that helps with at least part of the problem. 1 Actually, I used that article as the basis for automatically backing up my git repos by (sort-of) reversing his model. I had the bare 'hub' physically located on a remote external hard disk which was then SSHFS mounted into my local filesystem every time my machine booted. I worked on the 'prime' side of things - which was my local development repo, not a live server - and pushing a change locally was automatically mirrored onto my offsite bare 'hub' backup thanks to git hooks. 2 There are repos (original and more up-to-date clones) that provide command line tools to implement his model. Edited to add: I'll update the readme file for the script I use to create 'hub' and 'prime' repos and put the script up on github in a while. Edited to add: I no longer use the Gitflow branching model - I find it cumbersome. There are plenty of alternatives.
-
MySQL clients work fine with remote MySQL servers so it is possible to have the two on different machines: it will work. What isn't so obvious is the way that MySQL handles DB replication and failover for high availability (which it sounds like you might want to do.) It's not a simple subject so I'll not go into it here but seeing as you aren't afraid to do your research, I'd recommend taking a look at "High Performance MySQL" (at least the 3rd edition) which really covers replication as well as performance. I think you'll find that the new edition (I've only got the second) also touches on sharding for load balancing - something that you might have to do manually in MySQL unlike some other high availability DBs.) If any of the data you are going to be storing involves financial transactions (say placing orders) then I'd also recommend looking at storing it in InnoDB tables rather than (what was) PWs default MyISAM tables. It is possible to get PW running on InnoDB tables in MySQL, I've done it myself though I haven't posted a how-to about it yet.
- 4 replies
-
- 5
-
-
- scalability
- load balancing
-
(and 1 more)
Tagged with:
-
Hi Alan, Really busy here at the moment so sorry for the brief reply but, yes, the "bc" maths functions are needed for the PPP library. I thought I had the modules check for availability of those functions when it was installed (will check later) did you clone your site to your host (in which case modules will not execute the prerequisite function availability check) or did you try installing the modules directly on the host?