-
Posts
4,043 -
Joined
-
Last visited
-
Days Won
67
Everything posted by Pete
-
I was just about to say ryan seems to prefer echoing blocks of HTML rather than opening and closing PHP tags in side HTML blocks, but he beat me to it - at the end of the day coding standards should be seen as good suggestions, but use whatever works best for you and whatever is legible I prefer using PHP tags in my HTML templates but I can tell you from experience when you're doing something complicated like a table of data where there are 10 cells on a row all presenting data from fields it can soon get messy opening and closing all those tags.
-
If you don't need anything in a hurry I will be building a newsletter system along the lines of your requirements but it will be a few months off. It's a module someone is paying me to build, but I'm working on another one first
-
Well I lost the parrot sometime around when I was last being a pirate: But I found him again when I went to a fancy dress party as French Polynesia (the theme was countries): What? How is that French Polynesia? French (beret) polly (parrot) knees (I'm showing mine) ear (Spock ear). French-poly-knees-ear. No, nobody guessed it on the day
-
Gah, spoke too soon. Works for increasing brightness but not decreasing EDIT: there was a fix in the last comment below the "correct" answer - changing the last line to this works perfectly for increases and decreases in colour brightness: return sprintf("#%02x%02x%02x", $r,$g,$b); I'm using it so that someone can set the hover colour of jQuery UI accordions in association with some gradient styles from here: http://www.colorzilla.com/gradient-editor/
-
So whilst I wasn't looking for this: http://processwire.com/talk/topic/3851-pirate-maps/ I finally found what I was looking for. Essentially I needed to give a client the ability to use Soma's colour picker and tie the colour to an element on the page. Problem is the element's background has a gradient - disaster! Not a problem any more, as it's possible to take a hex value and calculate lighter and darker colours: http://stackoverflow.com/questions/5199783/help-needed-with-php-function-brightness-making-rgb-colors-darker-brighter (see accepted answer halfway down). The thing with web design/development is that pretty much anything is possible, and usually if you have an obscure requirement someone else will already have thought of a solution. Don't be limited by anything other than your imagination
-
I wasn't actually looking for this at all, but it just shows how far you can go with Google Maps and a chunk of custom code! http://www.splitbrain.org/blog/2009-02/01-a_pirate_map_with_libgd_and_google_maps Very cool!
-
Based on some things I've been reading around the forums as well as experience from other systems, I think it would be nice if, when someone selects "Admin Themes" from the drop-down, the layout changes to show a thumbnail of the admin theme with author's name and other details below in a grid. I realise that currently there is no simple way to do this, but an idea I had is that you simple add a thumbnail.jpg file to every theme on GitHub (and theme authors add these for new ones too) and as long as each thumbnail is the same name you can link to them directly with a URL a bit like this: https://github.com/libgit2/libgit2sharp/raw/master/square-logo.png I think linking to them is fine and that way you rule out showing an old thumbnail - I did toy with the idea of downloading them into a cache but you can never be sure you have the latest (though there are ways to check). I was going to attempt this myself but I'll be mega-busy for at least a month and besides, Soma is a coding machine What do you think? Kind of like the themes page for WordPress but just for admin themes. Could even allow a few thumbnails (up to 3 maybe) and do something neat around that? If authors don't put their themes on GitHub then they do lose out, but the counter-argument is that they lose out by not having them on GitHub - several of my modules have received updates recently that I haven't had to be involved in other than committing the changes, so I'm sure themes can benefit in the same way
-
Hehe, not got that far yet, just installed the module last night and am thinking about possibilities for an upcoming project.
-
Switching from ExpressionEngine to PW, could these be achieved ?
Pete replied to Ibn Saeed's topic in General Support
It is technically possible to do all of this in ProcessWire and more, but since some of your needs are unique it would involve writing some functionality yourself. For some of your needs there is likely code available here on the forums which I'm sure someone will point you too soon (I'm typing on mobile), and for everything else the community is here to help you out. The thing with ProcessWire is that almost anything is possible, but I have to ask have you taken a look at the tutorials and familiarised yourself with some of the docs on the website to get a feel for how the system works? At some point early on you will be creating fields and templates to accomplish a lot of this. Of course if you like you could also add your requirements to the Jobs forum and it is possible someone could develop this for you, but it is always good to get stuck in and get a better understanding of the system first if you have the time. -
But what would you have left to do then? Oh yeah, more modules. Good point
-
#2 & #4 - more work for Soma on the cheatsheet - that will keep him happy Am I right in thinking number 3 is pretty huge, especially if you have a lot of autoload files that don't already check page/template/something-else in their functions? It sounds useful in terms of now having a standard place to define when the module will run Good stuff all round!
-
I'm using this fieldtype to assign some users access on a per-page basis (something I have occasionally seen a need for in other topics here on the forums) and agree with Soma that it would be good to be able to keep the tree open after selecting an item. Does anyone have any idea how to do this? I looked at the JS file for the module but couldn't see anything obvious in there unfortunately. Is there a simple way to prevent it collapsing automatically using some JS?
-
Is it not in dev branch as per ryan's post in that topic you linked to then? Guessing you've probably tested that already.
-
Antti - to answer your questions: This grated on me every time I wrote the word "category" and I should probably just change it to "parent page" as that's more in keeping with ProcessWire's terminology (to newcomers "Category" makes sense, but PW is all about enticing people to learn new things after all ). I'll change this in the next update. It is hardcoded to the images field for now. I realise this is a bit of a gamble that they haven't renamed/deleted this field, so should probably add an extra config option for this. The reason I didn't for now is that it then led me to thinking (as you have) about other file types and then I thought about allowing different fields for different templates and started to get a headache I should at least do the first part and allow the admin to select a different field, plus add more checks for attachment filetypes. As a result of those two points, the next version really needs: Rename "category" to "parent page" throughout Allow admin to select image field Add more checks for filetypes attached to emails Add field for whitelist of email addresses Maybe allow for other attachments (why not? It's simple enough ) Not sure when I might get around to these as there may be other stuff in the pipeline before then
-
Thanks ryan! And thanks again to Jason for letting my run with some ideas. I could just as easily completed this by making the admin enter comma separated values in a textarea field (the easy way to go) but I wanted to make input foolproof and the idea was already in my head. And now some techy stuff: I had some fun working out the ajax behind adding new rows and settling on saving the field data as a JSON string in the end (which is fine because nobody is going to set up dozens of email accounts!) but if there are any suggestions for improvement there then please let me know as it seems to me now that there are endless possibilities for "add another row" type setups in module configuration. Before that I was trying to overcomplicate things and have the new rows save in the background as an array, but if I intercepted the page save, ran the ajax request and then use jQuery to finish submitting the form then it wouldn't save the other form data. I abandoned that idea completely (but left the function in the module file for reference). In the end, keeping it simple worked out better as running ajax upon saving the config page slowed the page save process down as it essentially sent two requests - converting the data to a json string and saving to a hidden field is instantaneous by comparison To those not following all that, my eventual solution was to KISS
-
Already nominated my favourite. You might be able to guess what it is
-
Using ProCache by any chance?
-
Pull today's events to home page from fullcalendar event page fields
Pete replied to ljones's topic in General Support
Just thought I'd jump in and say thanks Soma - wasn't aware it took strtotime keywords! Always learning -
Shopify looks like it has a very extensive API - best of luck with the project
-
I liked fartscroll But in all seriousness, this site is very handy, thanks!
-
Updated this to v1.0.6. You can now add optional roles that can bypass maintenance mode (superuser will always bypass regardless of whether it's selected or not!). @ceberlin - this should help with your scenario
-
Pretty sure it's not a PW issue - I develop on my local SSD and upload to servers all the time, and vice versa - so would assume it's maybe a corrupt image like Wanze says.
-
Check if ($page->name - - - - ? ) is within a range of page names
Pete replied to pwired's topic in General Support
Of course, you could just as easily have created a new template for slideshows called "slideshow" and in the page settings for each of those pages changed the template from "basic-page" to "slideshow" rather than doing conditional logic based on page names. Might be less confusing all round unless there was a specific reason you were doing it this way? More on templates here, specifically the third paragraph: http://processwire.com/api/templates/ -
Just a note to all MODx'ers - I think this is a nice way to transfer some snippets/chunks to ProcessWire as well if people want to go down that route and have some they used to use in body text. Obviously it's not quite the same thing (potentially more powerful depending on your needs), but anything that helps make a transition easier is good in my book Very useful, powerful module ryan!