aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-10 21:13:37 -0700
committerfriendica <info@friendica.com>2012-10-10 21:13:37 -0700
commitb16a40b13ecfa7e64a849c126abe2b45604418c4 (patch)
tree108694a7cbf1bee620387b2402b0036e17815004 /mod
parent794c92a8fb789f604c869e9adabf5aae24cd90d6 (diff)
downloadvolse-hubzilla-b16a40b13ecfa7e64a849c126abe2b45604418c4.tar.gz
volse-hubzilla-b16a40b13ecfa7e64a849c126abe2b45604418c4.tar.bz2
volse-hubzilla-b16a40b13ecfa7e64a849c126abe2b45604418c4.zip
profile in a window for those who think all profiles and all pages on the internet should look exactly like theirs
Diffstat (limited to 'mod')
-rw-r--r--mod/abook.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/mod/abook.php b/mod/abook.php
index ee402d394..7aa4e9e05 100644
--- a/mod/abook.php
+++ b/mod/abook.php
@@ -153,6 +153,60 @@ function abook_content(&$a) {
if(argc() == 3) {
+
+ $cmd = argv(1);
+ if($cmd === 'profile') {
+ $xchan_hash = argv(2);
+
+ if($xchan_hash) {
+ $r = q("select * from xchan where xchan_hash = '%s' limit 1",
+ dbesc($xchan_hash)
+ );
+ if($r && count($r)) {
+$o .= <<< EOT
+<script language="JavaScript">
+<!--
+function resize_iframe()
+{
+ if(typeof(window.innerHeight) != 'undefined') {
+ var height=window.innerHeight;//Firefox
+ }
+ else {
+ if (typeof(document.body.clientHeight) != 'undefined')
+ {
+ var height=document.body.clientHeight;//IE
+ }
+ }
+
+ //resize the iframe according to the size of the
+ //window (all these should be on the same line)
+ document.getElementById("glu").style.height=parseInt(height-document.getElementById("glu").offsetTop-8)+"px";
+}
+
+// this will resize the iframe every
+// time you change the size of the window.
+window.onresize=resize_iframe;
+
+//Instead of using this you can use:
+// <BODY onresize="resize_iframe()">
+
+
+//-->
+</script>
+
+
+<iframe id="glu" width="100%" src="{$r[0]['xchan_profile']}" onload="resize_iframe()">
+</iframe>
+
+EOT;
+
+
+ // $o .= '<div id="profile-frame-wrapper" style="width: 100%; height: 100%;"><iframe id="profile-frame" src="' . $r[0]['xchan_profile'] . '" style="width: 100%; height: 100%;"></iframe></div>';
+ return $o;
+ }
+ }
+ }
+
$contact_id = intval(argv(1));
if(! $contact_id)
return;