Ross,
Problem One:
I was tweaking with the registration system some more and created an account and for some reason the validation email is being received like this![]()
http://i25.photobucket.com/albums/c51/dog199200/errorvalid.j pg
The username, password, none of that can even be seen.
Problem Two:
After a few guess and hit clicks to be able to click the validation link, it gave me this:
http://www.divineshadowsonline.com/action/validate/key/9f0ba 05d0918fec982589156cd469451
The problem is that it doesn't work to well since the url to use it is http://www.forum.divineshadowsonline.com/action/validate/key /9f0ba05d0918fec982589156cd469 451 so its seeing my domain, but ignoring my subdomain which don't work.
Question:
I know there is a check in the API to see if the forum is sending the email, but how can you get it so that the forum doesn't send the email at all, where I can send my own custom email, from one of my own email addresses, and yet still be able to send the validation keys and stuff?
Problem 1: It's having trouble loading the skin information. I'll have to check what you've got setup and what it is trying to load. I'll probably also put in a fail-safe so if it cannot find a skin to load it uses some basic one with a font size defined.
Problem 2: I will have to check which domain it attempts to use. It may need two domains defining (one for cookies and one for e-mail links). I'll do some tests and get back to you.
OK oh and speaking of domains, i'd also like to note that the API doesn't exactly work to well with cross domain related things, and that includes sub-domains. I can logout of the forum at the same time as the website, but if there is places using another sub-domain like http://www.store.divineshadowsonline.com, it wont log out of it, even if all the system are exactly the same ![]()
You would need to make sure that all cookies are stored on the .divineshadowsonline.com domain. I've not looked at #2 yet so am not sure what domain your forum is using for cookies yet.
#1 should now be fixed.
Ok i'll test out the first bug and see if its fixed.
after for two, if its calling off of the forum for the cookie that cause the problem XD
any luck in finding out what domain all the cookies and stuff are being saved too as well as the second problem I pointed out?
I'm just trialling a fix for the cookie issues. I've run out of time now but will try to get it applied to your forum sometime tomorrow (it also requires a slight change to the API)
ok np, i'll just need an idea of how much it effect my coding, most everything i have done it login checks
ok np, i'll just need an idea of how much it effect my coding, most everything i have done it login checks
It's just a case of changing 3 lines in the vforums_api.php file![]()
ah ok, so nothing drastic XD
OK, I have the necessary changes to the forum. Now for the API. In the vforums_api.php change these lines:
header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
if($this -> domain && !empty($this -> domain)) {
header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
}
With this:
if($this -> domain && !empty($this -> domain)) {
header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
} else {
header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
}
Then, whenever you initiate the API you need to ensure you set the third parameter as your domain (without the www)
$vf = new vforums_api('username.vforums.co.uk', 'SecretKey', 'divineshadowsonline.com');
I'd recommend manually clearing the cookies / using a fresh browser to test it incase you have old cookies stored still.
What one do I change, ro do I chanve both cases that this shows up?Code:
- header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
- header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
- if($this -> domain && !empty($this -> domain)) {
- header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
- header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
- }
Its shows up under both Logout and login_user functions
Just for login. Logout is slightly different![]()
yea i just noticed that when looking at then through a syntax highlighter
Edit: Ok it seems to be working ok, at least its not breaking the code. I just changed hosts and they have yet to configure my DNS settings for me, so I can't test the sub-domains, but i will as soon as I can. As well seems as if the email is working right again so thank you very much![]()
I can confirm that it's working properly, because I registered and got the email, and it looked normal.