Leaderboard
Popular Content
Showing content with the highest reputation on 01/22/2015 in all areas
-
if someone can check I have done this right, I would be obliged as I ain't no module developer! This is a very simple text formatter that looks for @ and # and adds the appropriate links to twitter. So, @profile will become http://www.twitter.com/profile and #searchterm will become http://twitter.com/search?q=searchterm It uses preg_replace as a quick and dirty solution rather than the Twitter API - so no apps need to be created and so on. https://github.com/jsanglier/TextformaterTwitterReplace Obviously, if you use @something and #something regularly and DONT want them linked, then this is useless for you. But quite nice for blogging purposes Unsolicited thanks to Netcarver because I nicked one of his modules to work out how to do it Joss7 points
-
In case you haven't seen it yet: https://www.cmscritic.com/2014-critics-choice-award-winner-best-free-php-cms ProcessWire won the CMS Critics 2014 Best Free PHP CMS Award.7 points
-
I have say the cynical side of me can think of all kinds of scenarios: Someone hacks them so suddenly all lamp posts disappear on the street, or you think a hole has appeared in front of you - you ignore it only to find it really HAS opened up in front of you. Your kid messes around with the setting and you are being attacked by butterflies at work all day. Hospital admission increase as holo wearers keep walking into people texting. It starts heated debates between designers and manufacturers as to what "blue" actually is. Advertisers are sued for all the accidents they cause. When you take them off you run screaming under the bed clothes because "my world is sooo empty!" People keep hitting each other as they swat at imaginary screens ..... And so on. Google is pulling google glass, I note. Good thing really. I went into a restaurant a couple of months ago and some bloke was wearing a pair. five or six people, including me, asked him to remove them so we could be sure he was not filming us. I did invent something called the Holonet about fifteen years ago in a book I was writing (which I really should finish one day) It was the replacement for the internet and was a sentient system where each package of data had its own sense of family and would deliver itself by any means possible. It might use a wire, it might use an air current, or invade the mind of a flea on a dog, or catch a falling star - the entire system becomes a mystery to the designers as they have no idea how packages get from one place to another. Bit like the beer service in our local pub, come to think of it.....5 points
-
When I was a rebellious teenager in the 1970s, the idea of being so wired up to the world so the world would always know where I was would have been horrific. The whole point of being crazy and rebellious was that we could "escape" and "drop-out" True escapism, the real cool proper stuff, was something self-experienced and only shared in a very defined, personal way. Now, escapism seems to mean, "standing still so the world can see you are doing exactly the same as millions of others." The uniqueness is gone. I have always promised myself that if I woke up one day and was insanely rich, I would start a "Disconnect" movement. Under the terms you would set a point in your life (retirement, or whenever) when you would kill your internet connection, throw away your mobile, turn off your virtual reality and bin the PC/Tablet/inplant and simply deal with the life you could see and touch around you. It would be the final statement of being human: "That is it. I have used it as I wished and it got stuff out of me and I got stuff out of it. But now, I am going away and am no longer sharing. Goodbye and thanks for all the fish."4 points
-
The module uses now the WireMail function instead of php mail. Besides I added the tag "scf" for fields and templates created by this module (just available on a new installation).4 points
-
Games play a bigger role in our lives than most think. They let us escape from reality much like films do too but are interactive in a broader sense. Gadgets like glass or this holo go in the same direction but are far more driven by making money and trying to get something out we actually don't need. Kapitalismus if you wish. Wow effect. Look at what we can do!.. Exploring and getting new territory in our daily live that's yet free from ads and stuff like that. Perfectly trying to create new opportunities to blend in some thing and manipulate us. Google car is also a wonderful example. Driving a car doesn't let you use a phone or Google. Imagine wearing glasses that can be controlled by third parties track you and your behavior even more. I'm not sure we let this happen as easily as hey think. Joss says it well. We want to make our own experience with real object humans and nature. At some point breaking out of this will become a deep necessity.2 points
-
// Skip the label as long as it's blank $submit->set('skipLabel', Inputfield::skipLabelBlank);2 points
-
I'm sorry I was under the impression I couldn't select time, only days, with SchedulePages. After your comment I double checked and well... problem solved. I guess I'm ready to go (and ditch WP) Thank you.2 points
-
Here's a drop-in paste-in for getting the "view" tab on the edit screen to open in a new window: (put this in your ProcessPageEdit.js ) $(function(){ $('a#_ProcessPageEditView').click(function(){ window.open(this.href); return false; }); });2 points
-
Websites often provide content not only as on list of stuff, but with some sort of category. The most flexible way in ProcessWire to manage such a categorization are with PageFields. Form example with a structure like this. - Magazine (magazine) - Articles - Article 1 (article) - Article 2 - Article 3 - … - Categories - Category 1 (category) - Category 2 - … Templatenames in parentheses Now all articles have a url structure like: "…/magazine/articles/articlename/" The categories are looking like: "…/magazine/categories/categoryname/" But it can be useful to also provide the articles as part of the categories like this: "…/magazine/categories/categoryname/articlename/" Because ProcessWire doesn't provide such functionality by default, we'll use urlSegments. These have to be enabled in the template-settings for the category template. This template therefore fulfills two different jobs. Displaying a list of containing articles, as well as rendering the articles which are linked by the list. A simple example of a existing category.php could be: <?php // category.php $articles = $pages->find("template=article, category=$page"); // This example uses a deligated template approach. // Feel free to use your own way of templating, // but this is also a simple way to explain this. $content = renderArticleList($articles); include("./_main.php"); Now we need to include the logic to seperate the default rendered article-list to the now added rendering of the called article. <?php // category.php // Throw a 404 Error if more than one segment is provided if($input->urlSegment2) throw new Wire404Exception(); if($input->urlSegment1){ // Show the called article // Sanitize the input for pageNames $name = $sanitizer->pageName($input->urlSegment1); // Search for the article with this name $article = $pages->get("template=article, name=$name"); // Throw an 404 error if no article is found if(!$article->id) throw new Wire404Exception(); // Explicitly set the original url of the article for the <link type="canonical" href=""> tag $article->canonical = $article->url; // Render the page, like if it was normally called. // $page->url will not updated to the "categorized" url for the rendering-part // so you need to have that in mind if you provide some sort of breadcrumb echo $article->render(); }else{ // Show the list of articles of the current category $articles = $pages->find("template=article, category=$page"); // The generateCategoryUrls() function is new, because // $page->url would provide the wrong urls. // Details are provided later $content = renderArticleList( generateCategoryUrls($articles, $page) ); include("./_main.php"); } Now if we call this "…/magazine/categories/categoryname/articlename/" we'll get the right article rendered out instead of the article-list. Now we need to talk about the article-list, which would - without changes - still render the "wrong" urls to all those articles. Therefore I added the generateCategoryUrls() function. This function iterates over the pageArray and adds a second url to all those articles. <?php // part of _func.php function generateCategoryUrls($list, $category){ foreach($list as $item){ $item->categoryUrl = $category->url.$item->name."/"; } return $list; } The last thing missing is the actual template which gets rendered by renderArticleList(). This would normally call for $article->url to get the url to the article. We want this to render our second url if we are on a category site. To let the template still be useable by non category sites, we just change the parts, where to url is used form the current $article->url to $article->get("categoryUrl|url"). Only if the additional urls are provided they get rendered or it falls back to the normal urls of the articles. There we go, with such a setup all categorized articles are reachable via both urls. A small addition to explain the $article->canonical I used in the category.php. For SEO it's not good to provide the same content on multiple pages without explicitly declaring which of the duplicated ones should be the original / indexed one. By providing the following link tag we provide this declaration. The extra field I use isn't really necessary, because $page->url still is the standart ProcessWire url of the shown article. But I like this to be visibile in the code, that this is a dublicate. <link rel="canonical" href="<?php echo $page->get("canonical|url") ?>"/> Hope you like the explanation. Feel free to give feedback on this. Based on the example shown in the wiki: http://wiki.processwire.com/index.php/URL_Segments_in_category_tree_example1 point
-
: Microsoft HoloLens, project holograms with a headset anywhere in your house or working place. Looks very cool. Looks to have way better functionality than google glass or todays augmented reality. It is said that this is going to work together with windows 10.1 point
-
Btw, unrelated, note that it is possible to change the author of a post. When editing the post, just go to its settings tab and under 'Created by User' you can change the user.1 point
-
Cool. But that will just show the number of posts they have but not (necessarily) sorted according to their individual posts count. For that you would need something like this... $posts = $pages->find("template=blog-post, sort=created_users_id.count");//you might want to limit results depending on use case //test it....it should output the list in DESC order... foreach ($posts as $post) { echo $post->createdUser->title . ' - ' . $post->title . '<br>'; } Count selectors – finding matches by quantity http://processwire.com/api/selectors/#count1 point
-
People giggle at me with my allotment, which I have had to give up. But it has always been important to me to be able to run away on my own terms. When I was sixteen in the hot summer of 1976, it was about running away on my bike, running to secret places with my mad girl friend, and picking up a guitar at any given point and playing with people not having a clue as to who I was, where I was from or what I stood for. In my fities (ish) the running away with the girlfriend (rather non-existent at present) is probably unlikely and my songs seem too "out there" for most people. But yelling at a stupid turnip that has refused to grow - Heaven! If my total disconnect idea does not appeal to most, maybe a partial disconnect is in order. One of the most successful and sustainable weight reduction diets is the 5/2 fasting diet - eat well for five days and fast for a couple. Perhaps that should be routine for technology too. Every five days, whatever the weather, you have to stand outside your door and just watch and listen (and shoot at anyone who walks past wearing VR goggles!)1 point
-
Soma, I just got around to using this module, and it's great! It makes setting all these up SO much easier. Thanks man.1 point
-
1 point
-
Funny, I did that too. We're all gonna look like we're on drugs. Luckily, however, the headset would explain it. Picture what it'd be like if this stuff was done with a small chip implanted in the brain. No headset.1 point
-
1 point
-
It's funny if you take a look at the video, ignore the hologram stuff and just analyse the actions of the people there. Then you'll realise how much has to happen, before something like this really gets useful. By now it's just barely more than a 3D monitor. A year ago I wrote my bachelor theses about virtual reality and the interaction of those, but with the extra feature of (theoretical) haptic feedback of those holograms. That's the point when this will get suddenly much more interesting.1 point
-
I've added a barebone module to the processwire recipes site, so maybe people will just point to a single source for something like this and Soma doesn't have to ramble about details as much https://processwire-recipes.com/recipes/extending-page-save-process/1 point
-
Hi Mike, Jumplinks sounds exactly what I need, especially the mapping collections. I'll try it out right now.1 point
-
Yeah, I copied and pasted the regex - it has always been greek to me. Of course, I can't make it completely fool proof - for instance a username that does not exist! "Did you mean....?"1 point
-
1 point
-
I am not sure on this, but I wonder if Page Path History can handle that URL format? Have you thought about using the Redirects module (http://modules.processwire.com/modules/process-redirects/) or the new Advance Redirects / Jumplinks (https://processwire.com/talk/topic/8697-alpha-processadvancedredirects/). I am also curious how you did your import. I am thinking of adding redirect support to the MigratorWordpress module (https://github.com/NicoKnoll/MigratorWordpress) and will probably use one of those two modules to do it. I would want to add both the ID based and SEO friendly WP links as redirects - any thoughts?1 point
-
The one thing about Processwire uses is that most of them have ended up here having really trawled round the field, so have a pretty good perspective. When I think of all those I have tried (and I have use less than many): PHP News script thingy (no database required and bugger all security either) Mambo Drupal Joomla/Seblod (an attempt to make Joomla more versatile, but ends up hugely bloated) Dreamweaver Impakt TikiWiki Liferay And all those I have long forgotten1 point
-
@PeterDK, I'm not sure if this is really possible nor if it is a good idea, but I want to throw it into the discussion: If you can use symlinks, maybe you can setup two hosts that point to the same directories of wire and site, but have there own index.php and own .htaccess. admin.domain.tld | |--index |--htaccess | |-------------------site-symlink----------| |-------------------wire-symlink--------| | | | | |---------------------site-real | | |---------wire-real | | | | | |-------------------wire-symlink-------------| | |-------------------site-symlink------------------------------------ | |--index |--htaccess | www.doamin.tld1 point
-
@joss Yes that would be a good way of putting and would also gain more respect. I know what you mean by some WP users & WP promoters. It is often stated by them as a matter of fact that Wordpress is the best without even trying anything else.1 point
-
A pull request has been issued, let's see whether Ryan adopts the change. This would likely also fix the issue reported here: https://github.com/ryancramerdesign/ProcessHannaCode/issues/81 point
-
Great stuff but I do think that some might accuse cms critic of being a little biased though I do totally agree with the result. But saying that cms critic is probably in a better position than most to make such a judgment after testing and using so many content management systems.1 point
-
New year, new site online http://schutzbelueftung.de/ This time industry client, they build ventilation systems for diggers, earth movers and stuff like that. Pretty interesting. English version is in the works, should be ready by march. This is the second page featering my pagetable extended module, with which the client can easily build an individual layout out of predefined layout elements. That means: Everything on the site is filled by the client, all images and text. One special thing is the database of their installations: http://schutzbelueftung.de/aufbaubeispiele/ Here you can filter by company, type field of application. This is done by ajax in the background, so easy to build with the PW selectors <31 point
-
Thx vxda, fixed. Since you also can swipe the images, I don't see the necessity in enlarging the arrows on mobile though1 point
-
Recursive Hanna Code Hanna Code currently (version 1.9) does not support recursive Hanna tags, for example one Hanna Code tag is rendereing a partial which again contains another Hanna Code tag. As I needed that requirement I made changes to support recursion to my private repository. Is that something useful to the wider community? If yes I could issue a pull request.1 point
-
Nice site . Found a bug: user is unable to click right arrow on carousel on lower resolutions (theres some div covering arrow), see attached screen. I would also sugest making arrows bit bigger for mobile devices. Good job . http://snag.gy/HsVTA.jpg1 point
-
Hi Pete - I will do so shortly. Thanks. Edit - though, the module isn't compatible with 2.5, so I can't add it... Could we perhaps add a 2.6-dev to that list?1 point
-
@everfree.. it would be good to have a definitive module that combines all of the ideas and features needed to have this working in all possible scenarios, and all different page select (asm, autocomplete, list) types.. Being able to set what fields it applies to is probably a much needed feature.. Originally the module I made was borne out of a need on a a site that i'm finishing now, a record label where the albums need to have artists added as pages... but then once you add or create a new artist you need to go right away and do some settings, like type, instruments, bio, sort name etc. so it would have been difficult to go and search for the artist you just added in order to do those settings... I have now used it on 2 additional new projects and implemented it on 3-4 other sites and i do find it pretty much indispensable.., and it will likely be in every site from now on..1 point
-
2.5.3 is the stable version, so this should be included even there.1 point
-
@n0sleeves just tried ngrok, that's even 4w3s0m3r thanks I like pay what you want services, because in my experience, they almost always have great support (they are kind and not of the greedy type), and I end up paying more that for other services without that model. We have a great pwyw hoster here in Germany, uberspace, they rule!1 point
-
Check your image's fields Input Tab and tick checkbox at 'Overwrite existing files?' Since version 2.5.11 point
-
@ajben - very nice - some of my 'older' clients would probably benefit from a simpler admin (even though pw admin with Reno is IMHO state of the art..)! Would be willing to contribute, help in any way to push forward alternative admin themes!1 point
-
Damn you guys, I don't answer anything anymore.....1 point
-
Okay, so I've actually decided to rename the module to ProcessJumplinks. I prefer it. https://github.com/mike-anthony/ProcessJumplinks Hit counter is done. Still need to work on importing from Redirects module - I'll do that tomorrow as I'm super-tired now. I don't think I'm going to make this compatible with the current stable (2.5.3). If you really want me to, please let me know. Will also work on docs soon - though my intro post covers a lot. Nice to have docs, however.1 point
-
@everfree.. did you see my version of this - might be similar.. (yours looks a lot more definitive..) my version is super simple, just enables a feature that as Soma pointed out is already in the core; and then using some jQuery, enables the editing of pages in other types of page selects like autocomplete, page list select etc.. https://processwire.com/talk/topic/8477-adminpageselecteditlinks-module-for-enabling-edit-links-on-multipage-selects/?p=820201 point
-
Nice idea, but I would personally go for a dedicated table for this. Perhaps you could steal some ideas from teppo's ChangeLog module: http://modules.processwire.com/modules/process-changelog/1 point
-
As a former (well, still current WP developer due to certain clients), I can tell you that your search is in fact over.1 point
-
You got the right CMS (==love) if you don't think/ask yourself "Is it(==he/she) may the right one?" anymore1 point
-
Welcome chadamas, I've been using PW since late 2011, and I don't think about CMS's anymore. I suspect you will never look back.1 point
-
Had to do this yesterday. But this works only on the newest dev version of processwire, because Ryan just implemented the removeTab() method. Older versions will still show the tab, but no actual form to delete something. <?php /** * ProcessWire 'Hello world' demonstration module * * ProcessWire 2.x * Copyright (C) 2014 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com * */ class RemoveDeleteTab extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( 'title' => 'RemoveDeleteTab', 'version' => 1, 'summary' => '…', 'singular' => true, 'autoload' => true, ); } public function init() { // Remove Settings Tab in Global settings for non superadmins $this->addHookAfter('ProcessPageEdit::buildForm', $this, "removeDeleteTab"); } public function removeDeleteTab(HookEvent $event){ // check what role the user has, if superuser do nothing if($this->user->isSuperuser()) return; $page = $event->object->getPage(); if($page->template->name === "settings"){ $form = $event->return; $fieldset = $form->find("id=ProcessPageEditDelete")->first(); $form->remove($fieldset); $event->object->removeTab("ProcessPageEditDelete"); $event->return = $form; } } }1 point
-
Just wanted to mention that neither of these are necessary. The CKEditor module already handles both of these settings. The enterMode is already hard-coded for ENTER_P. And you can disable ACF (i.e. allowedContent=true) by unchecking the "Use ACF" box in the field settings, which applies this.1 point
-
Just a little hint: in config.js, you can add these lines: config.allowedContent = true; // don't filter anything, i.e. allow custom style / classes / id etc. config.enterMode = CKEDITOR.ENTER_P; // by default, CKEditor wraps everything in DIVs - annoying. This will wrap everything in <p> tags1 point
-
That's my code. I always use jquery for instant registration without refreshing page, so my code is composed of 3 parts. The html form, the javascript that performs the validation (also check if username and email are already used) and the php that performs registration process. After registration user will redirect to profile page with welcome message. There are some code lines you probably don't need but you can easily clean...simple php. Note: because of jquery you cannot have the php code inside PW folders so i have an external folder called "process" with all my php files called by jquery at the same level of "site" folder, in this case "/process/register.php". P.S.: i'm using jquery validate plugin for validation. FORM <script type="text/javascript" src="/site/templates/scripts/register.js"></script> <div class="row"> <div class="span16"> <fieldset> <legend></legend> <form action='/iscrizione/' method='post' id="registerform"> <div class="clearfix"><label for="login_name">Username</label><div class="input"><input type="text" id="login_name" name="login_name" value="" maxlength="50" /></div></div> <div class="clearfix"><label for="login_pass">Password</label><div class="input"><input type="password" id="login_pass" name="login_pass" value="" /></div></div> <div class="clearfix"><label for="confirm_pass">Ripeti password</label><div class="input"><input type="password" name="confirm_pass" value="" /></div></div> <div class="clearfix"><label for="email">Email</label><div class="input"><input type="text" name="email" id="email" value="" maxlength="40" /></div></div> <div class="actions"> <input type="submit" value="Iscriviti" class="btn primary" name="register_submit" id="register_submit" /> </div> </form> </fieldset> </div> </div> JS $(document).ready(function(){ $("#registerform").validate({ debug: false, rules: { login_name: { required: true, minlength: 6, remote: "/process/username.php" }, login_pass: { required: true, minlength: 6 }, confirm_pass: { required: true, minlength: 6, equalTo: "#login_pass" }, email: { required: true, email: true, remote: "/process/emails.php" } }, messages: { login_name: { required: "Inserisci il tuo username", minlength: jQuery.format("Inserisci almeno {0} caratteri"), remote: jQuery.validator.format("Lo username {0} non è disponibile.") }, login_pass: { required: "Inserisci la password", minlength: jQuery.format("Inserisci almeno {0} caratteri") }, confirm_pass: { required: "Ripeti la password", minlength: jQuery.format("Inserisci almeno {0} caratteri"), equalTo: "Le password non sono uguali" }, email: { required: true, email: "Inserisci una email valida", remote: jQuery.validator.format("Questa email è già presente nel nostro database.") }, }, submitHandler: function(form) { $("#register_submit").attr('value','Attendi...'); $("#register_submit").attr('disabled', 'disabled'); $.post('/process/register.php', $("#registerform").serialize(), function(data) { if (data=='success'){ var url = "/mioprofilo/"; $(location).attr('href',url); }else{ $(".span16").prepend( $(data).hide().fadeIn('slow') ); $(".error").fadeOut(5000); $("#register_submit").attr('value','Iscriviti'); $("#register_submit").removeAttr('disabled'); } }); } }); }); PHP <?php require_once('../index.php'); require_once('class.tempmail.php'); $input = wire('input'); $sanitizer = wire('sanitizer'); $roles = wire('roles'); if($input->post->register_submit) { $username = $sanitizer->username($input->post->login_name); $pass = $input->post->login_pass; $email = $sanitizer->email($input->post->email); $u = new User(); $u->name = $username; $u->pass = $pass; $u->email = $email; $u->roles->add($roles->get("guest")); $u->roles->add($roles->get("utente-basic")); // my custom role $u->save(); // i add profile picture to every user after registration using 5 different random avatar images. $pnum = rand(0,5); $profilephoto = wire('config')->paths->root."site/templates/styles/images/noprofile".$pnum.".jpg"; $u->profilephoto->add($profilephoto); $u->profilethumb->add($profilephoto); $u->save(); if (wire('session')->login($username, $pass)){ $array_content[]=array("username", $username); $array_content[]=array("login", $username); $array_content[]=array("password", $pass); $admin_id = "noreply@domain.com"; $user_email = $email; sendingemail_phpmailer($array_content, "register.html","class.phpmailer.php","Sitename",$admin_id,$user_email,"Welcome to website"); print "success"; }else{ print '<div class="alert-message error"> <p>Errore durante la registrazione. Riprova.</p> </div>'; } } ?> Code for checking the existing email (or username, same code, just change variable) <?php require_once('../index.php'); $email = trim(strtolower($_REQUEST['email'])); $sql_check=wire('users')->find("email=$email"); if($sql_check<>""){ echo 'false'; }else{ echo 'true'; } ?> And that's the login HTML FORM <?php if ($session->get("_user_id")){ $session->redirect('/'); } ?> <? include('./head.inc'); ?> <div class="topbar"> <div class="fill"> <div class="container"> <h3><a href="/">Sitename</a></h3> <ul class="nav"> <li class="active"><a href="/">Login</a></li> </ul> </div> </div> </div> <br><br><br> <script type="text/javascript" src="/site/templates/scripts/login.js"></script> <div class="container"> <div class="content"> <div class="page-header"> <h1><?php echo $page->title; ?><small> effettua l'accesso</small></h1> </div> <div class="row"> <div class="span16"> <fieldset id="formlogin"> <legend>Login</legend> <form action='/login/' method='post' id="loginform"> <div class="clearfix"><label for="login_name">Username</label><div class="input"><input type="text" name="login_name" value="" class="required" /></div></div> <div class="clearfix"><label for="login_pass">Password</label><div class="input"><input type="password" name="login_pass" value="" class="required" /></div></div> <div class="actions"> <input type="submit" value="Accedi" class="btn primary" name="login_submit" id="login_submit" /> </div> </form> </fieldset> </div> </div> </div> <? include('./foot.inc'); ?> </div> <!-- /container --> </body> </html> JS $(document).ready(function(){ $("#loginform").validate({ debug: false, rules: { login_name: { required: true }, login_pass: { required: true } }, messages: { login_name: "Inserisci il tuo username", login_pass: "Inserisci la password", }, submitHandler: function(form) { $("#login_submit").attr('value','Sto accedendo...'); $("#login_submit").attr('disabled', 'disabled'); $.post('/process/login.php', $("#loginform").serialize(), function(data) { if (data=='success'){ var url = "/"; $(location).attr('href',url); }else{ $(".span16").prepend( $(data).hide().fadeIn('slow') ); $(".error").fadeOut(5000); $("#login_submit").attr('value','Accedi'); $("#login_submit").removeAttr('disabled'); } }); } }); }); PHP <?php require_once('../index.php'); $input = wire('input'); if($input->post->login_submit) { $name = wire('sanitizer')->username($input->post->login_name); $pass = $input->post->login_pass; if(wire('session')->login($name, $pass)){ print 'success'; }else{ print '<div class="alert-message error"> <p>Dati non validi. Riprova</p> </div>'; } } ?> After registration i send a welcome email. That's the tempmail php that use the well known phpmailer class for sending emails adding templating functionality. You need to download the class.phpmailer.php from the web. <? function sendingemail_phpmailer ($var_array,$template,$phpmailer,$FromName,$From,$to,$Subject,$videolist){ if (!is_array($var_array)){ echo "first variable should be an array. ITS NOT !"; exit; } require_once($phpmailer); $mail = new PHPMailer(); $mail->IsSendmail(); // telling the class to use SMTP $mail->Host = ""; // SMTP server $mail->FromName = $FromName; $mail->Sender = $FromName; $mail->From = $From; $mail->AddAddress($to); $mail->Subject = $Subject; $mail->IsHTML(true); $filename = $template; $fd = fopen ($filename, "r"); $mailcontent = fread ($fd, filesize ($filename)); foreach ($var_array as $key=>$value){ $mailcontent = str_replace("%%$value[0]%%", $value[1],$mailcontent ); } $mailcontent = stripslashes($mailcontent); fclose ($fd); $mail->Body=$mailcontent; if(!$mail->Send()){ echo "Errore durante l'invio del messaggio"; exit; } } ?>1 point