Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/27/2013 in all areas

  1. Hello, I've recently updated a showcase website for (private) antique collection. http://agcat.net/ Module I used: - Procache - Batcher This website is expected to be written in Japanese/English, but English texts are not available yet. Developing this website, I thought Processwire would be a fantastic solution to organise and show cultural heritage such as museum collections!
    7 points
  2. What a sad writing... http://cms.about.com/b/2013/10/20/too-many-cmss.htm He has a good point here though
    4 points
  3. Well, as usual, that was easier than I thought. In case others overlook the same thing, I was able to access those settings with the following: $field = wire('fields')->get($this->name); $template = $field->template_id; $parent = $field->parent_id; $selector = $field->findPagesSelector; $code = $field->findPagesCode;
    2 points
  4. Filtering is very easy because each choice excludes all the others. In the example you gave it could work like this: $resultados = $pages->find("template=potenciometro, fabricante=$fabricante, produto=$produto, resistencia=$resistencia, classEnerg=$classEnerg, acabamento=$acabamento, tolerancia=$tolerancia, conica=$conica"); This would work because you would be looking for products that have all these characteristics. But the example that I gave doesn't take in account tat some filters might be not used. For that you could do this: $fabricante = $sanitizer->selectorValue($fabricante); $fabricante = $fabricante ? "fabricante={$fabricante}" : ""; // do the same for all fields $resultados = $pages->find("template=potenciometro, $fabricante, $produto, $resistencia, $classEnerg, $acabamento, $tolerancia, $conica"); These assume that your fields are text fields, but most probably they would be page fields, in that case your search would be more of this kind: fabricante.name=$fabricante read more about how to organize content here http://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/ If you need a more intelligent search, one that instead of excluding just prioritizes some fields over others, I can help you with some code for that also.
    2 points
  5. I would have thought that most people who occasionally checked the alternatives would have heard of MODx by now at least? Anyway, my assessment of that article is that it's possibly the laziest piece of writing on CMS' I've ever read. What was the point of it aside from to tell people not to bother looking at other systems? If the author had spent a little time with the systems on the list it's entirely possible the article would have been very different, but he resigned himself to just not bothering because they're not big enough instead of seeing if any were better for what he wanted. I knew it was doomed from the very moment he wrote "...and active security updates." - which means he's one of many thousands of proud bloggers and content creators who think that the alarming regularity of security patches in Wordpress are somehow a comfort. They're not. They're a sign that something is wrong. It's entirely possible that the very concept that you don't have to update the system on PW sites unless new features are needed is entirely alien to people like the author of that article. I take great comfort in the fact that ryan actively practices this (though I update all of mine just because old habits die hard, plus it's the easiest upgrade process I've ever come across). I'm slightly scathing towards this guy in this post, but it's wholly deserved I feel as instead of being an "expert" he has instead been blinkered and misleading through sheer laziness. It's pretty inexcusable on a high-traffic website to be honest. The whole thing seems to be tailored towards advertising the two he uses (one of which appears in ads on the page) however I'll concede that he did at least link to the CMS Critic awards even if he couldn't bring himself to linking to the winners' project pages.
    2 points
  6. ProcessWire Site Profile Using Zurb Foundation 4 This is a drop-in replacement for the default ProcessWire site profile. See the live demo at: http://processwire.com/foundation/ It is mobile-first and fully responsive, capturing all the benefits of Zurb Foundation 4. Ready to be expanded upon with built-in support for deeper levels of navigation nesting in the sidebar. Pagination ready with Foundation-specific pagination output, when/if you want it. Improved search engine, relative to the basic profile. Library of Foundation-specific markup generation functions included, primary for generation of navigation (in _nav.php). Uses ProcessWire 2.3+ prepend/append template file settings making it easy to work with. It is largely stock Foundation 4 in terms of look and feel, with a few tweaks. To Install Download this profile from GitHub or mods.pw/4u. Start with a copy of ProcessWire 2.3 or newer, and its default site profile. If starting with an uninstalled copy of ProcessWire Replace the /site-default/templates/ directory with the templates directory from this profile. Replace the /site-default/config.php file with the config.php file from this profile. Run the ProcessWire installer. If starting with an already-installed copy of ProcessWire Replace the /site/templates/ directory with the templates directory from this profile. Add the following two lines to your /site/config.php file: $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Desktop Screenshot Mobile Screenshot
    1 point
  7. No more coding for today, only this
    1 point
  8. Thanks Apeisa! I knew it was something simple. I've been coding in php for years, and in the last couple of weeks I've been making this mistake repeatedly. I think it's because I've been coding more javascript which uses a single =. At any rate, thanks for the assist.
    1 point
  9. Greetings, Thanks diogo for bringing this to our attention. The people at about.com should be embarrassed to have something like this tarnishing their domain. Even if the subject was restaurants and not CMSs, the thinking that is revealed here is atrocious. The author's logic goes like this: I know there are many choices out there, and I haven't tried them all, but I already decided that they are not as good as this one. Generally, I really dislike using the number of plugins as an argument in support of a CMS. Joomla constantly boasts about having 7500+ plugins, and it is meaningless. Thanks, Matthew
    1 point
  10. You made my day! Thank you again: With this I was able to do it really quickly. Actually, thanks to the developer of the Processwire CKE plugin (Ryan I think) it is even easier than having to change the CKEditor config.js: All you need to do is go to the field setting for the field that uses the editor, choose the "Input" tab and then under "CKEditor Settings" > "Remove Plughins" you add: "contextmenu,liststyle,tabletools"; That does it! Luckily I don´t need tables in the editor either. I like to keep the options there fairly simple to prevent editors from being able to mess up the pages. If I needed an option for tables somewhere I´m sure there would be either a solution without CKEditor or else I could set the field to the old settings (only for that one instance of CKE, an added advantage of doing it this way is that you can configure each instance separately). As for "liststyle", I´m not sure what that refers to. Anyway I still have the Options for bulletet and numbered Lists in my editor and they still work as before.
    1 point
  11. you are probably hooking into page save (you left the actual hook away from code). When you create new page, then it is also saved and hook gets repeated. Simple way of preventing is adding runtime property to your new page: $calendar->skip = true; and check for that property before creating new page. EDIT: I see you have template check there that should do the same - but it has a bug in it: if($page->template = 'group') should be with ==
    1 point
  12. Or I could turn it on for the correct template. Thank you. Solved!
    1 point
  13. Good point, actually. My answer was (at least) partially wrong / lacking It seems that this security behavior (blocking access from JavaScript to clipboard) isn't (anymore?) tied to iframes. The fact remains that in order to achieve this, you'll have to disable the CKEditor context menu. There's some discussion about this at StackOverflow here: http://stackoverflow.com/questions/2246631/how-to-disable-ckeditor-context-menu. This might cause some issues, though; one reply there claims that you'll also have to disable tabletools plugin. I'm not entirely sure of the scope of that plugin, but I'm afraid that disabling it might make it impossible to add tables -- or at least edit them once they've been added.. which is kind of problematic. (In this forum tables are disabled altogether, so this isn't an issue here.) Anyway, you might try those tips if pasting with mouse / right click feels important enough
    1 point
  14. It's pretty similar to what some email marketing programs I've used in the past do. It's a neat way of saying as the admin "hey, you can play with these toys in any order you want, but we're still controlling all the containers" and it does make for something that's a bit more controllable. It would certainly be of interest I think to people writing blogs or news articles - take an average article from this site for example: http://www.rockpapershotgun.com/2013/10/23/enemy-within-preview/ - text, image, text, image and now and then a video - and it really would allow people to write articles where they like - admin or frontend - and see the layout they'll get as they're writing it. There are other front-end editors of course, but this just looks so simple. Anything like this that makes things like that simpler is going to be great, even if all it is really doing is constricting what you can and can't do - but for news and blogs that's where you don't mind having your layout controlled like that Having said all this, you would have to wrap each bit of content with a div so when you go back and edit it the blocks all come apart nicely, but that's no big deal really unless you're trying to shave off every last byte from your page load. <div class='editor-image'> or something isn't exactly going to ruin your life.
    1 point
  15. I think what you want is to hook after ProcessPageAdd::buildForm. That returns an InputfieldForm object, that you could manipulate with an 'after' hook. The only problem is that method isn't currently hookable. But you can make it hookable by editing the file and prepending 3 underscores to it, i.e. "buildForm" => "___buildForm". I will make this same change in the core source and you'll see it in the next batch of dev commits.
    1 point
  16. @Macrura: I've just pushed new version to GitHub with "version-control" permission. This is going to be installed automatically with the module, but if you've already installed and don't want to lose any data, simply add a new permission called "version-control" manually and apply it to appropriate roles.
    1 point
  17. Last week I had time and worked with PocketGrid. As example I took the same demo-page on which I tested Kube. At first I worked from desktop to mobile (like I did with Kube). Rebuilding the site with PocketGrid was fun and no problem. Next challenge: building it mobile-first with PocketGrid. Puuh, was hard at the beginning. You had to think completely different (css). Was my first real 'mobile-first' doing. But at the end I got it. Result: less clean html, removing one unnecessary breakpoint, clean css. On the other side: IE8 needs a extra css or some js (because mobile-first). In short words: PocketGrid is supercool... Also I like the clean logical html. All the responsive magic is done in the css. No need for cryptic classnames. <div class="navigation block-group">...</div> <!-- PocketGrid --> <div class="footer block">...</div> <div class="small-2 large-4 columns">...</div> <!-- Foundation --> <div class="col-xs-6 col-md-4">...</div> <!-- Bootstrap --> Using percent, em, px... whatever you like. PocketGrid is absolutely flexible.
    1 point
  18. @visualcookie: did you insert those paths in that format exactly? As far as I know, you should insert them starting from /site/ (ie. /site/templates/_sitejs/.) Probably something you've already tried, but just making sure
    1 point
  19. I actually mean code snippets in general, not just those that would be relevant for use with Hanna code. There are so many useful bits of code spread throughout this forum and various gist repos (especially Soma's), but finding them can be difficult. The ability to be able to search for a function and execute it or copy it for use in a template directly from within a code tester/runner or the Hanna code module would be fantastic. I could see that for snippets that perform admin type functions this could actually replace some some potential desire for smaller modules. An example might be your clean-files.php script: http://processwire.com/talk/topic/4437-delete-orphaned-filesimages-from-siteassetsfiles/?p=43687 I think it would be cool to be able to fire up the code runner and browse by category and/or search for "clean orphaned files" and see an explanation of what it does and then be able to run the script directly without the need for copying/pasting from the forum into a template and executing that. With my page tree migrator I have done something like this with the ability to import files directly from the page-list git repo from a simple dropdown, so surely we could something like this using gists, but with searching options?
    1 point
  20. Ok, I have quickly hacked together some enhancements to Wanze's Batcher module. There is now a Create Fields tab where you can enter the details (name, fieldtype, label & description) for as many fields as you want. A couple of things to keep in mind - some field types require some key config options on the Details and Input tab, so in some cases I am not really sure how much time this will really save. Because of that I have currently limited the field types that can be created to simple text based ones (text, email, url, numeric etc), and left out the more complex ones like page, repeaters, datetime etc. Of course there is the potential to add some of these settings to each item in the create field batcher, but we wouldn't want things to get overly complex. Also, I am not really sure of the etiquette here - I have modified Wanze's module and he may not want to see this functionality in his module (which would be totally fair). So what I have done for now is just include a screenshot of what I have created and I'll wait to hear from him to get his thoughts before posting the code.
    1 point
  21. You can hook before Fieldgroups::save or Templates::save. public function init() { $fieldgroups->addHookBefore('Fieldgroups::save', $this, 'addProcessField'); } public function addProcessField(HookEvent $event) { $fieldgroup = $event->arguments[0]; if(!$fieldgroup->hasField('process')) $fieldgroup->add('process'); }
    1 point
  22. The main reason it's not there is just because $input is another layer on top of $_POST (or $_GET or $_COOKIE) and I wanted to limit the overhead of it as much as possible, at least until we needed it. Didn't want to enable the possibility of someone posting endless multidimensional arrays from a security standpoint. But ultimately if the need was there, I would add it. And now that its come up, we might as well add it. Probably what I will do is just limit the recursion to 2 or 3 levels to keep it safe. I don't see any potential issues with adding it. If you've had the need for it, then I'm sure others will to. If you want to submit a pull request, I'll bring it into the core. Otherwise, I'll plan to add and commit an update to the core soon. Thanks, Ryan
    1 point
×
×
  • Create New...