Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/17/2013 in all areas

  1. When I get a new VPS or dedicated server (usually from ServInt) the first things I ask them to do are: Upgrade PHP to the latest version available (preferably 5.4+). Install an opcode cache like APC (except for PHP 5.5, which apparently has one built in). Make sure that PDO is enabled (some ServInt default configs don't have it for some reason). I also usually make two tweaks to the php.in file: Bump up the memory_limit to 128M or 256M. Not technically necessary, but nice when you need to import or manipulate a lot of data or deal with large photos. Bump up the upload_max_filesize and post_max_size to a number at least as large as the largest files I'll be uploading (usually 100M).
    4 points
  2. I like to solve it by having a lot of specific templates, and only 1 basic-page type template. This is in part because I really like to keep pretty strict family settings for each template, so that the client doesn't ever have to decide what template to use when creating a page, and they don't have the option to create pages where they shouldn't. It also opens more options for current or future access control. But the actual template files are pretty spartan, and many of them totally blank, some set or modify a few variables, and others simply include another. I rely on my prepend/append template files to handle all of the common stuff (_init.php and _main.php) leaving the other template files focused purely on any components that are unique for the template. In terms of scalability, I also like having lots of template files, even if there isn't much in them, because future additions and modifications are very simple. So far this way has worked really well for the last few sites I've used it on, but I don't think any one method works best for everyone because we all have slightly different needs.
    3 points
  3. I also want to join the party Some of these I use a lot, some I just find interesting and bookmarked: http://copypastecharacter.com/ <- absolutely love it!! http://webanywhere.cs.washington.edu/ <- screen reader anywhere http://www.monstaftp.com/ <- this one is very recent, so I hope it will get better http://photobatch.stani.be/ <- for photo batch editing. website is not working right now, see here https://launchpad.net/phatch http://redpen.io/ <- very simple tool for getting feedback on designs https://draftin.com/ <- for collaborative writting. I love where they are going with this https://delicious.com/ with this chrome extension <- still use it a lot for public and private bookmarking http://codepen.io/ <-everyone knows this, right? http://color.hailpixel.com/ <- nice color picker http://tinypng.org/ <- make pngs smaller https://avocado.io/ <- for couples. use it everyday https://aerofs.com/ <- very fast file sharing http://www.justbeamit.com/ <- also for sharing files without an intermediary server https://www.hightail.com/ <- speaking of file sharing. Did you know that yousendit changed? http://www.adminer.org/ <- my favorite for managing mySQL https://code.google.com/p/sigil/ <- for making ebooks http://elementaryos.org/ <- not an app, i know... but this is my current OS http://codev.it <- for quick file editing through ftp http://flackr.github.io/circ/ IRC client for chrome https://talky.io/ very easy video conference edit: added codev to the list edit2: added CIRC edit3: added talky
    3 points
  4. There was a bug in the InputfieldCKEditor module that made the "Anchor" tool not work. In fact, if you clicked on it, it basically freezes the page and you can't do anything but reload. This is a result of the Anchor tool now requiring the Link plugin in CKEditor (as of version 4.1.2 I think). Since the Link plugin was in our default "Removed Plugins" configuration setting, the Anchor tool is broken. In order to fix it, edit your field settings, click the "input" tab, and remove "link" from the "Removed Plugins" list. Alternatively, you can just update your InputfieldCKEditor to the latest version v1.1.1 and it will take care of this for you. The latest version of InputfieldCKEditor also updates the CKEditor version from 4.1.2 to 4.2.0 and has a few more tweaks as well, so it's worth the upgrade even if you don't use the Anchor tool.
    3 points
  5. If it's Git in general you want to use on Windows (not specifically Github), I would recommend adding SourceTree to your list of software to evaluate. It's free, and works really well with local and remote Git repositories. I use it at home and at work, and find it really easy to use.
    2 points
  6. You actually don't need or want the "sort=sort" at all when it comes to a children() call, because it's already assumed, given that parent pages already specify a sort. You would only specify a sort if you wanted to modify the default sort. But there would be no condition under which you'd need to specify a sort=sort to a children() call simply because if the default sort is something other than sort=sort, then "order in the admin" doesn't exist by definition. I don't know why specifying it is breaking it without looking into the code (not in front of it at the moment), but my guess is that it's canceling the default behavior in this case. As a result, I think if you simply omit that part, it should work the way you want.
    2 points
  7. I was doing a favor today for someone who's stuck with a custom WP "theme" and wants some special functionality on top. Looking at all this mess, I shuddered, more than once.
    2 points
  8. Snippets: simple tool for collecting and managing code snippets. Available for Mac and Win.
    2 points
  9. ColorPicker Custom Fieldtype/Inputfield for ProcessWire 2.+ This module gives you a new custom Fieldtype. Let's you select a color using a Colorpicker jQuery Plugin. The color selected will be stored in HEX format uppercase: "EAEAEA"; To use it in your template as a background HEX color, you'd simple output the value and prefix it with a #: echo "background-color: #" . $page->color; When creating a new field in the admin, you can set a default value the field should be prefilled with when creating a new page. The field supports a "reset" button to be able to set it back to the default value. The colorpicker used: ColorPicker jQuery Plugin by Eyecon Since 1.0.6 the colorpicker supports color swatches to add predefined colors for easy selection. Thanks @Rayden for the implementation. How to install: Download the contents of this repository and put the folder renamed as "ColorPicker" into your site/modules/ folder Login to processwire and got to Modules page and click "Check for new modules". You should see a note that two new modules were found. Install the FieldtypeColorPicker module under "Field" section. This will also install the required InputfieldColorPicker at the same time. Done You can now create a new field with the "ColorPicker" Fieldtype. Get it from modules section: http://modules.proce...e-color-picker/
    1 point
  10. I put in module dependencies into the 2.2 dev version yesterday, and just wanted to explain how they work, both for the user side and the developer side. What it means and what it does "Module dependency" means that when you install plugin modules, they can now require that other prerequisite modules are installed first before they are. Likewise, if one module requires another, then it prevents modules in use from being uninstalled. Ultimately this leads to more clarity in the system, and makes it easier for one module to rely upon another. Likewise, it prevents the issue of being able to uninstall one module that's actively used by another. It's a convenience and a safety. The module dependency update in 2.2 also adds the ability for related modules to establish a simple parent-child relationship. One module can say that it is responsible for the installation of another, and so you can have modules installed or uninstalled as a group. Meaning, if you installed a plugin that includes 3 different modules to operate, then PW will only let you install the one designated by the developer, and the others will be installed automatically immediately after it. The same goes for the uninstall process. How to use now Attached are a couple screenshots that show how it looks from the Modules page in PW. If you want to test out dependencies, this feature is in the "dev" branch of the current ProcessWire distribution. If you are up to date on your git pulls, or you just installed a fresh copy with git, then you just "git checkout dev" to get to it. Of course, only do this on a test or development site, not a production site. FOR MODULE DEVELOPERS Using these dependencies is completely optional from a module development standpoint. While these dependencies don't exist in the current stable version of PW (2.1) there's no harm in implementing them now, as PW 2.1 will just ignore them. To test dependencies in PW 2.2, you'll just want to switch to the dev branch as mentioned in the previous section. When to use dependencies If you know that your module needs some other module in order to run property, it's a good idea to take advantage of dependencies. Especially given how easy they are to implement. Another situation where you'd want to use dependencies is with plugins that include more than one module. For instance, a fictional plugin called "Log Master" may have an "autoload" module called LogMaster to hook into various things and log them, and another called ProcessLogMaster to display them in the admin. You don't want someone to be able to install ProcessLogMaster without first installing LogMaster. Furthermore, you might want to have ProcessLogMaster automatically install (and uninstall) at the same time as LogMaster. In this light, dependencies can add a lot of convenience for the person installing your module, and less support and documentation burden for you. Using the "requires" dependency Dependencies are defined in your getModuleInfo() function. To establish a dependency, all you need to do is add a "requires" property to the array returned by your getModuleInfo() function. That "requires" property may be a string or an array. If it's a string, it's assumed to contain just the name of one module. If it's an array, it's assumed contain one or more module names. Lets say that I was creating a "Hello World" module that required the "LazyCron" module. Here's how you'd do it: HelloWorld.module <?php public static function getModuleInfo() { return array( 'title' => 'Hello World', 'version' => 101, 'author' => 'Ryan Cramer', 'summary' => 'Just an example', 'requires' => "LazyCron" // added this line ); ); You can also specify 'requires' as an array, which is what you'd want to do if you wanted to specify that multiple other modules are required (though you can of course use an array for 1 module too): HelloWorld.module <?php public static function getModuleInfo() { return array( 'title' => 'Hello World', 'version' => 101, 'author' => 'Ryan Cramer', 'summary' => 'Just an example', 'requires' => array("LazyCron", "AdminBar") // added this line ); ); That's all that you need to do to specify a module dependency. Once you do that, ProcessWire won't let your module be installed until LazyCron and AdminBar are installed. Likewise, ProcessWire won't let LazyCron or AdminBar be uninstalled so long as HelloWorld is installed. Using the "installs" dependency If you want to specify that your module installs and uninstalls other modules, then you should add an "installs" property to the array returned by getModuleInfo. Like with "requires", the property may be a string or an array, with an array is required for multiple items. Using this property is your module's way of telling ProcessWire that it is the parent of those modules and they should be installed–and uninstalled–at the same. Like with PW 2.1, your module's install() and uninstall() methods may handle the installation/uninstallation of any other modules too... but it doesn't have to. PW will automatically install/uninstall any modules specified in "installs" immediately after your module, unless your module already took care of it. It's a good idea to specify those child modules in your "installs" even if your install() function is already taking care of installing them. That way, PW can still note the relationship in the admin. Below are examples of how to add the "installs" property to your getModuleInfo(). We'll use the LogMaster example mentioned earlier on. LogMaster.module – parent module <?php public static function getModuleInfo() { return array( 'title' => 'Log Master', 'version' => 101, 'author' => 'Lumberjack Bob', 'summary' => 'Log all actions on your site', 'requires' => 'LazyCron', 'installs' => 'ProcessLogMaster' // added this line ); ); Now you've told PW that ProcessLogMaster should be installed at the same time as LogMaster. If LogMaster doesn't install ProcessLogMaster, then ProcessWire will install ProcessLogMaster automatically after it installs LogMaster. One thing to note about uninstalls: PW will only uninstall modules that specify the parent module in their "requires". If they don't, then PW will leave them installed when the parent module is uninstalled. After all, why should PW uninstall a module that doesn't require the other one being uninstalled? But I'm guessing that in most (not all) instances where you would use "installs", you'll also want to use "requires" with the child modules, pointing to the parent module: ProcessLogMaster.module – child module <?php public static function getModuleInfo() { return array( 'title' => 'Log Master (Process)', 'version' => 100, 'author' => 'Lumberjack Bob', 'summary' => 'Displays the logged actions in the admin', 'requires' => 'LogMaster', // added this line ); ); Using the above example, this ProcessLogMaster will be automatically uninstalled with LogMaster since it indicates that it requires LogMaster, and LogMaster indicates that it installs ProcessLogMaster. SCREENSHOTS 1. This shows how the module dependencies are highlighted on the Modules list page. Note that the install option is disabled for those modules that require another to be installed first. 2. This shows the screen that appears when you click on the LanguagesSupport module. It demonstrates the group of modules (children) connected with LanguageSupport (parent) module. 3. This shows an example of a module (FieldtypeComments) that has a module requiring it (CommentFilterAkismet). That CommentFilterAkismet module is an optional component to the Comments module, so is not installed by default when FieldtypeComments is installed. Since CommentFilterAkismet requires FieldtypeComments, CommentFilterAkismet would have to be uninstalled before FieldtypeComments could be uninstalled.
    1 point
  11. Hi folks I thought I'd post up a quick, basic tutorial of how to get started with Github and not have to learn any of the command line code. It's still recommended that you learn the basic commands, but this is aimed to help Git newbies like me get their modules on Github with the minimum effort possible. Check out the PDF below and have fun GitHub for Windows.pdf
    1 point
  12. Just feeling the love today for this incredible system. As with most great things, you tend to take them for granted after a while but I just had a realisation today of just how important ProcessWire is to my working life and the thought of having to use any other tool is too depressing for words! Thanks once again Mr Cramer
    1 point
  13. Greetings, I have been working a lot with SVG graphics lately, which is especially interesting when combined with the dynamic nature of ProcessWire. I generally use Adobe Illustrator or Inkscape to create the SVGs. But I really like this: http://code.google.com/p/svg-edit/ It works very nicely as a standalone app, but the exciting part is integrating this with a ProcessWire site. More on that in another post! Thanks. Matthew
    1 point
  14. I've been really enjoying using Bohemian Coding's Sketch app for the past couple of months and recently I noticed their official user manual for Sketch is powered by ProcessWire! How cool is that?! http://www.bohemiancoding.com/sketch/help/
    1 point
  15. Here I have mostly vruuums and beeps, and even dling-dlongs from the church bell Edit: "Here" means Frankfurt, not Porto
    1 point
  16. Hahajaja guys I'm just kidding. I'm just talking about listen to music. No music doesn't mean absolute silence. Absolute silence can feel odd but as long as there is noise around it doesn't count as silence. I also can better if there is some natural noise going and I mostly feel focused when working at night with some zzirps doing their singing outside its like meditation. But certain music just distacts when doing complex work. I also listen to music when doing easy work.
    1 point
  17. 1) you may do this by using a hidden tools page with an images field and than you only have to use $page->images->add($shotImageUrl) to save the image to the tools page assets directory. And you have it as PageImage and you can do all image api stuff 2) I have uploaded a new module for Image Manipulation. With this you are able to use some well known image methods (width, height, size) and you can store the image together with your xml or json file instead of creating and using a tools page with InputFieldtypeImage. Example (this could be somewhere in your makeRequest method): // get your image from dribble and save it to your cache directory $shotImageUrl = 'http://dribble.com/some/path/to/image.jpg'; $imgCacheFile = $this->cachePath . md5($url) . '.image.jpg'; $result = file_put_contents($imgCacheFile, file_get_contents($shotImageUrl)); // if $result is not false and greater than zero the image was successfully saved, // now you can load the $imgCacheFile into the ImageManipulator, resize it and save it by overwriting the $imgCacheFile $boolResult = wire('modules')->get('PageImageManipulator')->imLoad($imgCacheFile)->resize(360)->save(); // thats all PS: if you want rely on the PageImageManipulator module, you can set it as needed dependency for your module: public static function getModuleInfo() { return array( // ... 'requires' => array('PageImageManipulator'), ); } see: http://processwire.com/talk/topic/778-module-dependencies/
    1 point
  18. Hhm, I have finalized the third WatermarkMethod: watermarkText() (and have uploaded the third and (hopefully) last version of the module: http://processwire.com/talk/topic/4264-release-page-image-manipulator/) But it isn't really what I wanted it to be. It is because GD2 with PHP (at least with version < 5.5.0) doesn't support anti aliasing for transparency! My initially plan was to analyse the source image histogram-data and automaticly set the fontcolor to more lighten or darker. Also I want to have it a bit blurred and transparent. But everytime one define the transparent color for the overlayed textmask, it gets cutted the hard way! (0 = nothing or 1=100%, and nothing in between) I have tried to get a bit around that behave and now it depends on the source images. Sometimes it seems to be possible to use the method, and sometimes it's to ugly!
    1 point
  19. I've just pushed some fairly major updates to this module for version 2.0.0: Add zoom to the data managed by this module. It can be accessed from your field in the same way as address, lat and lng, i.e. $page->map->zoom. It will remember your zoom level setting from the page editor, and it can be used for generating your own maps. The map settings are now configurable in the field settings (input tab). This includes the starting/default location for the map, map height, default zoom level and map type. Removed some annoying behaviors from the geocoder. The client-side (javascript) and server-side geocoders no longer try to complete with each other. InputfieldMapMarker is now responsive so that it's input organization is just as usable at mobile resolution. Addition of a new related Markup module: MarkupGoogleMap. This provides an easy way for you to generate maps with the data managed by FieldtypeMapMarker: $map = $modules->get('MarkupGoogleMap'); // output a map with one marker echo $map->render($page, 'map'); // or output a map with a bunch of markers: $items = $pages->find("template=something"); echo $map-render($items, 'map'); This is just a basic usage example. For all options see the README.
    1 point
  20. Settings You can store in the admin. (/processwire/ if you create a structure like this: /Processwire/Settings/ <- hide from menu & enable guest access ( will show open lock ) /Settings/color/ /color/red/ /color/blue/ /color/green/ /Settings/position/ /position/top/ /position/left/ /position/right/ Then the editors won't see anything in the tree. And you can query for your color or position.
    1 point
  21. Greetings, I agree with everything being said here. On a related idea... Lately, I've been experimenting with SVG layouts, and when you combine that with the dynamic capabilities of ProcessWire you enter a whole new world of possibility. I've been meaning to set up a discussion on this to share our ProcessWire/SVG explorations. Thanks, Matthew
    1 point
  22. I love it when you have to try something new, perhaps only display data under certain circumstances, exclude certain pages or display things conditionally and you think "Ok well I'll just have a go before I go and look up how to do it". Refresh the page and "It worked!" I think to make up for finding this way too easy thanks to PW, I'm going to install Wordpress and then use 3 different plugins to create "custom fields". That ought to teach me.
    1 point
  23. ProcessWire gives me the old Apple feeling back. ( talking about 10/15 years ago) But we have our own Steve Jobs! Ryan Cramer has the vision, the knowhow and the social aspect we all adore. I love the things that are not in the admin, and how to handle all those other aspects. (api) I don't want a assets manager ( if there's no reference ) I don't want endless settings on a shared place. I don't want to explain ( in tutorial ) how a site works. I don't want to use some kind of TPL language inserting logic in a textfield. I don't want a headache to get data. All the above I can easily build/do with ProcessWire, the fact that I can I really love.
    1 point
  24. Greetings, Yes... Several times a week, I have an urge to post something like this! For me, with recent experiences in Joomla/Drupal/WordPress fresh on my mind, I can make direct comparisons to many core ways of working. As time goes on, and my "big three" experiences fade away, I do find myself forgetting specific details. But what I never forget is the feeling of frustration and how long it took to get projects up and running in the other CMSs, and the freedom we have in ProcessWire to just make our visions happen. It's interesting you post this today. Recently, I have been wanting to search the web for any discussions comparing CMSs and make sure that more people understand that it's not only about "the big three." Thanks, Matthew
    1 point
  25. Yep, tnx just satisfied a customer today with your fixes !
    1 point
  26. Greetings, The idea of selects being pages -- at first -- seems odd, because other CMSs have simpler ways to do it. But the first time you need to have multi-dimensional elements as selects, you realize how terrific this is. Just a simple example... In one of my recent projects, admins create store pages and add the location by selecting a US state. They need to see the full name of the states in the select box. I also needed to create a search that allowed visitors to find those stores by entering any or all of the state name. But, I also needed to display state abbreviations in store listing pages. Using ProcessWire selects, I just created "state" pages with the title field, as well as an "abbreviation" field, then used those pages to populate the select. The person creating the page doesn't even know the abbreviations are there. They just know that when they select the full state name, magically, the proper abbreviation shows up in the listings pages. You could go many levels down (or up) from there! Thanks, Matthew
    1 point
  27. I believe this issue is specifically for Debian servers. I found an old article that explains why this behavior occurs on Debian machines: http://oscarm.org/2006/09/debian-php5-and-session-garbage-collection/ The above article still seems to be relevant, even though it seems to be marked as solved in the Debian bug system (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388808) I moved my sites from a Centos machine to a Debian in April and under that time the number of session files has been growing. I post this as a heads up for others running ProcessWire on Debian. //Jasper
    1 point
  28. Not to mention you can also make it easily multi-language. One of the reason it's a clever system.
    1 point
  29. The context in your case is "mytemplate" as I understand correctly. Because multiple templates can share 1 fieldgroup.
    1 point
  30. Greetings, AHA! A little voice told me there must be something like this going on, because of two things: 1. It seemed odd to get a "selector" issue when creating pages. 2. There's always an easy solution to any "issues" in ProcessWire. Here's what happened. In this project, I added a method to check for duplicate titles upon submitting the page (creating or editing), and THAT is where the "selector" issue was happening. For others dealing with this same idea, here's my code... Originally, I had this, which DID NOT work: $matchedtitle = $input->post->title; $checktitles = $pages->find("parent=/parent/, title=$matchedtitle"); // Look for existing pages with requested title. I edited it as follows, and IT WORKS: $matchedtitle = $sanitizer->selectorValue($input->post->title); // "selectorValue" strips out commas from title search. $checktitles = $pages->find("parent=/parent/, title=$matchedtitle"); // Look for existing pages with requested title. The second code snippet is the one to use. Thanks, Matthew EDIT: The code above is for the create page routine. The edit page routine has a bit more going on.
    1 point
  31. Hi! I made a mistake when making the module translatable. Sorry about that. I just pushed a new version to Github that should work. /Jasper
    1 point
  32. Thanks for pointing me in the right direction Ryan. Although it took a bit of figuring tinkering around since I initially got this error "Field must be in fieldgroup context before its context can be saved" for those passing through this thread, finally got the following code working correctly: //add the field to the template first $mytemplate = wire('templates')->get('mytemplate'); $mytemplate->fieldgroup-add('roles'); $mytemplate->fieldgroup->save(); //-- we now *override* the default label and description to suit our template --// $field = $mytemplate->fieldgroup->getField('roles', true); //!IMPORTANT: set 2nd parameter to true to get the field in the context of the fieldgroup. //note: I don't really understand what "in the context of.." means though $field->label = 'Select roles'; $field->description = 'Select the roles that should receive notifications.'; //now save! wire('fields')->saveFieldgroupContext($field, $template->fieldgroup); For those who want to go through core, the hints are in wire/modules/Process/ProcessField/ProcessField.module
    1 point
  33. Prepros (available for Win and OSX) Prepros is a GUI compiler for preprocessing languages such as LESS, Sass, Compass, Stylus, Jade, Slim, Markdown, Haml and CoffeeScript. Prepros can also live refresh your browser whenever you change your code on your favourite editor. Compile less, sass, scss, compass, coffeescript, stylus, jade, slim, markdown, haml and livescript files No dependencies (sass compass etc..) Image optimization Live browser refresh Javascript minification and concatenation @imports detection and watching Options for customization Error & success notifications Built-in http server
    1 point
  34. Windows 7 Ultimate 64bit 1. Launchy - fast app launcher 2. SublimeText2 3. KeePassX - multiplatform password manager 4. Dropbox + Google Drive + SyncBackSE 5. MyPaint - drawing program that I use for quick sketches, wireframes, flowcharts, etc.
    1 point
  35. Great list Martijn, I wholeheartedly agree with 1 3 too. Never saw the need for 2 when, Spotlight's always been good enough for me. Not sure if mentioned yet but textexpander is a real time saver (just seen it's 45 dollars though )
    1 point
  36. What kind of backup are you thinking of? If it's the whole package you can write a bash script which tars and gzips the entire folder your ProcessWire site is in and a dump of the database - both with nice filenames. Next the scripts connects to the S3 server and uploads both the files. In that case you wouldn't need to touch the API.
    1 point
  37. It does distract me. I love to listen to silence when I'm focusing on it only. When I'm focusing on something else, it distracts me. I like to work with music or in a coffee place. But that's me. Maybe I am empty and never noticed it
    1 point
  38. Thanks, I understand now. I've updated the InputfieldCKEditor to populate the config.height property based on the rows value.
    1 point
  39. In case you missed it, Sublime Text 3 is now open to non-registred users http://www.sublimetext.com/3
    1 point
  40. In that case you want to use 'installs' rather than 'requires'. Either that, or don't use dependencies at all and just $this->modules->get('module'); in your install(), which will install it automatically (if it's files are in the /modules/ directory). Use 'requires' for things like other 3rd party modules that the user might have to install separately, or modules that the user might have to configure after installing. The 'requires' option is also useful for preventing un-installation of modules. If one module requires another, then the one required can't be uninstalled so long as the one requiring it is installed.
    1 point
×
×
  • Create New...