Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/27/2012 in all areas

  1. OK. I will release a new version in the next week. Because I have holidays - means enough time - then
    2 points
  2. FieldtypeMapMarker Module for ProcessWire 2.1+ This Fieldtype for ProcessWire 2.1+ holds an address or location name, and automatically geocodes the address to latitude/longitude using Google Maps API. This Fieldtype was also created to serve as an example of creating a custom Fieldtype and Inputfield that contains multiple pieces of data. Download at: https://github.com/r...ldtypeMapMarker How to Use To use, install FieldtypeMapMarker like you would any other module (install instructions: http://processwire.c...wnload/modules/). Then create a new field that uses it. Add that field to a template and edit a page using that template. Enter an address, place or location of any sort into the 'Address' field and hit Save. For example, Google Maps will geocode any of these: 125 E. Court Square, Decatur, GA 30030 Atlanta, GA Disney World The address will be converted into latitude/longitude coordinates when you save the page. The field will also show a map of the location once it has the coordinates. On the front end, you can utilize this data for your own Google Maps (or anything else that you might need latitude/longitude for). Lets assume that your field is called 'marker'. Here is how you would access the components of it from the API: <?php echo $page->marker->address; // outputs the address you entered echo $page->marker->lat; // outputs the latitude echo $page->marker->lng; // outputs the longitude Of course, this Fieldtype works without it's Inputfield too. To geocode an address from the API, all you need to do is set or change the 'address' component of your field, i.e. <?php $page->marker->address = 'Disney Land'; $page->save(); // lat/lng will now be updated to Disney Land's lat/lng
    1 point
  3. Hi! Just finished my first module This module adds a new "Google-Analytics" Page in your Admin-Panel and displays various Statistics from a Google Analytics Account. It uses the JQuery plugin "jqplot" to display the charts. Github: https://github.com/w...GoogleAnalytics Modules directory: http://modules.proce...ogle-analytics/ Features Visits by Date (Chart) General Statistics about Visits (Total visits, Visit duration, New visitors, Returning visitors etc.) Demographics: Countries, Cities, Languages System: Browsers, Operating Systems, Screen Resolutions Mobile: Operating Systems, Screen Resolutions Pageviews by Date (Chart) Top Content Traffic Sources: Keywords, Referral Traffic by Domain and URI Choose a default date range displaying statistics: last 24 hours, 2 days, 1 week, 1 month etc. Custom date range by setting a "start date" and "end date" Requirements Google Account and Analytics Account A Project in the Google APIs Console cURL Installation 1) Create a Project in the Google APIs Console: Create a new Project in the APIs Console: code.google.com/apis/console/ Under Services, enable the Analytics API Under API Access: create an Oauth 2.0 Client-ID Give a Product Name, choose "Web-Application", Domain doesn't matter Enter a Redirect URI to the GA-Page in your Processwire Installation: http://yourdomain.com/processwire/google-analytics/ Notes: The redirect URI must exactly match with the URL from the new "Google Analytics" page in Processwire. Open the Page and copy the URL from the address-bar (localhost does work too!) The project created in the APIs Console can be reused for every Processwire installation using this module. You just have to enter more redirect URIs 2) Install the module: Place the module's files in /site/modules/ProcessGoogleAnalytics Install the Module via the Admin-Panel Enter Client-ID and Client-Secret keys from the created project in the module config Load the newly created page "Google-Analytics" and click on the button "authenticate" Grant the module access to the Analytics Data Choose a Google Analytics account (Domain) from the dropdown Done: You should see the statistics. Check out the module config options for further customization In order to let other users see the Google Analytics page, you must give their role access to the "ga-view" permission. Ps. Processwire is awesome and so is this community!
    1 point
  4. I missed the XML sitemap generator that I used in a previous CMS so I built my own module to achieve the same functionality. This module outputs an XML sitemap of your site that is readable by Google Webmaster Tools etc. I've generally found that it reduces the time it takes for new sites and pages to be listed in search engines using one in combination with Webmaster Tools etc (since you're specifically telling the service that a new site/new pages exist) so thought I may as well create a module for it. The module ignores any hidden pages and their children, assuming that since you don't want these to be visible on the site then you don't want them to be found via search engines either. It also adds a field called sitemap_ignore that you can add to your templates and exclude specific pages on a per-page basis. Again, this assumes that you wish to ignore that page's children as well. The sitemap is accessible at yoursite.com/sitemap.xml - the module checks to see whether this URL has been called and outputs the sitemap, then does a hard exit before PW gets a chance to output a 404 page. If there's a more elegant way of doing this I'll happily change the code to suit. Feedback and suggestions welcome On a slightly different note, I wanted to call the file XMLSitemap originally so as to be clearer about what it does in the filename, but if you have a module that begins with more than one uppercase letter then a warning containing only the module name is displayed on the Modules page, so I changed it to Sitemap instead which is fine as the description still says what it does. File can be downloaded via GitHub here: https://github.com/N.../zipball/master
    1 point
  5. Hey @Soma - it looks like it's a bug in FireFox! http://forum.world.st/Enabling-cookies-causes-callback-links-to-incorrectly-redirect-in-Firefox-td3325969.html I just ran it in debug mode in Chrome and the problem isn't evident. Seems that FireFox redirects to the value in rel=next when cookies are enabled. What the hell! Sorry to have troubled everyone. Bah!
    1 point
  6. We're nearing 12/2012 so expect unusual things happening everywhere.
    1 point
  7. Some more on this here http://coding.smashingmagazine.com/2011/12/05/sisyphus-js-client-side-drafts-and-more/
    1 point
  8. See: http://processwire.c...fly/#entry16017 Now you just need to get that "arrayToCSV => false"-option down to MarkupPagerNav =). If you're calling $somePageArray->renderPager() yourself, you can just pass options array as an argument. But if you're using ProcessPageType::renderList() (reading minds here...) then it would be another thing to ask Ryan to modify. So maybe not renderList($selector) but renderList($selector, $pagerOptions=null) and $pagerOptions as an argument to render() here: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Process/ProcessPageType/ProcessPageType.module#L119 Or something like that, no time to try that out at the moment.
    1 point
  9. there are solutions out there like sisyphus. but i don't know how to implement this in the pw-backend.
    1 point
  10. Hello everyone, I'm new to Process Wire and I'm trying to set up a website for a magazine. My first task was to import a bunch of videos from another site into PW and it actually worked out quite good. Now I've got a bunch of pages with an external image reference in the image field. My idea was *not* to copy the whole lot of images, but to download and resize the ones that are requested. The first naiive attempt was this: <img src="<?=$article->video_image->size(350,88)->url; ?>"> With 'video_image' being a full path to an image on another remote server. Soo ... that didn't work. Do I need to copy the image to my server before resizing it? Or is there a trick to resize it and save only the "new" image on my server? Thanks for any help! Loving PW so far! thomas
    1 point
×
×
  • Create New...