Skip to content

Commit de14c82

Browse files
committed
Alpha0.1.0
1 parent 6c0aaa3 commit de14c82

File tree

217 files changed

+21504
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+21504
-0
lines changed

README.txt

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
=== GXBlog Alpha0.1.0 说明文档 ====
2+
2013.09.18
3+
By GenialX
4+
5+
【GXBlog官博】
6+
http://gxblog.lofter.com
7+
8+
【GenialX‘s Blog】
9+
http://www.ihuxu.com
10+
11+
【新增内容 - 基于Alpha 0.0.2】
12+
1、【Model主题扩展机制】 - 类似emlog、wp模板扩展机制。
13+
- 在a0.0.1中已实现Action主题扩展机制(通过继承类实现模板扩展);
14+
15+
【修复内容 - 基于Alpha 0.0.2】
16+
1、Syntaxhighlighter插件逻辑错误;
17+
2、修复GXTemplate逻辑错误;
18+
3、修改ShowAction结构 - 整体完善缓存性能;
19+
20+
【新增类库 - 基于Alphpa 0.0.2】
21+
1、GXPage、GX404Page、GXParamErrorPage - 自定义界面类 - 服务于a0.0.2 a0.1.0;
22+
2、GXActionTheme - 持有ShowTemplateAcion的外观类,使Action主机机制更灵活 - 服务于a0.0.2;
23+
3、GXFilter - 参数过滤父类 ,有待完善 - 服务于 a0.0.2,a0.1.0;
24+
4、GXQuery - Model主机扩展机制的请求类 - 服务于a0.1.0;
25+
5、GXTemplate - Model主题扩展机制的模板请求雷 - 服务于a0.1.0;
26+
6、ObjectManeger - 全局静态管家 - 服务于a0.1.0;
27+
7、ObjectType - ObjectManager接口 - 服务于a0.1.0;
28+
29+
说明:【服务于】 - 指从哪一版本开始启用、而非兼容。
30+
31+
【Alpha0.1.0 程序下载】
32+
http://pan.baidu.com/share/link?shareid=956055471&uk=3090350796&third=15
33+
34+
【Alpha0.1.0 Bug提交】
35+
http://www.ihuxu.com/p/119.html
36+
37+
1、程序介绍
38+
【GXBlog】,是一个"暂时"简陋的单用户个人博客管理系统。在PHP+MySQL+Apache环境下,尽可能完善地利用
39+
面向对象思想,来构造一个简洁、个性、快速的博客管理系统。目前,GXBlog处于测试阶段(Alpha Stage)。
40+
41+
2、功能介绍
42+
(1)【缓存功能】(仅实现Action主题机制的缓存) - 让博客飞起来。
43+
(2)【两种主题模板扩展机制】 - 用最简单的方式,展示最个性的自己。
44+
(3)【插件机制】 - 只有想不到,没有做不到!
45+
(4)【自动安装】 - 安装只需铭记‘下一步’。
46+
47+
3、程序安装
48+
(1) 服务器环境
49+
PHP version 5 or newer
50+
MySQL version 5 or newer
51+
Apache version 2 or newer
52+
(2)
53+
将本程序解压到根目录下,通过地址栏访问根目录可随向导【自动安装】。
54+
在安装过程中,需要手动创建一个数据库,比如'gxblog'。然后将数据库名字填入相应向导表格中。
55+
56+
4、注意
57+
(1)由于程序简陋,没有完善的错误处理机制和管理机制。正因如此,程序也非常需要大家的测试来使其更完善,
58+
来构造更优雅、简洁的代码。
59+
(2)部分配置开关可以到【gx-system/conf/site.inc.php】文件中手动修改。
60+
(3)主题扩展和插件机制尚未成熟,所以暂时不提供帮助文档。
61+
(4)Apache下伪静态规则:
62+
RewriteEngine on
63+
RewriteRule ^/gxblog/p/(.*).html$ /gxblog/index.php?p=$1
64+
RewriteRule ^/gxblog/tag/(.*)/$ /gxblog/index.php?tag=$1
65+
RewriteRule ^/gxblog/tag/(.*)$ /gxblog/index.php?tag=$1
66+
67+
5、感谢
68+
哎、Solo的悲伤。。。
69+
中秋节快乐~
70+
By GenialX 2013.09.18 21:10
71+
72+
================================================================================================
73+
以下内容请适度拖放观看 *。*
74+
================================================================================================
75+
|
76+
|
77+
| *************** ** ** *****************
78+
| * * * * * *
79+
| * * * * * *
80+
| * * * * *
81+
| * * * * *
82+
| * * * * *
83+
| * * * * *
84+
| * * ****************
85+
| * ******** * * * *
86+
| * * * * * *
87+
| * * * * * *
88+
| * G * * X * * B *
89+
| * * * * * *
90+
| * * * * * *
91+
| **************** ** ** ***************** log
92+
|
93+
|
94+
|
95+
================================================================================================
96+
================================================================================================
97+
98+

gx-admin/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
/**
3+
* I Miss - 2013.08.27 23:05 By GenialX
4+
*/
5+
require_once dirname(dirname(__FILE__)).'/gx-system/libs/tools/load.php';
6+
7+
AdminFacade::show_index();

gx-content/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
// Genius is nothing but labor and diligence. - 2013.08.28 21:34 By GenialX
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
/**
3+
*
4+
* @name gx-syntaxhighlighter
5+
* @author GenialX
6+
* @version 0.1
7+
*/
8+
class SyntaxHighlighter{
9+
10+
public function __construct(& $plugin){
11+
$plugin->register('SYNTAXHIGHLIGHTER_SHOW',$this,'show');
12+
$plugin->register('SYNTAXHIGHLIGHTER_GENERATE',$this,'generate');
13+
}
14+
15+
public function show(){
16+
echo $this->get_scripts();
17+
}
18+
19+
public function generate(){
20+
$GXEngien = ObjectManager::get_object(ObjectManager::TemplateActionGXEngien);
21+
if($GXEngien){
22+
$content = $this->get_scripts();
23+
$GXEngien->append($content);
24+
}
25+
}
26+
27+
private function get_scripts(){
28+
return "
29+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shCore.js'></script>
30+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushCpp.js'></script>
31+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushCss.js'></script>
32+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushDelphi.js'></script>
33+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushJava.js'></script>
34+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushJScript.js'></script>
35+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushPerl.js'></script>
36+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushPhp.js'></script>
37+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushPython.js'></script>
38+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushSql.js'></script>
39+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushVb.js'></script>
40+
<script type='text/javascript' src='".HOME_PATH."gx-content/plugins/syntaxhighlighter/scripts/shBrushXml.js'></script>
41+
<script type='text/javascript'>SyntaxHighlighter.all();</script>
42+
<link type='text/css' rel='stylesheet' href='".HOME_PATH."gx-content/plugins/syntaxhighlighter/styles/shCoreDefault.css'/>
43+
";
44+
}
45+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* SyntaxHighlighter
3+
* http://alexgorbatchev.com/SyntaxHighlighter
4+
*
5+
* SyntaxHighlighter is donationware. If you are using it, please donate.
6+
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7+
*
8+
* @version
9+
* 3.0.83 (July 02 2010)
10+
*
11+
* @copyright
12+
* Copyright (C) 2004-2010 Alex Gorbatchev.
13+
*
14+
* @license
15+
* Dual licensed under the MIT and GPL licenses.
16+
*/
17+
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(2(){1 h=5;h.I=2(){2 n(c,a){4(1 d=0;d<c.9;d++)i[c[d]]=a}2 o(c){1 a=r.H("J"),d=3;a.K=c;a.M="L/t";a.G="t";a.u=a.v=2(){6(!d&&(!8.7||8.7=="F"||8.7=="z")){d=q;e[c]=q;a:{4(1 p y e)6(e[p]==3)B a;j&&5.C(k)}a.u=a.v=x;a.D.O(a)}};r.N.R(a)}1 f=Q,l=h.P(),i={},e={},j=3,k=x,b;5.T=2(c){k=c;j=q};4(b=0;b<f.9;b++){1 m=f[b].w?f[b]:f[b].S(/\\s+/),g=m.w();n(m,g)}4(b=0;b<l.9;b++)6(g=i[l[b].E.A]){e[g]=3;o(g)}}})();',56,56,'|var|function|false|for|SyntaxHighlighter|if|readyState|this|length|||||||||||||||||true|document||javascript|onload|onreadystatechange|pop|null|in|complete|brush|break|highlight|parentNode|params|loaded|language|createElement|autoloader|script|src|text|type|body|removeChild|findElements|arguments|appendChild|split|all'.split('|'),0,{}))
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/**
2+
* SyntaxHighlighter
3+
* http://alexgorbatchev.com/SyntaxHighlighter
4+
*
5+
* SyntaxHighlighter is donationware. If you are using it, please donate.
6+
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7+
*
8+
* @version
9+
* 3.0.83 (July 02 2010)
10+
*
11+
* @copyright
12+
* Copyright (C) 2004-2010 Alex Gorbatchev.
13+
*
14+
* @license
15+
* Dual licensed under the MIT and GPL licenses.
16+
*/
17+
;(function()
18+
{
19+
// CommonJS
20+
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21+
22+
function Brush()
23+
{
24+
// Created by Peter Atoria @ http://iAtoria.com
25+
26+
var inits = 'class interface function package';
27+
28+
var keywords = '-Infinity ...rest Array as AS3 Boolean break case catch const continue Date decodeURI ' +
29+
'decodeURIComponent default delete do dynamic each else encodeURI encodeURIComponent escape ' +
30+
'extends false final finally flash_proxy for get if implements import in include Infinity ' +
31+
'instanceof int internal is isFinite isNaN isXMLName label namespace NaN native new null ' +
32+
'Null Number Object object_proxy override parseFloat parseInt private protected public ' +
33+
'return set static String super switch this throw true try typeof uint undefined unescape ' +
34+
'use void while with'
35+
;
36+
37+
this.regexList = [
38+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
39+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
40+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
41+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
42+
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
43+
{ regex: new RegExp(this.getKeywords(inits), 'gm'), css: 'color3' }, // initializations
44+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
45+
{ regex: new RegExp('var', 'gm'), css: 'variable' }, // variable
46+
{ regex: new RegExp('trace', 'gm'), css: 'color1' } // trace
47+
];
48+
49+
this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
50+
};
51+
52+
Brush.prototype = new SyntaxHighlighter.Highlighter();
53+
Brush.aliases = ['actionscript3', 'as3'];
54+
55+
SyntaxHighlighter.brushes.AS3 = Brush;
56+
57+
// CommonJS
58+
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
59+
})();
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/**
2+
* SyntaxHighlighter
3+
* http://alexgorbatchev.com/SyntaxHighlighter
4+
*
5+
* SyntaxHighlighter is donationware. If you are using it, please donate.
6+
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7+
*
8+
* @version
9+
* 3.0.83 (July 02 2010)
10+
*
11+
* @copyright
12+
* Copyright (C) 2004-2010 Alex Gorbatchev.
13+
*
14+
* @license
15+
* Dual licensed under the MIT and GPL licenses.
16+
*/
17+
;(function()
18+
{
19+
// CommonJS
20+
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;
21+
22+
function Brush()
23+
{
24+
// AppleScript brush by David Chambers
25+
// http://davidchambersdesign.com/
26+
var keywords = 'after before beginning continue copy each end every from return get global in local named of set some that the then times to where whose with without';
27+
var ordinals = 'first second third fourth fifth sixth seventh eighth ninth tenth last front back middle';
28+
var specials = 'activate add alias AppleScript ask attachment boolean class constant delete duplicate empty exists false id integer list make message modal modified new no paragraph pi properties quit real record remove rest result reveal reverse run running save string true word yes';
29+
30+
this.regexList = [
31+
32+
{ regex: /(--|#).*$/gm,
33+
css: 'comments' },
34+
35+
{ regex: /\(\*(?:[\s\S]*?\(\*[\s\S]*?\*\))*[\s\S]*?\*\)/gm, // support nested comments
36+
css: 'comments' },
37+
38+
{ regex: /"[\s\S]*?"/gm,
39+
css: 'string' },
40+
41+
{ regex: /(?:,|:|¬|'s\b|\(|\)|\{|\}|«|\b\w*»)/g,
42+
css: 'color1' },
43+
44+
{ regex: /(-)?(\d)+(\.(\d)?)?(E\+(\d)+)?/g, // numbers
45+
css: 'color1' },
46+
47+
{ regex: /(?:&(amp;|gt;|lt;)?|=| |>|<||>=||<=|\*|\+|-|\/|÷|\^)/g,
48+
css: 'color2' },
49+
50+
{ regex: /\b(?:and|as|div|mod|not|or|return(?!\s&)(ing)?|equals|(is(n't| not)? )?equal( to)?|does(n't| not) equal|(is(n't| not)? )?(greater|less) than( or equal( to)?)?|(comes|does(n't| not) come) (after|before)|is(n't| not)?( in)? (back|front) of|is(n't| not)? behind|is(n't| not)?( (in|contained by))?|does(n't| not) contain|contain(s)?|(start|begin|end)(s)? with|((but|end) )?(consider|ignor)ing|prop(erty)?|(a )?ref(erence)?( to)?|repeat (until|while|with)|((end|exit) )?repeat|((else|end) )?if|else|(end )?(script|tell|try)|(on )?error|(put )?into|(of )?(it|me)|its|my|with (timeout( of)?|transaction)|end (timeout|transaction))\b/g,
51+
css: 'keyword' },
52+
53+
{ regex: /\b\d+(st|nd|rd|th)\b/g, // ordinals
54+
css: 'keyword' },
55+
56+
{ regex: /\b(?:about|above|against|around|at|below|beneath|beside|between|by|(apart|aside) from|(instead|out) of|into|on(to)?|over|since|thr(ough|u)|under)\b/g,
57+
css: 'color3' },
58+
59+
{ regex: /\b(?:adding folder items to|after receiving|choose( ((remote )?application|color|folder|from list|URL))?|clipboard info|set the clipboard to|(the )?clipboard|entire contents|display(ing| (alert|dialog|mode))?|document( (edited|file|nib name))?|file( (name|type))?|(info )?for|giving up after|(name )?extension|quoted form|return(ed)?|second(?! item)(s)?|list (disks|folder)|text item(s| delimiters)?|(Unicode )?text|(disk )?item(s)?|((current|list) )?view|((container|key) )?window|with (data|icon( (caution|note|stop))?|parameter(s)?|prompt|properties|seed|title)|case|diacriticals|hyphens|numeric strings|punctuation|white space|folder creation|application(s( folder)?| (processes|scripts position|support))?|((desktop )?(pictures )?|(documents|downloads|favorites|home|keychain|library|movies|music|public|scripts|sites|system|users|utilities|workflows) )folder|desktop|Folder Action scripts|font(s| panel)?|help|internet plugins|modem scripts|(system )?preferences|printer descriptions|scripting (additions|components)|shared (documents|libraries)|startup (disk|items)|temporary items|trash|on server|in AppleTalk zone|((as|long|short) )?user name|user (ID|locale)|(with )?password|in (bundle( with identifier)?|directory)|(close|open for) access|read|write( permission)?|(g|s)et eof|using( delimiters)?|starting at|default (answer|button|color|country code|entr(y|ies)|identifiers|items|name|location|script editor)|hidden( answer)?|open(ed| (location|untitled))?|error (handling|reporting)|(do( shell)?|load|run|store) script|administrator privileges|altering line endings|get volume settings|(alert|boot|input|mount|output|set) volume|output muted|(fax|random )?number|round(ing)?|up|down|toward zero|to nearest|as taught in school|system (attribute|info)|((AppleScript( Studio)?|system) )?version|(home )?directory|(IPv4|primary Ethernet) address|CPU (type|speed)|physical memory|time (stamp|to GMT)|replacing|ASCII (character|number)|localized string|from table|offset|summarize|beep|delay|say|(empty|multiple) selections allowed|(of|preferred) type|invisibles|showing( package contents)?|editable URL|(File|FTP|News|Media|Web) [Ss]ervers|Telnet hosts|Directory services|Remote applications|waiting until completion|saving( (in|to))?|path (for|to( (((current|frontmost) )?application|resource))?)|POSIX (file|path)|(background|RGB) color|(OK|cancel) button name|cancel button|button(s)?|cubic ((centi)?met(re|er)s|yards|feet|inches)|square ((kilo)?met(re|er)s|miles|yards|feet)|(centi|kilo)?met(re|er)s|miles|yards|feet|inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin)|print( (dialog|settings))?|clos(e(able)?|ing)|(de)?miniaturized|miniaturizable|zoom(ed|able)|attribute run|action (method|property|title)|phone|email|((start|end)ing|home) page|((birth|creation|current|custom|modification) )?date|((((phonetic )?(first|last|middle))|computer|host|maiden|related) |nick)?name|aim|icq|jabber|msn|yahoo|address(es)?|save addressbook|should enable action|city|country( code)?|formatte(r|d address)|(palette )?label|state|street|zip|AIM [Hh]andle(s)?|my card|select(ion| all)?|unsaved|(alpha )?value|entr(y|ies)|group|(ICQ|Jabber|MSN) handle|person|people|company|department|icon image|job title|note|organization|suffix|vcard|url|copies|collating|pages (across|down)|request print time|target( printer)?|((GUI Scripting|Script menu) )?enabled|show Computer scripts|(de)?activated|awake from nib|became (key|main)|call method|of (class|object)|center|clicked toolbar item|closed|for document|exposed|(can )?hide|idle|keyboard (down|up)|event( (number|type))?|launch(ed)?|load (image|movie|nib|sound)|owner|log|mouse (down|dragged|entered|exited|moved|up)|move|column|localization|resource|script|register|drag (info|types)|resigned (active|key|main)|resiz(e(d)?|able)|right mouse (down|dragged|up)|scroll wheel|(at )?index|should (close|open( untitled)?|quit( after last window closed)?|zoom)|((proposed|screen) )?bounds|show(n)?|behind|in front of|size (mode|to fit)|update(d| toolbar item)?|was (hidden|miniaturized)|will (become active|close|finish launching|hide|miniaturize|move|open|quit|(resign )?active|((maximum|minimum|proposed) )?size|show|zoom)|bundle|data source|movie|pasteboard|sound|tool(bar| tip)|(color|open|save) panel|coordinate system|frontmost|main( (bundle|menu|window))?|((services|(excluded from )?windows) )?menu|((executable|frameworks|resource|scripts|shared (frameworks|support)) )?path|(selected item )?identifier|data|content(s| view)?|character(s)?|click count|(command|control|option|shift) key down|context|delta (x|y|z)|key( code)?|location|pressure|unmodified characters|types|(first )?responder|playing|(allowed|selectable) identifiers|allows customization|(auto saves )?configuration|visible|image( name)?|menu form representation|tag|user(-| )defaults|associated file name|(auto|needs) display|current field editor|floating|has (resize indicator|shadow)|hides when deactivated|level|minimized (image|title)|opaque|position|release when closed|sheet|title(d)?)\b/g,
60+
css: 'color3' },
61+
62+
{ regex: new RegExp(this.getKeywords(specials), 'gm'), css: 'color3' },
63+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
64+
{ regex: new RegExp(this.getKeywords(ordinals), 'gm'), css: 'keyword' }
65+
];
66+
};
67+
68+
Brush.prototype = new SyntaxHighlighter.Highlighter();
69+
Brush.aliases = ['applescript'];
70+
71+
SyntaxHighlighter.brushes.AppleScript = Brush;
72+
73+
// CommonJS
74+
typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
75+
})();

0 commit comments

Comments
 (0)