Jump to content

asbjorn

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by asbjorn

  1. A major update to the translations today, in terms of adding my "site" related translations (for pro and free modules). Minor changes to the existing "wire" translations. I have also installed 3.0.13 devns, so that is the official supported version of this language pack. Changes made to the first post to reflect the current status.
  2. I've been trying to wrap my head around multilanguage, which was discussed in this thread previously. But I have no luck importing (the English one in this example) into my template(s). NOTE: The domain is just an example, the real domain is different. I have two languages: Norwegian: http://domain.no/service-pages/?template=subject English: http://domain.no/en/service-pages/?template=subject When I paste these links into the browser, I get the JSON in the correct language as I hope for from each of them. But when I try to import it somewhere (even on domain.no itself), I can only get the Norwegian one to work. The code (with /en/) that wont work is this, simply remove /en/ and it works. <?php // Get JSON string $json_output = file_get_contents("http://domain.no/en/service-pages/?template=subject"); // Convert JSON string to Array $someArray = json_decode($json_output, true); echo "<pre>"; print_r($someArray); echo "</pre>"; ?> Any suggestions?
  3. I tried this code, and it worked great in a template of mine. But when I tried to use it in a hanna code, I got the an error like "cannot redeclare function". This might be rudimentary php, but I am at a loss. Any ideas on this?
  4. Here's my Norwegian language pack for ProcessWire. I've been adding translations gradually since 2015. By November 2020 the translations are completed, and up to date with the latest dev version of ProcessWire. For details, go to the ProcessWire Modules page … https://modules.processwire.com/modules/norwegian/ … and/or GitHub – please "star" the repo ⭐️ https://github.com/snobjorn/processwire-norwegian-language-pack-nb-no Status: Completed / up to date. Third party and PRO module translations have moved to another repository (see the complete list at GitHub? https://github.com/snobjorn/processwire-modules-norwegian-language-pack-nb-no
  5. Two people for the most part on the largest images which cause 100 % peaks. And that's only a couple of times a day. Workflow has been my main concern here. As a part of teaching others to post news articles and such, I have told them that original image files should be used. Very few people remember what they're told about image resolution, I have tried for years. I think the client side resize module is my best chance at still having a workable workflow. So I will try that. Thanks for all the suggestions and information about the technical side of this as well.
  6. Thanks! I had a look at my host's documentation, and it turns out they are running mod_security. With that turned off, Hanna Code is working properly with php codes back end again. I've been using PhpMyAdmin to create/edit Hanna Codes the last few weeks. Works fine, but I do not like messing around in there. So your solution, Robin S, was very welcome!
  7. I have a page on a shared hosting service, with a I/O max usage of 3072.0 KB/s . This is usually more than ok, but when I upload large images and resize them (to thumbnail and front end), the I/O usage skyrockets and often hits the limit. I am no server pro, and have asked my hosting company if this is a problem, and gotten an vague answer. So I am jumping ahead a few steps and asking here how people handle large images in ProcessWire? We are talking about images up to 10–15 MB, sizes up to 5184x3456 or more. I like to keep the original in case of future resizing. Maybe I'm overkilling it anyway, and maybe it's uneccessary. But still I wonder how other ProcessWire-users handles I/O usage and images.
  8. Status: I have found that my described issue is related to my current host. I set up a test on my old host and it gave me full access to edit/create PHP with Hanna Code again. I have not pinpointed exactly what requirements I need on my current host.
  9. That might be! I checked on a local installation as well, no problems there. Probably some permissions being mixed up on copy to a live site, which most of my pages have been that I have tested on. Any idea what specific folder or file I could check for this? I've been looking here and there now, without luck.
  10. Anyone else got this problem? I tried on multiple installations of ProcessWire. Always when trying to create (or save an existing) Hanna Code in PHP, I'm throw and error. I.e. this one: Forbidden You don't have permission to access /processdisplay/processwire/setup/hanna-code/edit/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
  11. I have some trouble with an "unstable" Hanna Code at my 2.6.1 site. Whenever I edited a php code, I was redirect to a 404 front end error. So I installed Hanna Code afresh. But also when I am trying to add a new php code, I get the error. Creating a html code works. Any ideas? (I tried with debug mode on, but got no notifications.)
  12. Anyone tried this with the dev branch of PW 3.0.x? I got to the second part, where connecting "columns" with fields. And it could not find the fields. Maybe I'm missing something, maybe it's not compatible?
  13. Thanks kixe. My solution: I checked with a couple of your lines of code. There was no change of super user ID in my config file. I would have had to manipulate my database, I guess. But I ended up spending a little extra time to setup a new installation (copying files, export/import templates and field, and modules). This was all for my own "base installation", and I would rather not come across errors related to this (or how I 'fixed' it) in the future. But knowing there's an answer is always a great part of the ProcessWire learning process for me.
  14. I had one. I can easily make more. None of them have id 41 or get when I create new users. The reason I'm asking is because of an notice I get: Notice: Trying to get property of non-object in /Users/ness/framework.pw/wire/core/Page.php on line 1211 I thought it was an v3 error, but when I reported it I was told it was because of no superuser with id 41.
  15. I seem to have a problem because my superuser does not have 41 as ID (but 1074). I have no idea how this happened, but I have been moving this installation around during development. Anyway, is there a way to change this back?
  16. When I migrated my WordPress blog to ProcessWire a while ago, I ended up doing it by exporting WordPress to CSV and importing it to ProcessWire with the "Import Pages from CSV files" module. It was a bit of manual work. But I wanted full control and did it in parts. Multiple steps. I wanted to split my tags into new page types, such as directors, ratings and tags. And I split my categories into genres and media type (film, tv). Because I wanted more options, and as you see, it was a movie blog. Because I had around 2700 posts at the time, I did it all locally (MAMP). But first I did a lot of search and replace in the CSV (using Google Spreadsheet). Split content into columns (that became field types). And replaced e.g. my genres with the ID of newly manual created genre pages. Director pages was created automatically during CSV import based on director names. I also imported the images from a local folder using the ProcessWire API and some coding in a template file. Which was what I did last. This is not a step by step guide for how to do it. But I did it after having used ProcessWire for only a few months. So if you got time, get to know ProcessWire a little first, and see the possibilites.
  17. I recently noticed a strange problem in my body field. I have a multilanguage setup with Norwegian and English. And I am using Ckeditor. The strange problem was that the (inline) toolbar wouldn't show on Norwegian, neither would text input in Norwegian be saved. English worked fine though. I tried this and that. And at last I found that using custom editor JS styles set was the error. Simply removing the path to my file made this work again. During all this I logged on and off a couple of times when testing. But since I hadn't edited the JS for a long time, I wanted to know what was the specific problem. So I removed some and all of the content in the JS (which I had named ckeditor.js by the way). And I logged on and off during each time. But nothing would work. One last shot was to rename my custom JS file named ckeditor.js to something like mystyles.js. And it worked again, with all the same content as before. I have no idea why this "suddenly" went wrong, and why a rename seemed to fix it. I might have something to do with modules, a migration of the site (I cleared the sessions folder though). ProCache? Updating to 2.7.1 (from 2.6.x) didn't fix the problem. So I am at a loss as of why. But I am sharing this in case anyone else have been experiencing something similar. And because I couldn't find any answers on the issue.
  18. Did you ever managed to get this working? I have been trying with config.templates_files and config.templates without luck. Both in /site/modules/CKEditor and /site/templates, different ways each place. The only thing I've got working is if I replace the code in /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.4.6/plugins/templates/templates/default.js And as mentioned all over, never code or place anything in wire. So no luck here as well.
  19. (I am unsure of where to put this question, it might be both module and template related.) I was looking at the module PageRenderIPRestriction and started wondering. Would it be possible to do something similar, but give a guest a user role based on IP (v6 preferrably)? Not for security measures, but for presentation. I'm working on a mixed webpage with both intranet features and normal web page stuff. There's some parts of my templates I was thinking of restricting to a specific (or multiple) user role(s), namely employees. Example: If visitor's IP range is A-B, then he's an employee and should be able to view some extra buttons in a news article. If visitor's IP range is else, no buttons are visibile.
  20. I edited my post. I was able to show my sitemap when I reduced links to around 2400. That is the number of pages I have if I exclude my tags (actors and directors). The the sitemap is now working. But it stops working if I allow all my pages again.
  21. On my new site a couple of months ago, I setup Ryan's sitemap from this thread. It worked fine. After that I have added a whopping 18 000 pages (tags, etc.), and my sitemap is no longer working. I have no idea if there's a connection. But could there be a limit? My code is still exactly like Ryan's, no customisation. URL is http://filmdagbok.no/sitemap.xml Chrome shows nothing, Firefox shows an error. Extra info: No trailing slash. No cache (although I should probably setup this for this template?). Edit: I figured out that if I exclude the parent for my different tag types, the XML worked. But still, I wonder if there's a limit on how many pages the sitemap can hold? And how one would solve the problem.
  22. Thanks, that last one seems like something I could use. I'll try it another day and will mark it as solved then.
  23. Thanks, that part is clear, but I would like to have headings for each group, and have the results in each group wrapped in UL-tags. I have updated my post to reflect this with bold headers and bullet points.
  24. I have a question on how to group search results by template, with pages sorted alphabetical (as standard) in each group. I have a film blog running ProcessWire. It has lots of posts, ratings, categories, ratings, directors, actors and tags, my search result is getting crowded by all this pages after a while. These pages have different templates. Until now I have had badges with the template label by their title in the search result. I am wondering if there's a simple way of coding it to group the search result, kind of like how IMDb does it: Titles are grouped first, then names second. Like this. To illustrate, here's a part of my structure, template name in brackets: --- Main (home) Blog (posts) Movie 1 (post) Movie 2 Actor (actors) Actor 1 (actor) Actor 2 Director (directors) Director 1 (director) Director 2 Tag (tags) Tag 1 (tag) Tag 2 --- And here's how I would want my search result to show, e.g. if all these pages where to mention Tom Hanks somehow: --- Movies: Movie 1 Movie 2 Directors: Director 1 Director 2 Tags: Tag 1 Tag 2 Actors: Actor 1 Actor 2 --- I am in a learning process, and I am sure there are other problems that will appear when considering usability. Limits within groups, etc. But for now this is a way of sorting that I might also want to use elsewhere later on. Whereas I have headings and results in separate lists. (PS: I have read a couple of posts on group sorting based on parent ID, but none of them was exactly what I was looking for.)
×
×
  • Create New...