Jump to content

formmailer

Members
  • Posts

    319
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by formmailer

  1. Thanks for your reply Antti! Wow, I totally missed this module. It's exactly what I need. Your reply regarding my first question is very helpful. I'll start playing with it. /Jasper
  2. Hi, While converting a site to PW I ran into two (slightly similar) issues that I need to solve before I can launch the PW version. 1. Inserting a value from a XML field into the body On a page about I need to display the current currency rate of the Swedish crown into the body field. The current rate should be retrieved from a XML feed of the European Central Bank: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml The result should be something like: this is the body text ..... ..... The current currency rate: 100 Swedish Crowns is 11,59 Euro ..... ..... The body text ends here. What would be the best way to accomplish this? 2. Publish a RSS feed (the page should be a reader I need to publish the RSS of another site (Wordpress) on my page, something like this: Latest news by www.otherwebsite.com Article 1 Summary of the article, with an image if the feed offers one. Read more... Article 2 Summary of the article, with an image if the feed offers one. Read more... Article 3 Summary of the article, with an image if the feed offers one. Read more... This feed is also an XML feed of course. Any suggestions on how to accomplish this? I used to use some external php-scripts to do both of the above, but that doesn't seem right anymore. Especially the rss feed to be displayed should go into the PW database, probably each article as an own page. Maybe the currency rate could also be added as a page.... I hope that you have some ideas on this.... /Jasper
  3. Looks great Nico. And I read the comment of one of your readers about the site being slower after the change, but I didn't notice any loading speed issues from Sweden, although I don't know how fast your WP blog was. /Jasper
  4. I'd like to wish you all a merry Christmas and a happy new year as well! /Jasper
  5. Hi Ryan, Thanks for the quick reply. It's good to know that it will be solved in PHP 5.4, although it will take some time before it becomes mainstream. Until that time I'll running without the cache field. /Jasper
  6. I just tried the cache field and it works fine, but there seems to be an encoding problem. One of the included fields contains the text "Stöllet, Värmland". In the cache field it's written: St\u00f6llet, V\u00e4rmland. When searching for Värmland there are no results. Searching for V\u00e4rmland, works, but it's very unlikely that a user searches for this. /Jasper
  7. That's a great idea, Ryan. I'll break it in two like you suggested queries. I have never looked at the cache fieldtype, but it seams very usefull here. Going to try that out. Haha, that makes two of us... I don't know how it came in there... i suppose it was a "copy 'n paste" error. Yeah, I knew that, but my test searches gave so many admin results that I wanted to excluded them even for me, at least for the time being. /Jasper
  8. I am using the following find query for the search box on my site: <?php $matches = $pages->find("title|body|summary|headline|fakta~=$q, limit=50, template!=admin, template!=redirect-overview, template!=, template!=redirect-url"); But I would like to have pages with a certain template to have a lower priority. Example: I have a few pages with a template called "links". When searching I want all the results from from all other templates and finally (if I haven't reached the limit of 50) the results with the links template. Would this be possible? /Jasper
  9. Cool Ryan, I'll add this to my scheduled pages module soon, since it relies on LazyCron. /Jasper
  10. Personally I would prefer enabling compression in Apache, using mod_deflate for example.. /Jasper
  11. Hi, That depends on how you look at it and what your goal is. If you don't care about an unique look of your site and the main goal is to get a site up and running in five minutes, Processwire is probably not the best choice for you. However, it is an excellent choice if you want to develop your site exactly the way you want it to be. Processwire is extremely flexible and (the basics) are easy to understand, but there is a certain learning curve. Once you passed that (and that shoul go pretty fast), I am sure you will love Processwire. /Jasper
  12. I assume you aren't allowed to install mysqldump using the shell account, but can't you just download and install PHPMyAdmin? That should run fine on most hosts.
  13. Just wanted to let you guys know that I created both, the HTML and the CSS, from scratch and found that there was quite a lot that was wrong. Many things were defined multiple times (eg. the same fonts were defined in parent, child and grandchild classes). So it was a great opportunity to clean things up and learn doing better CSS. And best of all, I didn't have positioning/background problems. I didn't even need to use "strange hacks" I don't fully understand. /Jasper
  14. formmailer

    For Antti

    Yeah, it's only getting worse... the poor little thing. ;D
  15. formmailer

    For Antti

    And I forwarded it to my Finnish colleagues. ;D
  16. Hi Soma! Thanks for your reply! I guess you are right. Instead of using the existing css and php/html source, it might be better to build the templates from scratch. The result code would be much cleaner code, without a 5 or 6 years old history, with many changes and probably some obsolete things. I'll start working on this. Thanks for your help everybody! /Jasper
  17. Yes, that works Nico. Thanks! Updated that even on www2. But I don't really understand why it works... Why do I need the "left: 50%" and the "margin-left: -492px" to get a 100% height?
  18. That's strange, there should be background images on both of them. It should look like the image I posted (and then all the way down, which works on www but not yet on www2). If you don't see any background images at all, I would appreciate an screenshot because that means something is more wrong than I tought.... I changed all the absolute positioning to floats. But as you can see (http://www2.zwedenweb.com) it still isn't the way it should be:the body and fullBackground have some values, but not the 100% values I want. The strangest thing is that it isn't even 100% for one of the columns. /Jasper P.S. I am feeling quite dumb about asking these CSS questions, but some parts of CSS (the same goes for most jquery stuff as well, but that's an other history) are still a mistery for me. But I am learning and promise that I'll get better at it.
  19. Thanks Antti. So it's the absolute positioning that's doing this. I didn't do the current design, which dates back to 2006, myself and never realized that this could be a problem. What I don't understand is that it doesn't seem to cause problems on the original site (http://www.zwedenweb.com). Anyway the PW version is on http://www2.zwedenweb.com. I'll start working to get rid of the absolute positioning right away. /Jasper
  20. Yep, I'll find a way to publish the dev site. I'll let you know when it's online. /Jasper
  21. Thanks for your reply, Nico. Unfortunately it didn't help. /Jasper
  22. Hi! Once again I need CSS help (sorry! ). I am converting an existing (non cms) site to Processwire and everything works fine except for one CSS issue I can't get fixed. The CSS is almost the same, but for some reason the HTML element in the PW site only has a heigt of 20px (see attached image). Because of this the fullBackground DIV gets a height of 20px as well. Everything is working fine in the original site (zwedenweb.com). I've been sitting or searching for hours now, but without success. Does any of you have an idea what I could be missing? I tried adding height: 100% to both html and body. This had some effect but not enough... the heigth became 6xx pixels, which still isn't the actual height. I hope someone can help me, because this is driving me nuts. //Jasper Below is the simplified version of my template and the CSS. The reset.css is the default that comes with PW. HTML <!DOCTYPE html> <html lang="nl" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $page->title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> </head> <body> <div id="fullBackground"> <div id="headerBackground"> </div> <div id="leftBackground"> </div> <div id="contentBackground"> <div class="contentHeader"> </div> <div class="contentText"> <div class="footerClass"> <hr class="seperator"> <div class="footerLeft"> Copyright © 1996 - <?php echo date("Y"); ?>, <a href="<?php echo "{$config->urls->root}"; ?>">ZwedenWeb</a><br /> Ontwerp: <a href="http://www.firmaq.nl/nl/pages/home.php" target="_blank">Firmaq Internet Solutions</a> </div> <div class="footerRight"> <a href="<?php echo "{$config->urls->root}"; ?>adverteren.php" title="Adverteer op ZwedenWeb">Adverteer op ZwedenWeb</a><br /> <a href="http://twitter.com/zwedenweb" title="Volg ZwedenWeb op Twitter" target="_blank">Twitter</a> | <a href="<?php echo "{$config->urls->root}"; ?>/privacy.php" title="Privacy & cookies">Privacy & cookies</a> | <a href="<?php echo "{$config->urls->root}"; ?>/sitemap.php" title="Sitemap">Sitemap</a> </div> </div> </div> </div> <div id="rightBackground"> </div> <div class="break"> </div> </div> </body> </html> CSS @import url(reset.css); body { margin:0; padding:0; color: #000066; background-color: #32738C; text-align:center; } a:link {color: #000066; text-decoration: underline; } a:active {color: #000066; text-decoration: underline; } a:visited {color: #000066; text-decoration: underline; } a:hover {color: #000066; text-decoration: none; } #fullBackground { position: relative; margin: 0 auto; width: 985px; text-align:left; background-image: url(images/main_background.gif); background-repeat: repeat-y; } #headerBackground { position: absolute; left: 0px; top: 0px; width: 985px; height: 120px; background-image: url(images/header.gif); background-repeat: no-repeat; } #leftBackground { position: absolute; left: 0px; top: 120px; width: 190px; padding: 20px 25px 20px 5px; background-image: url(images/bar_left.gif); background-repeat: no-repeat; min-height: 700px; } #contentBackground { position: absolute; left: 190px; top: 120px; width: 600px; padding: 20px 0 0 20px; background-image: url(images/content_background.jpg); background-repeat: no-repeat; min-height: 900px; } #mainBackground { background-color: #32738C; } #rightBackground { position: absolute; left: 790px; top: 120px; width: 195px; padding: 20px 5px 20px 20px; background-image: url(images/bar_right.gif); background-repeat: no-repeat; min-height: 500px; } #advertentie { width: 160px; margin: auto; display: block; padding-right: 35px; text-align: center; } .contentHeader { width: 560px; } .contentText { width: 560px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000066; } .footerClass { margin: 15px 0 15px 0; width:560px; font-size:10px } .footerLeft { float:left; width:350px; text-align:center } .footerRight { float:left; width:210px; text-align:right }
  23. Thanks Ryan! That's exactly what I needed. These submenus are quite static, they have been there since 2001 and will certainly be there the next couple of years. (but the content has changed of course ) /Jasper
  24. Hi! Thanks for your replies. I don't think the jquery is going to solve my (little) problem. I'd might be able to explain the context a bit more with a real life example. My site http://www.zwedenweb.com is a site without CMS that I am converting to Processwire. When you take a look at the navigation menu, you will see "Vakantie in Zweden" (Vacation in Sweden), which contains a submenu called "Vervoer naar Zweden" (Transport to Sweden). This submenu contains exactly the same links like the menu item "Vervoer naar Zweden" at root level. The same goes for the Accommodatie (Accommodations) submenu. Reason for this is that, logically, the best place is under "Vakantie in Zweden", but page visitors wanted to have an quicker way to get to these pages. I hope this explains the question. /Jasper
  25. Great idea! I have a similar (but different) problem: I need to do this for quite large part of the navigation tree. Example: Holiday - Transport -- Bus -- Airplane -- Car Some other page Transport - Bus - Airplane - Car Of course I can use Ryan's method but it would be quite a lot work and, more important, if I add a page under Transport, it has to be added twice. Is there a way to get around this? I currently use this code to create the menu tree: <?php function menuTree($page) { if ($page != wire('pages')->get('/')) { // Don't list home as the parent of every page echo "<li><a href='{$page->url}'>{$page->title}</a> "; } if($page->numChildren) { echo "<ul>"; foreach($page->children as $child) menuTree($child); echo "</ul>"; } } /Jasper
×
×
  • Create New...