Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Ah yes, the next step in the puzzle. This is where you'll need to match the id of each row in the templates table to the appropriate "templates_id" field in the Pages table. No magic here, just careful manual matching. I wouldn't touch the Pages table at all though - be sure to change the id in the templates table.
  2. Yes - that's right in both cases! Let us know how you it goes.
  3. I can help out if you want, but I would have a go at it yourself first. The part that I could do really shouldn't take that long via PHPMyAdmin or some other MySQL GUI. The time consuming bit will be the template access/family settings which I wouldn't know how you would want configured anyway.
  4. Not planning on it - just trying determine whether the post actually belongs in the PW forums or not
  5. Do you still have the fieldgroups table? So long as you don't have any unusual settings where a template is using an alternate fieldgroup, you can probably build this back up again with relative ease. I would start with a templates table from another install and delete all the templates which aren't relevant to the problem site. Then use the fieldgroups table to get the names of the templates and the fieldgroups_id value for that column in the templates table. Once you have rebuilt all the rows in the templates table, I would manually add back the template access / family settings etc. Hope that makes sense and helps. Good luck!
  6. @Kelc12 - are you specifically wanting to use ProcessWire for the backend to this app?
  7. It's not a bug - when saving, output formatting has to be off. PS - you should get familiar with Tracy: bd($page->of()) is a lot easier than messing around with ob_start and var_dump
  8. Well, that's weird - here it returns true or false. Anyway, we are getting off track. Either turn on output formatting before $event->message, or simply add first() before url and you should be fine. Does that work or not?
  9. Do a little experiment and dump or bd($page->of()); before your $event->message and see what you get.
  10. This is the usual array of images problem - either add first()->url, or set the image field to only accept one image.
  11. No problem! Should I commit the version with $page->protected property then? I assume that is still something you need to get it working in your scenario?
  12. Perhaps I should add another variable ($ppid - protected page id) to the array that is passed to wireRenderFile. This would be the id of the page that is protected, whether that is the current page, or the parent which is protecting it. That way you could do a $pages->get($ppid)->body to get the appropriate text. Would that be useful? Attached version has this if you want to try it out. Does that idea also help with your multi-language content question? I don't think I am totally following what you need there. PageProtector.zip
  13. Hey @renobird - I have one site that is 5 levels deep and I think it would be great. How many levels are you thinking would be too many? What do you think the issue is with too many levels? Maybe I am just not seeing what the issue would be yet? Maybe long page titles (like journal article titles) would be a problem?
  14. Just my 2 cents, but I'd rather see just the one official admin theme that supports top and side menus. The key thing is that I'd like to have that official theme easily skinnable. I would love the options to color and style the theme with CSS while keeping all the html and php standard. The problem with some of the third party themes back in the early PW 2 days was that new features added to the default theme never made it to the third party themes. I'd also love to see the page tree in the sidebar and the other menu items (setup, modules, access) in the top menu. I am not certain, but I think now that the page tree is cached it won't be a performance issue to have it in the sidebar anymore?
  15. That's not the intention of this approach - the login template you select should be a dedicated template file (it shouldn't really even have a PW template associated with it). The only thing it should echo is the head, footer, etc and $loginForm - that is it! I believe if you follow that approach everything should work as expected and be secure with no need to redirect. Sorry if that's not clear. Sorry about that - silly mistake - I have now replaced it with the PageProtector version I was referencing.
  16. Absolutely! Datamaps supports chloropleth and bubbles. I often use the bubbles options for the markers at various locations. You can color and size them as needed and also add a tooltip with more info. You can even add click events to trigger display of further information on the page - perhaps a chart related to turtle info at the click site. The other great thing about datamaps is that because it outputs as SVG (via D3JS), you can manipulate the elements with css and js very easily. It really is a pleasure to work with. It also works great with AngularJS and I expect it will integrate nicely with VueJS as well (something I plan on trying soon). You can also use your own map data rather than relying on the built-in world / country maps. You just need to convert ESRI shape files to the topojson format, which is awesome for the web. As you can tell, I am a huge fan of the datamaps library Perhaps you should dive in and ask more detailed questions as they come up - probably time to start a new topic though.
  17. I haven't used this module, so not sure how to best integrate chloropleth into it, but I am sure someone who has will chime in. Datamaps works great with PW - no need for a module - just use the dataUrl option and point it to a PW bootstrapped php file which uses PW selectors to grab the required data (Profields Table field works great as a data source, but not necessary), populate an array, and the run json_encode on it. I would recommend starting with a manually populated json file first to make sure you have datamaps working properly, and then work on the dynamically generated file. It's not difficult, but might be a little tricky your first time. PS Of course if your data is in a non-PW database table, you can do direct SQL queries to build up the array/json
  18. http://leafletjs.com/examples/choropleth/ Another awesome option for chloropleth maps is: http://datamaps.github.io/
  19. Yeah, I was hoping to avoid that - I never like polluting all templates with settings type fields if I can avoid it, but maybe in this case it is the only option. I guess if it's set to hidden and system so it can't be manually deleted (but deletion is taken care of during module uninstall), and its checked status would be toggled when checking the "Protect this page" checkbox on the Settings tab, then it wouldn't be too invasive. The other catch of course is that protecting a parent that has thousands or more children could result in a very slow page save because it would need to update the status of all those children as well.
  20. @tpr - just had a quick play with a protected property and selectors. Runtime properties only work with in memory page arrays, so you would have to do: $allResults = $pages->find("template=basic-page"); $notProtectedResults = $allResults->find("protected=0"); I think you already figured this out Anyway, that example works with the attached version. What are your thoughts on the best approach here? PageProtector.zip
  21. Hey @tpr - thanks for the report. I'll take a look at the issue with protected() and trying to make the property available in find() selectors - not sure if this is possible or not. Regarding the child issue - it is working here if use the default login form and also if I choose a login template - that is both options seem to be working fine. Perhaps it's a Latte issue when using wireRenderFile like I am around line 304 ? I don't really understand this - users should see the same login form no matter what page they try to visit (because it renders the template you have chosen) - I don't see any reason to redirect - again, maybe a latte issue? Any chance you could try the module without latte just to see if everything works as expected? Maybe I am still not understanding though?
  22. I agree and think you have a great little module here that will likely become a default install for me.
  23. Oh, I wouldn't say that at all. Lots of the code in Migrator is very messy - I was just joking
×
×
  • Create New...