Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/23/2014 in all areas

  1. Just posted a new module to github that simply displays a google calendar in a new calendar page in the Admin interface. It's meant to go hand-in-hand with Ryan's MarkupLoadGcal module. There's really not much else to say about it other than it uses the new module config class so you'll need to be running an up-to-date dev version to be able to use this. Here's a shot of the config page... ...and here's what the calendar page is like... Please note, this module only embeds the calendar; the event you see listed under the calendar in the screenshot above is added by hooking this module's execute() method and extending the output. The hook method uses Ryan's MarkupLoadGcal module to pull events out of the calendar's feed and then appends them under the calendar. ProcessGcalEmbed in the module repository. ProcessGcalEmbed on Github.
    6 points
  2. Hello everybody, I would like to show you one of my last projects: http://www.effectiveminds.de Would be great if you could give me some feedback ! Here some technical details: Main modules used:FieldtypeCropImage FieldtypeMapMarker ProcessRedirects Front-End-Scripts:Stellar.js jQuery Easing Magnific Popup jQuery Waypoints
    6 points
  3. @jordanlev: Commenting quickly on this. You want to use PageTables - you'll love them. They will provide your project the ability to include the product locations and variations on the same page with your product. PageTable-fields have their own template attached to them. In your case, you can probably go ahead and use the existing product-variation and product-location templates. You just create two new PageTable-fields, one for each template and then attach the new fields to your product-template. For more information, check this post for an example https://processwire.com/talk/topic/6417-processwire-profields-table/?p=63119. And don't be mislead by the term "field", these are pretty badass fields.
    4 points
  4. @Suntrop, Just to echo what Joss has said and I realise my post above was probably ambiguous.... CKEditor the module is a core module and lives in /wire/modules/Inputfield/InputfieldCKEditor/ - Don't touch this However, custom settings should be done/placed in /site/modules/InputfieldCKEditor/. Here you will find the following files + folder README.txt mystyles.js config-body.js config.js plugins contents-inline.css contents.css Read the contents of those files + see these guides for how to customise your CKEditor https://processwire.com/blog/posts/august-2014-core-updates-2/#upgrades-to-ckeditor https://github.com/ryancramerdesign/ProcessWire/tree/dev/site-default/modules/InputfieldCKEditor http://www.flamingruby.com/blog/processwire-weekly-13/#1-1 http://www.flamingruby.com/blog/processwire-weekly-13/#1-2
    3 points
  5. Settings for the CKeditor in the wire folder should actually be put in the inputfieldCKeditor directory in the site/modules folder, so they do not get overwritten by Wire updates. That also includes any additional plugins you might install.
    3 points
  6. Hehe, if you can get the address of Ryan's public calendar for releases, I'll add it as a default feed.
    2 points
  7. To get the ID of the module you need to $id = $modules->getModuleID("ProcessPageEdit"); echo $pages->get("process=$id")->title;
    2 points
  8. normally you do this within the language file "wire--modules--inputfield--inputfieldckeditor--inputfieldckeditor-module". If you have the german language pack installed it's already set to german.
    2 points
  9. You don't need to check if user is logged in, cause you log him in just before and test if it's working with if($u) which should be if($u->id) $u = $session->login($username, $pass); if($u && $u->id) { // user is logged in, get rid of tmp_pass $u->of(false); $u->tmp_pass = ''; $u->save(); // redirect here } Apart from that $user->isLoggedin() wouldn't work anyway cause you have $u which is the logged in user. The template var $user at that moment isn't updated.
    2 points
  10. The missing trailing slash would NOT result in 404 but a redirect. The "result in 404" is more a indication that /quote/ doesn't exits.
    2 points
  11. The Module Blog for ProcessWire replicates and extends the popular Blog Profile. Blog is now in version 2. Please read the README in the Github link below in its entirety before using this module As of 20 December 2017 ProcessWire versions earlier than 3.x are not supported Blog Documentation is here (Work in Progress!) See this post for new features in version 2 or the readme in GitHub. To upgrade from version 1, see these instructions. ################################################## Most of the text below refers to Blog version 1 (left here for posterity). Blog version 1 consists of two modules: ProcessBlog: Manage Blog in the backend/Admin. MarkupBlog: Display Blog in the frontend. Being a module, Blog can be installed in both fresh and existing sites. Note, however, that presently, ProcessBlog is not compatible with existing installs of the Blog Profile. This is because of various structural and naming differences in respect of Fields, Templates, Template Files and Pages. If there is demand for such compatibility, I will code a separate version for managing Blog Profile installs. In order to use the 'Recent Tweets Widget', you will need to separately install and setup the module 'MarkupTwitterFeed'. Please read the README in the Github link below in its entirety before using this module (especially the bit about the Pages, etc. created by the module). I'll appreciate Beta testers, thanks! Stable release works fine. Download Modules Directory: http://modules.processwire.com/modules/process-blog/ Github: https://github.com/kongondo/Blog You can also install from right within your ProcessWire install. Screenshots (Blog version 1) Video Demos ProcessBlog MarkupBlog Credits Ryan Cramer The Alpha Testers and 'Critics' License GPL2
    1 point
  12. Recipes website: http://superpola.com Modules Used: ProCache ProcessImageMinimize / minimize.pw Batcher AIOM
    1 point
  13. This is a very basic guide on how to optimize a ProcessWire page for speed. It doesn’t go into the depths of optimization and perfect render paths but will provide you with some proven ProcessWire methods for faster websites. The big problems that are easy to fix are what we aim for. You want quick improvements? Then read on… First let's have a look ath the following graph. Those are the areas, we want to improve. Source: http://httparchive.org/interesting.php?a=All&l=Oct%201%202014 Clean up your HTML Look at your HTML source code. Are there any unnecessary parts? Remove anything that might not be needed and try to keep your markup as clean as possible. Avoid using too many external JS libraries or other tools. It is okay to include jQuery from a CDN, because most visitors will already have cached the file. Too many of those external requests will slow down the page. If possible, try to avoid render-blocking Javascripts and move your script tags to the end of the page, right before the body. In most cases, your Javascript will enhance your content but doesn’t need to fire before the site is rendered. Always think if you need to include another library or the fourth webfont on your site. Minify Markup The next step to save some bytes is to remove all whitespaces from your markup. It doesn’t have to look nice, it has to be loaded fast. We perform this trick with our new super-weapon: The AllInOneMinify module for ProcessWire. Install it like every other module for ProcessWire. Once activated, go to the module settings and tick the checkbox for “Minify HTML” and look at your sites source code. It should be minified. AIOM can handle conditional browser comments. If your layout depends on whitespaces you could “force” them by putting an into the markup. Optimize the CSS Now we’re heading for the next larger part of a usual website. We will combine all CSS files and then remove anything not needed (whitespace,comments) from it. Before we start, make sure your CSS files only contain rules that you really use. Especially if you’re using a framework like Bootstrap, most of the selectors are never used. Remove them carefully. We need the AllIneOneMinify module from the previous step again. After installation, open the template file where your HTML header is generated. We will now replace all stylesheet tags with a single file. AIOM needs to know all CSS (or even LESS) files, relative to your template folder. It will then output a link to a single, compressed CSS file. You might have this in your HTML head: <link href="<? echo $config->urls->templates;?>/css/grid.css "rel="stylesheet" /> <link href="<? echo $config->urls->templates;?>/css/style.css“ rel="stylesheet" /> Replace all links to Stylesheets with the single tag like this: <link href=”<? echo AIOM::CSS(array(‘css/grid.css’,’css/style.css’)));?>” rel=”stylesheet”/> You pass an array with the file names to the AIOM method CSS. It will return a link to the file. AIOM takes care of image urls inside CSS. It will detect changes in the source file and only generate a new file if necessary. While developing, you might want to turn on the “Development” checkbox in the module settings. Make JavaScript tiny Do the same as you do to the CSS to your Javascript files. First, clean up the code. Then install AIOM and compress all JS files into a single file using the AIOM::JS method that works as the AIOM::CSS method. For best results, think about including scripts like jQuery from a CDN and put your scripts below the content, before you close the body tag. Also note that the order on how your throw your JS files into AIOM might be important, depending on the code inside. Get the right image size. ProcessWire comes with great image tools. Use them, to make images exactly the size you need them. You don’t have to serve that little thumbnail with over 3000px length just because the editor wasn’t able to reduce the size. Example: Your designer wants to have a slider image with a maximum size of 600x320 pixel. To output the image with that exact dimensions, use the API accordingly: $sliderImage->size(600,320)->url; An even better way would be to use adaptive images or the new srcset attribute combined with a JS fallback. Then your site only delivers the image size as needed. Hint: Play around with the image quality setting in the config.php. Maybe you don’t need images with a JPG quality of 90+. Compress the images further with minimize.pw To make images even smaller, we can use the minimize.pw service. This service will compress images nearly lossless by using more complicated tools to reduce the size of PNGs and JPEGs. By doing this, you remove bytes from the largest chunk of your website weight. minimize.pw is free for 2000 images. Just enter your E-Mailadress and receive a free key Then you have to install the ProcessImageMinimize module and enter they key. You can now activate the option to automatically compress every image uploaded. It is fail-safe and will compress images in the background. Please note, the automatic mode only works with images uploaded AFTER you have activated the module. You can manually select image fields with the ->mz() API method. Just include it before you output the image in your template file: $myImage->width(300,300)->mz()->url; We've closed the service. You could use something similar like Imgix ( https://www.imgix.com/ ). Activate GZip compression on your site Another method to speed up your site is to activate GZip compression. The server will then send all files compressed to the client. This works with nearly all browsers and the CPU power required is minimal. You can tell your server to do this, by adding those lines to your .htaccess file in your root directory. Please take care, that you do not overwrite the ProcessWire rules in the file! For best results add them on the top of the .htaccess file: <IfModule mod_deflate.c> AddOutputFilter DEFLATE js css AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html </IfModule> This was taken from another forum post. Tell the client to cache stuff To make repeating visits faster, we can tell the browser to cache special files for a longer period of time. Again, add this on top of your .htaccess file: <IfModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 seconds" ExpiresByType image/x-icon "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType text/javascript "access plus 1 month" ExpiresByType application/octet-stream "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month" </IfModule> <IfModule mod_headers.c> <FilesMatch "\\.(ico|jpe?g|png|gif|swf|woff)$"> Header set Cache-Control "max-age=31536000, public" </FilesMatch> <FilesMatch "\\.(css)$"> Header set Cache-Control "max-age=2692000, public" </FilesMatch> <FilesMatch "\\.(js)$"> Header set Cache-Control "max-age=2692000, private" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary: Accept-Encoding </FilesMatch> Header unset ETag Header append Cache-Control "public" </IfModule> Remember, that this caching might be annoying while developing the site. Use the internal cache (or ProCache) Another trick to make the site faster is to use a caching system. This will “store” your rendered site so you don’t have to query the database that often. We can either do this with the internal cache of ProcessWire or use the commercial, official ProCache module. Using the build-in system, you go the the setting page of a template and open the “Cache” register. You can now set the Cache time and what happens if something changes. The settings depend on the content of the site. Mostly static content can be cached longer and you might not need to reset the cache every time. Dynamic sites will need shorter cache times. ProCache (buy here) is even faster because it will bypass PHP and the database. Files are served directly as HTML. Please note, that caching might make the site faster but it can create new problems. Use with care. Summary Keep your code as clean as possible. Remove anything unnecessary and then compress HTML,CSS and JS using the AIOM module. The largest part of your page weight are images. Keep them small by using the appropriate dimensions and consider services like minimize.pw. In the end, use intelligent caching and buy ProCache. Following this guide takes not more than an hour but can speed up your site and make your visitors happy. This was just a quick overview of techniques to optimize your page speed. There is plenty of stuff you can do but the steps above are a good first step. Maybe you can share your favorite methods (or links) to start the discussion.
    1 point
  14. Given a Google Calendar XML feed URL, this module will pull it, cache it, and let you foreach() it or render it. Download at: https://github.com/r.../MarkupLoadGCal USAGE The MarkupLoadRSS module is used from your template files. To use it, you get a copy of the module, tell it what URL to load from (with the load method), and then execute a find() query with a selector string. It works basically the same as a $pages->find("selector string"). <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://calendar XML feed'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) echo "<p>{$item->title}</p>"; To get a Google calendar URL, you would go into your (or another) calendar on Google and click to the calendar's settings. At the bottom of the screen, you will see a section called "Calendar Address" with XML, ICAL, and HTML. Copy the XML address, and use that with this module. If you just want one to test with, use the one from my examples below: http://www.google.co...com/public/full Note: you must use the 'full' not 'basic' calendar from Google Calendar. You can identify if you've got the right one because it will end with 'full' rather than 'basic', as in the URL above. Selector Properties The selector properties you may provide to find() are: from: Starting date in any common date/time format (or unix timestamp). to: Ending date in any common date/time format (or unix timestamp). keywords: Keyword(s) to search for in the Google calendar events. limit: Max number of items to load (default = 100). sort: May be 'date', '-date', 'modified' or '-modified'. html: Set to '0' if you don't want the event description in HTML. The find() method will return the found items. You can then foreach() these items to generate your output. A render() method is also included with the items which provides some default output, if you want it. Calendar Item (Event) Properties Each calendar item has the following properties: title: The title of the event description: Detailed description of the event (in HTML, unless disabled) location: Where the event will take place author: Author of this item from: Timestamp of when the event begins to: Timestamp of when the event ends dateFrom: Formatted date string of when the event begins dateTo: Formatted date string of when the event ends See the module file for additional configuration options. EXAMPLES Example #1: Simplest example <?php // get the calendar module $cal = $modules->get("MarkupLoadGCal"); // set the feed URL: may be any google calendar XML feed URL $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); // find all items for December, 2011 $items = $cal->find('from=2011-12-1, to=2011-12-31'); // render items using built-in rendering echo $items->render(); Example #2: Rendering your own items <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find('from=2011-12-1, to=2011-12-31'); foreach($items as $item) { echo " <h2>{$item->title}</h2> <p> <b>Date From:</b> {$item->dateFrom} (Timestamp: {$item->from}) <br /> <b>Date To:</b> {$item->dateTo} (Timestamp: {$item->to}) <br /> <b>Location:</b> {$item->location} <br /> <b>Author:</b> {$item->author} </p> {$item->description} "; } Example #3: Finding Keywords <?php $cal = $modules->get("MarkupLoadGCal"); $cal->load('http://www.google.com/calendar/feeds/3icgo6ucgvsf6bi5orld9moqqc%40group.calendar.google.com/public/full'); $items = $cal->find("from=Aug 1 2011, to=Dec 1 2011, keywords=Eddie Owen"); echo $items->render(); ADDITIONAL INFO Options See the module's class file (MarkupLoadGCal) for a description of all options in the comments of the $options and $markup arrays at the top of the class file. Handling Errors If an error occurred when loading the feed, the $cal will have an 'error' property populated with a message of what error occurred: <?php $items = $cal->find("..."); if(empty($items) && $cal->error) { // an error occurred echo "Error! " . $cal->error; } $items will be blank if an error occurs, but it will always be of the same type, so it's up to you whether you want to detect errors. If you don't, then your calendar output will just indicate that nothing was found. Cache By default your calendar queries are cached for an hour. You can change the cache time by setting the $cal->cache property to the number of seconds you want it to cache. --- Edit: Added note that you must use the 'full' google calendar feed rather than the 'basic' one.
    1 point
  15. title inspiration TL;DR Unless a last bit of checking I am doing over the next short while concludes otherwise, I am going to convert all my sites to run from httpS connections <del>and ensure all the certificates I use are of type SHA-2 not SHA-1</del><ins>and later on ensure all the certificates I use are of type SHA-2 not SHA-1</ins> Dull detail I amy be wrong about a little or a lot of this stuff so please check my facts before you rush off and do stuff, but, I've learnt some new stuff over the last little while and thought I'd share with PW friends in case it's of any help. The following is just a bunch of things that I believe are correct and that may be helpful, sorry I had no time to write it up into a nice article/post: Google preferring websites that serve their pages over httpS connections (so clearly it's a good idea to make a website deliver pages over httpS) source many of the the companies selling certificates are selling SHA-1 type certificates rather than SHA-2—I (I bought two in recent months from different suppliers and they are both SHA-1)—want to test a site's certificate? Check out https://shaaaaaaaaaaaaa.com/ (even tho the URL looks mad I believe it's good and comes from this authoritative looking source: https://konklone.com/post/why-google-is-hurrying-the-web-to-kill-sha-1) Google are gradually sunsetting SHA-1 (in favour of SHA-2) Microsoft, Chrome, and Firefox all recently deprecated SHA-1, and plan to turn it off in 2017. source x
    1 point
  16. Yep, the certificate authorities are rubbing their hands in glee.
    1 point
  17. Very nice. I would have considered this for my last project a few weeks ago. I found theming is too limited for the embedded calendar, so I ended up using a fullcalendar fork on Github that added a Google-style agenda view. Still not ideal, but a rather nice interactive calendar without iframes. It would be worth taking a look at if you're wanting to add more flexibility.
    1 point
  18. Does it come complete with ProcessWire release deadlines?
    1 point
  19. Congratulations, you've just encountered the Baader-Meinhof Phenomenon
    1 point
  20. By id, or usually using the object ($modules->get("ProcessHome")).
    1 point
  21. Something like this should work <?php $tests = $pages->find("template=detail-testimonial, sort=-date"); foreach ($tests as $test) { $mydate = date("F", $test->getUnformatted("testimonial_date")); echo "{$mydate}<br/><h3>{$test->title}</h3><p>{$test->testimonial_body}</p><hr/>"; } Actually, i'm not sure that setting an extra var ($mydate) would be most efficient. You can also do it directly and then concatenate your stuff together.
    1 point
  22. Actually, on second thought (distracted thoughts while working on something totally non-PW), I think a test send would be a good idea - would be nice to see exactly what the users will getting emailed to them. Might take me a few days to get to this, but I will get to it as soon as I can.
    1 point
  23. Already said that SES is 100th of the price, but more work. This is interesting - Sendy hosting http://www.sendyhosting.com/
    1 point
  24. login() returns null if login failed so a test like $u->id would give a warning or error that $u is not an object. if($u) would also work here.
    1 point
  25. 1 point
  26. I don't think you need to place your data into admin branch. Why? It's meant for admin stuff and it would be no problem to put them in the root of home. If you don't have a template file they are not viewable or you could protect them by removing guest view access. I can't agree with that the page tree and editing sorting deleting or crud if you will is confusing. Quite the opposite. And this is from a experience in about dozen different projects with no technical savvy users. Often we don't even need to explain them. While you of course can easily build custom crud and stuff I thonk you do too much for thinga already there. You don't have to build that really. Edit. Don't get me wrong I don't mean it's all completely wrong. Just scratching my head and you must be hating me already To me it sounds like. Ok I want only data, no frontend so I pllace them in admin/ .. but then users can't access them or edit them so I create my rails mvc crud to let them do edit them. While you can easily place them outside admin/ and let PW handle all this jus fine. But maybe I don't get what really is the reason. Also you can render part of the tree in your module and have them edit using pw edit screen and sort or delete them with a fee lines of code.
    1 point
  27. I would highly recommend Mailchimp Joss, we send over 1.000.000 emails a month using MailChimp. For templates look at these blue prints: https://github.com/mailchimp/Email-Blueprints They are from Mailchimp and they know what the are doing.
    1 point
  28. Once you got the oats out of your keyboard, of course.... @totoff - Personally, I always had a soft spot for Yellowstone, but Yosemite is nice too.
    1 point
  29. Already running Yosemite on a 2014 MBA. I was really eager to get my hands on a feature that most people probably find rather whatever, but I loved it from the moment Apple first showed it at the keynote introducing Yosemite – doing iPhone calls on a Mac. (It does actually work well for me. No more having to pick up the call on the iPhone, plugging in headphone to have my hands free etc. Just accept the call on the Mac and talk.) Other than that, I'm okay with the new look. No idea why a lot of people are desperately looking for ways to replace the Finder icon, the folder icons in Finder and get Lucida Grande back. Also, I love the new iOS-style notification center. Oh, also, second-best feature in Yosemite: the F11/12 keys for controlling the sound volume now don't make sound any more by default. I'm really not going to miss those sounds at the start of each Skype call when everybody's adjusting their volume … Since I don't use MAMPP or the local Apache, no issues with that. However, I had to “repair” some Ruby gems that I had installed for whatever reasons. I really only use Sass/Compass and scss-lint, so I have no idea why those gems are even installed. Other than that, everything seems to work fine, I didn't even notice that the upgrade took longer than expected because of all the Homebrew stuff I have installed.
    1 point
  30. Until I bought Lister Pro, I did not fully realize how much it could increase your productivity. Working with the tree (or using the built-in search engine for quicker access) is intuitive, and I'd say fast enough in most cases, but it's a one-size-fits-all solution. With the tree, there's no easy way to group pages under different parents, or search for pages that fit one or more criteria and view and edit them quickly. Since Lister Pro is a customizable search engine, you can target with precision which criteria you'd like to use to return the pages you'd like to view and/or edit. In a few clicks, I can set up my own results in a easy-to-scan table view. You can save these results, and they show up under the "Pages" dropdown menu for quick access, which for me wasn't clear from Ryan's description of the plugin. This is incredibly powerful. Let's take an example. Let's say I run an Website showing cultural events across the US, organized by cities (New York, Washington, DC, etc.) and categories (Music, Performing arts, etc.). I have various editors. One of them would like to view only the events he's been assigned to, e.g. all music events created this year in Washington, DC. I can easily create a customizable admin view for him: The results look like this (the columns can be adjusted to your needs of course, and the editor can also filter the results even further): The editor has super quick access to his own "admin view" from here (I've called this page "Recent events" in this example): I can go ahead and create various views for each of my editors. If I work alone, I can do the same to gain quick create, view and/or edit access to whatever views I choose. I hope you can see the power of this module, and I'm not even talking about the included actions that let you manipulate the results, such as email users, exporting to CVS (very useful to export results for offline data analysis in Excel), etc.
    1 point
  31. Has the cheatsheet been updated for 2.5 ? It's unclear from the page itself what version of ProcessWire it is for or when it has been updated. Also, bonus points if it could be possible to highlight new or modified core functions.
    1 point
  32. @diogo: Let's drink, n speak some double dutch.
    1 point
  33. NP. I feel stupid all the time, that's why I continue trying not to be stupid.
    1 point
  34. You can change it in the setting of the Page List Process Module.
    1 point
×
×
  • Create New...