Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by dragan

  1. you can add include=all in your selector For mass-editing stuff like hidden / published etc., use the Batcher module.
  2. I've never used repeaters myself, but if these were "regular" input-fields, I'd just add a text- or textarea input field to the template(s). Inside these, the editor could list the fieldnames (separated by comma or linebreak), and this would dictate the placement / order of fields in the template. Convert the "fieldOrder" from text to an array, and just output them in that order in the tpl. Certainly not as elegant as drag-and-dropping fields in the admin edit area, but simple enough. I'm not sure though how to access / adress repeater fields though, so that might or might not work for your scenario.
  3. 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.
  4. frontpage bottom right: change to frontpage bottom left: should better be:
  5. Can you post a real-life example of such a query? What's the reason you query mySQL directly, what kind of scenarios?
  6. I'd simply add a textarea field in your templates, and check if there's any content, e.g. if(strlen($page->extraJS) > 3)) { echo $page->extraJS; } And in that field, either enter the JS code. Or, if the JS files are already in your site/templates/scripts/ folder, just specify the .js file-name. if(strlen($page->extraJS) > 3)) { echo '<script src="' . $config->urls->templates . 'scripts/' . $page->extraJS . '"></script>'; }
  7. Well, that's what I meant. I replaced it.
  8. I tried to upgrade from 2.3.0 stable to the latest dev version, but got this error msg: PHP 5.3.22, PDO enabled (double-checked in phpinfo() and my hoster) I have only overwritten the wire-folder. When I was updating 2.3.0. to 2.3.2 it worked nicely. Do I have to install it as a completely new PW site, in order to use the latest functions (especially field dependencies) ?
  9. Just a little word of caution: It only works "out of the box" with the PW default language. If you have a multi-language site, all alternative languages have to be updated seperately. I've been importing and updating product pages for a 4-language site the last couple weeks (you know... clients' deadlines are always very flexible...). It's also possible to write PHP code directly in your Excel sheets, copy and paste it into a text-editor, and run the script just once. Just make sure the field-name arrays and field-value arrays always match (hidden rows in Excel are the devil - they get exported to .csv as well). With 50 or 100k products / pages, it's a good idea to add set_time_limit(), or split the data in chunks... http://php.net/manual/en/function.set-time-limit.php
  10. You could try https://code.google.com/p/php-excel-reader/ Or convert the XLS to CSV, and use default PHP CSV functions to import / parse the data. http://php.net/manual/en/function.str-getcsv.php Depending on the number of imports and the number of different templates / fields, you could write a few lines of PW API code. It's quite easy to copy and paste Excel fields and convert to PHP arrays. Simple example: $f = array("height","width","thickness","weight","price"); // field names $v = array(38,75,3,220,10); // field values $id = 123; // page id $myPage = $pages->get($id); $myPage->of(false); foreach($f as $k=>$v) { $fld = $f[$k]; $myPage->$fld = $v; } $myPage->save(); It's also quite easy to update a whole bunch of pages with one script (e.g. define a parent and/or template in the selector).
  11. On a somewhat related note, I was looking into (standalone) browser-based file-managers, and found this gem: http://elfinder.org/ It's got an API, drag-and-drop goodness, archive creation / extraction functions, and instructions how to integrate it in tinyMCE + CKEditor. Gonna play around with it this weekend...
  12. if (file.name == "justinbieber.jpg") { done("Naha, you don't."); } The dropzone guy has clearly a sense of humour...
  13. Thanks Ryan. I completely overlooked that tab in the image / file fields.
  14. I have a (somewhat) related question, so I thought better to ask here than creating a new thread... Is it possible to make the image / file description field multiline? i.e. textarea? I'd like to create a simple way for logged-in users to look at images and Flash files and add comments (in the frontend, via API). A second text-field wouldn't be necessary - as long as I can add linebreaks for feedback / remarks in the existing default desc. field.
  15. Nice site! Personally, I'd make the top navigation bigger. It almost gets overlooked beneath the phone number. Site loading / speed is absolutely OK over here (Google Chrome / desktop browser).
  16. edit: well, that was easy $f = $fields->get("title"); $f->set("langBlankInherit", 1); $f->save(); I'll keep it here, in case someone else searches for the same thing... Is there an API function to change the language support blank behaviour? e.g. change the behaviour of dozens of multilang fields via API? (from "show default language" to "blank" or vice versa). I see in the DB-table "fields" an entry like this: "langBlankInherit":1 (field "data"), when set to remain blank... (Using dev version 2.3.2)
  17. Very impressive! Is this festival Portugal's answer to Burning Man?
  18. Do you mean this one? http://modules.processwire.com/modules/language-support/ Yes, that is installed. But imho that still doesn't explain why drag-and-drop uploads stop working, and the trash can icon disappears.
  19. Looking great! To me, it's the additions of dropdowns I'll probably appreciate the most (especially for the "Setup" menu)... reaching menus faster, with fewer mouse clicks. Kudos.
  20. You can greatly minimize potential FTP upload errors, if you upload a ZIP or .tar to the server, and unzip it remotely. It's faster than uploading millions of files / folders / sub-folders via FTP, too.
  21. Strange indeed. Tell me about it. The relevant CSS was in no way altered. We use the default admin theme, too. Today I've spent 2 hours more on this. Turns out that if you name an input field "file" with some sort of language code at the end like so: download_manual_fr, download_manual_en, download_manual_de the system is somehow confused, for whatever reasons. If you name a field foo_fr for type "text", everything works fine. I have these all over the place. But as soon as you use such naming conventions for file-fields, it gets all sorts of confused. Renaming such fields worked. e.g. download_manual_fr -> download_manualfr it works as advertised. Perhaps someone who's an admin can cross-link it to the multilang forum?
  22. Looking at it some longer, it turned out that there are either CSS bugs, or browser bugs. Duplicating file input fields with Apple Safari or Firefox on Mac: Buggy. Trashcan icon is not visible. Doing the same with Google Chrome on Mac: works fine. Same with Google Chrome Win: works fine. You'd think that Webkit browsers behave the same, but apparently not...
  23. Looking in the page edit HTML source, I noticed this: How it looks in the duplicated input fields where drag'n'drop doesn't work: <span class="AjaxUploadDropHere description"><span class="ui-icon ui-icon-arrowreturnthick-1-s ui-priority-secondary"></span> drag and drop files in here</span> How it looks in those that do work normally: <span class="AjaxUploadDropHere description" style="display: inline;"><span class="ui-icon ui-icon-arrowreturnthick-1-s ui-priority-secondary"></span> drag and drop files in here</span> .InputfieldFileUpload .AjaxUploadDropHere { display: none; } In other words: display: inline doesn't get rendered in the buggy fields. It overrides the display: none in wire/modules/Inputfield/InputfieldFile/InputfieldFile.css?v=100 This explains why the drag'n'drop area isn't visible. But what could possibly trigger this? That still doesn't explain why uploaded files can't be deleted The client already has backend access to update content, so unfortunately he already uploaded several files in several pages... Anybody have a hint what went wrong when duplicating fields?
  24. I have cloned (duplicated) a few file input fields today, but found the following odd behaviour: - Drag'n'drop is no longer possible. - Trash icon doesn't display in Mac/Safari + Mac/Chrome. - I can't delete any uploaded files anymore. addtl. infos: Filetypes are usual stuff / allowed file-types (PDF mostly) etc. PW 2.3.2 dev Files are visible in the backend and in the DB. Tried on Mac Safari + Win Google Chrome (in the latter, the trash icon is fine) Due to a large number of input fields, we've resized the input field width to 50 or 25%, but changing them back to 100% didn't do anything.
  • Create New...