Why this tab doesn't work? - facebook

I have added this tab in my page but I can't send invite to my friends. It doesn't work !! Why ?
I have used this code:
<?php $url_inc="<fb:req-choice url='http://facebook.com/Anti.Social.Development' label='Partecipa' />"; ?>
<center>
<fb:fbml>
<fb:request-form
action="index.php"
method="POST"
invite="true"
type="InvitoSpeciale"
content="Ti invito <?php echo htmlentities($url_inc); ?> " >
<fb:multi-friend-selector cols="3" rows="3" showborder="false" actiontext="Invita i tuoi amici.">
<fb:request-form-submit />
</fb:request-form>
</fb:fbml>
</center>
<fb:share-button class="meta">
<meta name="medium" content="mult"/>
<meta name="title" content="name of fan page"/>
<meta name="description" content="description of fan page"/>
<link rel="image_src" href="url to image location" />
<link rel="target_url" href="http://facebook.com/Anti.Social.Development"/>
</fb:share-button>

Hello Senior as for as I have understood you are closing extra one ">" bracket after your content heading.
For me the below code works
<fb:serverFbml width="760px">
<script type="text/fbml">
<fb:fbml>
<fb:request-form
action='http://apps.facebook.com/yoursite/'
method='POST'
type='photo fun'
content="Let's fun with facebook
<fb:req-choice url='http://www.yoursite.com' label='Register'/>"
<fb:multi-friend-selector actiontext="Select your friends."></fb:multi-friend-selector>
</fb:request-form>
</fb:fbml>
</script>
</fb:serverFbml>

Related

iframe src from form input

any ideas how to have say a set url for iframe like mysite.com/ and then this input form would add the input field to the end like mysite.com/txtsrc?
<html>
<head>
<title>Blah.</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function SetSrc()
{
document.getElementById("myIfreme").src = document.getElementById("txtSRC").value;
}
</script>
</head>
<body>
<form>
Enter URL:
<input type="text" id="txtSRC" />
<input type="button" value="GO" onclick="SetSrc()" />
</form>
<iframe id="myIfreme" src="" frameborder="0" marginwidth="0" scrolling="yes"></iframe>
</body>
</html>
so rather than user inputting the full src i want mysite.com/then the form input after that but so user would not have to put mysite.com/
thanks in advance
i have tried but failed anyone able to help?

Height of a <div> in a bootstrap form

I have this in a bootstrap form:
Name
"/>
<div class="form-group ">
<label class="control-label col-sm-3 col-xs-3 col-md-3 col-lg-3" for="email">E-mail</label><?php echo #$_SESSION['ctform']['email_error'] ?>
<div class="col-sm-7 col-xs-7 col-md-7 col-lg-7">
<input class="form-control" id="email" name="ct_email" type="text" value="<?php echo htmlspecialchars(#$_SESSION['ctform']['ct_email']) ?>"/>
</div>
</div>
I cannot define the height of my and as a result I have a lot of space (200px) between the fields. Any idea how to solve this? Thank you.
Try to do this way:
var el = document.querySelector(".form-group");
el.style.width = "200px";
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<form class="form-inline">
<div class="form-group">
<label for="email">Email:</label>
<?php echo #$_SESSION['ctform']['email_error'] ?>
<input class="form-control" id="email" name="ct_email" type="text" value="<?php echo htmlspecialchars(#$_SESSION['ctform']['ct_email']) ?>"/>
</div>
</form>
</body>
</html>
https://www.w3schools.com/code/tryit.asp?filename=FENK34MFH506

Mikrotic Social Login

I am trying to create a hotspot portal on a Microtik HAP RB951Ui-2nD. I can add users and remove them and it works fine, but the problem is that I want to use it with facebook authentication basically, everything should be working fine, with apache in my localhost it seems to work perfectly fine, but when I actually use it in mikrotik the facebook features that my login should have, are not there.
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WIFI-KECE</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
$(if chap-id)
<form name="sendin" action="$(link-login-only)" method="post">
<input type="hidden" name="username" />
<input type="hidden" name="password" />
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
</form>
<script type="text/javascript" src="/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
//-->
</script>
$(endif)
<div class="container">
<div class="col-md-offset-4 col-md-4">
<div class="login-box">
<header>
<h1>Welcome</h2>
<small>Login now! </small>
</header>
$(if error) <p style="color:#ff0000;text-align:center;"><small>$(error)</small> $(endif)
<form class="login" name="login" action="$(link-login-only)" method="post"
$(if chap-id) onSubmit="return doLogin()" $(endif)>
<input type="hidden" name="dst" value="$(link-orig)" />
<input type="hidden" name="popup" value="true" />
<div class="form-group">
<input class="form-control" name="username" type="text" value="$(username)" placeholder="Username" required/>
</div>
<div class="form-group">
<input class="form-control" name="password" type="password" placeholder="Password" />
</div>
<button type="submit" class="btn btn-default btn-block">LOGIN</button>
$(if trial == 'yes')
<div class="second-login text-center">Or you can log in a way like our facebook page.</div>
<div style="margin: 0 auto; width: 150px;">
<div class="fb-like" data-href="https://www.facebook.com/zeroumit" data-layout="button_count" data-action="like" data-size="large" data-show-faces="false" data-share="true"></div>
<div id="fb-root"></div>
</div>
<script>
window.fbAsyncInit = function() {
FB.init({ appId: '1271642732875588',
status: true,
cookie: true,
xfbml: true,
oauth: true,
version: 'v2.5'});
FB.Event.subscribe('edge.create',
function(response) {
window.location = "$(link-login-only)?dst=$(link-orig-esc)&username=T-$(mac-esc)";
}
);
FB.Event.subscribe('edge.remove',
function(response) {
window.location = "$(link-logout)";
}
);
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
$(endif)
</form>
</div>
</div>
</div>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
<!--
document.login.username.focus();
//-->
</script>
</body>
This is my login.html
Basically the like button, share etc is not there.
You must allow in walled-garden the FB domains
/ip hotspot walled-garden
add dst-host=*facebook* action=allow
add dst-host=*fbcdn* action=allow
add dst-host=*fb* action=allow
add dst-host=*akamai* action=allow
You can try cloud radius billing and social login for mikrotik at www.cloud-hotspot.com

jQuery Mobile on PhoneGap - List Example Looks bad, components overlaps

I just downloaded PhoneGap to try it. I made an XCode Project and it's working alright. Then, I wanted to try some jQuery Mobile on it, so added this to the default Hello World Page of Cordoba:
I added, to the head:
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
And then on the body:
<ul data-role="listview" data-inset="true" data-filter="true">
<li>Acura</li>
<li>Audi</li>
<li>BMW</li>
<li>Cadillac</li>
<li>Ferrari</li>
</ul>
I thought it would go fine, but look how it comes out:
Here's all the code in case you want to take a look at it. Am I doing something wrong?
<!DOCTYPE html> <html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>
<div>
<h1>Apache Cordova</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
<ul data-role="listview" data-inset="true" data-filter="true">
<li>Acura</li>
<li>Audi</li>
<li>BMW</li>
<li>Cadillac</li>
<li>Ferrari</li>
</ul>
</div>
<script type="text/javascript" src="cordova-2.7.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body> </html>
I was missing the
<div data-role="content">
wrapping the list. That was all.
Here's all the code in case it's useful for someone:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<title>Hello World</title>
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.3.1.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Apache Cordova</h1>
</div>
<div>
<h1>Some text</h1>
</div>
<div data-role="content">
<ul data-role="listview" data-inset="true" data-filter="true">
<li>Acura</li>
<li>Audi</li>
<li>BMW</li>
<li>Cadillac</li>
<li>Ferrari</li>
</ul>
</div>
</div>
<script type="text/javascript" src="cordova-2.7.0.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>

Input iFrame Source from Form Input

I want my iFrame window to show the URL I enter from the Form Text box, To that I want the iframe src="" to be changed to the form field input. How can I do that? Here is a sample code that I intent to use.
<html>
<head>
<title>Blah.</title>
<link href="style.css"rel="stylesheet" type="text/css" />
</head>
<body>
<form>
Enter URL: <input type="text" />
<input type="submit" value="GO" />
</form>
<iframe src="" frameborder="0" marginwidth="0" scrolling="yes"></iframe>
</body>
</html>
Try this.
<html>
<head>
<title>Blah.</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function SetSrc()
{
document.getElementById("myIfreme").src = document.getElementById("txtSRC").value;
}
</script>
</head>
<body>
<form>
Enter URL:
<input type="text" id="txtSRC" />
<input type="button" value="GO" onclick="SetSrc()" />
</form>
<iframe id="myIfreme" src="" frameborder="0" marginwidth="0" scrolling="yes"></iframe>
</body>
</html>