Jump to content

diogo

Moderators
  • Posts

    4,315
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. Hi @Soma sorry for the late answer. The version is 006, but I don't think multisite is the problem. Just installed a new multisite locally and I don't get the same problem. I'll dig a bit more and see what really happening.
  2. I'm having a problem with bootstraping PW in a install with multisite active, as anyone tried that before? As soon as I include the index, I get redirected to another page and the script doesn't run. I also tested accessing it through a subdomain that is not configured in the module, but the result is the same. Is there a way to bypass the module for a specific domain?
  3. Hi Jan, thanks for passing by and answer the question. Padloper is a great eCommerce platform for PW built by a really talented dev from the forums. Just thought I should let you know
  4. An article from April describing a strategy for deploying PW using Robo task manager http://antonioandra.de/articles/deploying-processwire-with-robo/
  5. After seeing your ode, the solution @kongondo pointed at doesn't really apply here because you're not creating a page array, but looping through the data that comes from the API. Any reason why you're not using the same variable to create a page, and to add the fields and save? You would spare a call to the database on each iteraction if you didn't: $page = wire('pages')->get("parent={$parent_page->id}, this_id={$page['id']}"); // where this_id & $page['id'] are this entities id in the api if(!$page->id) { // CREATE new page $page = new Page(); // <- removed the $new_page variable ... // Some generic fields // save $page->save(); // not needed -> $page = wire('pages')->get($new_page->id); } ... // Set some more fields based on API data // save $page->save();
  6. @LostKobrakai Oh, you're right, of course. Stroked! It doesn't work only when you call a function directly: function greet() { return 'Hi!'; } echo "Trigger greeter: {greet()}"; // Trigger greeter: {greet()}
  7. Just a small correction on your code. In this case it doesn't apply, because $event->zeit() is not an actual function, but in the case that it was, you could never call it inside the curly braces, because with that method of echoing strings the functions are not processed. In that case you would want to do: $content .= "<p>Datum:" . $event->zeit();
  8. Hey Beat, no need to bang your head If you didn't change the output in the field settings, you should be getting a timestamp (1475743564). You can just break it down into date and time like this: echo "<p>Datum: " . strftime( '%d/%m/%Y', $event->zeit ); echo "<br />Zeit: " . strftime( '%H:%M:%S', $event->zeit ); The strings that I'm passing to the function are time representations from this list: http://php.net/manual/en/function.strftime.php You can do something more elaborate like this: strftime( '%A, %e of %B of the year %Y', $event->zeit ); which would output "Thursday, 6 of October of the year 2016" In that case, you would probably want to output them in German, so you have to set the locale if the system isn't already: setlocale(LC_ALL, "de_CH", "de_CH.utf-8", german") strftime( '%A, %e of %B of the year %Y', $event->zeit );
  9. https://www.reddit.com/r/Wordpress/comments/55pe4l/processwire_vs_wordpress/ These guys need some fight PS: I posted something already: https://www.reddit.com/r/Wordpress/comments/55pe4l/processwire_vs_wordpress/d8dsole
  10. Robin's method would work in that case. Maybe you should go with that.
  11. You can still replace one instance of $("#container1") by $container on the line you just added. $("html, body").animate({ scrollTop: $container.offset().top }, 'slow'); It's good practice to avoid calling the jQuery function when not needed to save processing, and since you have the element already in a variable.
  12. /* JS */ var $container = $("#container1"); // avoid calling jQuery all the time $container.on('click','.MarkupPagerNav a', function() { $container.load( $(this).attr("href") + " #content1", function() { $container.removeClass('loading'); }).addClass('loading'); return false; }); /* CSS */ #container1 > * { opacity: 1; transition: opacity 200ms; } #container1.loading { background: url('http://cdnjs.cloudflare.com/ajax/libs/semantic-ui/0.16.1/images/loader-large.gif') no-repeat center 40vh; } #container1.loading > * { opacity: 0; transition: opacity 200ms; } Much simpler and lighter
  13. On the first code you're trying to scroll inside the element itself. On the second code you're animating the whole page to it's top. You don't want either, what you want is to animate the whole page to the position of the top of the element, that you can get by using $("#container1").offset().top $("html, body").animate({ scrollTop: $("#container1").offset().top }, 'slow');
  14. You're loading the links dynamically, so your 'click' event won't be bound to them, and the click assumes the default behaviour (without JS). That's why the url changes, and you get a page refresh. Try this instead: $("#container1").on('click','.MarkupPagerNav a', function() { Like that. the event is delegated to "#container1" — that will never change — and the dynamic content is searched for from there down. Documented here: http://api.jquery.com/on/#direct-and-delegated-events Edit: FYI I have it working on the live website only by executing this block of code on the console: $("#container1").on('click','.MarkupPagerNav a', function() { $("#container1").load( $(this).attr("href") + " #content1" ); return false; }); The miracle of inspector tools
  15. You can easily change any text in the admin by creating a new custom language. Edit: strike that, You don't even have to create a new language. Just install the multi language support, and you're good to go.
  16. I agree. No need at all for utf8 on urls. PS: good advice with the flags. I hate to see the brazillian flag representing the Portuguese language in international sites, and I'm sure Brazilians feel the same when it's the other way around. A flag represents a country, not a language.
  17. I think it should be "Português" because it's directed at people that want the content in Portuguese. Usually that doesn't make much difference, but think of the extreme case of a website in Chinese (again Chinese, but for the other question) — if you have the language links in chinese, the people to whom they concern won't understand them.
  18. Thanks Antti! But credit where it's due — the typography work was mostly from Royal Studio, and fortunately the guys at AIM were quite picky with me concerning detail
  19. The whole text of that page should be "see footer"
  20. See here how to paginate an existing array
  21. Hi guys! I'm really happy to finally showcase this website in the forum. It's the website of a Porto based Digital Animation Studio. A bunch of talented folks, really. This is a heavily animated/scripted/ajaxed website, that makes use of CSS animations, transitions, transforms, HTML5 audio API, and so on and so on. I spent actually more time debugging than constructing it. Unfortunately, we didn't manage to kill all the bugs before the launching, so you might experience some along the way. We even had to give up on Safari (Damn buggy piece of software !!), and advice the user to use another modern browser. But we think it's still well worth it This is also the first website we developed but didn't design. The design is from the excellent The Royal Studio, from Porto. You might know some of their illustration work for the Adobe online tutorials. --- Enough talk, here is the link http://www.aimcreativestudios.com/ (No safari, please, you'll regret it) Hope you guys like it!
  22. Old thread, but I think it's worth it. I just tried CodeGuard, and I have to say I'm pretty impressed. It's worth noting that they have a free plan for daily backups on a single website up to 1GB. I'm thinking this is the way to go for those small clients that I have spread in shared hostings.
  23. I would also probably go with repeater matrix here, but dropping this here to give you another option http://modules.processwire.com/modules/fieldtype-page-table-extended/
  24. Loved your text Ivan!
  25. @horst you saved my day with this module
×
×
  • Create New...