Leaderboard
Popular Content
Showing content with the highest reputation on 08/08/2012 in all areas
-
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!4 points
-
In german and on a WP Blog . Thanks Michael! http://www.perun.net/2012/08/08/das-kleine-feine-cms-processwire-reduzierung-aufs-wesentliche/2 points
-
I think that only 'Title' and its lower case url version 'name' are system fields and required, but a lot of the time 'Title', 'Headline', 'Summary' & 'Body' are a natural fit for most pages. Title is fairly self-explanatory Headline is a bit longer version of Title, for navigation link text and meta title Summary is a brief summary of what the page is about and might appear also in search results and as page meta description Body is the main body text of the page On most pages, I tend to leave them all available, even if not populated. This kind of code snippet <?php echo $page->get("headline|title"); ?> prints the page Headline, or Title if the headline is empty, and you will see variations of this used in the default install.2 points
-
Authors of existing modules Please post existing modules to the new modules directory as soon as you are able to. I would add all them myself except that each module gets authenticated with the author. This ensures you are able to make future edits to it. If I went and added all the modules (or imported from that spreadsheet we made awhile back), you wouldn't be able to edit your listing. This is the only reason why I haven't added/imported anyone's modules except my own. Authors of new modules In addition to creating a thread here, please post your module at the new modules directory. You might want to create the thread here first since you'll be asked for the URL when creating your entry in the directory. Add your module to the directory1 point
-
Today I finally had time to add my modules to the directory. And while I did it I found a module I never published in his foru only in the webchat and on github: AutoUpgrade. (Click here to see it in the modules section) ------------------------ AutoUpdate This module will notify you if a newer version of ProcessWire is available and give's you a link which will redirect you to a "upgrade" page where you just have to press the "Upgrade" button to upgrade your system. WARNING: It's in alpha mode. So you can use it to try it but you shouldn't use it in a bigger project or similar. INSTALLATION This module's files should be placed in /site/modules/AutoUpgrade/. It's really important that it is in a separate folder! -------------------- I would love to get some feedback on this and if it's working for you or if it breaks. / Nico1 point
-
Yay, success! I just installed this in a not-up-to-date installation, it did report an available update and the update to 2.2.3 did work. So the basic functionality seems to be working just fine. However, I think there's room for improvement in terms of usability in addition to the GitHub/major release setting. It would be great if this could display a changelog so people could see what actually changed in new versions. I have yet to experience a PW update which was mandatory, so it would be great if there was some kind of way to check out whether an upgrade is actually necessary. Not sure how to implement this, but I can not help with that anyway. Also, after successfully performing an upgrade, the AutoUpgrade page still says "Click on 'Upgrade' to start the upgrade. etc." That's pointless. If there's no newer version, the page should just say "No upgrade available." or something. Another configuration detail: it would be great if it could be configured to display or not display the upgrade notifier on every page. This can get quite annoying. Still, a very handy module!1 point
-
Something like this can be used to create a new PageArray $somepages = $pages->find("template=news, limit=10"); $parray = new PageArray(); $parray->add($somepages); // add one page (or also multiple since 2.2.2) // or $parray->import($somepages); // add one or multiple pages from another PageArray $parray->sort("-modified"); ... Edit: If you have an array with id's that's also cool: $ids = array(1002,1004,2303,4342); $parray = new PageArray(); foreach( $ids as $id ) $page->id ? $parray->add( $page->get($id) ) : continue ;1 point
-
I added the check and added the module to the directory (http://modules.processwire.com/modules/process-page-delete/)1 point
-
I often type some random chars into the .htaccess to see if a 500 (?) is thrown, which helps to see if htacess is really working/enabled.1 point
-
Code is working now! Thanks! libs/paypal/ipn.php <?php include ("../../index.php"); $productid = $wire->pages->get(1332); var_dump($productid); ?>1 point
-
Very nice post from Barry ProcessWire, my new favorite CMS in the whole wide world!1 point
-
Good suggestions. This makes sense to me. I've added the code to add a class of PageListItem_[template name] to each item. Going to test a bit more locally and commit early this week. Thanks, Ryan1 point
-
Looks like a nice idea for a module. I agree that in some sites it can make the tree more readable to some clients. Not the same thing, but there is a module from Soma that you might like http://modules.proce...st-image-label/ The backend doesn't work exactly the same way as the frontend, particularly the processes, but can still use the API functions.This is possible for sure. edit: Soma, sorry for the double answer I still don't understand why sometimes the system doesn't alert that there is a new answer...1 point
-
Jquestion, one good thing that has changed in ProcessWire since that post you linked to was written is that the user system is now built around pages and templates. You can add whatever fields you want to your 'user' template. This opens up a lot more possibilities that didn't exist back when that post was written. So if you want multiple users to have access to a given page, you might just want to create and add a new page reference field to the 'user' template. You might call it something like "client_page". Use 'PageListSelect' or 'PageListSelectMultiple' as the Input field type for that page field. Now when you edit a user, you can select what private page(s) they should be able to view. In your template used by that private page, you'll want to have some kind of access check in there like this: if($user->isGuest() || $user->client_page->id != $page->id) throw new WirePermissionException("You don't have access to this page"); or if a multi-page reference field: if($user->isGuest() || !$user->client_pages->has($page)) throw new WirePermissionException("You don't have access to this page"); To allow for logins by email address: if($input->post->login_submit && $input->post->email) { $email = $sanitizer->email($input->post->email); $emailUser = $users->get("email=$email"); if($emailUser->id) { $user = $session->login($emailUser->name, $input->post->pass); if($user) { echo "Login success!"; } else { echo "Login failed!"; } } else { echo "Unrecognized email address"; } }1 point