ギャラリーのファイルを編集する必要があります。いくつかのファイルが見つかります。/wp-content/plugins/nextgen-gallery/view/
編集したいファイルは " gallery.php
" です。
通常は代替テキスト ( $image->alttext
) を表示するタイトルを置き換えます。ギャラリーtitle
は各サムネイルの " " を取得して大きく表示するため、ここに HTML コードを配置できます (エンコードする必要もあります)。
私のものを試してください(あなたが望むもの):
<?php foreach ( $images as $image ) : ?>
<div id="ngg-image-<?php echo $image->pid ?>" class="ngg-gallery-thumbnail-box" <?php echo $image->style ?> >
<div class="ngg-gallery-thumbnail" >
<?php $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."%23".$image->pid;
$url2 = $image->imageURL;
$url3 = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']."#".$image->pid; ?>
<a href="<?php echo $image->imageURL ?>" id="<?php echo $image->pid ?>" title="<?php //echo $image->alttext ?><?php
echo '<div class="nggfb" style="float:left;width:80px" class="share-custom" ><a class="share-custom sd-button" href="javascript:postToFeed(\''.$url3.'\',\''.$url2.'\');" style="float:left"><span style="background-image:url(&quot;http://www.starbasket.fr/wp-content/plugins/jetpack/modules/sharedaddy/images/facebook.png&quot;);">Partager</span></a></div>
<div class="tweets" style="width:100px;float:left">
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?url='.$url.'&counturl='.$url.'&hashtags=StarBasket&related=campstarbasket&via=campstarbasket&text=Une photo ! '.$url2.'" style="width:130px; height:20px;">Tweet</iframe>
</div>
<div style="float:left;width:80px;">
<iframe src="/wp-content/googleplus.php?url='.$url.'" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" style="border:0;width:100px;height:20px;"></iframe>
<meta itemprop="image" content="'.$url2.'">
</div>
<a class="small-button smallblack " style="height: 18px;padding-top: 0;" onClick=" return copy(\''.$url3.'\')" href="'.$url3.'">Copier</a>' ?>" <?php echo $image->thumbcode ?> >
<?php if ( !$image->hidden ) { ?>
<img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> />
<?php } ?>
</a>
</div>
</div>
<?php if ( $image->hidden ) continue; ?>
<?php if ( $gallery->columns > 0 && ++$i % $gallery->columns == 0 ) { ?>
<br style="clear: both" />
<?php } ?>
<?php endforeach; ?>
Facebookとコピー/貼り付け機能(「#」またはhtmlコード「%23」)のために別のURLを作成しました.WebページにアクセスせずにTwitterクライアントに表示するために、ファイルのURLも取得します。また、Facebook の場合は、ページ全体 (「#imageID」なし) のメタ og:url を使用するため、共有機能を使用できます。そのため、ダイアログ機能を選択します。Google+ は良いものを取りますが、サムネイルは取りません。