Jump to content

LostKobrakai

PW-Moderators
  • Posts

    4,956
  • Joined

  • Last visited

  • Days Won

    100

Everything posted by LostKobrakai

  1. Looks like this is really a configuration issue with the server as the .htaccess is only needed for subpages, but the homepage should work without it. You don't need to change anything in the database as the whole cms uses relative urls. For further debugging, please have a look at the apache logs or maybe the processwire logs(site/assets/logs/).
  2. You've essentially two options. Either use a dedicated page to generate a json or csv output, which you can call from your javascript. Or you can just output the data as json directly to the page you're using the Store Locator on, like this: echo "<script type='text/javascript'>var storelocator_data=".json_encode($yourData).";</script>"
  3. One can do this, but it requires some manual setup and maintenance. As long as there's not a major reason to go that way it's just easier to go with independent installations.
  4. ProcessWire won't work without a .htaccess, so renaming it back to .txt won't solve anything. What rewrite base do you use on the subfolder? Normally it should be like this: # Subfolder RewriteBase /v2/ # Root RewriteBase / # or even no RewriteBase
  5. For a rather small community (at least compared to the big cms players) it's best to keep things in english, so everyone can give input as well as benefit from answers given.
  6. While you can do this it's not recommended, as some parts of ProcessWire depend on this name, e.g. some rewrite rules in the .htaccess. Also I don't see why you would rename your /site folder to your website's name, as really the whole folder, which holds /site, /wire, index.php and .htaccess, is your website. If someone is likely to delete a "site" folder, than it's also likely that this person could delete the "wire" folder, both are not desirable results.
  7. A nice addition for the external config would be if one could choose the inputfield, which you're including automatically for the getDefault() values.
  8. Languages are defined in a per installation basis (name and label are free to choose), therefore you cannot set your module automatically to the users language. The only fixed language is the default one, which could also be translated to something other than english. The only option you have is providing the translation .json files, so the users can install them by themselves (or automating this step with asking for the languages in which certain translations should be put). Also please look in the forums before asking, there where certainly other threads about handling module translations before.
  9. $puffColor = $article->$puff_color->title; // Needs to be $puffColor = $article->puff_color->title;
  10. Git is a version control system and not a backup system. It's meant to handle source code and not user content. There are dozens of better ways to backup a whole site.
  11. Your selector is wrong "name=$name" would be parsed to "name=directly-off-root.html", but your page's name is still only "directly-off-root" without the html. As you're not using not html'ed names I would suggest just adding it to the name of the pages directly. Your hook to Page::path just changes to url on runtime, but does not modify the "name" field your selector checks for. To keep your code clean it's also best to not couple two different things, appending ".html" and masking out a parent page, into a single hook. Then you'll see that Page::path isn't the right place to handle your first issue.
  12. http://cheatsheet.processwire.com/pagearray-wirearray/sorting-and-filtering/a-sort-property/
  13. Make a second module, which is autoload, let it install by the fieldtype module. Add the hook to Page::render and check the current page for a map field. If so, call the module which generates your markup and inject it. The markup generation only needs to be able to run independent of other functions, but rather just from the field context the page object provides to the autoload module.
  14. Ok, in this case as you're module is already running when you attach the hook it should be working without making it autoload. In this case I also don't see, why the hook won't work.
  15. There isn't one in the admin interface and I think it's because it seems to be a rare case that a simple fixed number will be used as default. As soon as it needs to be more dynamic a hook or module is most likely the more flexible answer.
  16. To be able to hook a function if it's called your module must be present, therefore it needs to be autoloaded. The hooked module does't. Just to be sure, did you add the necessary "___" before the hooked function? Without those the function is not hookable. Also is it intended, that your function exit()s before anything gets done?
  17. There are basically two ways of making a page accessible under a different url. Either you use urlSegements and a dedicated template, which then renders the page instead of own content. // render another page in a tamplate $pages->get("/services/some-service")->render(); The other option is hooking Page::path to modify the path on the fly. You can see an example here: https://gist.github.com/LostKobrakai/9c02484a9710e16bc512 Also this isn't a new issue, see here: https://processwire.com/talk/topic/9692-hidemask-a-parent-page-from-front-end/
  18. Sorry to say that, but I don't think there will be much support for this version of processwire. This dev version is already half a year old, so please do try to first upgrade your installation. Most likely it's already fixed.
  19. Edit: Should have read completely before posting, but I can say, that probably your hook is wrong. CKEditor is using a iframe for it's content, so there shouldn't be a inputfield present.
  20. I think it's not intended, that I can already choose 2.5.28 as required version. Edit: And there are some issues with quotes in the module's info.json
  21. Yeah, the example should probably be adjusted to not lure people to think it's needed for process pages.
  22. @Soma The headline talks specifically about "non-process" modules. The page config option is already used for Process modules. But sometimes a module needs a page e. g. for storing some files and for such things you still need to generate the page manually.
  23. Sorry for the unelaborated answer, but have a look here at the $user / $roles and $permission parts: http://cheatsheet.processwire.com/ Edit: Do activate advanced mode to see all methods/properties.
  24. Welcome to the forums, mattcohen. I'll keep it as short as diogo, but I hope it helps. I don't really see, why you're worried about the search results. WP_Query is kinda link ProcessWire's $pages->find() and the the looping is done by a foreach loop instead of has_posts()/the_post() combo. It's really not that different, but ProcessWire does not rely on any post specific functions to call in content. You've the whole power php gives you to sort / show / manipulate your search results. Also the combination of the selectors, which are used for $pages->find(), and custom templates is really powerful.
  25. Then we'll need some more information. Is this a image saved on the same page as the textarea you're editing is on? Which ProcessWire version are you using? Do you have any image related modules installed? Can you give a slightly more detailed explanation how you're getting to that error?
×
×
  • Create New...