Aug 31

刚才又申请个GGAD帐号

现在手里的300多个垃圾站每天加在一起大概能有几千IP,好的话可能会上万吧,猜的~~~呵呵

不挂点广告白瞎了,呵呵

所以刚才又申请个GGAD帐号,准备拿这个帐号专门来挂垃圾站的

看看一个月能挂多少银子吧

期待。。。。。。。。。。

written by Toby \\ tags: ,

Aug 27

这个月总是忘记更新博客

可能是上次PR更新伤了我的心吧,PR3快1年了,也不升4,哎

也可能确实太忙了???谁知道呢?

牡丹江交友网的UCH插件也没时间弄,一些SEO博客也让朋友帮忙更新了

最近实在腾不出手来干些别的了

就连自己的小博客都好几次忘记更新,也不知道自己天天脑子里在想些什么东西~~

written by Toby

Aug 25

受朋友邀请,给他的新站做个链接

他的站百度总是不收录,到处问怎么办,实在没有办法,只能找些链接加加看了~

不知道该怎么写了,呵呵

下边是软文部分 PS:

铃声屋 www.lingshengwu.com

铃声站 www.lingshengzhan.com

呵呵,所谓软文就是取巧的方式来做链接或起到宣传的作用

我现在已经做完链接啦、也已经起到宣传的作用了

只不过作用小了一些而已,呵呵

如果这也算一篇软文的话,那么我估计没有比我这再简洁的软文了  :)

written by Toby \\ tags:

Aug 24

刚看了2008北京奥运会闭幕式,心里激动ing~~~~~~~

就连刘奇先生在讲话时也激动的不得了

我想每个中国人心里都应该十分激动吧

虽然才开了不久就要闭幕了

说实话,我还没开够呢  - -!

为什么不多开些日子啊

以后天天开才好呢,嘿嘿

哎,4年一届不知道中国什么时候才可以再申请

希望马上去申请,这届开的这么成功,中国应该很容易申请到第2次吧~~

在2012年英国奥运会上中国会有多少个金牌呢?期待。。。

written by Toby \\ tags: ,

Aug 22

早上闲着没事看了下友情链接部分

发现30个链接只有一半仍然链着我了,尴尬!

一直以来也没检查链接的习惯,今天突然一看,吓了自己一跳。

把没链接我的博客统统删掉了。

还剩15个,但是有问题的也不少

http://www.luckylvyou.com/  落叶知秋  404错误 

http://www.fireyy.com/     Ifireyy  百年难更新一次

http://www.yd631.com/blog/  D JOY 已经放弃的博客,哎

这3个虽然有问题,不想再链接了,但是也留着,毕竟在我博客上链了这么久,有感情了。

再有就是对于2个月以上不更新的博客,无法访问的博客都删掉了。不好意思

 ——————————–

PS:

下午跟D JOY聊了会,说我可以撤下他那个被放弃的博客了,哎。。。

written by Toby \\ tags:

Aug 20

关于UCH中安装了投票后首页的FEED动态显示出现”feed_comment_”问题解决方案:

先下重新下载插件

送礼1.5版 下载地址: uch_gift_115_gbk (586.93 KB)

投票1.5版 下载地址: uch_vote_115 (21.12 KB)

问答1.5版 下载地址: uch_ask_115_gbk (14.05 KB)

然后复制下下面代码生成cp_comment.php文件 ,覆盖到source/cp_comment.php下即可

或直接下载  cp_comment (3.13KB)  直接覆盖。

演示地址:www.mdjlove.com

<?php
/*
 [UCenter Home] (C) 2007-2008 Comsenz Inc.
 $Id: cp_comment.php 8338 2008-08-04 06:09:51Z liguode $
*/

if(!defined(’IN_UCHOME’)) {
 exit(’Access Denied’);
}

include_once(S_ROOT.’./source/function_bbcode.php’);

//共用变量
$tospace = $pic = $blog = $album = $vote = array();

if(submitcheck(’commentsubmit’)) {

 if(!checkperm(’allowcomment’)) {
  showmessage(’no_privilege’);
 }
 //实名认证
 ckrealname(’comment’);

 //判断是否发布太快
 $waittime = interval_check(’post’);
 if($waittime > 0) {
  showmessage(’operating_too_fast’,”,1,array($waittime));
 }

 $message = getstr($_POST['message'], 0, 1, 1, 1, 2);
 if(strlen($message) < 2) {
  showmessage(’content_is_too_short’);
 }

 //摘要
 $summay = getstr($message, 150, 1, 1, 0, 0, -1);

 $id = intval($_POST['id']);

 //引用评论
 $cid = empty($_POST['cid'])?0:intval($_POST['cid']);
 $comment = array();
 if($cid) {
  $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’comment’).” WHERE cid=’$cid’ AND id=’$id’ AND idtype=’$_POST[idtype]‘”);
  $comment = $_SGLOBAL['db']->fetch_array($query);
  if($comment && $comment['authorid'] != $_SGLOBAL['supe_uid']) {
   //实名
   realname_set($comment['authorid'], $comment['author']);
   realname_get();
   
   $comment['message'] = preg_replace(”/\<div class=\”quote\”\>\<span class=\”q\”\>.*?\<\/span\>\<\/div\>/is”, ”, $comment['message']);
   //bbcode转换
   $comment['message'] = html2bbcode($comment['message']);
   $message = addslashes(”<div class=\”quote\”><span class=\”q\”><b>”.$_SN[$comment['authorid']].”</b>: “.getstr($comment['message'], 150, 0, 0, 0, 2).’</span></div>’).$message;
   if($comment['idtype']==’uid’) {
    $id = $comment['authorid'];
   }
  } else {
   $comment = array();
  }
 }

 //对输入的id、idtype进行检查
 checkcomment($id, $_POST['idtype']);

 //事件
 $fs = array();
 $fs['icon'] = ‘comment’;
 $fs['target_ids'] = $fs['friend'] = ”;

 switch ($_POST['idtype']) {
  case ‘uid’:
   //事件
   $fs['icon'] = ‘wall’;
   $fs['title_template'] = cplang(’feed_comment_space’);
   $fs['title_data'] = array(’touser’=>”<a href=\”space.php?uid=$tospace[uid]\”>”.$_SN[$tospace['uid']].”</a>”);
   $fs['body_template'] = ”;
   $fs['body_data'] = array();
   $fs['body_general'] = ”;
   $fs['images'] = array();
   $fs['image_links'] = array();
   break;
  case ‘picid’:
   //事件
   $fs['title_template'] = cplang(’feed_comment_image’);
   $fs['title_data'] = array(’touser’=>”<a href=\”space.php?uid=$tospace[uid]\”>”.$_SN[$tospace['uid']].”</a>”);
   $fs['body_template'] = ‘{pic_title}’;
   $fs['body_data'] = array(’pic_title’=>$pic['title']);
   $fs['body_general'] = $summay;
   $fs['images'] = array(mkpicurl($pic));
   $fs['image_links'] = array(”space.php?uid=$tospace[uid]&do=album&picid=$pic[picid]“);
   $fs['target_ids'] = $album['target_ids'];
   $fs['friend'] = $album['friend'];
   break;
  case ‘blogid’:
   //更新评论统计
   $_SGLOBAL['db']->query(”UPDATE “.tname(’blog’).” SET replynum=replynum+1 WHERE blogid=’$id’”);
   //事件
   $fs['title_template'] = cplang(’feed_comment_blog’);
   $fs['title_data'] = array(’touser’=>”<a href=\”space.php?uid=$tospace[uid]\”>”.$_SN[$tospace['uid']].”</a>”, ‘blog’=>”<a href=\”space.php?uid=$tospace[uid]&do=blog&id=$id\”>$blog[subject]</a>”);
   $fs['body_template'] = ”;
   $fs['body_data'] = array();
   $fs['body_general'] = ”;
   $fs['target_ids'] = $blog['target_ids'];
   $fs['friend'] = $blog['friend'];
   break;
  case ’sid’:
   //事件
   $fs['title_template'] = cplang(’feed_comment_share’);
   $fs['title_data'] = array(’touser’=>”<a href=\”space.php?uid=$tospace[uid]\”>”.$_SN[$tospace['uid']].”</a>”, ’share’=>”<a href=\”space.php?uid=$tospace[uid]&do=share&id=$id\”>”.cplang(’share’).”</a>”);
   $fs['body_template'] = ”;
   $fs['body_data'] = array();
   $fs['body_general'] = ”;
   break;
  //为了投票能使用系统评论而添加 1
  case ‘app_vote_id’: 
   //事件
   $fs['title_template'] = “{actor} 评论了”.$_POST['app_name'].” {touser}”;
   $fs['title_data'] = array(’touser’=>”<a href=\”".$_POST['refer'].”\”>{$_POST['app_title']}</a>”);
   $fs['body_template'] = ”;
   $fs['body_data'] = array();
   //$fs['body_general'] = ”;
   break; 
 }

 $setarr = array(
  ’uid’ => $tospace['uid'],
  ’id’ => $id,
  ’idtype’ => $_POST['idtype'],
  ’authorid’ => $_SGLOBAL['supe_uid'],
  ’author’ => $_SGLOBAL['supe_username'],
  ’dateline’ => $_SGLOBAL['timestamp'],
  ’message’ => $message,
  ’ip’ => getonlineip()
 );
 //入库
 $cid = inserttable(’comment’, $setarr, 1);

 switch ($_POST['idtype']) {
  case ‘uid’:
   $n_url = “space.php?uid=$tospace[uid]&do=wall&cid=$cid”;
   $note_type = ‘wall’;
   $note = cplang(’note_wall’, array($n_url));
   $q_note = cplang(’note_wall_reply’, array($n_url));
   if($comment) {
    $msg = ‘note_wall_reply_success’;
    $magvalues = array($_SN[$tospace['uid']]);
   } else {
    $msg = ‘do_success’;
    $magvalues = array();
   }
   $msgtype = ‘comment_friend’;
   break;
  case ‘picid’:
   $n_url = “space.php?uid=$tospace[uid]&do=album&picid=$id&cid=$cid”;
   $note_type = ‘piccomment’;
   $note = cplang(’note_pic_comment’, array($n_url));
   $q_note = cplang(’note_pic_comment_reply’, array($n_url));
   $msg = ‘do_success’;
   $magvalues = array();
   $msgtype = ‘photo_comment’;
   break;
  case ‘blogid’:
   //通知
   $n_url = “space.php?uid=$tospace[uid]&do=blog&id=$id&cid=$cid”;
   $note_type = ‘blogcomment’;
   $note = cplang(’note_blog_comment’, array($n_url, $blog['subject']));
   $q_note = cplang(’note_blog_comment_reply’, array($n_url));
   $msg = ‘do_success’;
   $magvalues = array();
   $msgtype = ‘blog_comment’;
   break;
  case ’sid’:
   //分享
   $n_url = “space.php?uid=$tospace[uid]&do=share&id=$id&cid=$cid”;
   $note_type = ’sharecomment’;
   $note = cplang(’note_share_comment’, array($n_url));
   $q_note = cplang(’note_share_comment_reply’, array($n_url));
   $msg = ‘do_success’;
   $magvalues = array();
   $msgtype = ’share_comment’;
   break;
  //为了投票能使用系统评论而添加 2
  case ‘app_vote_id’:
   $n_url = “app.php?do=vote&ac=view&id=$id&uid=$tospace[uid]“;
   $note_type = ‘app_comment’;
   $note = “评论了你的投票 <a href=’{$n_url}’ target=’_blank’>”.addslashes($_POST['app_title']).”</a>”;
   $q_note = “回复了你的投票 <a href=’{$n_url}’ target=’_blank’>”.addslashes($_POST['app_title']).”</a>”;
   $msg = ‘do_success’;
   $magvalues = array();
   $msgtype = ‘app_comment’;
   break; 
 }

 //发送邮件通知
 $msgtype = empty($comment)?$msgtype:$msgtype.’_reply’;
 $touid = empty($comment['authorid']) ? $tospace['uid'] : $comment['authorid'];
 addmailcron($touid, ”, cplang($msgtype, array($_SGLOBAL['supe_username'])), ”, $msgtype);

 if(empty($comment)) {
  //非引用评论
  if($tospace['uid'] != $_SGLOBAL['supe_uid']) {
   //事件发布
   if(ckprivacy(’comment’, 1)) {
    feed_add($fs['icon'], $fs['title_template'], $fs['title_data'], $fs['body_template'], $fs['body_data'], $fs['body_general'],$fs['images'], $fs['image_links'], $fs['target_ids'], $fs['friend']);
   }
   //发送通知
   notification_add($tospace['uid'], $note_type, $note);
   //留言发送短消息
   if($_POST['idtype'] == ‘uid’ && $tospace['updatetime'] == $tospace['dateline']) {
    include_once S_ROOT.’./uc_client/client.php’;
    uc_pm_send($_SGLOBAL['supe_uid'], $tospace['uid'], cplang(’wall_pm_subject’), cplang(’wall_pm_message’, array(addslashes(getsiteurl().$n_url))), 1, 0, 0);
   }
  }
 } elseif($comment['authorid'] != $_SGLOBAL['supe_uid']) {
  notification_add($comment['authorid'], $note_type, $q_note);
 }

 //积分
 if($tospace['uid'] != $_SGLOBAL['supe_uid']) {
  updatespacestatus(’get’, ‘comment’);
 }

 showmessage($msg, $_POST['refer'], 0, $magvalues);
}

$cid = empty($_GET['cid'])?0:intval($_GET['cid']);

//编辑
if($_GET['op'] == ‘edit’) {

 $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’comment’).” WHERE cid=’$cid’ AND authorid=’$_SGLOBAL[supe_uid]‘”);
 if(!$comment = $_SGLOBAL['db']->fetch_array($query)) {
  showmessage(’no_privilege’);
 }

 //提交编辑
 if(submitcheck(’editsubmit’)) {

  $message = getstr($_POST['message'], 0, 1, 1, 1, 2);
  if(strlen($message) < 2) showmessage(’content_is_too_short’);

  updatetable(’comment’, array(’message’=>$message), array(’cid’=>$comment['cid']));

  showmessage(’do_success’, $_POST['refer'], 0);
 }

 //bbcode转换
 $comment['message'] = html2bbcode($comment['message']);//显示用

} elseif($_GET['op'] == ‘delete’) {

 if(submitcheck(’deletesubmit’)) {
  include_once(S_ROOT.’./source/function_delete.php’);
  if(deletecomments(array($cid))) {
   showmessage(’do_success’, $_POST['refer'], 0);
  } else {
   showmessage(’no_privilege’);
  }
 }

} elseif($_GET['op'] == ‘reply’) {

 $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’comment’).” WHERE cid=’$cid’”);
 if(!$comment = $_SGLOBAL['db']->fetch_array($query)) {
  showmessage(’comments_do_not_exist’);
 }

} else {

 showmessage(’no_privilege’);
}

include template(’cp_comment’);

//检查
function checkcomment($id, $idtype) {
 global $_SGLOBAL;
 global $tospace, $pic, $blog, $album;

 switch ($idtype) {
  case ‘uid’:
   //检索空间
   $tospace = getspace($id);
   break;
  case ‘picid’:
   //检索图片
   $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’pic’).” WHERE picid=’$id’ LIMIT 1″);
   $pic = $_SGLOBAL['db']->fetch_array($query);
   //图片不存在
   if(empty($pic)) {
    showmessage(’view_images_do_not_exist’);
   }

   //检索空间
   $tospace = getspace($pic['uid']);

   //获取相册
   $album = array();
   if($pic['albumid']) {
    $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’album’).” WHERE albumid=’$pic[albumid]‘”);
    if(!$album = $_SGLOBAL['db']->fetch_array($query)) {
     updatetable(’pic’, array(’albumid’=>0), array(’albumid’=>$pic['albumid']));//相册丢失
    } else {
     if($album['target_ids']) {
      $album['target_ids'] .= “,$album[uid]“;
     }
    }
   }
   break;
  case ‘blogid’:
   //读取日志
   $query = $_SGLOBAL['db']->query(”SELECT b.*, bf.target_ids
    FROM “.tname(’blog’).” b
    LEFT JOIN “.tname(’blogfield’).” bf ON bf.blogid=b.blogid
    WHERE b.blogid=’$id’”);
   $blog = $_SGLOBAL['db']->fetch_array($query);
   //日志不存在
   if(empty($blog)) {
    showmessage(’view_to_info_did_not_exist’);
   }

   //是否允许评论
   if(!empty($blog['noreply'])) {
    showmessage(’do_not_accept_comments’);
   }
   if($blog['target_ids']) {
    $blog['target_ids'] .= “,$blog[uid]“;
   }
   //检索空间
   $tospace = getspace($blog['uid']);
   break;
  case ’sid’:
   //读取日志
   $query = $_SGLOBAL['db']->query(”SELECT * FROM “.tname(’share’).” WHERE sid=’$id’”);
   $share = $_SGLOBAL['db']->fetch_array($query);
   //日志不存在
   if(empty($share)) {
    showmessage(’sharing_does_not_exist’);
   }

   //检索空间
   $tospace = getspace($share['uid']);
   break;
  case ‘app_vote_id’:
   $cspace = array(’uid’=>$_POST['app_uid'], ‘username’=>$_POST['app_username'], ‘app_title’=>$_POST['app_title'], ‘app_link’ => $_POST['refer'], ‘app_name’ =>$_POST['app_name']);
   //检索空间
   $tospace = getspace($_POST['app_uid']);
   break;
  default:
   showmessage(’non_normal_operation’);
   break;
 }
 if(empty($tospace)) {
  showmessage(’space_does_not_exist’);
 }
 //黑名单
 if(isblacklist($tospace['uid'])) {
  showmessage(’is_blacklist’);
 }
}

?>

written by Toby \\ tags: