Modified:
trunk/sql/parasy.mysql.sql
trunk/upload/include/discuzcode.func.php
trunk/upload/index.php
trunk/upload/parasy/ParasyInit.php
trunk/upload/templates/babel/header.htm
trunk/upload/templates/babel/viewthread.htm
trunk/upload/viewthread.php
Log:
Happy New Year!
Modified: trunk/sql/parasy.mysql.sql
==============================================================================
--- trunk/sql/parasy.mysql.sql (original)
+++ trunk/sql/parasy.mysql.sql Sat Feb 2 21:41:59 2008
@@ -98,7 +98,7 @@
`content` varchar(250) NOT NULL default '',
`background` varchar(35) NOT NULL default '',
`icons` int(2) NOT NULL default '0',
- PRIMARY KEY (`vid`)
+ PRIMARY KEY (`vid`),
KEY `authorid` (`authorid`),
KEY `author` (`author`),
KEY `dateline` (`dateline`)
Modified: trunk/upload/include/discuzcode.func.php
==============================================================================
--- trunk/upload/include/discuzcode.func.php (original)
+++ trunk/upload/include/discuzcode.func.php Sat Feb 2 21:41:59 2008
@@ -159,7 +159,7 @@
}
function discuzcode($message, $smileyoff, $bbcodeoff, $htmlon = 0,
$allowsmilies = 1, $allowbbcode = 1, $allowimgcode = 1, $allowhtml = 0,
$jammer = 0, $parsetype = '0', $authorid = '0') {
- global $discuzcodes, $credits, $tid, $discuz_uid, $highlight,
$maxsmilies, $db, $tablepre, $hideattach;
+ global $discuzcodes, $credits, $tid, $discuz_uid, $highlight,
$maxsmilies, $db, $tablepre, $hideattach,$bbsdir;
if($parsetype != 1 && !$bbcodeoff && $allowbbcode) {
@@ -192,8 +192,8 @@
);
$discuzcodes['replacearray']['bbcode_regexp'] = array(
"cuturl('\\1\\2')",
- "<a href=\"http://www.\\1\" target=\"_blank\" class=\"msg_link\"
rel=\"nofollow external\">\\2</a>",
- "<a href=\"\\1://\\2\" target=\"_blank\" class=\"msg_link\"
rel=\"nofollow external\">\\3</a>",
+ "<a href=\"http://www.\\1\" target=\"_blank\" class=\"msg_link\"
rel=\"nofollow external\">\\2 <img
src=\"".$bbsdir."/images/common/o_in_new.gif\" title=\"Open in new window\"></a>",
+ "<a href=\"\\1://\\2\" target=\"_blank\" class=\"msg_link\"
rel=\"nofollow external\">\\3 <img
src=\"".$bbsdir."/images/common/o_in_new.gif\" title=\"Open in new window\"></a>",
"<a href=\"mailto:\\1@\\2\">\\1@\\2</a>",
"<a href=\"mailto:\\1@\\2\">\\3</a>",
"<font color=\"\\1\">",
@@ -298,12 +298,13 @@
}
function cuturl($url) {
+ global $bbsdir;
$length = 65;
- $urllink = "<a href=\"".(substr(strtolower($url), 0, 4)
== 'www.' ? "http://$url" : $url).'" target="_blank" class="msg_link"
rel="nofollow external">';
+ $urllink = "<a href=\"".(substr(strtolower($url), 0, 4)
== 'www.' ? "http://$url" : $url).'" target="_blank" class="msg_link"
rel="nofollow external">';
if(strlen($url) > $length) {
$url = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, -
intval($length * 0.3));
}
- $urllink .= $url.'</a>';
+ $urllink .= $url.' <img src="'.$bbsdir.'/images/common/o_in_new.gif"
title="Open in new window"></a>';
return $urllink;
}
Modified: trunk/upload/index.php
==============================================================================
--- trunk/upload/index.php (original)
+++ trunk/upload/index.php Sat Feb 2 21:41:59 2008
@@ -83,7 +83,7 @@
$svp_o ='';
} else {
$svp = $db->fetch_array($query);
- $svp_o = '<span class="tip">��������������� [ <small><a
href="'.$bbsdir.'/profile-username-' .
urlencode($svp['username']) . '.html">' .
$svp['username']. '</a></small> ] �� [ <small><a href="http://' .
$svp['svp_url'] . '" target="_blank" re="nofollow external">http://' .
cutstr($svp['svp_url'], 40) . '</a></small> ] ����Ȥ�ɣ�</span>';
+ $svp_o = '<span class="tip">��������������� [ <small><a
href="'.$bbsdir.'/user-' . urlencode($svp['username']) . '.html">' .
$svp['username']. '</a></small> ] �� [ <small><a href="http://' .
$svp['svp_url'] . '" target="_blank" re="nofollow external">http://' .
cutstr($svp['svp_url'], 40) . '</a></small> ] ����Ȥ�ɣ�</span>';
}
}
}
Modified: trunk/upload/parasy/ParasyInit.php
==============================================================================
--- trunk/upload/parasy/ParasyInit.php (original)
+++ trunk/upload/parasy/ParasyInit.php Sat Feb 2 21:41:59 2008
@@ -61,10 +61,6 @@
}
}
-if ($discuz_uid){
- $my_percent = @round($posts * 100 / $posts_total, 3);
-}
-
/* Parasy || Geo Initialization */
if(PARASY_FEATURE_GEO && ($discuz_uid || $discuz_user)) {
$Geo = new Geo($geo_user, $Geo->map);
Modified: trunk/upload/templates/babel/header.htm
==============================================================================
--- trunk/upload/templates/babel/header.htm (original)
+++ trunk/upload/templates/babel/header.htm Sat Feb 2 21:41:59 2008
@@ -38,7 +38,7 @@
<!--{eval $discuz_userss_encode = rawurlencode($discuz_userss);}-->
<div id="top_banner" style="background:
url('{IMGDIR}/bg_$topbg.jpg');" align="left">
<div id="top_right">
- <!--{if $discuz_uid}--><div class="hi">Hi,<a
href="$bbsdir/u-$discuz_uid.html" class="tr1">$discuz_userss</a>!</div>
<a href="$bbsdir/memcp.nnm" target="_self" class="tr">�������</a>
<!--{if $discuz_uid && in_array($adminid, array(1, 2, 3))}-->| <a
href="$bbsdir/admincp.php" target="_blank" class="tr">{lang
admincp}</a> <!--{/if}-->| <a href="$bbsdir/logout-{FORMHASH}.nnm"
class="tr" target="_self">�dz�</a><!--{loop $extcredits $id $credit}-->
| <a href="$bbsdir/expense/view.nnm"
class="tr"><small>$GLOBALS[extcredits.$id]</small>$credit[unit] $credit[title]</a><!--{/loop}-->
| <a href="#;" class="tr" title="����������ռ�ٷֱ�"><small>$my_percent %</small></a>
+ <!--{if $discuz_uid}--><div class="hi">Hi,<a
href="$bbsdir/u-$discuz_uid.html" class="tr1">$discuz_userss</a>!</div>
<a href="$bbsdir/memcp.nnm" target="_self" class="tr">�������</a>
<!--{if $discuz_uid && in_array($adminid, array(1, 2, 3))}-->| <a
href="$bbsdir/admincp.php" target="_blank" class="tr">{lang
admincp}</a> <!--{/if}-->| <a href="$bbsdir/logout-{FORMHASH}.nnm"
class="tr" target="_self">�dz�</a><!--{loop $extcredits $id $credit}-->
| <a href="$bbsdir/expense/view.nnm" class="tr"><small>$GLOBALS[extcredits.$id]</small>$credit[unit] $credit[title]</a><!--{/loop}-->
<!--{else}-->
<a href="$bbsdir/login.nnm" class="tr">{lang login}</a> | <a
href="$bbsdir/passwd.nnm" class="tr">�һ�����</a> | <a
href="$bbsdir/signup.nnm" class="tr">ע��</a><!--{/if}-->
</div>
Modified: trunk/upload/templates/babel/viewthread.htm
==============================================================================
--- trunk/upload/templates/babel/viewthread.htm (original)
+++ trunk/upload/templates/babel/viewthread.htm Sat Feb 2 21:41:59 2008
@@ -53,8 +53,8 @@
<a href="space.php?uid=$post[authorid]" class="var"><div
style="width:75"><img src="$bbsdir/images/common/nohead.gif" width="75"
height="75" class="portrait" style="margin-bottom: 5px;" alt="" /></div></a>
<!--{/if}-->
<!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
- <a href="space.php?uid=$post[authorid]" target="_blank"
class="t">$post[author]</a><br />
- <!--{if $post['nickname']}--><div style="padding-top: 3px;"
class="grey">($post[nickname])</div><!--{/if}--><br />
+ <a href="space.php?uid=$post[authorid]"
class="t">$post[author]</a><br />
+ <!--{if PARASY_FEATURE_GEO}--><div style="padding-top: 3px;"><a
href="$bbsdir/geo/$post[usr_geo]"
class="o">$post[geo_name]</a></div><br /><!--{/if}-->
<a href="$bbsdir/send-pm-$post[authorid].html"><img
src="{IMGDIR}/foldersmall.gif" /></a><br />
<!--{if $vtonlinestatus && $post['authorid']}-->
<!--{if ($vtonlinestatus == 2 && $onlineauthors[$post[authorid]]) ||
($vtonlinestatus == 1 && ($timestamp - $post['lastactivity'] <= 10800) && !$post['invisible'])}-->
@@ -167,14 +167,17 @@
<!--[member reply]-->
<!--{else}-->
<!--{eval $topic_color = rand_color();}-->
-<div class="$post[v2bg]">
+<div class="light_odd">
<div class="re_info"><small>#$post[number] - $post[dateline] <!--{if $discuz_uid}-->
<!--{if $forum['ismoderator'] || $post['authorid'] ==
$discuz_uid}--> <a
href="$bbsdir/edit-$fid-$tid-$post[pid]-$page.html"><img
src="{IMGDIR}/comment_edit.png" align="absmiddle" title="�༭"
/></a><!--{/if}--><!--{if $allowpostreply}--> <a
href="$bbsdir/quote-$fid-$tid-$post[pid]-$page.html"><img
src="{IMGDIR}/comments_add.png" align="absmiddle" title="����"
/></a><!--{/if}--><!--{if $raterange && $post['authorid']}--> <a
href="$bbsdir/rate-$tid-$post[pid]-$page.html"><img
src="{IMGDIR}/coins_add.png" align="absmiddle" title="���"
/></a><!--{/if}--><!--{if $post['rate'] &&
$forum['ismoderator']}--> <a
href="$bbsdir/removerate-$tid-$post[pid]-$page.html"><img
src="{IMGDIR}/coins_delete.png" align="absmiddle" title="{lang
removerate}" /></a><!--{/if}-->
<!--{/if}--><!--{if $forum['ismoderator'] && $allowdelpost}--><input
type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}--></small></div>
<!--{if $post['authorid'] && $post['username'] && !$post['anonymous']}-->
<!--{if $post['avatar']}--><img src="$post[nmavatar]" width="32"
height="32" align="absmiddle" class="re_port" /><!--{else}--><img
src="$bbsdir/images/common/nohead_m.gif" width="32" height="32"
align="absmiddle" class="re_port" /><!--{/if}--> <strong><a
href="$bbsdir/u-$post[authorid].html" style="color: $topic_color;" class="var">$post[author]</a></strong>
<!--{else}-->
-<img src="$bbsdir/images/common/nohead_m.gif" width="32" height="32"
align="absmiddle" class="re_port" /><!--{if !$post['authorid']}-->{lang
guest} <small>$post[useip]</small>{lang unregistered}<!--{elseif
$post['authorid'] && $post['username'] && $post['anonymous']}--><!--{if
$forum['ismoderator']}--><strong><a
href="$bbsdir/viewpro.php?uid=$post[authorid]" target="_blank"
style="color: $topic_color;" class="var">{lang
anonymous}��ʿ</a></strong><!--{else}--><strong><span style="color:
$topic_color;">{lang
anonymous}��ʿ</span></strong><!--{/if}--><!--{else}--><a
href="$bbsdir/u-$post[authorid].html">$post[author]</a>{lang member_deleted}<!--{/if}-->
+<img src="$bbsdir/images/common/nohead_m.gif" width="32" height="32"
align="absmiddle" class="re_port" /><!--{if !$post['authorid']}-->{lang
guest} <small>$post[useip]</small>{lang unregistered}<!--{elseif
$post['authorid'] && $post['username'] && $post['anonymous']}--><!--{if
$forum['ismoderator']}--><strong><a
href="$bbsdir/viewpro.php?uid=$post[authorid]" style="color:
$topic_color;" class="var">{lang
anonymous}��ʿ</a></strong><!--{else}--><strong><span style="color:
$topic_color;">{lang
anonymous}��ʿ</span></strong><!--{/if}--><!--{else}--><a
href="$bbsdir/u-$post[authorid].html">$post[author]</a>{lang member_deleted}<!--{/if}-->
+<!--{/if}-->
+<!--{if PARASY_FEATURE_GEO}-->
+<span class="tip_i"><a href="$bbsdir/geo/$post[usr_geo]" class="var">$post[geo_name]</a></span>
<!--{/if}-->
<!--{if $post['subject']}--> ˵��$post[subject]<!--{/if}-->
$post[newpostanchor] $post[lastpostanchor]
Modified: trunk/upload/viewthread.php
==============================================================================
--- trunk/upload/viewthread.php (original)
+++ trunk/upload/viewthread.php Sat Feb 2 21:41:59 2008
@@ -253,7 +253,7 @@
$newpostanchor = $postcount = $ratelogpids = 0;
$onlineauthors = array();
- $query = $db->query("SELECT p.*, m.uid, m.username, m.groupid,
m.adminid, m.regdate, m.lastactivity, m.posts, m.digestposts, m.oltime,
+ $query = $db->query("SELECT p.*, m.uid, m.username, m.groupid,
m.adminid, m.usr_geo, m.regdate, m.lastactivity, m.posts,
m.digestposts, m.oltime,
m.pageviews, m.credits, m.extcredits1, m.extcredits2, m.extcredits3,
m.extcredits4, m.extcredits5, m.extcredits6,
m.extcredits7, m.extcredits8, m.email, m.gender, m.showemail,
m.invisible, m.xspacestatus, mf.nickname, mf.site,
mf.icq, mf.qq, mf.yahoo, mf.msn, mf.taobao, mf.alipay, mf.location,
mf.medals, mf.avatar, mf.avatarwidth,
@@ -279,12 +279,20 @@
$post['number'] = ++$numpost -1;
}
$post['count'] = $postcount++;
+ /* Parasy || S:Add */
$post['v2bg'] = $v2bg = isset($v2bg) && $v2bg == 'light_odd' ? 'light_even' : 'light_odd';
+ if(PARASY_FEATURE_GEO) {
+ if ($charset == 'utf-8') {
+ $post['geo_name'] = $Geo->map['name'][$post[usr_geo]];
+ } else {
+ $post['geo_name'] = iconv('utf-8', $charset, $Geo->map['name'][$post[usr_geo]]);
+ }
+ }
+ /* Parasy || E:Add */
$post['thisbg'] = $thisbg = isset($thisbg) && $thisbg == 'altbg1' ? 'altbg2' : 'altbg1';
$post['dbdateline'] = $post['dateline'];
$post['dateline'] = gmdate("$dateformat $timeformat",
$post['dateline'] + $timeoffset * 3600);
$post['groupid'] = $_DCACHE['usergroups'][$post['groupid']] ?
$post['groupid'] : 7;
-
if($post['username']) {
$onlineauthors[] = $post['authorid'];
$post['groupid'] = getgroupid($post['authorid'],
$_DCACHE['usergroups'][$post['groupid']], $post);