Jump to content

horst

PW-Moderators
  • Posts

    4,085
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hi, I have search results that I do not understand. It could be that a plus-sign is entered into the searchfield, for example: a+m Architekten When using $sanitizer->selectorValue the plus-sign is stripped, therefor I try using $sanitizer->text, but it doesn't match. The query looks like: $suchFelder = 'headline|beschreibung|stichworte|architekt.title|kategorien.title'; $q = $sanitizer->text($input->get->q); $input->whitelist('q', $q); $matches = $pages->find("{$suchFelder}%=$q, limit=50"); But it should match with architekt.title. Other queries, without a plus-sign, do find all pages/records: a-z Architekten ABB BRT Atelier Markgraph
  2. Hi Sanyaissues, slkwrm already gave you correct answer, but it looks to me that there is a little misunderstandig (not sure, but could be). I think slkwrm suggested that you have organized your csv-file something like that: Product one, /category/xxx/, /brands/zz1/, "This is the brand one" Product one, /category/xxx/, /brands/zz2/, "This is the brand two" Product two, /category/yyy/, /brands/zz3/, "This is the brand three" Product two, /category/yyy/, /brands/zz4/, "This is the brand four" Product three, /category/zzz/, /brands/zz5/, "This is the brand five" But seems it is bit different: Product one, /category/xxx/, /brands/zz1/, "This is the brand one", /brands/zz3/, "Description 3" Product two, /category/yyy/, /brands/zz2/, "This is the brand two", /brands/zz4/, "Description 4", /brands/zz5/, "Description 5" Product three, /category/nnn/, /brands/zz7/, "Custom description 7" You have to iterate over the lines of your csv file add a new page, add title and category and when coming to the brands you can add the first repeater-item as you showed above. If you have more than one (looks like it can differ), you should save the page! and after that iterate over the brands and foreach you have to add it and to save the page, (I think) $productPage->title = $title; $productPage->category = $categoryName; $repeater = $productPage->items->getNew(); $repeater->brand = $brandName; $repeater->description = $description; $productPage->save(); // check / get your brands foreach($myBrands as $brand) { $repeater = $productPage->items->getNew(); $repeater->brand = $brand['name']; $repeater->description = $brand['description']; $productPage->save(); } Don't know if this is an elegant way, but should work (haven't tested) . >> Please refer to the api: http://processwire.com/api/fieldtypes/repeaters/ look after "Using the API to add or remove repeater items"
  3. http://processwire.com/talk/topic/4371-resize-image-to-long-edge-value/
  4. have core tab too ------ Have found a very minor issue with responsiveness of the theme regarding the PW-logo: inner width = 768 - 1 row for Topmenu & Logo is visible inner width = 767 - 1 row for Topmenu & but Logo is hidden inner width = 485 - 2 rows for Topmenu & but Logo is hidden inner width = 479 - 2 rows for Topmenu & and Logo is visible again! Is this intended behave or should the Logo be constantly visible?
  5. @Ryan, ProcessWire 2.3.14 on Win7 with FF26 & IE10 are the same: No Core-Tab, but found "Autocomplete" in the Source: No JS-Messages in the Console. EDIT: oh, sorry, - it wasn't InputfieldAutocomplete, it was PageAutoComplete InputfieldAutocomplete not found in source
  6. Hi Stefan, about the Sanitizer & Pagename: have you simply added new lines with äöü? or did you change the default existing ones (that belong to a nordic language and translate ä = a, ö = o, ü = u)? the other one I'm not sure, but I always use pagefields like that: marke.title=Masita|Kempa
  7. tested with PW 2.3.14 Default-Install on Win7 FF26: doesn't work with all fields. it works with the title-, headline- and summary-field but doesn't with the body-field (TinyMCE)!
  8. @Ryan: if you need a list with the names of possible timezones: TimeZoneListen.zip
  9. Possible solution with the built in Multi-Language-Tools: You are able to create a structure like that: set nl as your default language, create one tree with your page structure: root (doesn't have content or a language but redirects to the first child, if no language is set in cookies, browser or else, to default language nl)overzicht page20 Page40 For all other languages (de, fr, en, etc.) you can fill and edit the content on the same pages in the backend with Multi-Language-Fields. You need to put a language switcher onto your page / into your menu and you are done.
  10. Hi PeterDK & welcome to the forums. When reading this, a question comes to my mind: Did you know ProcessWires built in Multi-Language-Support? Especially at first, how you can use Multi-Language-Urls and the Multi-Language-Fields? So, it may be you need to use the hirarchy like you have shown in your post, but I first want to ask if it could be a better solution to use the built in Multi-Language-Tools. If you need to go with your structure like shown above, you may use $session->redirect($url); in your home template. To redirect to nl/overzicht/ $session->redirect('/nl/overzicht/'); You can find these and many other at the CheatSheet. (You have to click 'advanced' at the top right to see more methods/properties) ------ EDIT: Generic url with redirect, like Kongondo has shown just a few seconds before my post, is a better solution! BTW: congrats to your 1.000 post Kongondo
  11. Curious, because they have only a total of 211 registered users in their community.
  12. On WNYC I have found an interesting podcast archive called "New Sounds" with very different 'none mainstream' music in it. I came across this when research on my own name , - they use a picture that I have shot: O Berimbau --- all podcasts, Rythms of Minimalism, Piano Grooves, The New Latin Tinge, Acoustic World Music, & more podcasts
  13. Tested and works superb (Win7 FF26) Only one thing is annoying with images-fields: when it is switched to grid-display for easier sorting in larger lists, it always opens the original image after dropping a thumbnail. But I don't want view the originals, I want to arrange the images. Any chance to avoid opening when in sorting- / grid- mode?
  14. Agree with Adrian, Manfred,Teppo, Martijn + really like:
  15. Ah, ok. You may also try to create a simple php script somewhere outside of pw with this content: <?php header("location: http://www.your-site.com/page-url-with-mail-script/"); or with this one: <?php file_get_contents("http://www.your-site.com/page-url-with-mail-script/"); and call that with your cronjob.
  16. Maybe you can configure your cronjob to fetch the url via wget like: wget --quiet --no-cache -O - http://www.your-site.com/page-url-with-mail-script/ > /dev/null This way you don't need to change any code, only your cronjob. (https://www.google.de/search?q=site:processwire.com/talk+ryan+wget+cron+null)
  17. Hi interrobang, I cannot really follow what you are try to do - or I cannot find the specs for that the option can be a template filename: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/modules/PageRender.module#L244 http://cheatsheet.processwire.com/ $page->render() also doesn't show anything, but it could be that there is missing newer stuff because ist seems to stick with the 2.3 stable. From where do you get that with the template filename?
  18. I actually have build a site that is hosted by Hetzner in Germany and they have the badest setup for shared server that I ever have seen. PHP is only running as fcgi, not as apache module and the MySQL Server is not reachable via localhost but is on a different machine / IP. (so every request to the DB needs to use DNS-System too. I have the same site running for development at http://all-inkl.com - There it is running much much times faster! So, the owner will change to all-inkl now.
  19. Your code seem not to make any sense. 1) Please can you explain to me what the variable $image in the first line should hold. (and what it actually holds) 2) and what do you want to do with a loop in the second line? (and where does $images come from?) You should go step by step. FIrst you should inspect the first line of code. If this does what you expect / want, go on with the next step. And really, you should _read_ the doc kongondo has you pointed to, once or twice more.
  20. @pwired: if you really cannot use the drag-drop upload in the backend, you may use your own ftp upload, separated from the /site/assets/files/ folders. Something like this: - myImageUpload - site - wire With your uploadfolder you have to create subdirectories with the id of the pages / folders where the images should belong to. After successfull ftp-uploaded some images you can manually run an importerscript that scanns your uploadfolder and import the images via api. Also this script should delete the images (and folders?) in the uploaddirectory after import into PW. This way you will not have any drawbacks or side effects with the DB-(meta)data or sanitizing of the imagefilenames etc.
  21. I must say I cannot really follow what you have setup, but If you have to do a redirect for a whole site / domain, I'm pretty sure you cannot do it _after_ all PW-instructions in the htaccess. Instead you need to put it at first and the PW-stuff after it. BTW: to say "This does not work" is less helpfull for people who want try to help. For example: a detailed description of what you get when requesting a URL that should redirected would be much better.
  22. As far as I have noticed with my projects there are no problems with that. I store the choosen language in session and at the beginning of a respond in (head.inc or _init.php or something that like) I do a language check. So this is called with all requests, regardless of GET, POST, AJAX or whatever. It is no difference. EDIT: And regardless if you store it with a session or not, the urls you call in your ajax request will point (or should point) to the urls of the actually choosen language variation: if en is default your url could be "/parentpage/subpage/" and if you have a language de it would/should be "/de/parentpage/subpage/". Only the homepage "/" is different, that's why I use session and language checking.
  23. have you tried to set it to the top of the htaccess file?
  24. Ok, I think you 1) need to build fields for all the properties a object can have, 2) build a template and add all the fields to it and 3) than you create a root-page in the pagetree for the parent that may contain children. The children will be one page for one object. Whereas the first three steps can be done manually, the import of the objects should be done by a importer script. If you also can use a CSV-file, you can find a module for the import: http://mods.pw/j If you cannot, it's also easy to write your own individual importer-script. Please ask if you need further assistance. It would be good if you have a unique property for each object with your import-data.
  25. If I understand right, you have created an export-xml from all (content-)objects of a local version of your site?, - now you want to import it with the live-site? Does this export-file comes from a PW-Site or something other?
×
×
  • Create New...