Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/16/2013 in all areas

  1. Could it be built more rapidly, smoothly and reliably with ProcessWire? Absolutely. Could the same be said of using a quality framework vs. starting from scratch? Yes, though I'd personally choose ProcessWire. Would it be as scalable as building something from scratch, and optimizing it specific to the need? No way. As Facebook grew, they even went as far as to build their own PHP, separate from the one you can I use. Using an existing PHP framework like ProcessWire is an excellent way to take a potentially big idea to fruition. If the idea is a good one that delivers on being the next Facebook or Craigslist, then you'll have no problem getting the resources to take your application code where you need to. I think most of the heavy-hitting services out there start this way, and then move on to something custom once the scale justifies it. But that scale is extremely large. It would be cost prohibitive to build for that scale when you haven't yet reached it. In terms of price to pay, the most likely needs for scale can be solved by increasing your server's resources or switching to a cloud-based hosting environment that can scale larger than an individual server. But again, if things get Facebook-large, then you'll be in an entirely different segment where you'll probably be building not just your own software, but your own hardware too.
    5 points
  2. As some of you might have noticed recently there has been a large "Frontend Performance Talks Offensive" (not only) by Google Engineers. Here are some high quality (regarding content) Videos which i enjoyed very much and thought you also might be interested in. A Rendering Performance Guide for Developers by Paul Lewis: Performance Tooling by Paul Irish Your browser is talking behind your back by Jake Archibald Gone In 60fps – Making A Site Jank-Free by Addy Osmani http://addyosmani.com/blog/making-a-site-jank-free/ Any suggestions for more interesting performance related stuff are welcome!
    3 points
  3. Hi motionmindz and welcome! PW gives you ultimate flexibility to handle SEO however you would like, but it does do a lot of great things to help you along, including excellent clean and SEO friendly URLs to all pages. It also has the ability to handle custom URL segments, rather than using GET variables: http://wiki.processwire.com/index.php/URL_Segments You should definitely make use of the sitemap module to generate a sitemap that can be submitted to search engines through tools like Google's webmaster tools: http://modules.processwire.com/modules/markup-sitemap-xml/ Remember that one of the key components of SEO is good content and proper use of html tags, which is, and should be, up to you and your content creators. Hope that helps, but let us know if you have any more specific questions.
    3 points
  4. It doesn't matter. Either width() or width can be used in that scenario. When using the non-function version, $page->image->width then you are just retrieving the width. When using the function version you can retrieve or set set the width. $width = $page->image->width; // get the width $width = $page->image->width(); // get the width, same $thumb = $page->image->width(100); // get image having width 100 Same goes for the height.
    2 points
  5. Good to hear about the new version of Foundation! I will plan to update this profile for Foundation 5 (and add any other necessary description files) as soon as there's time to do it.
    2 points
  6. I've recently built out a site that does exactly what you are describing. Users can create an account. Once approved as an editor, they have the opportunity to "submit new product" or "edit this product" (appears when viewing a product page). The submissions go into a FormBuilder queue, where the site managers review and approve them. When approved, they go straight into a page (whether new or existing), and the entry gets automatically deleted. The edit product form essentially looks like this (even though this is technically the search page). I would link to it directly, except they wanted the add or edit form submissions to be limited to registered users. All the forms on this site, including user registration, login, search and edit/add products are all done through FormBuilder. Though FormBuilder is not a turn-key solution for this stuff, as some development was still involved (primarily via FormBuilder hooks). But this site had to be developed in a very short period of time (a few days) so FormBuilder and the Foundation profile came in handy.
    2 points
  7. If that works, I think it should be fine. Another way to do it is to enable $config->advanced=true; in your /site/config.php temporarily, and you'll see a new "system" tab appear when editing a template. There is a checkbox there to disable the settings tab. But note that applies for everyone, not just a single role. If you use this, remember to change $config->advanced=false; as it's not intended to be something you leave on and some settings it offers are irreversible (thus can be dangerous).
    2 points
  8. You get a like for your response. (Do yourself a favour, invest some time in PHP. Starting is hard, the rest will follow!)
    2 points
  9. Hi Dragan, you are right, that code belongs to a wp theme, i miss the whole picture, i was looking for a twig support forum and you appear on the results. What a waste of time, sorry dude. Thanks anyway. ( i will remove my account)
    2 points
  10. Presentation site which i made for my little one man company. http://www.rapidlab.cz/
    2 points
  11. This project was made from scratch (default profile and deleted all content, fields, templates, files). It uses /site/templates/inc directory where is main.php menu.php and other shared parts. In main.php file is basic html document and have some minimal layout (basicaly some 3 column with simple logic which column show). Templates in /site/templates/ contains more complex layout, logic .... if needed. Processwire is awesome if come to let me do things my way. In newer projects i am using little different way with _init.php and _main.php (prependTemplateFile, appendTemplateFile) that is inspired by Foundation Profile.
    2 points
  12. If you are still looking for a nice solution. Let PHP do the work for you. Try this: PHP Tidy (its included in PHP5) Example: <?php $html = '<ul><li><h2>Chaos</h2><p>here comes the stuff</p><li><h2>Philosohie</h2><p>I love nice source code</p></li><li><h2>next Listpoint</h2><p>Help, got lost in indentation</p></ul>'; $tidy_options = array('indent' => 3,'output-xhtml' => true); $tidy = new tidy(); $tidy->parseString($html, $tidy_options); $tidy->cleanRepair(); $body = $tidy->body(); // Output echo $tidy; /* Output <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <ul> <li> <h2> Chaos </h2> <p> here comes the stuff </p> </li> <li> <h2> Philosohie </h2> <p> I love nice source code </p> </li> <li> <h2> next Listpoint </h2> <p> Help, got lost in indentation </p> </li> </ul> </body> </html> */ more Information: http://id1.php.net/manual/en/book.tidy.php http://tidy.sourceforge.net/docs/quickref.html#indent-attributes
    2 points
  13. Personally, I think PW is better off focusing on the CMS rather than worrying about building a forum solution. This just distracts and removes time better spent on expanding and improving an already excellent CMS. There are plenty of exceptional forum solutions out there already, why not use one of them? A native one just become a lot more work starting from scratch when tons of options already exist. That's my two cents.
    2 points
  14. EDIT: This project has been put on ice - I don't work with ProcessWire in my day job anymore, so this project is looking for a new maintainer. Knowing that, you can decide whether it's worthwhile reading through 7 pages of posts EDIT: The source code has been dumped on GitHub - feel free to fork and have at it. There's one thing about ProcessWire that pains me, and I've brought this up before - it's the same problem I have with e.g. Drupal... Because the meta-data (Configuration, Fields and Templates) is stored inside the database, once you have a live site and a development site, moving changes from the development site to the live site is, well, not really possible. Repeating all the changes by hand on the live site is simply not an option I'm willing to consider. Telling the client to back off the site and give me a day or two to make the changes, and then moving the whole database after making and testing the changes on a development site, is really a pretty poor solution, too. I had heard some talk about a module in development, which would make it possible to import/export Fields and Templates? It sounds like that would mostly solve the problem. Ideally though, I'd really like a solution that records changes to Fields and Templates, and allows me to continuously integrate changes from one server to another. So I started hacking out a module, but I'm not sure if it's going to work at all, if it's even a good idea, or if it's worth the effort. I'm looking for feedback on the idea as such, more than the code I wrote, which isn't real pretty right now. Anyway, have a look: https://gist.github.com/b7269bb7bd814ecf54fb If you install this, create a "data" folder under the module's folder - migration files will be written there. Basic overview of the idea and code: The module hooks into Fields::load() and takes a "snapshot" of the current Field properties and settings on start-up. It also hooks into ProcessField::fieldSave() and when a field is saved, it compares it's properties and settings to the snapshot it took at startup - if changes were made, it writes the previous name and updated properties into a file. The same thing is not implemented for Templates yet, but would be. The migration-files are named like "YYYY-mm-dd-HH-mm-ss.json", so that they can be sorted and applied in order. Each file contains a JSON representation of a method-call - currently only updateField() which would repeat a previous set of changes and apply them to another installation of a site. (not implemented) So basically, the module would record changes to Fields and Templates, and would be able to repeat them. How those files get from one system to another is less of a concern - would be cool if servers could exchange migrations semi-automatically, using some kind of private key system, but initially, simply copying the files by hand would suffice. I'm more concerned about the whole idea of capturing changes and repeating them this way. Any thoughts? Is this approach wrong for some reason? Would this even work?
    1 point
  15. WORK IN PROGRESS PLEASE BE AWARE Processwire MVC by Harmster A quick guide Introduction I am developing a MVC like module for Processwire. My goal is to split code login and design as much as possible. If you're familiar with CakePHP and or Zend you shouldn't have much trouble as those are the frameworks I loosely based this on. This module comes with Twig Template engine from Symfony 2 (see more here) Download Download PWMvc at github: https://github.com/Hawiak/MvcModule Configure 1) Drag/upload/add the /site/modules/MvcModule folder into your project's module folder. 2) Search for new Modules 3) Install MVC 4) Press "Submit", this is important, without the submit your paths are not saved. 5) Leave every textfield as it is for now, these are the defaults. 6) Create 3 folders in your /site/templates folder and call them assets, snippets and layouts 7) You are going to need a default layout file, just create a new php file in the folder layouts you just created called layout.php 8) Place the AppController.class in your /site/templates 9) Place the _create_mvc.php in your /site/templates 10) Edit your /site/config.php and add the following line $config->appendTemplateFile = '_create_mvc.php'; Files, Folders and Fields You might be wondering what you just installed. Here's a quickreference guide to the files: FILE: AppController.class This is actually just an empty class and it can be used for things that are all the same over your website, so not controller reliable. For example a title that you want to append on each one of the controllers, or scripts or stylesheets you want to have all over your website. FILE: _create_mvc.php This script sets up the MVC, it fetches the action, calls the methods. This script runs after EVERY template but only works if the template has an MVC field. FIELD: mvc If you've installed the MVC module you will notice you have an extra field installed called MVC. Add this field to every template you want to enable MVC on. FOLDER: assets In this folder there will be 2 folders called, scripts and styles by default but you can place any folders in here. By default MVC will look in these folders for scripts or styles you use using the $script or $styles property of the controller. FOLDER: layouts In this folder you will put your layout files, layout files is the structure of your website, think about a <head> and <body> tag, in general this is the same for most of your views, however you can set layouts per controller, even per action. Read about that later. FOLDER: snippets In this folder you will put your snippet files, snippets are piece of code that you re-use. The Controller The Controller is the Base provided by MvcModule. It has basic functionality and some properties (These will be extended if needed over time) For now the Controller class has these properties: layout - The "layout" property is used to set a file to be used as a layout file, this can be done in the method or the controller. view - The "view" property can be used to change the view for the action, by default the view will be the same as the action e.g. index.view for the index action and edit.view for the edit action. vars = array() - An array with all the variables that are being used in the controller and in the view, try and not use this variable but it is accesible in any controller or the AppController. Use the set() method instead. render_layout = 1 - This will be a switch to turn of the layout rendering, handy for ajax calls. layout_vars = array() - This is a array with all the vars being used in the layout, same applies here as for the vars, try and not use this variable but still it is accesible throughout your project. Use the set_layout_var instead. scripts = array() - An array with all the scripts for a project, use as follow: $scripts = array('1' => 'jquery.js'); The 1 is the sequence of which the scripts will be loaded, it is handy when you want to load jquery before you load foundation or bootstrap. The scripts need to be in the /site/templates/assets/scripts folder by default. styles = array() - An array with all the styles for a project, use as follow: $styles= array('1' => 'jquery.css'); The 1 is the sequence of which the styles will be loaded, it is handy when you want to bootstrap first before your theme The styles need to be in the /site/templates/assets/styles folder by default. And these methods: set($var, $val) - Will set a variable for your View set_layout_var($var, $val) - Will set a variable for your Layout The AppController The AppController is the class you want to extend when creating a controller, its basicly an empty class where you can put custom stuff in, this class extends the Controller inside the MvcModule folder. Make custimizations in this class to prevent issues while updating MvcModule. Setting up a controller To set up a controller you need to create a file in the root of the template folder (/site/template). Name it like you named the template. It needs to be the same name as the template. Then create a class in it with a capital at the beginning, and append it with the word Controller. This is an example for the Controller Test in /site/template/test.php: <?php class TestController extends AppController{ } ?> You'll then have to set up methods inside this class, lets say you have an edit, view, delete and a list view of a few pages. <?php class TestController extends AppController{ public $title; public function index(){ $this->set('list-view', $pages->find('/')); } public function view(){ $this->set('view', $pages->get($this->input->urlSegments[2])); } public function edit(){ $this->set('edit', $pages->get($this->input->urlSegments[2])); } public function delete(){ $page_id = $sanitizer->value($this->input->urlSegments[2]); $this->pages->get($page_id)->delete(); } } ?> The code here is just to demonstrate how different views work and far from efficiant. In order for the views to work you'll have to create views in the view folder, like index.view, view.view, edit.view and delete.view. Because the TestController extends AppController and AppController extends Controller and Controller extends Wire you can use ProcessWire function by using $this. Template variables The following variables should be available in your template/layout/snippet (Not all of them have been properly tested) user pages page sanitizer files input permissions roles templates session config controller wire this (mvc module) Using Layouts A layout is the markup of your website. Its most of the time the same on all the pages for every view. It goes like. A very simple example of a working layout is: <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> {{ this.render_headers()|raw }} <title>{{ this.controller.title }}</title> </head> <body data-spy="scroll" data-target="#main-nav"> {{ this.render_snippet('navbar.php')|raw }} {{ this.render_view()|raw }} {{ this.render_snippet('login.php')|raw }} </body> </html> As you can see I used $this->controller->title you can set any variable you like and used it in here. Also, there is the $this->view_body. The view body is the result from the rendered view. And I use the method $this->render_headers() this renders the script and styles for your layout defined in your controller. You can define a layout for each controller or even for each method. Using $this->layout = 'yourlayout.php'; anywhere in your controller. Using Snippets A snippet can be used for a lot of stuff, like your navbar or your login, something you want to re use but not necessary on your layout. You can render a snippet using the {{ render_snippet(string $snippet_name, array $vars)|raw }} Just give the name e.g. login.php and an array of variables you want to use within the snippet, the variables are optional. The snippets can also access controller variables and/or wire variables objects. Using Views A view is where you will put your markup and all the stuff that your visitor will see. A simple basic page could just display a body A view that just displays the body that is set in the controller ($this->set('body', $this->pages->get('/'))) and then just echo $body on the view This is an example view: <div> {{ body }} </div> UPDATE Twig template engine has been implemented see the Twig documentation for more info TODO: Create more controller methods that make it easier to generate views Create an Error class for MVC enabled templates. Implementing Twig as a template engine for views and possible layouts, snippets. Implement feutures like extend in twig. May change the core. Advanced testing Write tutorial The module now features an admin panel. Create view files/folders from admin panel Create controllers from the admin panel Create new methods in the controller from the admin panel Changelog - 11/20/2013 - Updated whole module - 11/22/2013 - Implemented Twig, renamed views extension to .tmpl WORK IN PROGRESS PLEASE BE AWARE
    1 point
  16. I'm really please with my first attempt at a site: http://www.garagesalefinder.co.uk It uses the map module which was fairly easy to implement; Uses the simple news tutorial which I've also adapted to make a cool links block; Uses a Pete's email to page module that I've also adapted to feed straight into the simple news tutorial; Anyway, I'm very pleased with my first little project Thanks to everyone who has helped me on the forum
    1 point
  17. Regardless of whether it would be useful in this instance or not, if it'd be useful to have this type of hook for anyone, I'd be happy to add it. Though rather than having the code in Database.php (now WireDatabasePDO).php it would instead be added as a hook that a module could monitor and take action when desired. I did get a preview of mindplay.dk's module and it's very nice. Rasmus I hope you get the time to finish and release it sometime, you always do great work. You are right on that from a portability standpoint, as the IDs may not probably won't be the same between systems, so could never be relied upon. But I suppose the queries could always be altered to reference the name rather than the ID. I'm not sure that I necessarily understand on this point or if it's something that can't be worked around, though you've obviously spent more time coding towards this need than I have. But just to help me understand, can you give an example of what you mean?
    1 point
  18. Actually this is very applicable stuff and I think everyone here is interested. I know I am. Thank you for posting! please keep doing so.
    1 point
  19. Or you could go in the opposite direction and minify all your output, and never again worry about what it looks like to others because... it's all on 1 line and you are doing it in the name of saving bytes! I'm actually using this in my latest project and quite happy with the result. Though I've made some modifications to it (to account for removal of Javascript comments and leaving textarea fields alone), which I still need to submit as a PR to michamichamicha.
    1 point
  20. I love the new feature of "Locked" fields. Though currently checkboxes have their value as "1". Should that be "Yes/No" instead? And of course it should be translatable.
    1 point
  21. InputfieldCheckbox does actually support use of an alternate value for a checked or unchecked value (i.e. Yes/No), but you won't see it except in FormBuilder or in your own usage of the Inputfield. That's because FieldtypeCheckbox does not support different values for these. The reason is that they all map to 0 or 1 in the database, and I think it could get confusing if people start thinking of checkbox fields like text fields when it comes to searching/sorting, etc. So from the development sense, it's best to think of a checkbox field as a boolean or on/off toggle, and you can determine what the on/off state means from your code. This also makes it easy to translate for multi-language support, i.e. echo "Likes spicy food? "; echo $page->spicy ? __('Yes') : __('No'); Okay it's early in the morning here and I'm going back and reading your question again and seeing you mean within the context of locked fields and I see what you mean (appearance of "1" in editor just isn't so useful). I suppose we could always have FieldtypeCheckbox's formatValue() function translate the 0 or 1 to some other text (this is essentially what formatValue is for, though not typically used in admin setting). I'll keep thinking on this, it might be a good idea.
    1 point
  22. First of all, there's one issue page limit won't solve: you'd also have to limit page name (or whatever you're using in your top level navigation) to make this even remotely useful. Otherwise users could simply create pages with names long enough to break your navigation anyway Template approach would be feasible only if you want to limit pages on your top navigation but not after that. Otherwise you'd run into huge problems, such as having to create new template for children of each top level page (and another for each of their children etc.) It would make more sense to enforce a child limit for each (direct) parent page. The way I'd probably start digging into this would be by creating a module that hooks into ProcessPageAdd execute() method and adds additional check, either based on some hard-coded limit or a value of a field in some custom-created setup page (or a custom setting in site config, whichever you prefer) to see if a page can be added below given parent based on the number of existing children. Problem with that approach is that you'd also have to prevent user from moving pages in some situations, or they could simply avoid this limit by creating page elsewhere and then moving it where they want it. This could probably be solved by hooking into Pages save() method, but that would be somewhat ugly; giving user some kind of clue about this limit within UI (i.e. before they attempt to move a page) would be optimal, but I'm not quite sure how to achieve that without a lot of custom code. Hope this helps a bit. If you want to do this properly, it'll require some work, and personally I don't think it would still be optimal solution.. but that's just my opinion
    1 point
  23. Hi motionmindz and welcome to PW. Are you referring what tina is doing starting at around 1:46 in the video? If so, she is simply using a repeater field (http://processwire.com/api/fieldtypes/repeaters/) to store the type, ID, and title. The code she has used in the template to display the video is probably something as simple as: foreach($page->media_items as $media_item){ echo '<iframe width="560" height="315" src="//www.youtube.com/embed/'.$media_item->media_id.'" frameborder="0" allowfullscreen></iframe>'; } Some other tools you might find useful for media types are: http://modules.processwire.com/modules/textformatter-video-embed/ http://modules.processwire.com/modules/process-get-video-thumbs/ http://processwire.com/talk/topic/4580-video-fieldtype/ http://modules.processwire.com/modules/textformatter-soundcloud-embed/ http://modules.processwire.com/modules/audio-mp3/ http://modules.processwire.com/modules/local-audio-files/ Hope that helps.
    1 point
  24. Hi Melissa, I am guessing it's probably an issue with the the Maximum Files Allowed setting on the details tab of your left_images field settings. You should either set this to "1" or use the following to get the first of the images in that field: $image_left = $about->left_images->first(); If you haven't already, have a read of these: http://processwire.com/api/fieldtypes/images/ http://processwire.com/api/fieldtypes/repeaters/ EDIT: I saw you lurking over here: http://processwire.com/talk/topic/2188-solved-repeaters-with-images/ but thought I'd add that link here as well anyway, in case others come across this post first and would like more info.
    1 point
  25. Jacknails, we approached the issue more from a end-user UI perspective and decided they should jump through as few hoops as possible. The most accurate description might be that it's a contact form with an attached wishlist. Secondly, while I am definitely open to looking at, and trying to strip-down, a cart module I think it would be better for us (totally new to PW) to learn a bit more by building this feature up exactly how we want it to behave. Dragan, yes requiring user signup was also a consideration and, for now, it is not a requirement. And yes we could set a cookie, and that was something that occurred to me once I read the pseudocode. Thank you both for following up.
    1 point
  26. http://jankfree.org/ Strapped for time or just getting started with eliminating jank from your projects? These are our must-see resources!
    1 point
  27. Foundation 5 will be released in a week's time (info from their Twitter account): http://zurb.com/article/1274/we-feel-the-need-the-need-for-speed-what-
    1 point
  28. Thanks kongondo! I think that first thread you posted might be the ticket! Excited to give it a try Thanks much! The Processwire community is just wonderful
    1 point
  29. A few more for you Mary Create Pages (with File-Upload Field) via API http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/ And my favorite repo, especially for all things forms, Soma's Gist https://gist.github.com/somatonic
    1 point
  30. No theres no unpublish($page, true) You can use the Batcher module to mass edit pages. You'll need a selector like "has_parent=1004" id of parent... The behavior of children of a unpublished parent is the same as when it's published. It doesn't influence it's children. Hard to say without seeing your code. But my guess is you have a script that tries to find the parent page but can't because it's unpublished... and you call $parent->children() somehwere but $parent isn't really a page object. that's what the error says at least. But you still could get the parent and it's children via API even if unpublished, you just add "include=all" to the selector or just use a get $parent = $pages->get(1004); // id of the parent $children = $parent->children(); // works as usual, even if $parent unpublished But it's still unclear to me what you try/need. Why unpublish them, when you want to query them? That's a question I can't really give an answer, as I still don't know the reason why you want to unpublish all those pages? Do they need to be hidden in navigation? Where hideing the parent would be enough? I can imagine that if you really want to make them all unpublished and not reachable to unpublish the parent for the branch and control a 404 in you templates init somewhere like the head.inc. if($page->parents("status>=". Page::statusUnpublished)->count()){ throw new Wire404Exception(); } Basicly checking if any parents of the current requested page ist unpublished, and then show 404. But not tested really, just a example.
    1 point
  31. The module soma is talking about is included in the core, but not installed, so go to the modules page and install "Session Handler Database" which will also install the required "Sessions" module. Let us know if you are still having problems finding this.
    1 point
  32. Here is another website made for Pekiti-Tirsia Kali instructor. http://www.austinptk.com/ Uses Processwire, Foundation and new admin theme with all features. System is finished, but you cant see whole functionality now like event calendar and gallery. Enjoy!
    1 point
  33. A new PW site has just been launched: http://www.seifertsystems.com A teamwork with Beat Beer (frontend development) We had no influence on the visual design / layout. We had to maintain the visual look of the old site. But "under the hood", the markup changed a lot (for the better). The main functions / tasks: Transfer from old CMS (MODX Evo) to ProcessWire. Not everything could be exported / imported via script, due to the old site using a very clunky multilingual system (YAMS). Dynamic product catalogue, with main categories, and product type groups. Automated product catalogue import for all four languages (from MS Excel, import to PW via CSV import modulue and various API scripts). Compact products overview and detail product infos. (accessible tabs) Fully responsive - compatible with laptop, smartphone and tablet displays. Dramatical markup clean-up (HTML, CSS): resulting in much faster loading, and overall smaller filesizes (less than 50% of the old code). Usability, accessibility and SEO improvements. Multilingual setup (german, english, US-english, french), partially custom content per region / language. PW 2.3.2 multilang setup, geoIP for certain geographical filters / redirects. Newsletter 3rd-party app integration. = Mailchimp. Frankly, while it's OK, the possibilities for other languages than english are quite limited. Same goes for styling the signup CSS. But hey, it's free for up to 2000 subscribers or so... Faster loading and much more user-friendly for both site-visitors and site-admins. Hint 1: When using CKEditor, there's a setting "render WYSIWYG only on focus". Hint 2: There a setting to keep empty fields collapsed, when the field is empty. Dynamic XML and HTML sitemaps. XML: For all visible and published pages, for all four languages. HTML: One for each language. Image galleries and slideshows. (Shadowbox + jQuery Cycle plugin) Search with coloured keyword highlighting on the result pages. News section with publishing scheduling. i.e. create pages (news-items) in advance, and set publish and unpublish dates - simply by adding two datetime fields and an appropriate selector in the templates, e.g. $t = time(); $latestNews = $pages->find("parent=1108, limit=4, sort=sort, include=hidden, publish_start<'$t', publish_end>'$t'"); Main PW tools used: Batcher XML Sitemap from demo install (with a tweak, to collect all four languages, and sub-pages inside hidden folders too, all in one single XML) MarkupSimpleNavigation module Language Field Tabs FormBuilder Import Pages From CSV module Modules Manager Page Edit Fold Status module + various pieces from PW demo installs / profiles But by far, the biggest godsends were the great API, the terrific multilang PW functions of v. 2.3.2+, the good documentation, and the great community help here. The difficult parts were not really technical issues, but having to wait endlessly for content, getting new change requests almost daily, and putting up with several launch delays. We seriously didn't believe that we could launch it still in 2013. What may lie ahead next year (or not), is Googlemaps integration and dynamic PDF generation for product sheets.
    1 point
  34. Thanks for the great response - exactly the information I was looking for!
    1 point
  35. Thank you so much apesia, soma and adrian. @soma and @apeisa - I followed your advise. Thanks again now it is working fine (happy). @adrian - Yes adrian I put news-pager-index.php file under template directory. Just to recap: if we need use external template file other than the template name we have to use altFilename property. In the normal scenario we can use name property if the template file name and template name were same. Here is the working copy thanks to processwire and friendly community members. It might be helpful to newbies like me. class NewsPager extends WireData implements Module{ public static function getModuleInfo() { return array( 'title' => 'News pager', 'version' => 001, 'summary' => 'News pager template', 'singular' => true, 'autoload' => true, ); } public function init() { //todo add some listeners } /** * Install the module * */ public function ___install() { // new fieldgroup $fg = new Fieldgroup(); $fg->name = 'news-pager-index'; $fg->add($this->fields->get('title')); // needed title field $fg->add($this->fields->get('body')); // needed body field $fg->save(); // new template using the fieldgroup and a template $t = new Template(); $t->name = 'news-pager-index';//Used different name other than file name /* * altFilename property will accept file-name or file-name.php * or even $this->config->paths->templates . 'file-name.php' * Note: template file needs to be placed under * template directory */ $t->altFilename = 'news-pager-index-file';//name of the template file which is under tml dir. $t->fieldgroup = $fg; // add the field group $t->save(); } /** * Uninstall the module * */ public function ___uninstall() { $templateNeeded = $this->templates->get("news-pager-index"); $fgOld = $this->fieldgroups->get('news-pager-index'); if ($templateNeeded->getNumPages() > 0) { throw new WireException("Can't uninstall because template been used by some pages."); }else { wire('templates')->delete($templateNeeded); wire('fieldgroups')->delete($fgOld); } } }
    1 point
  36. I think you might need to do something like this: $users->get($page->createdUser->name)->image->last->getThumb('micro'); You need to get the name of the createdUser of the current page and get that user's fields from $users. As for the issue of keeping multiple images - those settings won't work on the front end - you need to delete all existing images before uploading. See this post from Ryan: http://processwire.com/talk/topic/4267-creating-new-page-in-combination-with-a-file-upload/?p=41876 Hope that helps.
    1 point
  37. Dear Ryan I am a new user in processwire but after almost 2 weeks I am messing around with it, I must admit that I am really impressed. I am not a so called "developer" even though for years I develop and deploy few wordpress and mostly Drupal Sites (some big and some for personal or mid business use). Sorry for so may words .... I developed my self a mockup site for one o my clients in my MAMP and I tried to transfer it to my VPS, which runs 5.3.2-1 ubuntu 4.21, but in vain. I faced my self this hash password problem. I checked all of the threads in the forum and your suggestions about it and so I finally luckily found a solution and I present it here just For the rest of the new users to be aware! I solved it out by just first installing the forgot password module and then by changing the code in the line 222 of password.php (PHP_VERSION, '5.3.0') to (PHP_VERSION, '5.4.0') I really do not know if I did something correct but obviously this worked for me and in a no time .... after logging back in I reset my initial password created a new one and here I am.. http://www.fifart.eu/apps/pkoptics/ (sorry it is in greek and just a mockup but I really like the fact that I made it with no installing dozens of modules (drupal) and with just a few lines of code which I found into the api and from several posts of your kind Forum's "Archibishops").. Thanks again
    1 point
  38. Yes, this is possible There are several options you could look at. The first one is if you feel comfortable tackling this with some code, and you don't need to do this in the control panel interface. There's a module called Form Template Processor. The second option is to use the brilliant Form Builder module, which (amongst other things): "Saves entries to a database, email, ProcessWire page, 3rd party service, auto-responder, or any combination of these". Another option would not be to use any modules. If you do it this way, you use your page templates to manually create the form and input fields (using plain HTML, or ProcessWire's API to load Inputfields) as well as processing the data upon submission and then creating the resulting page.
    1 point
  39. Try on a smaller set of rows and see the magic happen ;-) looks good to me, did something similar just yesterday with success (of course). Even large MB-sized PDFs were downloaded from a external server smoothly.
    1 point
  40. Draft https://draftin.com/ is also nice.
    1 point
  41. We use https://editorially.com - they just recently launched and have some great tools for collaborative editing. Also, you can export in a number of formats and even direct publish to a number of platforms.
    1 point
  42. I feel the same way. Many times these features are "required features from cms" when organisations are buying a new site. Then afterwards many of them actually never use these features. It's also countless time I have build many kinds of content aggregators, where "we really need to filter/sensor/schedule content". I say them that I believe you never use these features, are you sure you want to buy custom development here. They always want and after a year when I check the site they have never used these features. I guess it is mostly for "feeling for control". Also these things create a fabulous demo. What comes to other way around: retrieving history, restoring removed pages etc. These are rarely used things too, but they actually make updating feel more secure and when build well - they lighten the support burden.
    1 point
  43. I'm interested and always reading and watching everything about front-end performances and related tools. Thanks for posting them (and keep up the good work on the new admin interface...let's code it and make us play with it )
    1 point
  44. Well. Even if no one seems to be interested i'll keep updating this if i stumble upon interesting links. Maybe this will help someone in the future Here we go. How to prioritize visible content: http://www.feedthebot.com/pagespeed/prioritize-visible-content.html
    1 point
  45. Well you've come to the right place, because a very high percentage of messages posted here have snippets of code. At least half of the messages I post have at least some code snippet. But we really try to focus on using code snippets to teach, and not so much for copy/paste. The reality is that ProcessWire is quite simple once you have a few basic concepts down. And once you've got them, you won't care about copy/paste, because you'll know how to do anything you could ever want. So our goal here is always to teach you how to fish rather than give you fish. That being said, there are no rules in that regard and all useful snippets are welcome.
    1 point
  46. Thanks guys! I started using thomas' suggestion when I read it, and it works great. It's not perfect but at least most of it is properly aligned. I guess I have to let it go and stop worrying about indentation. Although sometimes, I really have to, because I teach part-time and I want the students to be able to read my examples easily. And yes, I'm introducing processwire to my students, instead of joomla and drupal which other schools usually use to teach cms. So there's hope that future web developers would be using processwire more and more! Thanks again!
    1 point
×
×
  • Create New...