我无法处理来自 LinkedIn 的整个会员资料 auth thingy,我只想将我们的公开资料放到我们网站上的资料部分:
我可以使用 php 包含来执行此操作,一切都很好,除了它破坏了我的页面上已经存在的 jQuery,因此选项卡及其内容不起作用。
function getProfileDivs ($dbc, $pg) {
$q6 = "SELECT * FROM profilelinks WHERE parent='$_GET[title]' AND status=1 ORDER BY id ASC ";
$r6 = mysqli_query($dbc, $q6);
if ($r6) {
while ($link2 = mysqli_fetch_assoc($r6)) {
$thread=$link2['label'];
echo "<div id='".$thread."'>";
if ($thread=='Profile') {
$profile= $_GET['title'];
profilePost ($dbc, $pg);
echo '<div id="linkedin">';
include ('http://www.linkedin.com/in/abstrkt'.$profile.'');
echo '</div>';
}elseif ($thread=='Mixcloud'){
echo '<h2>'.$thread.'</h2>';
personalBlogs ($dbc, $pg, $thread);
echo "<script src='http://widget.mixcloud.com/media/js/follow_embed.js'></script>";
}else{
echo '<h2>'.$thread.'</h2>';
personalBlogs ($dbc, $pg, $thread);
}
echo '</div>'; }//create Divs dynamicallly CLOSE
}//get Div Id's from table and display CLOSE
}
我怎样才能隔离LinkedIn HTML refs,只影响它所在的这个名为配置文件的DIV ,从而仍然让我的选项卡正常工作?
目前它也影响全局 CSS。
这是根本不起作用的 iframe 代码,只是一个空白框:
if ($thread=='Profile') {
$profile= $_GET['title'];
profilePost ($dbc, $pg);
echo '<div id="linkedin">';
echo '<iframe src="http://www.linkedin.com/in/abstrkt'.$profile.'" width="100%" height="450px" scrolling="yes"></iframe>';
//include ('http://www.linkedin.com/in/abstrkt'.$profile.'');
echo '</div>';
here is what the iframes look like on view source of the page for the whole tabs structure, everything works like this except the 1st linkedin iframe:
<div id="MainContent" class="background1"> <div id="ProfileStructure" class="ProfileStructure"><ul><li><a href=#Profile>Profile</a></li><li><a href=#Soundcloud>Soundcloud</a></li><li><a href=#Mixcloud>Mixcloud</a></li><li><a href=#Vimeo>Vimeo</a></li><li><a href=#Programming>Programming</a></li></ul><div id='Profile'><div id="linkedin"><iframe src="http://www.linkedin.com/in/abstrktRobbie" width="100%" height="450px" scrolling="yes"></iframe></div></div><div id='Soundcloud'><h2>Soundcloud</h2><div id="blogPosts">
<table>
<tr><h3>Soundcloud by Robbie</h3></tr>
<tr><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F4985712&color=8267c9&auto_play=false&show_artwork=true"></iframe></tr>
</table> <br></br></div></div><div id='Mixcloud'><h2>Mixcloud</h2><div id="blogPosts">
<table>
<tr><h3>Mixcloud by Robbie</h3></tr>
<tr><div><object width="100%" height="480"><param name="movie" value="//www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2FEnnoia_Delusions_of_Self%2F%3Flimit%3D10&embed_uuid=90a1ce18-e71a-45f4-825f-c2097e674728&stylecolor=&embed_type=widget_standard"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="opaque"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.mixcloud.com/media/swf/player/mixcloudLoader.swf?feed=http%3A%2F%2Fwww.mixcloud.com%2FEnnoia_Delusions_of_Self%2F%3Flimit%3D10&embed_uuid=90a1ce18-e71a-45f4-825f-c2097e674728&stylecolor=&embed_type=widget_standard" type="application/x-shockwave-flash" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" width="100%" height="480"></embed></object><div style="clear:both; height:3px;"></div><p style="display:block; font-size:12px; font-family:Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#02a0c7; width:auto;"><a href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=resource_link" target="_blank" style="color:#02a0c7; font-weight:bold;">Latest Ennoia's Cloudcasts</a><span> on </span><a href="http://www.mixcloud.com/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=homepage_link" target="_blank" style="color:#02a0c7; font-weight:bold;"> Mixcloud</a></p><div style="clear:both; height:3px;"></div></div>
<div style="clear:both; height:3px; width:auto;"></div><p style="display:block; font-size:12px; font-family:Helvetica, Arial, sans-serif; margin:0; padding: 3px 4px; color:#f3eaf5; width:auto;"><a href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=resource_link" target="_blank" style="color:#f3eaf5; font-weight:bold;">Latest Ennoia's Cloudcasts</a><span> on </span><a href="http://www.mixcloud.com/?utm_source=widget&utm_medium=web&utm_campaign=base_links&utm_term=homepage_link" target="_blank" style="color:#f3eaf5; font-weight:bold;"> Mixcloud</a></p><div style="clear:both; height:3px;"></div>
<a class="mixcloud-follow-widget" href="http://www.mixcloud.com/Ennoia_Delusions_of_Self/" data-h="160" data-w="315" data-faces="on">Follow Ennoia on Mixcloud</a></tr>
</table> <br></br></div><script src='http://widget.mixcloud.com/media/js/follow_embed.js'></script></div><div id='Vimeo'><h2>Vimeo</h2><div id="blogPosts">
<table>
<tr><h3>Vimeo by Robbie</h3></tr>
<tr><iframe src="http://player.vimeo.com/hubnut/user/user2484971/uploaded_videos?color=000000&background=ffffff&slideshow=0&video_title=1&video_byline=1" height="450" width="100%"></iframe></tr>
</table> <br></br></div></div><div id='Programming'><h2>Programming</h2><div id="blogPosts">
<table>
</table> <br></br></div><div id="blogPosts">
.<br></tr>
</table> <br></br></div></div></div> </div>
编辑 3
所以这是直接从linkedin站点复制的api页面,其中包含我的api密钥号,这给了我这个错误:
'); IN.parse(document.getElementById("profile")) }) }
在我看来, ' 正在打开或关闭一些它之后无法读取的东西......在dreamweaver中,除了第6行之外,该行没有语法错误或任何东西,其中的关键是有一个使没有意义...一开始的数字 5 是红色的,但是如果我从下往上构建它,我可以让 Robbie Miller 出现,但是一旦我构建了它在 JS 中要求的配置文件 div,它就会这样做`
<html>
<head>
<title>Profile App Example</title>
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: 5m5y1ybx85gp
authorize: true
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5b1.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
<script type="text/javascript">
function loadData() {
IN.API.Profile("me")
.result(function(result) {
$("#profile").html('<script type="IN/FullMemberProfile" data-id="' + result.values[0].id + '"></script>');
IN.parse(document.getElementById("profile"))
})
}
</script>
</head>
<body class="yui3-skin-sam yui-skin-sam">
<div id="profile"></div>
<script type="IN/Login" data-onAuth="loadData"></script>
</body>
</html>`