| 我加了个分享代码,可以分享到任一博客,基本上都支持,还有一定美化作用。预览:http://www.hedyou.com/plugin.php?id=vgallery:vgallery&tion=view&vid=1 
 下面说下怎么加代码。找到插件,template/gallery_view文件  记事本打开找到:
 
 <tr>
 <td width="640" valign="top">
 
 
 
 <!--{if $viewdata[vinfo]}-->
 <div class="bm bml">
 <table border="0" width="100%" cellspacing="0" cellpadding="0">
 
 
 上面加以下代码:
 <P>如果喜欢,请分享给你认识的人吧,O(∩_∩)O谢谢!</p>
 <!-- 分享给网友-->
 <p id="ckepop">
 <span class="jiathis_txt">分享推荐到:</span>
 <a class="jiathis_button_qzone">QQ空间</a>
 <a class="jiathis_button_tsina">新浪微博</a>
 <a class="jiathis_button_renren">人人网</a>
 <a class="jiathis_button_kaixin001">开心网</a>
 <a href="http://www.jiathis.com/share/" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank">更多</a>
 <a class="jiathis_counter_style"></a>
 </p>
 <script type="text/javascript" src="http://v2.jiathis.com/code/jia.js" charset="utf-8"></script>
 <!-- 分享完成 -->
 
 JIATJIS的代码,放心使用。
 
 至于下载,那PHP我倒是没能力全部写,优酷大概是这样的吧:php代码:
 
 function getSid() {
 $sid = time().(rand(0,9000)+10000);
 return $sid;
 }
 
 function getkey($key1,$key2){
 $a = hexdec($key1);
 $b = $a ^ 0xA55AA5A5;
 $b = dechex($b);
 return $key2.$b;
 }
 
 function getfileid($fileId,$seed) {
 $mixed = getMixString($seed);
 $ids = explode("*",$fileId);
 unset($ids[count($ids)-1]);
 $realId = "";
 for ($i=0;$i < count($ids);++$i) {
 $idx = $ids[$i];
 $realId .= substr($mixed,$idx,1);
 }
 return $realId;
 }
 
 function getMixString($seed) {
 $mixed = "";
 $source = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/\\:._-1234567890";
 
 $len = strlen($source);
 for($i=0;$i< $len;++$i){
 $seed = ($seed * 211 + 30031) % 65536;
 $index = ($seed / 65536 * strlen($source));
 $c = substr($source,$index,1);
 $mixed .= $c;
 $source = str_replace($c, "",$source);
 }
 return $mixed;
 }
 
 
 有能力希望有人可以增加下载的功能,这样就更强大了。
 
 对了,能弹字幕的话会比直接评论更有意思。基本就是用XML标记时间来弹幕。我不会写。
 |