HerTha

Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

15 Good

About HerTha

  • Rank
    Jr. Member

Profile Information

  • Gender
    Male
  • Location
    Leipzig, Germany

Recent Profile Visitors

1,189 profile views
  1. Thanks @bernhard ! In my particular case, I have a few ocurences of __('en_string') which I would like to apper as translated 'de_string' in the output. I could modify the source(s) replacing strings statically, but that would be rather "quick and dirty". Hm, maybe I could substitute the __() function with my own version...
  2. I wonder, is there some simple mechanism for translating a __('string') for a single language site? I'd prefer to keep Multi Language Support disabled for now.
  3. @justb3a thanks for providing this module! Before starting to use it to collect new subscribers, I had to import a list of existing newsletter subscribers from our old system. The list is just a text file with one email address per line. The amazing BCE didn't help in this case because PW users - while still pages - are somewhat special. I came up with a little script which can be invoked from a browser window: <?php namespace ProcessWire; include("../index.php"); // bootstrap PW /* * import newsletter subscribers * from a file 'subscribers.txt' */ $file = fopen("subscribers.txt", "r"); $i = 0; while(!feof($file)) { $line = fgets($file); if($line == '') { continue; } $email = $sanitizer->email($line); if($email == '') { echo 'misformed email rejected: ' . $line . '<br>'; continue; } $name = 'zzz-import-' . sprintf('%05d', $i); $u = new User(); $u->of(false); $u->name = $name; $u->email = $email; $u->addRole('newsletter'); $u->save(); $log->save('newsletter', "User {$u->name} has been successfully subscribed with email {$u->email}"); $i++; } fclose($file); echo "<br>{$i} subscribers imported.<br>"; I am not sure if a lot of other poeple need something like that as well - if so, maybe adding an "import" feature for the NewsletterSubscription module would make sense. Thanks for considering and greetings from the neighborhood!
  4. Hey fellow forum members: everyone in the Atlanta region go help Ryan shoveling snow! Everyone else - visit The Store and buy a Pro moule for the disaster relief fund!
  5. Thanks, Mike! Not sure what's the overall statistics (all users/installs), but for me it's still 100% 2.8.x (never touch a running system )
  6. Hi Mike, appreciate your work, even with tight time budget, thank you so much! I'd like to leave a comment on your suggestion to focus module development on PW V3 for future releases. As long as new PW versions are being released in the 2.8 branch, module support for this branch would be desireable, IMHO. Thanks for considering!
  7. First of all: Thank you for providing this awesome module! It seems to be a whole toolbox - the horn of plenty for page editors, so to say! Just installed BCE 1.4.4 on PW 2.8.35 on a test site. All looked great and shiny, but then I ran into a problem: I prepared a page with local BCE settings for updating it's 4000+ children. I have defined field pairings just with title and another text field to keep things simple in the beginning. A single line of CSV like Helium,He serves as the input. Thouugh, when I hit Save to start the update I am constantly getting: Warning: Creating default object from empty value in /home/.../public_html/site/modules/BatchChildEditor/BatchChildEditor.module on line 1321 Fatal error: Call to undefined method stdClass::isChanged() in /home/.../public_html/site/modules/BatchChildEditor/BatchChildEditor.module on line 1322 Any ideas what could be wrong?
  8. @adrian thanks for pointing me to this module! Good to know. I'll grab it and see how that goes...
  9. I am using ImportPagesCSV to import and update images for some product pages. Each CSV line contains the title field of a page and the URL of an image to add to this page. While this basically works just fine, I need to change the behaviour in some aspects: prevent the module from creating any new pages (only add images to existing pages) any existing images with identical name should be overwritten (replaced) the image just added should become the first image (index 0) in the image field For 2) I tried setting the "Overwrite existing files" option in the image field settings, but that did not help. Anyone to give me a hand, please? My programming skills seem too limited to identify the right places in the module's code, I'm afraid...
  10. Same here (at least for text/html)... This is reported to be the birthday of Sascha Schumann: http://stackoverflow.com/questions/8194481/why-is-expires-1981
  11. Well, I realized that another approach (using PageTable) was actually more suitable for my specific needs, so I did not dig any deeper into the above issue. I believe it has been brought up somewhere in the ProFields support area, though.
  12. Fellows, I need your advise: I am going to use a page field to select (one or more) related products. Everything's nice with just a few products to select from. With a large number of products (say 5000) I am running into trouble, though. When using a PageListSelectMultiple input field the user needs to browse through all ~100 columns of pages to find the desired entry. When using an AsmSelect input field it is possible to type in the beginning of the desired entry, so it's fairly quick to navigate to the right entry. However, every page (in admin) with such AsmSelect loads with quite some delay because all 5000 page field references have to be collected first. It actually prevents a fluent workflow. So, I wonder what's best practice to select from a page field with many entries, provided you know the name (or at least part of it) of the desired entry? I don't want to spread the product pages into subfolders at the moment because this would affect a lot of other functions of the site as well. I could imagine some text field where you can type in the beginning of the entry name. When hitting return a (reduced) page tree comes up with matching results. And if entering the complete entry name, the page would be added to the list of selected pages instantly, without displaying the page tree first. Does some method like this exist already? Other suggestions, anybody? tia! HerTha
  13. Hi all, I am trying to copy some existing data stored in a repeater field "itemlist" to a ProFields table "itemtable" using this PHP snippet: <?php include("./index.php"); // bootstrap PW $page_name = "apage.html"; $p = wire("pages")->get("name=$page_name"); $p->of(false); if($p) { foreach($p->itemlist as $item) { $item->of(false); if($item->il_code != '') { echo "<p>Element " . $item->il_code . " : " . $item->il_desc . " belongs to page " . $page_name . "</p>"; $new_row = $p->itemtable->makeBlankItem(); $new_row->code = $item->il_code; $new_row->desc = $item->il_desc; $new_row->avail = $item->il_avail; $p->itemtable->add($new_row); } } $p->save(); } Basically that works well - problem is that all HTML tags get removed when storing the text fields in the table. I have checked to make sure that no textformatters are specified in columns settings of that table. Are there any additional sanitizers etc. I need to take care of when dealing with such table fields? TIA, HerTha
  14. @Ryan et al: Can't help writing a line to say thank you for this amazing project and forum and community! I've been lurking around here for a few weeks already, attempting to set up a project to migrate an existing static web site. I quickly figured out that PW was the way for me to go, because of it's technical features and concepts. What surprised me, though, was the fact that I was able to get answers on nearly every question that arised during that process "in an instant" - thanks to the excellent resources of this community and forum contributors devotedly offering a helping hand. That's simply impressive - I hope to continue to maintain a steep learning curve to be able to return a little bit of that at some time...