Leaderboard
Popular Content
Showing content with the highest reputation on 02/18/2014 in all areas
-
Please add your ProcessWire sites to our directory, immediately before or after posting to this board. We want to make sure that everything posted here is also posted in our official directory.9 points
-
5 points
-
JFYI, the packaging is now ready, and ProcessWire is available as bitnami images: blog.bitnami.com/2014/02/processwire-added-to-bitnami-library.html So, now it's time to share share share!4 points
-
3 points
-
I terms of development and usage standpoint ProcessWire is much better suited for the task then Joomla, Wordpress and even Drupal. But you have to be ready to invest your time in learning some concepts of PW. There are a few of them: page, pageArray, selector, template, template file, field, and module. If you feell comfortable with OOP PHP, CSS and HTML, you will definetely succeed. Of course it will requre some custom coding as with any more or less complex project. I'll try to make some assessment here in terms of efforts required if you have the skills mentioned above: listing and search of properties for rent and sale - easy blog layout display and detail display - very easy gallery for each property - very easy google maps display of location - easy with existing module (some work is required if you need more complex integration) google maps search - (not quite sure what you mean here) I guess it depends on what parameters you want to search, should require some coding user registration - user access control is coming out of-the-box, you just need to customise it for your needs and make registration and login forms for your front end. add to favorites function- easy send to friend - easy social share - some coding requred - I think there are open source social sharing projects you could integrate for this (like this one) and so on - it depends, but I think the rest is super-easy front and back end editing - back-end editing is already here. But front-end editing is what you will have to code yourself. So I suppose could require fair amount of work. restricted access to some sensitive informations (like landlords contact details, clients info and so on) - it depends on the logic of your site, I guess you will have to code some parts. adding property informations with some already defined values in dynamic fields (street names for instance) - from easy to medium, but more info would help. Jquery image upload (automatic resize, thumbnail creation, watermark add) - all is here (thanks @Apeisa and @smd) including watermarks (thanks to @Horst) I am sure you get the picture. Unless you have a strict deadline go with Processwire - it will worth the effort in any possible sense. If it's your first project with PW, it may be not the easiest journey, but an exciting one. In the end you will aquire some great skills and have many insights. And I'm sure, after you've arrived you will never look back . Whereas you arguably could start faster with Drupal (that I think the only competitive CMS option here) dropping some plugins together, you then would almost inevitable struggle with your front-end markup and in general making all work the way you (and not Drupal) want. And again you have to be familiar with Drupal's internals to make those hacks. In PW you develope naturally extending existing functionality and it doesn't make any assumptions about your workflow and markup. So it gives you more rewarding experience during the development process. Almost all the skills you get using PW is transferable to other webdev areas. From the UX point of view PW's interface is a dream coming true (and Drupal is a nightmare IMHO). If you haven't seen PW 2.4 yet, just go and have a look - it's beautiful!3 points
-
Wow. Perfect Timing: Today I was searching for something exactly like this as we are building a social media campaign microsite for a client (let's see maybe the Login part will become a module). Thanks a lot for the link!2 points
-
Hi cork and welcome to PW. I believe all you need to do is this: $body .= $page->comments->renderForm(); The $body variable is built with the various pieces of content that you want to show in the template and is echo'd here in the _main.php file: https://github.com/ryancramerdesign/FoundationSiteProfile/blob/master/templates/_main.php#L113 Or if you want to keep things clearer you could do: $comments = $page->comments->renderForm(); and then echo $comments somewhere else in the _main.php file. So much flexibility in PW which can be daunting initially, but you'll come to love it very quickly Let us know how that goes for you.2 points
-
I've posted the first iteration of the directory here: http://processwire.com/about/sites/ – I plan on doing a lot more with it (including a landing page for each site), but just wanted to get something posted quickly since we may be getting more traffic coming in soon with the Bitnami release. Thanks to those that have submitted their sites so far. Thanks especially to Marty (stillmovingdesign), one of the most prolific ProcessWire users, for taking the time to submit all of his ProcessWire sites in there. We went from having about 5 sites to having 30 after he submitted his. Now we've got about 64 sites in there. Please keep submitting posting your ProcessWire sites. We want to show a comprehensive diversity of work in the directory, and it's already coming along really well! I've added a few of your sites for testing purposes. If you already see your site there and want to change something about it, just re-submit it and I'll overwrite the existing one.2 points
-
I don't think there is a sum function in PW...PHP can do that .....One approach is to use a hidden field that does the calculations for each rider behind the scenes on each page save. See this thread (especially Ryan's post) for an explanation http://processwire.com/talk/topic/5441-kind-of-calculated-field/. The advantage here is that no calculations are done on the fly on each web request...The sums are there to cherry pick from the DB... Edit: I've just realised Ryan's answer was in response to a similar (well actually the same) question that you Peter asked! Did you even read that thread?2 points
-
try: sort=-created to use "date" you would need to have created a filed called Date, I think.2 points
-
I very much like the possibility to configure admin themes as modules, thanks Ryan! But one thing: If there are more than one themes installed, they are selectable on user level. Wouldn't it be reasonable to also make them selectable on role level? I think this is a much more common scenario. The editors are grouped by roles and they are likely to have role based themes. If it doesn't fit, the theme selection on user level could override the role setting. btw: Same could be implemented for the user language.2 points
-
@gunter: see if httpHosts setting is in place in your /site/config.php and contains only "localhost", that's the most likely culprit. Ryan: if you're reading this and if aforementioned really is the problem here, I'd say that this is an issue that should be dealt with.. personally I'm against this whole setting (I'm seeing more issues than benefits there), but at least it should stay out of way as far as possible -- opt-in instead of opt-out.2 points
-
As the others have said, the point with ProcessWire is that you end up with exactly the interface and exactly the tools that your client needs, because you build them for them. The result fits their brand and their need, you are not trying to force them into a compromise. There are a few of us who have come the Joomla route (and would never go back) and we have all been amazed at how quickly we were able to pick PW up and make something solid with it - even people like me with little programming knowledge. And of course, any tools you develop as you go, you can keep and reuse on another project!2 points
-
Let's put it this way....if you enjoy microwave dinners, then Joomla or WP is for you. Sometimes the dinner will be easy to cook and may turn out right. On other occassions, the dessert will flop and you will be left frustrated but you will have to do with what you have. If on the other hand, you enjoy having all the ingredients you need and can follow any of several recipes to create some beautiful food with your ingredients, then PW is for you .... What am I saying? If you want to point and click and solve problems by adding more plugins to the system, Joomla and WP are "good". If you want finely grained control over everything, then PW is for you. However, with PW, some work will be required of you. You will have to be willing to learn....The community will be here to guide you along the way if you ask for help where you are stuck... Just my 2p (spoken from the point of view of an unashamedly biased PW addict - but who has been to J and W before...)...Seriously, though, creating a backend admin in PW is not difficult... Welcome to PW and the forums vladar2 points
-
Thanks Horst for the honest feedback. You're right, I didn't handle this situation and our conversation the right way. Yes, we keep the IPTC information. But please keep in mind, that we do some sort of compression that's not completely lossless. That's right and its already on the list for the next update. Like normal image variations in ProcessWire, the first time you load the page takes longer. The person uploading the images needs to open the page once. That's not perfect but was the fastest working method. See below. We only have one live site and some sites in developement. That's a problem, I know. Same thing as 4. Or should I be quoting myself? _ We sat down today and based on your feedback wrote down some features for the next module version. They should increase performance, make it more configurable and the integration will be easier. We also thought about developers like Horst that have thousands of images. Alternative hook after the image upload (based on selected fields). No need to call the mz() method or changing templates. Option to overwrite original files or to keep a variation. A pseudo "async" upload method. Images will be sent to our servers and then the site will render without the minimized images. If you open the site again, your PW will check if the minimized images are ready for download and replace/create the minimized files. No need to wait for our servers but results may take another page load before they appear. We don't want to open a "pipe" (e.g POST /receiveimages/) to write them back to the file system once compressed. Fallback to PW compressed images. On the server side we will then build a complete queue system for better scaling across multplie server instances. It also allows use to use the slower but better options of PNGQuant or JPEGOptim. The goal is to release this in the last february/first march week.2 points
-
You just get the textformatter module and use the formatValue(). It accepts Page, Field, String but you can also pass an empty page and field as most textformatters also don't use it except HannaCode I think. $str = $page->textfield; $modules->TextformatterModuleName->formatValue(new Page(), new Field(), $str); echo $str; This is deprecated, but should work for most textformatters still $str = $page->textfield; $modules->TextformatterModuleName->format($str); echo $str;2 points
-
To build on top of Ryan's response, redirecting is not just sensible to do on login, but whenever you have forms. The wikipedia page on the Post/Redirect/Get pattern explains it much better than what I can - it's definitely worth the read2 points
-
1 point
-
Great work Ryan ! Marty the MACHINE !1 point
-
Well dont forget you can resize the image using the api and create many different versions at the same time. And there is also the thumbnails module if you want to create a bespoke set of thumbnails at upload http://modules.processwire.com/modules/fieldtype-crop-image/1 point
-
1 point
-
Very interesting Plugin, though, what do you expect from a plugin in processwire? It seems like its almost ready to use as it is?1 point
-
You did draw: resize the image till one of the edges reach 150px, can be width or can be height or both if the original is square. if you don't want this, do you want to mesh up with the aspect ratio ?1 point
-
Doh... Solved my own problem.... Changed this... foreach($page->comments as $comment) To this... foreach($comments as $comment) Sorry for diverting you here... but thanks for looking! Here is what I have ended up with... // DISPLAY PAGINATED COMMENTS $limit = 10; // comments to display per page $start = ($input->pageNum-1) * $limit; $selector = "page=$page, sort=-created, start=$start, limit=" . ($limit+1); // find the comments. replace "comments" with the name of your comments field $comments = FieldtypeComments::findComments("comments", $selector); // output the comments foreach($comments as $comment) { if($comment->status < 1) continue; // skip unapproved or spam comments $cite = htmlentities($comment->cite); // make sure output is entity encoded $text = htmlentities($comment->text); $date = date('m/d/y g:ia', $comment->created); // format the date echo "<p>Posted by $cite on $date<br />$text</p>"; } // output the pagination links if($input->pageNum > 1) echo "<a href='./page" . ($input->pageNum-1) . "'>Back</a> "; if(count($comments) > $limit) echo "<a href='./page" . ($input->pageNum+1) . "'>Next</a>"; Thanks guys1 point
-
That sounds good and you'll definitely have more up-to-date results with that approach. I used cron mostly because sites in question were really large, content is constantly being updated and generating the JSON file could take (relatively speaking) a long time. I didn't want each page save to take that long.1 point
-
I see you found your solution, but I will post mine anyway, maybe it will be of some help too <?php $today = strtotime('today midnight'); //or if you want to show only events in future //$today = date(); $schedule = $page->schedule->find("schedule_date>$today"); //then put $schedule in your loop Also you can request one item like this: <?php $schedule_item = $pages->get(1007)->schedule->get("schedule_date>=$today"); //maybe you'll want to sort them if they are not in the right order, then add sort=schedule_date to your selector1 point
-
Have you read the pages on repeaters, especially the section on: "Finding pages by repeater value (using selectors)" You should be able to figure it out from there using a selector that finds items with schedule_date > time() Let us know if that gets you on your way, or if you need more specific help.1 point
-
Just to tie this issue back to the support board for the module. This issue has been reported, starting with this post: http://processwire.com/talk/topic/421-helperfieldlinks-field-and-template-edit-shortcuts/?p=484161 point
-
Second (looks like last) release candidate of stable Czech Language Pack for ProcessWire 2.4 is finished. Czech Language Pack Current version: 1.0rc2 (99 files) + README.txt Changelog: Some minor fixes. Added few missing strings Czech Language Pack for external modules. Current version: 0.6 (28 files) + README.txt Added: ProcessBatcher /site/modules/ProcessBatcher/ProcessBatcher.moduleTextformatterHannaCode /site/modules/TextformatterHannaCode/ProcessHannaCode.module /site/modules/TextformatterHannaCode/TextformatterHannaCode.module Updated: ProcessPageDelete ModulesManager InputfieldCKEditor ShoppingCart FormBuilder Contains: FieldtypeCropImage InputfieldCKEditor ProcessBatcher ShoppingCart TextformatterVideoEmbed FormBuilder ModulesManager ProcessPageDelete TextformatterHannaCode pw_czech_1rc2.zip pw_czech_modules_06.zip1 point
-
You need double quotes "". Also I guess the new line is visible when translating the string in the Pw admin. To get a new line in html, you need the br tag: <h2><?php echo nl2br(__("first line\nsecond line"));?></h2>1 point
-
Everything you've mentioned is possible with ProcessWire. If there aren't any complete solutions avaible for Wordpress or Joomla then ProcessWire might be your best choice to build it by yourself. But remember that the great flexiblity comes from building your own "logic" and template rather than using 10 different modules from 10 developers. It takes more time but the result is customized for your problem then. Search and list the properties pages. No problem. Example pseudo-code $pages->find('template=house,sale=1"); Another view option for a list of properties. The detail page could be the template of the property. The gallery can be a field with multiple Images or a extra page linked to the property. There is a GoogleMapsMarker Fieldtype. Works fine with some JS libraries for front-end integration. Not sure about this one. Now we come to the weaker spot of ProcessWire. It's no problem to build a simple signup form and make basic user management. But depending on your requirements you will have to put a lot of effort into this topic. Fine if you only need it for a single user/session Just HTML/JS magic. No problem and nothing special to ProcessWire ... The backend might be your problem. Backend Editing is no problem. But building a Front-End live editor thing is a huge project. Whole teams are spending weeks developing such functionality for other plattforms. Here you can look into the Module directory. This is possible with PW Not sure. You would define a source for this pre-populated data. Maybe a combination of a simple module and Page-reference field? Image resizing is no problem, neither is the thumbnail creation one. You can add a watermark with Horsts PIM module. Overall this is a complex project. Especially the front-end editing and the user thing can take some time. A basic system where you can have properties listed with details is easy and should be your first step. If you can invest the time you will get an awesome and flexible site. Split the project into smaller milestones would be my last suggestion.1 point
-
Oh good! All that typing from everyone is definitely worth it then!1 point
-
I think Kongondo has it mostly right. But for the sake of keeping it simple, maybe ignore the part about making a copy of the AdminThemeDefault for the moment, and just make your edits to AdminThemeDefault. Once you've got them in place, you can always copy it to a different admin theme in /site/modules/ if you want to. But lets get down how to add color themes first. 1. Add your new color theme option to the AdminThemeDefault.module file like Kongondo mentioned. 2. Go into /wire/modules/AdminTheme/AdminThemeDefault/styles/sass/ and copy _vars.scss to _colors-pete.scss. The _vars.scss is based around the Warm color theme. If you prefer to use a different one as a starting point, then copy _colors-classic.scss (for example) to _colors-pete.scss instead. 3. In the same directory, edit the main.scss file and add your new colors file, making sure the others (except 'vars') are commented out: @import 'vars'; @import 'mixins'; //@import 'colors-classic'; //@import 'colors-modern'; //@import 'colors-futura'; @import 'colors-pete'; // ADD THIS LINE 4. Make edits to your _colors-pete.scss file as you see fit. You don't need to know Sass to do this, as everything is predefined with Sass variables that you can just insert new color values into it. However, read the following steps first, as you may want to setup your Sass watch to keep an eye on the changes for you as you go, so that you can see them take place in your browser as you make them. 5. Compile the styles/sass/main.scss file to styles/main-pete.css using whatever method you prefer. The standard method would be to use Sass watch. If you were currently in your styles/ directory, you could type this at the command line to automatically compile changes to main-pete.css. sass --watch sass/main.scss:main-pete.css This will keep running indefinitely, monitoring for changes and compiling them to main-pete.css every time a change is made to any one of the scss files. If you only wanted it to run once, then you'd just omit the "--watch" part. 6. Before or while you are making changes to your _colors-pete.scss file, go ahead and login to PW admin and go to Modules > Core > Default Admin Theme. Click "Settings" and change the color theme to "Pete", so that you can see your changes as you go.1 point
-
You need to separate things out a bit. A template can be created with or without an associated file - a Template File is for markup and any logic you need. Any file you create in the Template folder and that has a php is a candidate for being associated with a template. When you create a template (with or without a file) you can set how it is used - can it have children? Can it be used for new pages? Does it have to be associated with a particular parent? And so on. Assuming you do not touch these settings, that template can then be used for any amount of sub pages. A page created with a template cannot be displayed unless there is a template file associated with it. But the data from that page is still available - either by using something like a Page Field on another template, or because you call that field in directly in another template file - $pages->get("/home/")->some_field It is worth going through some of the tutorials to get your head round these relationships - once you do it is all pretty easy. http://wiki.processwire.com/index.php/Basic_Website_Tutorial1 point
-
Hi yesjoar, Not sure about the trackChanges as Valery mentioned. But if output formatting is off, then Pw returns an array of images regardless of your max image setting. $p->setOutputFormatting(false); $image = $p->image->first(); $image->description = "Test"; $p->save() $p->setOutputFormatting(true);1 point
-
When I need a calculated field that will be used for sorting, I like to add a hidden (or regular, doesn't matter) field to the template to store the calculated value. The value gets automatically calculated on page save. A hook like this in your /site/templates/admin.php can do the work for you: $pages->addHook('saveReady', function($event) { $pages = $event->object; $page = $event->arguments(0); if($page->template == 'rider') { $miles = 0; foreach($page->rides as $ride) { $miles += $ride->miles; } $page->miles_ridden = $miles; } }); Then when it comes to sorting, you just sort on your calculated field: miles_ridden. If you are adding this to an existing PW installation, then you'd need to establish the initial values for each rider's miles_ridden. This could be done with a quick bootstrapped script: /setup-riders.php <pre><?php include("./index.php"); foreach(wire("pages")->find("template=rider") as $rider) { $rider->save(); echo "$rider->name: $rider->miles_ridden miles ridden\n"; } Then you'd just load domain.com/setup-riders.php in your web browser, and then delete the file when done.1 point
-
Actually found the part of code that misses the imagealphablending and imagesavealpha. Submitted a pull request1 point