Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/09/2014 in all areas

  1. Just fixed various issues. - images now get correctly uploaded to the category selected (this was a bug introduced by myself in the JS). - fix issue with category filter not showing nested categories correctly - fix issue with page search link not working correctly, made sure it works also with new 2.5 dev search page using Lister and now uses the textarea fields specified in the module settings. - changed the category select on images upload to a simple select input, with visually nested categories, for easier handling - some cleanup bumped up the version to 0.0.7. https://github.com/somatonic/ImagesManager
    4 points
  2. : Summary of Germany - Brazil Prost
    2 points
  3. Thanks! Works like a charm i will translate to spanish.
    2 points
  4. 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
  5. Dynamic Roles are a powerful access control tool for ProcessWire. They pick up where traditional roles leave off, and allow you to assign permissions at runtime based on any factor present with the user. Once a user receives one or more dynamic roles (at runtime), those dynamic roles then specify what pages the user can view, edit, or add children to. If traditional roles are a sledgehammer, Dynamic Roles are a scalpel, allowing nearly any finely tuned access control scenario. Traditional ProcessWire roles are limited to assignment of view/edit/add access on a per-template basis. Dynamic roles go outside those limitations and enable you to assign that access based on any factors present with a page (i.e. match any field values). Dynamic Roles assign new access, but do not revoke existing access provided by traditional roles. As a result, Dynamic Roles can be used together with traditional roles, and the two work beautifully well together. Though Dynamic Roles can also replace all situations where you would use traditional roles for access control assignments. If using Dynamic Roles to assign page-view access, you would typically want to use traditional roles to revoke view access from at least the "guest" role at the template level. Then use Dynamic Roles to assign view access to those pages in a more granular manner. This module directly affects the results of all page getting/finding operations by applying the access control directly to the database queries before pages are loaded. As a result, it is fast (regardless of scale), pagination friendly, and requires no further intervention by the developer other than configuring the dynamic roles as they see fit. Because it relies upon new features present only in ProcessWire 2.4.6+, it requires the current dev branch. Sponsored by Avoine Concept by Antti Peisa Code by Ryan Cramer PLEASE NOTE: This module is in pre-release state (like the PW dev branch it requires) and is not recommended for production use just yet. Though we do appreciate any testing and/or feedback that you are able to provide. While not required, this module benefits from ProFields Multiplier. If you have ProFields Multiplier installed before installing this module, it will make this module more powerful by making all of your access control selectors have the ability to use OR-group conditions. Depending on your access control needs, this enables you to accomplish more with fewer Dynamic Roles. How to install Make sure you are running ProcessWire 2.4.6 (dev branch) or newer. Download from GitHub (we will add this module to the Modules directory later). Place all files from this module in /site/modules/DynamicRoles/. In your admin, go to Modules > Check for new modules. Click "install" for the Dynamic Roles module (ProcessDynamicRoles). Click to Access > Dynamic Roles for the rest (see example and instructions below). Example and instructions Lets say you ran a Skyscrapers site and wanted a role enabling users with "portmanusa.com" in their email address to have edit access to skyscrapers designed by architect John Portman, with at least 40 floors, and built on-or-after 1970. Yes, this is an incredibly contrived example, but it is an example that also demonstrates the access control potential of this module. 1. In your admin, you would click to Access > Dynamic Roles. 2. Click "Add Dynamic Role". Enter a name for the dynamic role, like: "skyscraper-test-editor" and save. 3. Under "Who is in this dynamic role?" section, click "Add Field" and choose: Email => Contains Text => "portmanusa.com". This will match all users having "portmanusa.com" in their email address. 4. Under "permissions" check the boxes for: page-view and page-edit. 5. For this contrived example, we will assume the user already has view access to all skyscrapers, so we will leave the "What can they view?" section alone. 6. For the "What can they edit?" section: Click "Add Field" and choose: template => Equals => Skyscraper. Click "Add Field" and choose: architect => Equals => John Portman. Click "Add Field" and choose: floors => Greater Than Or Equal => 40. Click "Add Field" and choose: year => Greater Than Or Equal => 1970. 7. Click Save. Now users matching the conditions of your dynamic role will be able to edit the matching pages, but not any others (unless assigned by traditional roles).
    1 point
  6. Hello! I've now got more than a handful of websites running ProcessWire - some running from master and some on development. As Development branch sometimes moves rather fast and I want to keep certain sites up to date with those changes, I wanted to make the upgrade process a bit quicker and smoother if I'm going to be doing it more often. I made a quick and dirty bash script to handle this for me and thought I'd share it for others to make use of. I've only tested it on the hosting platform I use - Vidahost Cloud - which is Linux-based and has Git installed. So you'll probably need that sort of environment too Get it here: wire-upgrade.sh. The basic concept is as follows: Clone ProcessWire dev or master branch from Github to a temporary directory. Move the wire directory from the repository into the current directory named wire.new Rename wire to wire.backup.... Rename wire.new to wire Remove the temporary directory from step 1. The script should be ran in the site's root folder - the same level as the "wire" directory. Just specify which branch you want to upgrade to (master or dev) as the parameter (see comments at the top of the script for an example). My shell scripting skills are a bit on the rusty side these days, but I think I've got most bases covered. Any feedback, improvements, comments or suggestions are very welcome
    1 point
  7. Ever since my last experience with 1&1, their infamous “support” and their horrible performance in smaller hosting packages, I have explicity banned certain (German) providers. I will decline new clients which insist on staying with those hosters, and I can only advise to adopt that policy. Most clients don't understand the technical limitations that come with bad hosting, and the result will always fall back on you. It's just not worth it.
    1 point
  8. If you are a bit skilled, Uberspace is a good option for not more money https://uberspace.de
    1 point
  9. There is no disable just uninstall or install. You could add a checkbox to disable and not execute hooks
    1 point
  10. it work for willyc and.mom if u add.page-publish perm user need page-publish perm .to edit alreadey publisheded page user w/o page-publish only.create or edit.unpublishedd pages cd ..
    1 point
  11. Hahaha, I am going to have to use this elsewhere pwired.. Prost!
    1 point
  12. That's the problem with depending on one player (Neymar)...but yesterday they missed Thiago Silva even more! I still think Germany would have beaten them with these two players around....Brazil never really showed up at this WC and let emotions get in the way too many times...
    1 point
  13. The oranje already dancing:
    1 point
  14. Good luck. I found the Netherlands played very, very convincing so far. We will see.
    1 point
  15. As much as I'm happy that Germany is in the finals, I just feel bad for Brazil for being ditched that hard. They just collapsed after the first one/two goals with no recovery.
    1 point
  16. Well, I think it just took a little nap (in a wrong time).
    1 point
  17. Gratulation an alle deutschen ProcessWire Mitglieder. Was für ein Spiel ! Brazilian football died yesterday...
    1 point
  18. Concatenate FieldType Not sure if it works in that scenario, but worth a look.
    1 point
  19. If anyone is interested, this is a realtime commenting system I'm implementing using it. It's very alpha and I'm not sure if I'll ever to publish it as a module, but it was very easy to implement. The comments are posted using AJAX and the simple api router I use calls a function to post the comment. This function in turn creates a Pusher event in PHP and sends the data to Pusher, which sends it back to the client (this is all push). There are a few lines of javascript waiting for the event to trigger, which in turn renders the comment that was send back from the server through Pusher. I'm using all native PW fields and templates for this, this allows me to have caching enabled on the server. Each time a comment is posted, the discussion is re-cached, so if someone loads a page, it should get most of what's supposed to be there, then any updates are done client-side.
    1 point
  20. roles.on speed u sholud.call it adderole
    1 point
  21. First things first, the $user->language should be set based on the current domain its being accessed from. We'll assume that the subdomains match the language names, i.e. subdomain "fr.domain.com" corresponds with language "fr", as named in ProcessWire. Code like this should exist at the top of a common include file that gets run/included before others (I recommend using $config->prependTemplateFile to automate it for you, see /site/config.php). /site/templates/_init.php: foreach($languages as $language) { if(strpos($config->httpHost, "$language->name.domain.com") === 0) { $user->language = $language; break; } } Next, I'm not necessarily sure it's ideal to autodetect the browser language and redirect based on that. There will always be cases where this doesn't actually match the user's preference. It might (possibly?) be an SEO concern too. It also limits what you can do in terms of caching, since you have detection code that always needs to run. I think it might be better to present a default language and an easy path for the user to find their language. However, if you still want to do language detection from the browser, you can look at the http_accept_language header. We'll assume that your languages are subdomains use the same naming convention as the http_accept_language, which would be "fr", "en", "es", etc. $name = $sanitizer->pageName(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)); $language = $languages->get($name); if($language->id && $name != $user->language->name) { $url = "http://$name.domain.com" . $page->localUrl($language); $session->redirect($url); } I've found that flags don't always represent language well. For instance, for Spanish do you show a Spain, Mexico, or some other flag? I think what's better is to make the selection based on the native language name, i.e. "Espanol" for Spanish. This is easily recognizable to people looking for the language. As for implementation, there is a good code example for this in the API documentation: How to implement a language switcher. In your case, using different domains, the same strategy would apply except that you'd need to include the domain as part of the $url, i.e. // this for: de.domain.com $url = "http://$language->name.domain.com" . $page->localUrl($language); // or this for: domain.de $url = "http://domain.$language->name" . $page->localUrl($language);
    1 point
  22. Aaaand you also need to enable Page Number setting on the template you use this code.
    1 point
  23. Sorry, I just have to point this out: don't you have the blocks here the wrong way around? Everyone probably gets the point and corrects this automatically though - as you did with the latter examples yourself . Unless they just copy and paste the first snippet and go from there...
    1 point
×
×
  • Create New...