Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

个人动态里的论坛帖子重复5次!日了!

[复制链接]
茄子 发表于 2008-12-16 09:42:07 | 显示全部楼层
回复

使用道具 举报

 楼主| fdzhyj 发表于 2008-12-16 14:15:10 | 显示全部楼层
依旧没解决
回复

使用道具 举报

玻璃屋女孩 发表于 2008-12-16 14:19:44 | 显示全部楼层
按Q:UCHome feed重复显示这个问题的说明方法修改了还不行??
回复

使用道具 举报

 楼主| fdzhyj 发表于 2008-12-16 14:36:12 | 显示全部楼层
是的不行啊!
回复

使用道具 举报

闽侯网 发表于 2008-12-16 14:48:16 | 显示全部楼层
这个问题我刚发现。。
回复

使用道具 举报

闽侯网 发表于 2008-12-16 14:55:24 | 显示全部楼层
刚改的。不行。。改了FEED。PHP不行。不管用。
回复

使用道具 举报

玉林风华 发表于 2008-12-16 14:57:04 | 显示全部楼层
我还没有试一下呢!
回复

使用道具 举报

茄子 发表于 2008-12-16 16:38:18 | 显示全部楼层
是的不行啊!
fdzhyj 发表于 2008-12-16 14:36


你短消息联系下redstone,他帮你检查下
回复

使用道具 举报

 楼主| fdzhyj 发表于 2008-12-16 18:38:44 | 显示全部楼层
  1. <?php

  2. /*
  3. [UCenter] (C)2001-2009 Comsenz Inc.
  4. This is NOT a freeware, use is subject to license terms

  5. $Id: feed.php 846 2008-12-08 05:37:05Z zhaoxiongfei $
  6. */

  7. !defined('IN_UC') && exit('Access Denied');

  8. class feedcontrol extends base {

  9. function __construct() {
  10. $this->feedcontrol();
  11. }

  12. function feedcontrol() {
  13. parent::__construct();
  14. $this->init_input();
  15. }

  16. function onadd() {
  17. $this->load('misc');
  18. $appid = intval($this->input('appid'));
  19. $icon = $this->input('icon');
  20. $uid = intval($this->input('uid'));
  21. $username = $this->input('username');
  22. $body_data = $_ENV['misc']->array2string($this->input('body_data'));
  23. $title_data = $_ENV['misc']->array2string($this->input('title_data'));

  24. $title_template = $this->_parsetemplate($this->input('title_template'));
  25. $body_template = $this->_parsetemplate($this->input('body_template'));
  26. $body_general = $this->input('body_general');
  27. $target_ids = $this->input('target_ids');
  28. $image_1 = $this->input('image_1');
  29. $image_1_link = $this->input('image_1_link');
  30. $image_2 = $this->input('image_2');
  31. $image_2_link = $this->input('image_2_link');
  32. $image_3 = $this->input('image_3');
  33. $image_3_link = $this->input('image_3_link');
  34. $image_4 = $this->input('image_4');
  35. $image_4_link = $this->input('image_4_link');

  36. $hash_template = md5($title_template.$body_template);
  37. $hash_data = md5($title_template.$title_data.$body_template.$body_data);
  38. $dateline = $this->time;
  39. $this->db->query("INSERT INTO ".UC_DBTABLEPRE."feeds SET appid='$appid', icon='$icon', uid='$uid', username='$username',
  40. title_template='$title_template', title_data='$title_data', body_template='$body_template', body_data='$body_data', body_general='$body_general',
  41. image_1='$image_1', image_1_link='$image_1_link', image_2='$image_2', image_2_link='$image_2_link',
  42. image_3='$image_3', image_3_link='$image_3_link', image_4='$image_4', image_4_link='$image_4_link',
  43. hash_template='$hash_template', hash_data='$hash_data', target_ids='$target_ids', dateline='$dateline'");
  44. return $this->db->insert_id();
  45. }

  46. //note private 删除事件
  47. function ondelete() {
  48. $start = $this->input('start');
  49. $limit = $this->input('limit');
  50. $end = $start + $limit;
  51. $this->db->query("DELETE FROM ".UC_DBTABLEPRE."feeds WHERE feedid>'$start' AND feedid<'$end'");
  52. }

  53. //note public 取得事件的接口, 取完以后是否删除?
  54. function onget() {
  55. $this->load('misc');
  56. $limit = intval($this->input('limit'));
  57. $delete = $this->input('delete');
  58. $feedlist = $this->db->fetch_all("SELECT * FROM ".UC_DBTABLEPRE."feeds ORDER BY feedid DESC LIMIT $limit");
  59. if($feedlist) {
  60.         $maxfeedid = $feedlist[0]['feedid'];
  61.         foreach($feedlist as $key => $feed) {
  62.         $feed['body_data'] = $_ENV['misc']->string2array($feed['body_data']);
  63.         $feed['title_data'] = $_ENV['misc']->string2array($feed['title_data']);
  64.         $feedlist[$key] = $feed;
  65.         }
  66.         }
  67.         if(!empty($feedlist)) {
  68.         if(!isset($delete) || $delete) {
  69.         $this->_delete(0, $maxfeedid);
  70.         }
  71.         }
  72. return $feedlist;
  73. }

  74. function _delete($start, $end) {
  75. $this->db->query("DELETE FROM ".UC_DBTABLEPRE."feeds WHERE feedid>='$start' AND feedid<='$end'");
  76. }

  77. function _parsetemplate($template) {
  78. $template = str_replace(array("\r", "\n"), '', $template);
  79. $template = str_replace(array('<br>', '<br />', '<BR>', '<BR />'), "\n", $template);
  80. $template = str_replace(array('<b>', '<B>'), '[B]', $template);
  81. $template = str_replace(array('<i>', '<I>'), '[I]', $template);
  82. $template = str_replace(array('<u>', '<U>'), '[U]', $template);
  83. $template = str_replace(array('</b>', '</B>'), '[/B]', $template);
  84. $template = str_replace(array('</i>', '</I>'), '[/I]', $template);
  85. $template = str_replace(array('</u>', '</U>'), '[/U]', $template);
  86. $template = htmlspecialchars($template);
  87. $template = nl2br($template);
  88. $template = str_replace(array('[B]', '[I]', '[U]', '[/B]', '[/I]', '[/U]'), array('<b>', '<i>', '<u>', '</b>', '</i>', '</u>'), $template);
  89. return $template;
  90. }

  91. }

  92. ?>
复制代码
home里面的feed.php
回复

使用道具 举报

 楼主| fdzhyj 发表于 2008-12-16 18:42:26 | 显示全部楼层
  1. <?php

  2. /*
  3.         [UCenter] (C)2001-2009 Comsenz Inc.
  4.         This is NOT a freeware, use is subject to license terms

  5.         $Id: feed.php 845 2008-12-08 05:36:51Z zhaoxiongfei $
  6. */

  7. !defined('IN_UC') && exit('Access Denied');

  8. class feedcontrol extends base {

  9.         function __construct() {
  10.                 $this->feedcontrol();
  11.         }

  12.         function feedcontrol() {
  13.                 parent::__construct();
  14.                 $this->init_input();
  15.         }

  16.         function onadd() {
  17.                 $this->load('misc');
  18.                 $appid = intval($this->input('appid'));
  19.                 $icon = $this->input('icon');
  20.                 $uid = intval($this->input('uid'));
  21.                 $username = $this->input('username');
  22.                 $body_data = $_ENV['misc']->array2string($this->input('body_data'));
  23.                 $title_data = $_ENV['misc']->array2string($this->input('title_data'));

  24.                 $title_template = $this->_parsetemplate($this->input('title_template'));
  25.                 $body_template = $this->_parsetemplate($this->input('body_template'));
  26.                 $body_general = $this->input('body_general');
  27.                 $target_ids = $this->input('target_ids');
  28.                 $image_1 = $this->input('image_1');
  29.                 $image_1_link = $this->input('image_1_link');
  30.                 $image_2 = $this->input('image_2');
  31.                 $image_2_link = $this->input('image_2_link');
  32.                 $image_3 = $this->input('image_3');
  33.                 $image_3_link = $this->input('image_3_link');
  34.                 $image_4 = $this->input('image_4');
  35.                 $image_4_link = $this->input('image_4_link');

  36.                 $hash_template = md5($title_template.$body_template);
  37.                 $hash_data = md5($title_template.$title_data.$body_template.$body_data);
  38.                 $dateline = $this->time;
  39.                 $this->db->query("INSERT INTO ".UC_DBTABLEPRE."feeds SET appid='$appid', icon='$icon', uid='$uid', username='$username',
  40.                         title_template='$title_template', title_data='$title_data', body_template='$body_template', body_data='$body_data', body_general='$body_general',
  41.                         image_1='$image_1', image_1_link='$image_1_link', image_2='$image_2', image_2_link='$image_2_link',
  42.                         image_3='$image_3', image_3_link='$image_3_link', image_4='$image_4', image_4_link='$image_4_link',
  43.                         hash_template='$hash_template', hash_data='$hash_data', target_ids='$target_ids', dateline='$dateline'");
  44.                 return $this->db->insert_id();
  45.         }

  46.         function ondelete() {
  47.                 $start = $this->input('start');
  48.                 $limit = $this->input('limit');
  49.                 $end = $start + $limit;
  50.                 $this->db->query("DELETE FROM ".UC_DBTABLEPRE."feeds WHERE feedid>'$start' AND feedid<'$end'");
  51.         }

  52.         function onget() {
  53.                 $this->load('misc');
  54.                 $limit = intval($this->input('limit'));
  55.                 $delete = $this->input('delete');
  56.                 $feedlist = $this->db->fetch_all("SELECT * FROM ".UC_DBTABLEPRE."feeds ORDER BY feedid DESC LIMIT $limit");
  57.                 if($feedlist) {
  58.                         foreach($feedlist as $key => $feed) {
  59.                                 $feed['body_data'] = $_ENV['misc']->string2array($feed['body_data']);
  60.                                 $feed['title_data'] = $_ENV['misc']->string2array($feed['title_data']);
  61.                                 $feedlist[$key] = $feed;
  62.                         }
  63.                 }
  64.                 if(!empty($feedlist)) {
  65.                         $maxfeed = array_pop($feedlist);
  66.                         $maxfeedid = $maxfeed['feedid'];
  67.                         $feedlist = array_merge($feedlist, array($maxfeed));
  68.                         if(!isset($delete) || $delete) {
  69.                                 $this->_delete(0, $maxfeedid);
  70.                         }
  71.                 }
  72.                 return $feedlist;
  73.         }

  74.         function _delete($start, $end) {
  75.                 $this->db->query("DELETE FROM ".UC_DBTABLEPRE."feeds WHERE feedid>='$start' AND feedid<='$end'");
  76.         }

  77.         function _parsetemplate($template) {
  78.                 $template = str_replace(array("\r", "\n"), '', $template);
  79.                 $template = str_replace(array('<br>', '<br />', '<BR>', '<BR />'), "\n", $template);
  80.                 $template = str_replace(array('<b>', '<B>'), '[B]', $template);
  81.                 $template = str_replace(array('<i>', '<I>'), '[I]', $template);
  82.                 $template = str_replace(array('<u>', '<U>'), '[U]', $template);
  83.                 $template = str_replace(array('</b>', '</B>'), '[/B]', $template);
  84.                 $template = str_replace(array('</i>', '</I>'), '[/I]', $template);
  85.                 $template = str_replace(array('</u>', '</U>'), '[/U]', $template);
  86.                 $template = htmlspecialchars($template);
  87.                 $template = nl2br($template);
  88.                 $template = str_replace(array('[B]', '[I]', '[U]', '[/B]', '[/I]', '[/U]'), array('<b>', '<i>', '<u>', '</b>', '</i>', '</u>'), $template);
  89.                 return $template;
  90.         }

  91. }

  92. ?>
复制代码
uc里面的feed.php           看看我的错了没有?我按照方法该了不行!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-10 00:36 , Processed in 0.122937 second(s), 13 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表