姑且算是计划吧
- 本篇日志由AlloVince在April 04 2007 15:21:00发表
- YD的程序员葛阁 | 永久链接
- 日志未经声明,均为原创,版权遵循 『 创作共用 Creative Commons 』协议
Tech preview:
1. basic tech:php+mysql+xml
2. public class:PEAR
3. template:Smarty
4. ajax:xajax+dojo
5. media:flash+xml
Function preview:
1. Based on vbb
2. Free TAGs(includes Type & Group)
3. RSS
4. Standard template
5. Batch Upload
6. Batch Add & Manage
7. Import from XML files(RSS & LRC File to XML)
8. Wiki Contents Mode(keywords & Multiuser-edit)
9. Examine and Approve
10. User-defined Index
11. Special Group Mode

卡卡 在April 05 2007 14:38:00说:
英语小白一只,无责任飘过~~~~~~
AlloVince 在April 05 2007 04:13:03说:
Smarty本质上也是一个公共库,和Pear是一样的,没有服务器配置权限同样能用,就是有些麻烦= =
Lazing 在April 05 2007 04:02:53说:
引用:
----------
----------
template:Smarty
----------
----------
似乎要在服务器端配置……
Lazing 在April 05 2007 04:02:06说:
当年的未完工情况
AlloVince 在April 05 2007 03:57:49说:
所以了,黑字代表No Problem,蓝字代表尽量实现,红字代表富有挑战性的尝试……
Lazing 在April 05 2007 03:53:24说:
HTML 代码:
<?xml version="1.0"?>
<lyric id="41" update="2005-7-21T21:11:48" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="lyric.xml">
<info lan="English">
<title>komm, susser tod</title>
<artist>ARIANNE</artist>
<album ISRC="">THE END OF EVANGELION</album>
<author>庵野秀明(日文)</author>
<date>0</date>
<editor>Ave7.net</editor>
</info>
<script lan="English">
<line start="0">Komm,Susser Tod</line>
<line start="1046">词:庵野秀明(日文)</line>
<line start="2005">mike wyzgowski(英译)</line>
<line start="2337">作曲/编曲:shiro sagisu</line>
<line start="3275">主唱:arianne</line>
<line start="3566">录音:铃木恭一</line>
<line start="3821">Ave7.net 第七街·时空之滨</line>
<line start="5144">I know,I know I've let you down,</line>
<line start="5594">I've been a fool to myself.</line>
<line start="5901">I thought that I could live for no one else,</line>
<line start="6377">but now through all the hurt and pain,</line>
<line start="6844">it's time for me to respect.</line>
<line start="7158">The ones you love mean more than anything.</line>
<line start="7745">So with sadness in my heart,</line>
<line start="8053">I feel the best thing i could do,</line>
<line start="8408">is end it alland leave forever.</line>
<line start="8975">What's done is done it feels so bad.</line>
<line start="9311">What once was happy now is sad.</line>
<line start="9649">I'll never love again,my world is ending.</line>
<line start="10467">I wish that I could turn back time.</line>
<line start="10927">Cos now the guilt is all mine.</line>
<line start="11379">Can't live without the trust from those you love.</line>
<line start="11727">I know we can't forget the past.</line>
<line start="12173">You can't forget love and pride.</line>
<line start="12476">Because of that, it's kill in me inside.</line>
<line start="14233">It all returns to nothing.</line>
<line start="14783">It all comes tumbling down, tumbling down,tumbling down.</line>
<line start="15504">It all returns to nothing,</line>
<line start="16037">I just keep letting me donw, letting me down, letting me down.</line>
<line start="16783">In my heart of hearts.</line>
<line start="17023">I know that I could never love again.</line>
<line start="17328">I've lost everything everything everything that matters to me, matters in this world.</line>
<line start="18949">I wish that I could turn back time.</line>
<line start="19409">Cos now the guilt is all mine,</line>
<line start="19730">can't live without the trust from those you love.</line>
<line start="20210">I know we can't forget the past,</line>
<line start="20672">you can't forget love and pride.</line>
<line start="20990">Because of that, it's kill in me inside.</line>
<line start="22717">It all returns to nothing,</line>
<line start="23271">It just keeps tumbling down, tumbling down, tumbling down.</line>
<line start="24035">It all returns to nothing,</line>
<line start="24533">I just keep letting me donw, letting me down, letting me down.</line>
<line start="25240">It all returns to nothing,</line>
<line start="25806">It just keeps tumbling down, tumbling down, tumbling down.</line>
<line start="26526">It all returns to nothing,</line>
<line start="27070">I just keep letting me down, letting me down, letting me down.</line>
<line start="27805">ah……ah……ah……ah……</line>
<line start="28417">tumbling down,tumbling down,tumbling down</line>
<line start="29046">ah……ah……ah……ah……</line>
<line start="29668">letting me down,letting me down,letting me down</line>
<line start="30296">ah……ah……ah……ah……</line>
<line start="30923">tumbling down,tumbling down,tumbling down</line>
<line start="31558">ah……ah……ah……ah……</line>
</script>
</lyric>
Lazing 在April 05 2007 03:52:42说:
呃,这么短的时间……
这么多功能还是有难度的……
至今为止都没有想要如果要用Wiki形式用什么存储结构……
AlloVince 在April 05 2007 03:41:24说:
可耻的毕业设计 今天终于把pear搞定了
Lazing 在April 05 2007 03:40:26说:
PHP 代码:
void CXlyricDoc::LyricAddLine(UINT start, CString content)
{
CLyricLine ll;
ll.start = start;
content.TrimLeft();
content.TrimRight();
ll.content = content;
POSITION pos = m_lineList.GetHeadPosition();
POSITION cur = NULL;
int flag = 0;
while(pos){
cur = pos;
CLyricLine it= m_lineList.GetNext(pos);
if(it.start> ll.start){
flag = 1;
break;
}
}
if(flag == 1 && cur){
m_lineList.InsertBefore(cur, ll);
}
else{
m_lineList.AddTail(ll);
}
}
void CXlyricDoc::importLRC(CString &lrcpath)
{
CFile lrcFile;
while( !m_lineList.IsEmpty() )
{
m_lineList.RemoveHead();
}
lrcFile.Open(lrcpath,CFile::modeRead);
int len = lrcFile.GetLength();
if(len>20000)
{
AfxMessageBox(_T("文件大小超出限制"),MB_OK|MB_ICONERROR );
return;
}
char buf[20000];
lrcFile.Read(buf,20000);
buf[len]= '\0';
CString line;
int nLen = MultiByteToWideChar(CP_ACP, 0,buf, -1, NULL, NULL);
LPWSTR lpszW = new WCHAR[nLen];
MultiByteToWideChar(CP_ACP, 0,
buf, -1, lpszW, nLen);
// use it to call OLE here
CString temp(lpszW);
int j=0;
temp.TrimLeft();
temp.TrimRight();
int offset;
while(temp.GetLength()>0){
offset = temp.Find(91,1);
if(offset>0){
line = temp.Left(offset);
temp = temp.Right(temp.GetLength() - offset );
GetLrcLine(line);
}
else{
GetLrcLine(temp);
break;
}
}
}
void CXlyricDoc::GetLrcLine(CString lrcLine)
{
enum LT
{
lyric = 0,
title,
artist,
album,
editor,
offset,
other
};
static LT nFlag;
static int nOffset=0,sec[10];
char c;
int i=0,min,x=0,m=0,k;
//清理首尾空白
lrcLine.TrimLeft();
lrcLine.TrimRight();
//判断标签
if(isdigit(lrcLine.GetAt(1)))
nFlag=lyric;
else if(lrcLine.Find(_T("[ti:"))!=-1)
nFlag = title;
else if(lrcLine.Find(_T("[ar:"))!=-1)
nFlag = artist;
else if(lrcLine.Find(_T("[al:"))!=-1)
nFlag = album;
else if(lrcLine.Find(_T("[by:"))!=-1)
nFlag = editor;
else if(lrcLine.Find(_T("[offset:"))!=-1)
nFlag = offset;
else
nFlag = other;
//进入子处理程序
switch(nFlag)
{
case title:
lrcLine.Replace(_T("[ti:"),_T(""));
lrcLine.Replace(_T("]"),_T(""));
m_title = lrcLine;
break;
case artist:
lrcLine.Replace(_T("[ar:"),_T(""));
lrcLine.Replace(_T("]"),_T(""));
m_artist = lrcLine;
break;
case album:
lrcLine.Replace(_T("[al:"),_T(""));
lrcLine.Replace(_T("]"),_T(""));
m_album = lrcLine;
break;
case editor:
lrcLine.Replace(_T("[by:"),_T(""));
lrcLine.Replace(_T("]"),_T(""));
m_editor = lrcLine;
break;
case offset:
lrcLine.Replace(_T("[offset:"),_T(""));
lrcLine.Replace(_T("]"),_T(""));
nOffset = _wtoi(lrcLine);
nOffset /= 10;
//选择是否使用Offset
if(nOffset>0)
{
if(::MessageBox(NULL,
_T("当前LRC文件定义了偏移量[offset],是否使用该偏移量。"),
_T("导入信息"),
MB_YESNO | MB_ICONINFORMATION)==IDNO)
nOffset = 0;
}
break;
case lyric:
if((c=lrcLine.GetAt(i++))!='[')
return;
//获取多个时间轴标签
do
{
min=0;
sec[m]=0;
while(isdigit(c=lrcLine.GetAt(i++)))
min = min * 10 + c - '0';
while(isdigit(c=lrcLine.GetAt(i++)))
sec[m] = sec[m] * 10 + c - '0';
sec[m] += min * 60;
sec[m] *= 100;
//获取毫秒
if(c=='.')
for(k=0;k<3&&isdigit(c=lrcLine.GetAt(i++));k++)
{
x = c-'0';
for(int n=k+1;n<2;n++)
x *= 10;
sec[m] += x;
}
for(k=0;k<i;k++)
lrcLine.SetAt(k,'$');
lrcLine.Replace(_T("$"),_T(""));
m++;
i=0;
if(lrcLine.GetLength()==0)
break;
}
while( (c=lrcLine.GetAt(i++))=='[');
//根据时间轴写入歌词
for(k=0;k<m;k++)
{
sec[k] += nOffset;
if(sec[k]<0)
sec[k]=0;
LyricAddLine(sec[k],lrcLine);
}
break;
default:
break;
}
Lazing 在April 05 2007 03:37:25说:
XLyric?