TYPO3 – Auto assign not-logged feuser to a fegroup
In today's short snippet, I'll give you the easiest way I now to to assign a fegroup to your visitors, without login.
1- Begin by creating your FEgroup if not done yet.
2- In your localconf.php, for exemple, add those lines :
-
$ip = $_SERVER['REMOTE_ADDR'];
3- Replace "GROUPID" by the id of the FEgroup.
Now all your visitors are members of this FEgroup.
Enjoy !
Javascript – Test if variable is numeric
Here's a simple way to check if a variable is numeric or not in javascript
-
function isNumeric(input) {
-
return (input - 0) == input && input.length > 0;
-
}
Enjoy
HowTo Detect SSL in PHP
Here's a little function I had to use today to detect SSL for payments.
It detects if SSL is on, if not, it redirect the user to the SSL url.
Enjoy
JS – setInterval tip
You want to use the Javascript function setInterval() but you dont know how ?
Or you tried but it doesn't work ?
I think you do the thing like this :
var timerId = setInterval('myFunction', 200);
but it doesn't works.
Try like this :
var timerId = setInterval(function() { myFunction(); } , 200);
Hope this snippet helps you.
See ya !
