Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. What do you get with: print_r($page->next($g)) ?
  2. Does it work if you do this instead? $prev = "<a href='" . $page->prev($g)->url . "'>prev</a> ";
  3. https://www.hostpoint.ch/ a Swiss hosting recommended by Soma, some posts above and some years ago, has a very interesting feature: You can create a free account and add websites to it, but you can also be invited to work on other peoples sites. This is great because you can tell your clients to easily create their own account and simply give you authorisation to work on their website. no messing around with them giving you them passwords, or you having to create their account by yourself frequently involving payments. Nothing new, if you think of how any modern app uses this system for collaboration, but I don't see it a lot in hosting. Does anyone knows of other hosting that allows for this? Would be great to find one in the EU
  4. You could use textile http://modules.processwire.com/modules/textformatter-textile/ Not like using a color picker, but you can color a text like this: http://txstyle.org/doc/33/span
  5. Can it be something on the head.inc or upper_part.inc? What happens if you wipe everything from the home file?
  6. Hm, are you sure you are editing the right files? Does anything change when you edit the basic-page template?
  7. In the blank profile all the home.php file does is to include the basic-page: <?php include("./basic-page.php"); So, that's the intended behaviour. If you want it to be different you'll have to add some new code to it.
  8. You will always have to do something in the markup. To make a AJAX call you would have to rely on some markup anyway, I think adding the link to the page is the most transparent way to do it.
  9. Hi KunGu, welcome to the forums! Eheh, you chose the most difficult way to start I don't thing that's a bad thing but I would suggest that you also do some test with the direct output, since it's the simplest to understand and most common way in CMS integration. Just to have a feeling of how it works. With the delay output, you got it right, Heredoc is one way to go. Other way is to concatenate the html pieces like this: // ultra simplified example $myVariable = "<p>"; $myVariable .= "content"; $myVariable .= "</p>"; You can also include the content of an external file into a variable in two ways: ob_start(); include('slider.inc'); $myVariable = ob_get_clean(); or: $myVariable = file_get_contents('slider.inc')
  10. Thanks dragan. We're aware that the translations have some problems, although there was a professional translator involved. We will still pass your comment to the client.
  11. You can use a pageArray method instead of exploding things: if ( $pages->get('template=home')->featured_items->has($project) ) I actually showed this to you not that long ago https://processwire.com/talk/topic/10440-checking-array-for-a-value-might-be-more-php-question-than-pw-sorry/?p=98786
  12. if($page->related_projects->count > 0)
  13. You simply create a new template with a multilanguage text field for each expression you want to translate. the name of the fields and labels can be in english, but not necessarily the words that you will output, they would be just informative. Then you fill the fields with all the languages. To output them in other templates, you would do this: // top of the file $translations = $pages->get('/translations/'); // and when needed echo $translations->more_articles; // inside functions echo wire('pages')->get('/translations/')->more_articles;
  14. I would probably create a page "site wide translations" in the admin and have these as fields there.
  15. "1025|1074|1026|1027" is only returned when you echo, because PW converts the object into a string only for this purpose. If you want to know if a page exists in a pageArray, you should use the pageArray methods, in this case: if ( $project->project_tags->has(1025) ) Edit: LostKobrakai was faster
  16. This exact search could be simply: $pages->find("parent=/landscape_stone/natural/flagstone/, color=brown|gray, size=medium")
  17. Thanks Mike! I didn't even notice that I was using an old version. Linked to the latest and changed the speed to 25.
  18. I changed the setting. 50 was definitely too fast for me, even 30 was, so I settled with 15 for now (default is 3), can you win7 guys please check if t makes a difference for you? Many thanks!
  19. Thanks guys, I will try this fix.
  20. It is possible, it's just not designed for that. See here https://processwire.com/talk/topic/10226-getting-fields-in-a-fieldset/
  21. Yep, I saw it meanwhile. For now I "solved it" with css .ui-loader + .ui-page { display: none; } Later next week I'll try to actually fix it.
  22. Thanks! I don't have that feeling. Anyone else had this experience? Oh boy... It's funny, this did happen to the client in her browser and it stopped after a couple of changes i did. I stress tested the site on some browsers and was never able to reproduce it. This happened to you on the iPhone? EDIT: not ideal, but for now I solved it with CSS. Yep, caching scroll offsets would be a good enhancement. Will have a look at it. Hm... -- Many thanks for your feedback guys!
  23. diogo

    Follow us

    Hi Guys, The second website website that we launched this week http://follow-us.pt/ It's a one-page website for a company offers tailored architectural tours in Porto and North of Portugal. They asked us to do something completely different from the other companies that offer guided tours. Although this is a very simple site, there are two details that we're proud of technically the two columns scrolling in different speeds so they stop at the same time, although they have different heights; and the responsive connection between the two rectangles from the logo and headline, crafted with SVG. Hope you like it
  24. Hi guys, So, here is our latest creation. http://wine-route-georgia.com/ Wine Route Georgia provides exclusive tailored tours throughout Georgia including wine tastings and vinery visits. We were lucky to have a great set of images to work with, so we decided to design the website around them. The strategy was to keep the images in the background with a very slow slideshow, and for this we had make sure that it wouldn't be interrupted while the user navigates the content. Enter AJAX: Obviously the only way to do this is to use AJAX to get the requested content. We wanted the URLs to work normally and used this technique to make sure everything would work flawlessly http://rosspenman.com/pushstate-jquery/ . On PW the work was not different than a normal website with separate pages (including header and footer) since all the work is done with JS. The slideshow is quite complicated because it works differently when in responsive mode. On smaller devices, the slideshow pauses and becomes draggable. On larger devices you can call a grid with all images and select the one you want to see next. This is a completely custom behaviour for a slideshow and of course there is no jQuery plugin that does this by default, but after some frustration I found a plugin with an excellent API that allowed me to program it exactly how we wanted http://kenwheeler.github.io/slick/ Hope you like it.
  25. There you have your answer! Loop through all the pages in your PW install, get the url, pass it to a DOMparser, find all the images inside the content section from that page, get their url, and store them in this page image field. Pseudo-code: foreach ( $pages->find("template=all|imported|pages") as $p) { $html = file_get_html($p->old_url); foreach( $html->getElementById("content")->img as $img ) { $src = $img->src; // The image url is $src now // see the in this post in the cmscritic case study // how to extract the file name, and use both the url and filename to import the images to the page in $p } }
×
×
  • Create New...