Jump to content

Marco Angeli

Members
  • Posts

    119
  • Joined

  • Last visited

Everything posted by Marco Angeli

  1. I need to improve my copy & paste php. Thanks kongondo
  2. hi everybody, just discovered how powerful this module is, but I need a hint. Using this code everything is OK: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module echo $treeMenu->render(); ?> but I need to tweak some parameters, so I added: <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module $options = array( 'parent_class' => 'parent', 'current_class' => 'current', 'has_children_class' => 'has_children', 'levels' => true, 'levels_prefix' => 'level-', 'max_levels' => null, 'firstlast' => false, 'collapsed' => false, 'show_root' => false, 'selector' => '', 'selector_field' => 'nav_selector', 'outer_tpl' => '<ul>||</ul>', 'inner_tpl' => '<ul>||</ul>', 'list_tpl' => '<li%s>||</li>', 'list_field_class' => '', 'item_tpl' => '<a href="{url}">{title}</a>', 'item_current_tpl' => '<a href="{url}">{title}</a>', 'xtemplates' => '', 'xitem_tpl' => '<span>{title}</span>', 'xitem_current_tpl' => '<span>{title}</span>', 'date_format' => 'Y/m/d', 'code_formatting' => false, 'debug' => false ) echo $treeMenu->render($options); ?> and here's the result: Parse Error: syntax error, unexpected T_ECHO (line 110 of /home/morgenle/public_html/new/site/templates/header.inc)
  3. ...22 degrees in Porto! It's a really nice temperature! Thanks diogo for sharing this.
  4. I think a good starting point comes from this thread: http://processwire.com/talk/topic/1684-reading-and-displaying-data-from-a-custom-table/ Maybe the import-json.php can be adapted to our neeeds... When I have a free moment I'll try to deal with some code!
  5. Una bella iniziativa digitale che parte dal friuli : #goonitalia http://t.co/wlc6PaWWeo

  6. Perdere queste professionalità non è un buon segno. Ma @matteorenzi ne è al corrente? http://t.co/reOZ4M6zmD

  7. Thanks Diogo, Ryan's module is perfect to transform a PW site into an API. But I want to do something different: I'd like to read (parse) an external API like this one: { "response": { "version": "0.1", "termsofService": "http://www.wunderground.com/weather/api/d/terms.html", "features": { "conditions": 1 } }, "current_observation": { "image": { "url": "http://icons-ak.wxug.com/graphics/wu2/logo_130x80.png", "title": "Weather Underground", "link": "http://www.wunderground.com" }, "display_location": { "full": "San Francisco, CA", "city": "San Francisco", "state": "CA", "state_name": "California", "country": "US", "country_iso3166": "US", "zip": "94101", "latitude": "37.77500916", "longitude": "-122.41825867", "elevation": "47.00000000" }, "observation_location": { "full": "SOMA - Near Van Ness, San Francisco, California", "city": "SOMA - Near Van Ness, San Francisco", "state": "California", "country": "US", "country_iso3166": "US", "latitude": "37.773285", "longitude": "-122.417725", "elevation": "49 ft" }, "estimated": {}, "station_id": "KCASANFR58", "observation_time": "Last Updated on June 27, 5:27 PM PDT", "observation_time_rfc822": "Wed, 27 Jun 2012 17:27:13 -0700", "observation_epoch": "1340843233", "local_time_rfc822": "Wed, 27 Jun 2012 17:27:14 -0700", "local_epoch": "1340843234", "local_tz_short": "PDT", "local_tz_long": "America/Los_Angeles", "local_tz_offset": "-0700", "weather": "Partly Cloudy", "temperature_string": "66.3 F (19.1 C)", "temp_f": 66.3, "temp_c": 19.1, "relative_humidity": "65%", "wind_string": "From the NNW at 22.0 MPH Gusting to 28.0 MPH", "wind_dir": "NNW", "wind_degrees": 346, "wind_mph": 22.0, "wind_gust_mph": "28.0", "wind_kph": 35.4, "wind_gust_kph": "45.1", "pressure_mb": "1013", "pressure_in": "29.93", "pressure_trend": "+", "dewpoint_string": "54 F (12 C)", "dewpoint_f": 54, "dewpoint_c": 12, "heat_index_string": "NA", "heat_index_f": "NA", "heat_index_c": "NA", "windchill_string": "NA", "windchill_f": "NA", "windchill_c": "NA", "feelslike_string": "66.3 F (19.1 C)", "feelslike_f": "66.3", "feelslike_c": "19.1", "visibility_mi": "10.0", "visibility_km": "16.1", "solarradiation": "", "UV": "5", "precip_1hr_string": "0.00 in ( 0 mm)", "precip_1hr_in": "0.00", "precip_1hr_metric": " 0", "precip_today_string": "0.00 in (0 mm)", "precip_today_in": "0.00", "precip_today_metric": "0", "icon": "partlycloudy", "icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif", "forecast_url": "http://www.wunderground.com/US/CA/San_Francisco.html", "history_url": "http://www.wunderground.com/history/airport/KCASANFR58/2012/6/27/DailyHistory.html", "ob_url": "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=37.773285,-122.417725" } } and print in human readable language some results on a web page. Is there an easy way of doing this?
  8. Hello, I recently discovered this tool http://www.kimonolabs.com/ that let you turn a website into an API. So far so good. I'm trying to imagine how to deal with json in PW. I'd like to output the data on a single page. What's the best way of doing this?
  9. RT @arduino: Arduino Cofounder Has Some Advice For You, Hacker http://t.co/NzvxiPxbEd #interview

  10. Sophia George http://t.co/54WbmT3YMr is 1st resident games designerat @V_and_A

  11. Hi there, I installed PW here: new.mydomain.com Then I'll switch to www.mydomain.com I think all I have to do is copy all the files from "new" to root, isn't it? (I mean: there's no need to transfer DB, right?)
  12. Due bimbi a casa…tablet, TV? No. Gioco dell'oca.

  13. L'ho sempre detto che cambiare idea è importante http://t.co/XLgic5qg9m

  14. I really like this section: http://www.jonathandawe.com/music/fractals/ nice integration of images and audio.
  15. ...nice portfolio site! But I feel so clumsy when I drag the scrollers! It's my personal taste but I would prefer classical left and right arrows in this case. Anyway, good job!
  16. Thanks guys! sort=-created works like a charm!
  17. Hi there, I'd like to sort some thumbnails that link to a detail page, this is the code: <?php $works = $pages->find("template=detail, sort=-date, limit=3"); echo "<ul id='itemContainer'>"; foreach($works as $w) { echo "<li> <div class='span3'> <a href='{$w->url}'><img src='{$w->slide_images->eq(0)->getThumb('thumbnail')}' > </a> <div class='pad15'></div> </div> </li>"; } echo "</ul>"; $pagination = $works->renderPager(); echo $pagination; ?> unfortunately, "sort=-date" doesn't seem to work...
  18. RT @Cmdr_Hadfield: Last year was off the planet, the year prior it wasn't allowed due to injury risk, but today I'm going skiing. Sun's shi…

  19. Monuments men "Clooney simply can’t settle on a tone for the story he is trying to tell." http://t.co/X1FZ6j0OBc

×
×
  • Create New...