コピペした時に
$req = Request::get();
忘れてました。
Tomoac さん。
おお。動作に問題は無いですが、これだと
URL が「index.php?cID=xxx」な時だと、その URL がシェアされてしまうので、
<?php
$SocBtnWidth=200; // width of comment area
$SocBtnHeight=50; // height of comment area
$req = Request::get();
if ($req->getRequestCollectionID() > 1 && $req->getRequestPath() == ''
&& $_SERVER['REQUEST_METHOD'] != 'POST') {
// This is a request that is directly for the cID, rather than the path
$u = new User();
// Get the page object for the current cID
if (!$c->isError()) {
?>
<div class="ccm-edit-mode-disabled-item" style="width:<?php echo $SocBtnWidth; ?>px; height:<?php echo $SocBtnHeight; ?>px;">
<div style="padding:8px 0px; padding-top: <?php echo round($SocBtnHeight/2)-10; ?>px;"><?php echo t('Content disabled in edit mode.'); ?></div>
</div>
<?php } else { ?>
// ここに、URL がきちんと表示された時に表示する
<?php } ?>
tomoac
Re: Re: ソーシャルボタン
基本的なことを。
if ($req->getRequestCollection .... で、$req が生成されていないのでエラーが出ます。
getRequestCollection()の仕様は、APIの仕様をみればいいのでしょうか。