Jump to content

Harmster

Members
  • Posts

    137
  • Joined

  • Last visited

About Harmster

  • Birthday 10/07/1994

Profile Information

  • Gender
    Male
  • Location
    Netherlands

Contact Methods

  • Skype
    hawiak

Recent Profile Visitors

7,894 profile views

Harmster's Achievements

Sr. Member

Sr. Member (5/6)

100

Reputation

1

Community Answers

  1. Hey I'm trying to log a user in with a cookie. cookie stuff works fine as far as I can tell but logging the user in without a password gives me a bucket of problems. $u = $users->get($user_id); set_remember_me($u->name, $wire); echo "<br />Username retrieved from: ".$u->name; $users->setCurrentUser($u); $session->_user_id = $u->id; echo "<br />After setting current user: ".$user->name $remember->trash(); It echoes the following: Username retrieved from: Harmster After setting current user: guest What am i doing wrong, or what is the correct way to do this?
  2. Hey, I started on my tag system with repeaters... It works, but I get a bunch of errors... And I've got no idea what the problem is. These are errors in the session->error and I've put them in a JQuery plugin called toastr. It looks like this: What can I do to change this? Or is this only in debug mode and it doesn't really matter?
  3. The main reason for people not switching to Linux based distros is still that they are not confortable on it. Even I as a developer find it hard to get into Linux just because I grew up using Windows 98, xp, 7 and now 8 and I'm not used to the terminal, which linux distro's heavily rely on. And as for the most famous desktop distro for linux, Ubuntu... The Unity UI is just horrid, it feels so cheap... And + the fact that most of the business software wont run on linux distros, it still is a poor gaming platform (thanks to steam its getting better) it's just not as easy as windows is... And the fact that XP support ends.... Boy.. that aint a suprise...
  4. Hey, [NOTE] I have no idea if there's a better way, already a module that does the same or slightly different I just made this and I love to share this in case someone needs it! Onto the intro: every time I use the PHP Mail() function I find myself frustrated in the way I receive these e-mails so I found a library PHPMailer that lets you use SMTP fairly simple and because I love processwire I made this into a module Get it here: Github Basicly you use it almost the same as the PHP mail function, but this time you setup your SMTP (I've tested it with gmail) and call a method called send() on $phpmailer. Here's settings for gmail: - security: tls - port: 587 here's a example of usage: $subject = 'test'; $message = "Test message"; $r = $phpmailer->send($subject, $message, array($user->email => $user->first_name. " " .$user->last_name)); Arguments: - Subject: string - Message: string(html or whatever) - Recipient: array(email:string => name:string) - Attachment: array(path:string) !OPTIONAL It returns a 1 on success and an error string on failure. Use it, or don't. See you all around
  5. You'll also get errors when you use $config->paths->root in images etc (500 i believe) but if you use $config->urls->root you'll get away with it. I believe there's a different way of approaching things. Not sure why, never really looked into it but if someone is able and willing to explain that would be nice!
  6. Hey, The title may be misleading, I just lack the correct definition. I have 2 templates, Tags and Images. The tags template has 2 fields, a PageField Image with a link to an image and a TextField Title that functions as a tagname. Now I am building a search function and I am trying to achieve a 'join' like behavior where I can search on tags (Title) but in the Tags templates but also on Title in the Image templates and join them in a PageArray together (Only the Image templates, just retrieve the Image template with the Tag template's field Image). How do I achieve this with Processwire Selectors? In MySQL I think I would do something like this: SELECT tag as t, image as i WHERE t.tag=$tag OR i.title=$title JOIN tag ON t.image=i.id //This is far from correct but only used to give an indication of what I am trying to achieve..
  7. But thats for HTTP requests, I dont think PHP even uses that if you include a file? Since its called UrlRewrite. I'll try it this afternoon or tomorrow with the 2.4 on a webserver (If i can get one in time) I doubt that its inpossible top include files since if you just include a php file on a template it works too. EDIT: Did you make a page for Login? ill try and upload a complete 2.4 version with the module installed so that you can see what we did different. Give me half an hour EDIT2: I am a bit confused about the behavior of the HybridAuth... It takes me a bit longer EDIT3: I've encountered the same problem. I think I need to find a fodler that doesnt have that restriction but I cant seem to find one...
  8. Oh, never knew that. Ive developed a few modules that always let me include PHP files, I am not sure whether or not that is a HTTP call, since I only include it. - Localhost - 2.3 - http://localhost/index Ive registered http://localhost:80 on facebook both as app and as website. As for now I dont have a webhost available (....) but it shouldn't make any difference.. What are you trying to do? I've got it working by having the module folder (called ProcessHybridAuth) in the /site/modules/ folder then install it via the processwire admin and the put the code I wrote down earlier on a template called index (The home page / ) and then accesing it by localhost/project/
  9. if you assign level1 = 1 and then try to print an array i doubt it will work since you assigned an int or even a bool (Since 1 could also be true) and you try to print an array If you wish to print it should work with $level1 = array(1); That and i dont really understand your question, try and formulate your question instead of just stating a line and another line.
  10. No, never seen that issue to be honest. I just placed all the files in /site/modules/ and I installed it since the module will include the Auth and then create the object in the module itself. I did use it on a template though.
  11. Okay (Sorry for double posting, but I think this is worthy of having its own post) https://github.com/hawiak/hybridauthforprocesswire I've started witht he devleopment, I haven't tested anything because I am running this on a local machine, as for now the module has a bunch of inputfields and generates an object hybridauth, this is then bound to a fuel in the init() method and hoepfully you will be able to use it in your project as $hybridauth. Are there people that could help me with this? Or atleast test it? EDIT: It does work for facebook: Ive put this on my index(It throws a redirect loop but thats because its on my index_ if (isset($_REQUEST['hauth_start'])){ Hybrid_Endpoint::process(); } $adapter = $hybridauth->authenticate("Facebook"); $user_profile = $adapter->getUserProfile(); print_r($user_profile);
  12. Alright, sounds really good, I'll take a look today I have a few days spare and I think the everyone here could find this enjoyable. I'll let you know
  13. Very interesting Plugin, though, what do you expect from a plugin in processwire? It seems like its almost ready to use as it is?
  14. Could you also provide some code, Its hard to reproduce the error without it.
×
×
  • Create New...