Leaderboard
Popular Content
Showing content with the highest reputation on 08/21/2017 in all areas
-
Now in the modules directory. Want to update the module soon with some new flavors ... http://modules.processwire.com/modules/markup-processwire-photoswipe/ Cheers!4 points
-
Hey Horst, I think that in the time the lib was made, Twitter was still using OAuth 1.0A - but looking at their doc (twitter) OAuth2 is now supported (?), their doc also stipulate they still use OAuth 1.0A... https://dev.twitter.com/oauth I will look at more closely.3 points
-
https://processwire.com/blog/posts/processwire-3.0.40-core-updates/#tips-and-tricks2 points
-
wow for one i can say that is a lot of repeaters, each with a lot of fields. You probably need to ajax load the repeaters and repeater matrix fields to start, or put them all on a tab and ajax load that whole tab. with up to 10 entries on a repeater holding text, image, textarea (is this RTE?), and page ref (how many pages, and what inputfield are you using?), i would probably have gone with page table instead, though it might work. Also, assuming your MySQL instance is localhost? i have sometime seen some slowdowns when using MySQL hostnames, due to the additional DNS lookups; Have you tried optimizing and repairing all of the tables? also you may want to experiment with auto join for some fields here, but be careful, sometimes autojoin can cause problems...2 points
-
@everyone : More beta-tester needed ! If you have a bit time, a local or staging web server - feel free to test it on a prod server - and you want to try this module, please send me a private message ! This module can't harm your server It can be tested on the following ProcessWire version: 2.7.2 (no Composer here) 2.8.x 3.0.x @Ivan Gretsky wanna test it ?2 points
-
OAuth2Login for ProcessWire A Module which give you ability to login an existing user using your favorite thrid-party OAuth2 provider (i.e. Facebook, GitHub, Google, LinkedIn, etc.).. You can login from the backend to the backend directly or render a form on the frontend and redirect the user to a choosen page. Built on top of ThePhpLeague OAuth2-Client lib. Registration is not handled by this module but planned. Howto Install Install the module following this procedure: - http://modules.processwire.com/modules/oauth2-login/ - https://github.com/flydev-fr/OAuth2Login Next step, in order to use a provider, you need to use Composer to install each provider ie: to install Google, open a terminal, go to your root directory of pw and type the following command-line: composer require league/oauth2-google Tested providers/packages : Google : league/oauth2-google Facebook: league/oauth2-facebook Github: league/oauth2-github LinkedIn: league/oauth2-linkedin More third-party providers are available there. You should be able to add a provider by simply adding it to the JSON config file. Howto Use It First (and for testing purpose), you should create a new user in ProcessWire that reflect your real OAuth2 account information. The important informations are, Last Name, First Name and Email. The module will compare existing users by firstname, lastname and email; If the user match the informations, then he is logged in. ie, if my Google fullname is John Wick, then in ProcessWire, I create a new user Wick-John with email johnwick@mydomain.com Next step, go to your favorite provider and create an app in order to get the ClientId and ClientSecret keys. Ask on the forum if you have difficulties getting there. Once you got the keys for a provider, just paste it into the module settings and save it. One or more button should appear bellow the standard login form. The final step is to make your JSON configuration file. In this sample, the JSON config include all tested providers, you can of course edit it to suit your needs : { "providers": { "google": { "className": "Google", "packageName": "league/oauth2-google", "helpUrl": "https://console.developers.google.com/apis/credentials" }, "facebook": { "className": "Facebook", "packageName": "league/oauth2-facebook", "helpUrl": "https://developers.facebook.com/apps/", "options": { "graphApiVersion": "v2.10", "scope": "email" } }, "github": { "className": "Github", "packageName": "league/oauth2-github", "helpUrl": "https://github.com/settings/developers", "options": { "scope": "user:email" } }, "linkedin": { "className": "LinkedIn", "packageName": "league/oauth2-linkedin", "helpUrl": "https://www.linkedin.com/secure/developer" } } } Backend Usage In ready.php, call the module : if($page->template == 'admin') { $oauth2mod = $modules->get('Oauth2Login'); if($oauth2mod) $oauth2mod->hookBackend(); } Frontend Usage Small note: At this moment the render method is pretty simple. It output a InputfieldForm with InputfieldSubmit(s) into wrapped in a ul:li tag. Feedbacks and ideas welcome! For the following example, I created a page login and a template login which contain the following code : <?php namespace ProcessWire; if(!$user->isLoggedin()) { $options = array( 'buttonClass' => 'my_button_class', 'buttonValue' => 'Login with {provider}', // {{provider}} keyword 'prependMarkup' => '<div class="wrapper">', 'appendMarkup' => '</div>' ); $redirectUri = str_lreplace('//', '/', $config->urls->httpRoot . $page->url); $content = $modules->get('Oauth2Login')->config( array( 'redirect_uri' => $redirectUri, 'success_uri' => $page->url ) )->render($options); } The custom function lstr_replace() : /* * replace the last occurence of $search by $replace in $subject */ function str_lreplace($search, $replace, $subject) { return preg_replace('~(.*)' . preg_quote($search, '~') . '~', '$1' . $replace, $subject, 1); } Screenshot1 point
-
I like to showcase my new website acniti on the forum here. History Building and managing a website is a hobby, over the years, making websites got more complicated and more technologies, knowledge and wisdom are required. I started building my first website around 1997. It started out with a static site built with FrontPage, a WYSIWYG HTML editor. A few years later it was time for the first content management system, I looked at Joomla but settled for MediaWiki. I run those websites for 2 years on the MediaWiki platform and then moved on to WordPress. WordPress was good, it did a good job but over time, it became more complicated to make something out of the box, if it's not a blog, it becomes complicated and to have a feature rich website requires a lot of plugins. Little by little it became less fun and more and more hassle juggling the various plugins. In 2014 I became interested in learning PHP programming, I wanted to do this already for many years, but never had enough time to bite the bullet and work my way through the basics. At the end of the courses I though and now what have I learned, how to put this into action? To built modern website with PHP only is difficult, it also requires knowledge of html, MySQL, CSS, java-script etc. I started looking for a framework experimented a little with CakePHP and then came across Processwire via a CMS Critic blog post. Development setup I developed the acniti website on a Linux Ubuntu 16, with PHP 7 and MySQL as the development server. For the IDE I use PhpStorm, before using Storm I have used and tried some other IDE's such as Zend, Eclipse, Netbeans, Aptana but none of them I liked, some were feature poor, Zend and Eclipse were slow and use a lot of memory. PhpStorm not free but definitely worth the investment. I make use of the free tier Git repository of AWS called CodeCommit, I still use GIT Cola to commit the changes, I could also use PhpStorm for this but I never took the time to change my workflow. For project management I am a big fan of Redmine, Redmine is a web-based open-source project management and issue tracking tool. I use this also for my other work so it easily integrates with the website building flow as well. It's easy for maintaining lists of features you want to carry out per version, it supports a wiki which is easy for making notes and keeping a log of the activities. I use it everyday and it runs on Ruby. For images and graphics I switch back to Windows for some Photoshop. Processwire The acniti website runs on the latest stable Processwire version at the time of writing 3.0.62, the website has 4 languages including an Asian language. The Japanese language URL's are implemented with their 3 alphabets kanji, hiragana, katakana i.e. https://www.acniti.com/ja/インレットフィルタ. Some images on the site have text and image language tags help to select the correct language, the Processwire blog post from 30 June was helpful to get this running. The main site has a bootstrap theme, for the mobile version of the site the google AMP specification is implemented. This was really fun to do but challenging at times as the AMP specification is still a little limited. To visit the AMP pages type /amp/ behind any URL like https://www.acniti.com/amp/ for the homepage. The Google webmaster portal is really easy to troubleshoot and check for the correct AMP implementation. Finally structured data according to schema.org is added to the site via the JSON-LD markup. The commercial modules ProCache and Formbuilder are installed. The ProCache module is really amazing and makes the website lightning fast. Besides the commercial modules around eleven open-source modules are used, Database Backups, Tracy Debugger, Wire Mail SMTP, Protected Mode, Batcher, Upgrades, PublishAsHidden, URL (Multi-language), Twitter Feed Markup, Email Obfuscation (EMO), Login History, Selector test. During development the Processwire forum is really helpful and checked often. The forum is good for two reasons, most of the questions, I had during development of the site, are already on the site. Secondly the only 6 questions I posted over the last 2 years, are quickly and accurately answered. The downside I didn't become a very active member on the forum but see that as a compliment. An open issue on the acniti site is the AMP contact form with Formbuilder, the restricted usage of java-script for the AMP specification requires some more in-depth study. Hosting setup For the hosting services the acniti site uses Amazon EC2, I use AWS already many years to manage my cloud office so it was easy to decide to use it for the web hosting as well. The site is running on a micro instance of EC2 and with the ProCache module CloudFront is serving webpages worldwide fast. Updates from the development server are sent to CodeCommit and from there to the production server. From a site management point of view it would be nice to use AWS RDS to manage the MySQL databases, but from a cost perspective I decide not to do that for now. Via a cron I have set up automatic MySQL backups and these are via another cron job uploaded to AWS S3. To make sure the server is safe, a cron job runs daily snapshots of the server, this is getting initiated via AWS Lambda. Lambda also removes older snapshots because during creation a delete tag is attached for sevens days after their creation. It's important to make a separate MySQL backup as with snapshots the database often gets corrupted and its easier to restore a database backup than to fix a corrupted database. Another nice feature to use AWS Lambda for is a simple HTTP service health checker, which reports to you by email or sms when the website is down. Making use of all these Amazon services cost me probably somewhere between 10 - 15 $ a month, I have to estimate a little since I am running a lot more things on AWS than only the website. The site is running on a Comodo SSL certificate but next year I will change to the free LetsEncrypt, as it is easier to add and will automatically renew after 90 days. The Comodo certificate requires manually copy pasting and editing the certificates in place. Writing Content The content for the site I write in the Redmine wiki, most of the content I write requires research and it takes about two weeks before I publish the content to the Processwire site. For writing content I use the google spell checker with the grammar checker, After the Deadline. To ensure catchy headlines they are optimized with the Headline Analyzer from CoSchedule Social Media Now the site is running, it needs promotion. The robots.txt files shows the search engines the way as does the sitemap.xml both of these I have made in a template file. Most of the blog articles I promote are republished on social networks like, LinkedIn, Tumblr, Google+, Twitter, and some branch specific networks as the Waternetwork and Environmental XPRT. To check, the search engines index the site well, Google webmaster and Bing webmaster check for any problems with the site. For statics on the same server there is an instance installed of Piwik. Piwik is a leading open alternative to Google Analytics that gives full control over data. The Piwik setup works very well and gives a good overview of the site usage both on the desktop via the site or via a mobile app. As a part of a test I have installed the open-source SEO-panel on the same server to manage keywords and to further improve the scores in the search engine, a nice feature is that you can also track your competitors. I am still new to SEO panel and have to learn more how to use the tool effectively.1 point
-
And with, for example: $title = $page->get('header|title'); [ in _init.php ] and <h1><?php echo $title; ?></h1> [ in you template file ] ? (See the default profiles coming with a ProcessWire download before the installation process.)1 point
-
1 point
-
Okay, resolved Simple Contact Form issue and uninstalled that for now... Just for reference, I'm using Latte for the templates: contact-us.php $map = $modules->get('MarkupLeafletMap'); $view->map = $map->render($page, 'map'); $view->mapHead = $map->getLeafletMapHeaderLines(false); contact-us.latte {block headscripts}{include #parent} {$mapHead|noescape} {/block} .. {$map|noescape} For $map, only the container is rendered. The script is not appended to it.1 point
-
If it was me editing the pages, I could live with it, but for regular users is confusing. Not to mention paying customers .1 point
-
@Mustafa Online it will rely on a lot of files in the wire directory but in theory most things should be able to be overridden without changing files outside of the admin theme. To be honest I've not looked at this particular admin theme (no time recently) so I'm not even sure where to start. Hopefully you'll be able to work it out but please do ask questions if you get stuck.1 point
-
Hi, I've been invited by Apple to use their 'News' service for a publication in the UK. https://www.apple.com/uk/news/ A number of CMSs already have plugins to publish content via the API, however Processwire is not one (yet!) https://newsresources.apple.com/en/faq/66346243 It's slightly beyond my technical abilities but would be very interested in anyone that is willing to look at developing a Processwire Module. (for reference here is the Apple News API documentation) Update: Chapter Three have created a PHP Apple News library here https://github.com/chapter-three/AppleNewsAPI1 point
-
Thanks @abdus, I know about this possibility, but I would prevent this. Another solution would be to load the forms via Ajax. For the moment I will leave the template cache disabled.1 point
-
Not a solution but on form pages I disable template caching and opt for WireCache class for caching small bits of markup, like fetching pages and creating an <select> etc. https://processwire.com/api/ref/wire-cache/1 point
-
Hey, @flydev! I am sure those that are not beta testers will have most questions, so better ask us, eagerly waiting for the release, after it happens) Glad you are back here, by the way!1 point
-
1 point
-
Hello @ryanC, you can also use the shorter version <?=$urls->templates?> since PW 3.0.50. Regards, Andreas1 point
-
@Pete / @Tom. - Thanks - i tried to "RTL" the theme, but i found that it depends on a lot of files in "wire" directory, i don't know if that normal! Any way i will do my best to develop on it..1 point
-
@Mustafa Online The Admin Theme Uikit is ready to take to the next level by the community, however, no one has taken a grasp of that project yet. I sadly don't have the time yet to work on it, however I have ideas for it. I expect @renobird will pick it up at some point and guide the project. It will not hit master until UIkit comes out of beta, which from what they say, will be a very long time.1 point
-
I agree. I'd really like to be able to support ProcessWire and @ryan much more. We should have a git-backed documentation site. The Meteor Docs, as an example, are built in Hexo and managed on Github: https://docs.meteor.com We can then make sure it is up to date as a community instead of it resting on Ryan's shoulders.1 point
-
The module got renamed and updated a bit as its not intended to run only on the backend, but work also on frontend side. - Now, the administrator can choose to activate or not the backend login buttons. - The providers are added "dynamically". You have to simply edit a JSON config file which once saved, will show the required fields in the module settings. For example the following JSON config will only provide Google as login provider : { "providers": { "google": { "className": "Google", "packageName": "league/oauth2-google", "helpUrl": "https://console.developers.google.com/apis/credentials" } } } Small note for pw users : If like me you did not know, there is another module that manages OAuth2 authentication. Feel free to use the one which suit your needs! more info there: @jmartsch you should create a new module thread1 point
-
Heads up: after going through all the posts here I still couldn't get german month names to work. Reason for that was the configuration of the output formatting WRONG: date output format j. F Y results in 18. July 2017 RIGHT: date output format %e. %B %G results in 18. Juli 2017 The field description also states »Alternatively, you may use a PHP strftime format if desired for localization.« So I guess RTFM :-/1 point
-
Hi Pete, I remember you talking years ago about a hotel booking module. Did you ever progress this?1 point