Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by swampmusic

  1. Having a problem with PageFileSecure. Everything was working before, but now it seems to be broken. We have a specific template that creates a protected page with multiple image & document fields. On creation these pages successfully appear with "-" prefix under assets/files. Registered & Logged In users used to be able to view the pages and download content on them. Now only the superuser can. I checked the permission and roles, and all these registered users still have the "login-register" role assigned to them. I checked the permissions on the "login-register" role and they still have the page-view permissions assigned for the locked page template together with home ( required by default). It's baffling. the .htaccess has not been touched or modified. I am running under 3.0.98 but tried on latest and seeing same issue. I am a bit lost with this one as to why only superuser account can do download and not the logged in as well :-( Anybody and ideas ?
  2. Hi there, Did you try the other module ..... FieldtypeMapMarker instead of the markupgooglemaps module ?
  3. I am struggling to get comments using the Admin Core comments field. Have set it up before no problems but this time around I seem to have something conflicting with it. The line is it throwing up on seems to be related to a null value in $value['code'] And that seems to relate to around lines 544 of the module if($schemaVersion > 2) { $schema['code'] = $codeSchema; $schema['keys']['code'] = $codeIndexSchema; } When i look inside the field_comments table in the db, both the code & subcode fields are empty. Anybody know what should be in them and how I seem to have ended without them populating ? Thx!
  4. With this solution it takes out all the ticked pages for a specific language from the front end public view and also seo ,which is good. But, the translators cannot check if their work is ok without enabling the page ( which makes it public again ), then disabling it again. A bit messy as public or robots may view badly translated page, or translators may forget to disable a page again. Especially as some languages can screw up the layouts due to string lengths. Are you familiar with the MaintenanceMode module ? This allows the site to be disabled, but certain user roles to edit pages and view them. I was hoping to find a similar feature where certain user roles ( translators ) can still edit and view the pages they are translating, without them appearing in the public facing site. Thanks for your speedy response though ?
  5. Trying to figure out work flow for translators on a new website and have hit a brick wall. Site was launched in Spanish, now the translators want to add in other languages. I presumed that when you tick the "active" language checkbox on settings for the home page, then the new language would not appear on the public facing website, but translators would be able to work with the pages in the admin and view their work. Finally, once all translation had been completed, we could activate the language from the home page. I have searched thru the forums and found older articles from 2015 here. https://processwire.com/talk/topic/11100-disable-a-language-on-a-multilanguage-site/ https://processwire.com/talk/topic/10467-allow-translators-to-work-on-hidden-language/ This seems a really messy hack, or did i miss something ? Does anyone know if there has been an update within Processwire since 2015 to make this better/easier, or other articles explaining how to achieve it ? We were looking for a solution that the client can use from within Admin. Not via .htaccess or similar that would require tech skills. Many thanks for reading ?
  6. We have a customer using Sendy for about 6 months now, no problems, about 100k+ newsletters sent. Agree with @Sergio, keep an eye on SES dashboard as it's feedback is not visible in Sendy. We integrated it with Processwire, in as much as we built simple pages(form) where end user adds images and text for a newsletter. This then gets sent to Sendy as HTML Email and a Campaign all ready to go. The concept was to simplify and shield user from complexities of making HTML EMails. We used the Zurb Foundation as the base templates for the HTML EMail code. With Processwire we then merge template and end user form input and send to Sendy via it's API. The calculator on the Sendy.co web site is correct. The AWS SES cost to date for the 100k+ mails is about $USD 10. The clients savings from previous provider for same qty of mailings is approx. $USD 1,000. For a small business this really is significant. Actually, to any business. However, companies like Mailchimp and others are providing a good service, pre built templates, email designs, wizards, security etc... which you are going to have to do yourself to some extent if you go the Sendy route.
  7. Hi Folks, Encountered strange problem re: PageReference + MapMarker. The PageReference is being used for creating "tags" ala @renobird from this comment here: ( thx renobird! ) I then have a template with the PageReference on it, then below that a simple and standard MapMarker. If i set the Page Reference to "Allow New Pages Created", it's great, new tags can be added in. But when you then tab into the MapMarker and set the location all appears fine until you either Save Page or Publish. At that point, the page is saved, the new tags are added correctly, but No Location is saved in the Map Marker. If I set the Page Reference to NOT "Allow New Pages Created", the MapMarker location is saved perfectly well. So does anyone know if something weird happens in the "Save", that successfully adds in the new tags, but looses what was put into the MapMarker location ? Thx!
  8. Really nice work on the Map InputFields folks! I need to do something similar next week for a travel company. They want to plot a route on a map and I have been wondering about the best way to go about this. My thoughts so far would be to tie a repeater control to a map, let the user use the marker to plot the route, then add the coordinates into a repeater control. This approach using jQuery opens up all kinds of issues in terms of managing the UX design for removing steps in the route, adding individual steps into the repeater, synchronizing the plotted route with the repeater control entries from the marker etc.... Wondered if any one else has run into similar UX request and found a better way around it.
  9. Wow! So cool @kongondo. Only just seen this, I am buried deep in vuejs these last weeks. Will definitely have a look when I am back into Processwire again.
  10. @abdus @kongondo Thanks very much guys. I have used a variation of the above ideas with a json file. Seems to be working a treat, much appreciated Really appreciated your help.
  11. Having a problem with a basic multi-site instance. The multi-sites are dynamically created and run as sub-domains and all is ok with them. They are created during a sign up process by end users. During the sign up process - once the new site & db has been created, I had planned to load the new site instance and add a new user to it, using code similar to this.. $newSiteInstance = new ProcessWire($path, $newSiteUrl); $u = $newSiteInstance->users->add($sitename); $u->pass = $pass; $u->email = $email; $u->addRole('content-viewer'); $x = $newSiteInstance->users->save($u); This won't work in the registration script. It throws an error ... "SQLSTATE[42S02]: Base table or view not found". However, if I halt the script, load the new site incognito/other browser, then continue the script, all works perfectly. So $newSiteInstance = new ProcessWire($path, $newSiteUrl); doesn't seem to work for me unless a site has already been loaded in a browser or instantiated somehow. I am missing something here ? Does a site need to be bootstrapped before new instance will work on it ? Sorry, pretty new to this php/PW arena. Having fun though Any ideas folks ?
  12. @abdus, it has to be done from php file dynamically during the registration process. I think PW is monitoring the index.config.php file. Once new domain has been added into it, it then seems to work ok for a customer to log onto their new site and not get the error in admin that you get when a multi-site site is not in the index.config.php @kongondo, thx re: ideas on code. Normally in PW we have been left with hooks and API's to deal with things when we need to dig a bit deeper. I just can't find anything for the index.config.php file. Seems a bit odd if I need to hack it like this, otherwise creating multi-sites must always be a manual process.
  13. Hi Folks, We have a multi-site #1, multiple sites, multiple databases platform in development/concept at the moment. A company can sign up, register, and PW then creates a db, copies over a site folder with /wire symlink. All seems to work well, after sign up they can then enter into their subdomain site. ( Because of this dirty hack below that inserts the new subdomain into PW's hostSiteConfig array. Without this, the subdomain is not correctly registered as a PW site & instance I think). Does anyone know how to dynamically add an entry into the index.config.php file ? Knowing the little I have learnt so far about PW, Ryan has probably left us a really smart way to do it, but I haven't figured it out or found it yet. I have done a dirty hack on it, which I'm not very happy or proud off. Anybody know of a better way around the problem ? ... below is more or else the code I am using in the pilot version. // some error traps taken out for brevity on the booleans below... $hostsArray = ProcessWireHostSiteConfig(); // $sitename normally populated from the customers signup/registration // hard coded here for this example... $sitename ='somesubdomain'; $a = $sitename . '.' . 'localhost:8020'; // machine name, port & protocol normally comes from $config, hard coded for example. $b = 'site-' . $sitename . '/site'; $newSite = array($a => $b); $hostsArray = array_merge($hostsArray, $newSite); // very dirty hack starting.... // creating a string copy of the array used in // index.config.php $newString=''; foreach($hostsArray as $key => $value) { $newString .= "'" . $key . "' => '" . $value . "', "; } $newString = "return array(" . $newString . ');}'; // dirty hack getting worse :-( $newConfigIndex = file_get_contents($config->paths->root . 'index.config.php'); $startpos = strpos($newConfigIndex, 'return array('); // quality coders starting to feel sick at this point i suspect... sorry! ;-( $newConfigIndex = substr_replace($newConfigIndex, $newString, $startpos); $boolConfigIndex = file_put_contents($config->paths->root . 'index.config.php', $newConfigIndex); // crikey! did he really just do that !!!!!!
  14. Thanks mr-fan. I've seen these all before, they didn't quite do it for me, but I shall take another look tonight. I may have missed something.
  15. Beware… Newbie Question! Have checked forums first but couldn’t find exact answer. I have a use case where Customer loves to store images in folder structure. If I adapt this in PW, it can be pretty cool as I can add a lot of rich detail onto each Page in the folders that store images. For example.. —Country — Zambia — Zimbabwe On each country page exists Imagefield, plus a few text fields for copyright, tags and mapMarker for geolocation data. When a user drops a batch of 20 or so images onto the country page, they can add “global“ tags, location, copyright data for these images in one go. If they need fine grained data on a per image basis, then I am looking at a cool little module for extending Imagefield….. https://github.com/justb3a/processwire-imageextra So part one is looking good Part two of the eternal problem is how to get images copied off of one page onto another page in the CMS. Preferably as a copied image, not a linked image because the file tree described above holds the master image repository for the website, plus also future web sites or use cases as well. So I imagine an extension of the image field where I replace the File Upload button with another dialogue allowing me to cherry pick images out of the folder structure in Part 1. Is this possible ? Looking at the code around lines 1586, 1544 for function TraverseFiles(files) in InputfieldImage.js would it be possible to send in an alternate file collection cherry picked via a dialogue & jquery from the pages in the image repository tree into this function ? Then I can take full advantage of all the existing neat code in here ? It would be so crazy to try and re-invent the wheel as existing code looks so rock solid and cool. Many thanks for reading!
  16. Android version wants access to your contacts + location Do like the idea though https://play.google.com/store/apps/details?id=com.jasonette.jason
  17. Hi @bee8bit. Did you find a solution or work around for this ? I have a similar issue. "Days, Location, Description" in a Repeater. Where Location was going to be a inputFieldMapMarker. But, obviously not working. Did you figure a work around based on event listener or something ? Regards,
  18. No sorry, I had to do a dirty workaround that meant looping thru records. Nothing elegant and it's a concern for me moving forward if I have very large datasets. I got into a real mess with urlSegments and then having to build the Url for both the languageSwitcher and also the Breadcrumbs in a _main.php. Honestly, Processwire is a really smart piece of code ( i'm very new to it ), but in all my experience coding, when things go this wrong, it's normally because I am not doing something correctly, or I have badly thought it through. I will return to it in a little while as I need to make head way on other parts of the site. If I find something that works better, then for sure, I'll let post it here. Good luck!
  19. Thanks, went with (2), worked great.
  20. Thx for response It's strange, the "name" field seems to be treated differently. For example, where english is the default language, when switching to french the following works ok :- $hotel->title ..... is in french $hotel->description ..... is in french But, $hotel->name remains always in english unless you specifically define localName method - which I can't figure out how to do in a selector. Therefore, I am not so sure about selectors working on "name" field when you need to test it in anything other that the default language. I guess that's what I need to know, if they can do it, otherwise I have a problem. Looping thru a possibly very large dataset doesn't sound good.
  21. Is it possible to use localName($user->language) in a selector, something along the idea below, but I can't get it working ? $pages->find("template=hotel, localName($user->language)=$input->urlSegment2"); The problem I have is a urlSegment2 in any of 3 languages, so I need to be able to find the page in different language "names/urls". I dont like the idea of looping thru all the hotels looking for $hotel->localName($user->language) = urlSegment2; But I can't seem to figure out how to make a Selector work based on current language rather than the default. Thx,
  22. Mod Note: Topic locked. Please see this post instead, thanks. Hi, Anybody know if it is possible to autopopulate a leaflet "address" from another field on a template ? I have a country template, user enters a country name, then unfortunately needs to enter country name again to get the map. Would be much better if it auto populated.
  23. Does anyone know how you can populate the address field from another field on the template ? Eg; the title field is holding a country name, therefore would be nice if user does not need to type in country again, map just populates automagically. Thx,
  24. Not directly, but it pointed me in the right direction. I had some confusing errors - my mistake - on choosing wrong type of select box/drop down on field. Couldn't figure out why the filtering wouldn't work. Eventually went to database and saw dupe records, so then checked and changed Drop downs from multi to single. Only been working on ProcessWire for a week, so very new to it. One thing, when I went to the DB to see what was being saved, I couldn't believe how lean the data model is. Ryan or whoever has really done a brilliant job here. It will be interesting to see how my coming months go as I will be 100% on Processwire, looking forward to the ride
  25. I solved it in the end using this code in the fields Custom PHP Box .... return $pages->find("template=hotel, countriesbydestination=$page->title"); where the $page->title of the country page holds the country name, and the countriesbydestination is on the hotel page and holds the hotels country It seems to work ok. Thanks for your comment, it made me look onto the $page for the fix
  • Create New...