Archive

Archive for November, 2008

godaddy被封,tor被封,SourceForge被封,我们还能做什么?

November 26th, 2008

我该拿什么来爱你。

godaddy被封,根本买不了域名,登陆不了面板。想用个TOR吧,发现TOR被封,同时听说sourceforge被封就是因为tor.

向朝鲜学习。还有什么落后封闭的地方没?

顺便再骂一下天杀的lenovo.

国内出的东西,要绕到美国买才便宜。可我们这没有美国亲戚朋友的就只能买水货了。

我实在找不出一些理解来爱你。我的国家。你太让我伤心了。

暂时用这个vpn来注册名http://www.hotspotshield.com

心情随笔

override the output from the Joomla! core

November 26th, 2008

There may be occasions where you would like to change the way a Joomla! Extension (such as a Component or Module, whether from the Joomla! core or produced by a third party) is displayed on your site. Of course, you could recode the Extension from scratch, but that may be a bit ambitious for you! Thankfully, there is another way.

The standard output from any Joomla! Module or Component can be overridden by adding code to the html directory of your template. It is also possible to override two aspects of core functionality: Module chrome, and pagination.
Getting a head-start with overrides

If you are new to Joomla! development, then it is probably easiest to start with an existing view, and try modifying it to get what you want. To do this, you should make a copy of the existing view in the html directory of your template, and then modify the copy.

The directory structure you need is:

TEMPLATE_NAME/html/EXTENSION_NAME/VIEW_NAME/FILE_NAME.php

For example, if you want to change the way that the ‘Article’ view displays a com_content article, then you should copy the file at

PATH_TO_JOOMLA/components/com_content/views/article/tmpl/default.php
to
TEMPLATE_NAME/html/com_content/article/default.php

(note the slight difference in directory structure)

Similarly, if you want to change how the mod_login Module is displayed, then you should copy

PATH_TO_JOOMLA/modules/mod_login/tmpl/default.php
to
TEMPLATE_NAME/html/mod_login/default.php

Joomla! comes pre-packaged with a frontend template called Beez. Beez utilizes template overrides to produce a table-less layout for faster, smoother, and semantically correct markup. To see how it’s done, locate your Joomla! installation’s template directory, and you’ll notice the Beez template. Inside the Beez template directory, you’ll find a directory named html

the entire directory structure is as follows:

/your_joomla/templates/Beez/html/

If you want to try modifying the overrides used in Beez, you could simply copy and paste the Beez html directory into your own template’s main directory. However you choose to make your override files, you will need to ensure that they are correctly installed with your template. To do this, you should add the following code to your template’s templateDetails.xml file (in between the and tags):

html

The above code in essence lets the Joomla! package installer know that there are files to extract, and that they are part of the template as a whole.
Further tips

Template overrides are almost limitless. They allow you to add, edit, and remove the components of the Joomla! core output. Note: For the FireFox web browser, an extension is available called Firebug, which is useful for browsing a page’s HTML source and matching it up with the PHP code used in template overrides.

More information is available from the following resources:

joomla

comGateway的美国代购网站onenow.com上线 支付国内四个城市和VISA卡

November 25th, 2008

onenew.com美国网上购物,用国内信用卡支付,并配送至国内四个城市 上海,北京,深圳,广州地区送货 ,即日起至2009年1月31日,前8000名注册用户可享有第一笔订单30美金的运费优惠。快去捡便宜!!!

逛过美国的网络商户的人都知道,很多网站只往美国国内的地址递送商品,而且只受理美国国内的信用卡。现在,有了OneNow.com,面对众多美国网站上潮流时尚、质优价廉的商品,你不必再“望洋兴叹”了。现在就登陆OneNow.com,享受不一样的购物体验。足不出户,购遍美国30万家网络商户,轻松又简单。

OneNow.com是 一家集和了30万家美国网络商户的一站式购物平台。通过网站提供的“Deliver For Me”和“Pay For Me”服务,即使身在国内,即使只用国内发行的Visa卡,也可以轻松购遍这30万家商户。您在OneNow.com网站的支付有“Visa验证 (Verified by Visa)”服务的保障,并有DHL提供的高效、安全的物流服务,您在购物过程中碰到任何疑问,还可以求助网站的7天24小时中文在线客服。

从Ermenegildo Zegna风衣、Levi’s牛仔裤,到Elizabeth Arden化妆品,GNC的营养品,还有PS3、Xbox306和Toys ‘R’ Us的玩具,更有Macy’s、Sears、BestBuy等百货、家电零售卖场的网上折扣促销,这么多商品, 都唾手可得,你还不心动?

现在注册,还有运费优惠——2009年2月28日前注册的前8000名用户,第一笔订单可以享受30美元的运费优惠;另外,前5000名购买商品重量少于5公斤的顾客还可以享受10%的折扣。

还犹豫什么?现在就去OneNow.com注册,开始你的圣诞美国淘宝之旅吧!

visa的宣传地址:

http://www.visa-asia.com/ap/cn/zh_CN/cardholders/offers/onenow.shtml

关于onenow.com

comGateway 的网上购物服务使得亚洲客户可以很方便的从任何一间美国的在线购物网站上选购商品,这也包括了那些不提供美国境外货品送递服务或不接受美国境外信用卡的网上商店。

我们为客户提供了一个专有的美国境内投递地址,商家将货物投递到该地址后,通过我们的合作伙伴, DHL 快递,将客户购买的商品在 4 到 6 个工作日内送往客户的实际家庭地址。由于我们的国际送递收费远远低于国际标准,从而为客户节约大笔开支。针对不接受美国境外信用卡的网上商店,客户只需简单的使用我们的“为我付款”服务,我们就可以代表客户在该网站上付款。

此外, comGateway 还与多家银行及信用卡公司合作,确保顾客的隐私得到最好的保护,从而给顾客带来全方位的安全、便捷的网上购物新体验。

我们的防欺诈保护程序
在商家将货物运到我处之前,他们会首先确保该交易是合法的。所有由我们经手的交易,从下订单一直到送货上门,都会直接通过我们独有的先进的确认系统先由客户进行确认。客户还可以通过我们的系统来追踪他们的包裹,直到收到包裹和送递收据。

通过我们的服务,商家还可以直接与我们确认客户的订单。更多详情,请与我们联系。

我们的特定商家
comGateway 致力于商家信誉的最大化,确保我们的客户在购物时同时得到可信赖的服务以及高品质的原装商品。我们的目标是,使在线购物更简单,更安全,确保客户在线购物时获得完美的舒适体验。

如果您正是网站所有者,并且不希望我们的客户从您的网站上购物,请按照如下方式联系我们。

欲知更多关于商家关系,或是我们商业服务的其他方面的详情,请电邮至: biz@comgateway.com

招行的宣传彩页

招行的宣传地址:http://creditcard.cmbchina.com/special/sale/jwdg.htm

国内各大银行的促销代码

CHINA CITIC BANK 中信银行 – 促销编码 : CN082105

CHINA MERCHANT BANK 招商银行 – 促销编码 : CN082101

CHINA EVERBRIGHT BANK 中国光大银行 – 促销编码 : CN082108

CHINA MINSHENG BANK 中国民生银行 – 促销编码 : CN082106

BOC CREDIT CARD (INTERNATIONAL) LIMITED 中银长城国际 – 促销编码 : CN082102

SHANGHAI PUDONG DEVELOPMENT BANK 上海浦东发展银行 – 促销编码: CN082109

*首笔订单30美金运费优惠只限首8000位注册用户获得,有效期至2009年1月31日。

*每位用户仅能在一次交易中享受优惠。未使用部分不再留到下次使用。

*10% 运费折扣只限首5000笔交易,每个邮递包裹5公斤以下运费享受优惠,活动有效期至2009年1月31日。

个人收藏 , ,

joomla判断是否是首页

November 24th, 2008

在1.0当中判定首页一般使用如下的代码:

 <?php if (!((!$option)||($option!="com_frontpage"))){ ?>
 // 非首页
<? php } else {  ?>
//  首页
<?php }?>

在1.5当中此法已不可判断,需要采用如下方法判断:

<?php
    $menu = & JSite::getMenu();
     if($menu->getActive() == $menu->getDefault()){
?>
     //首页
<?php  } else{?>
     //非首页
<?php  } ?>

joomla

Joomla! 首页自由定制-为首页指定单独的模板

November 24th, 2008

大部分的Joomla! 1.5 模板给了我们足够的自由度,来在首页表达足够丰富的内容,然而有时候对于我们来说,三栏或者两栏的表达方式对于我们仍然不够,并且在建站的初期,可能最需要改变的就是首页的规划,从而达到最好的阅读效果。那么怎么才能让首页脱离模板的限制而任意布局和显示内容?

首先在/templates/目录下找到当前的模板目录,将index.php 拷贝为home.php和default.php ,然后我们来修改index.php,index.php的代码如下:

<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
function isFrontPage(){
 return (JRequest::getCmd('option')=='com_content' && !JRequest::getInt('id'));
}
if(isFrontPage()){
 include_once (dirname(__FILE__).DS.'/home.php');
} else {
 include_once (dirname(__FILE__).DS.'/default.php');
}
?>

其实就是判断是否在访问首页,如果访问首页,怎包含home.php,否则是默认default.php。

接下来就是按照你自己的意愿来修改home.php,而不受任何限制了。通常保留原来模板的页头部分,而内容部分可以你任意布局。

joomla ,

银行技穷,欲力措支付宝套现

November 24th, 2008

网上银行,支付宝交易,在国内历来都是没有手续费的。而且,在一定的时间内都不会收手续费。

那么各家银行,就面临着信用卡套现的风险。不过话说回来,你发信用卡就没有风险吗?

即然发信用卡有风险,套现的风险在何处,还不是在发信用卡的风险之内?

你要怕套现你就怕发信用卡啊?套现,在国外似乎是很平常的事儿,很正常的事儿。就到了中国特色的社会主义国家,就行不通了。

归根结底,还是因为银行没有利润。支付宝交易,银行没有利润,仅仅是有个流水。这样银行还不满足。有流水,就有资金,有业绩。难道你还要非在这上面加个手续费不成。估计要是加个手续费,银行这帮家伙就不会出来叫了。

心情随笔

最后的王爷片尾曲《说命》视频

November 24th, 2008

HOHO,是我上传到youtube上的。

Uncategorized ,

joomla模板单常见问题

November 24th, 2008

什么是模板(Template)?

模板决定了网站的整体外观和布局。模板提供了一个框架来整合通用元素(模块和组件),还包括了级联样式表(CSS)。站点的前端(网站)和后台(管理)都使用了模板。

Joomla! 安装版中包括了若干模板。你可以从其他网站上找到更多的模板,有些是免费的(基于各种许可证),也有些是收费的。此外,很多设计人员都能够制作模板。你也可以尝试制作你自己的模板。

模板通过模板管理器(Template Manager)管理,其入口在管理后台的扩展(Extensions)菜单下。

怎样安装模板(install a tempalte)?

在管理后台循扩展 » 安装和卸载(Extensions » Install & Uninstall)菜单进入,上传 .zip 格式的模板压缩文件即可。

也可以将整个模板文件夹直接复制到 /templates/ 目录下。

怎样修改模板(modify a template)?

模板是保存在 /templates/ 目录下的一系列 xml、php、html 和图片文件组成。你可以直接编辑这些文件,或者通过模板管理器(Template Manager)中提供的编辑接口进行修改(可修改模板中的 html 和 css 文件)。

怎样给特殊的页面单独指定模板?

Joomla! 中设定了默认模板,你也可以给特殊的“页面”单独指定模板,这里的页面特指某个(些)菜单项链接到的页面。因此,要给某个页面指定模板,首先要确保某个菜单项指向这一页面。参考 Joomla! 使用手册 – 菜单及菜单项(Menu & Menu Item)

(为页面指定模板,实际上是为模板分配页面。——译者注)
进入模板管理器,选择所要应用的模板,在 Menu Assignment (菜单分配)中,选择 Select From List (从列表中选择)单选框,然后从下面的下拉列表中,选择你希望应用这一模板渲染的页面,可多选。

注意:不能为系统默认模板分配页面。

深入理解:系统根据 ItemID 决定应用哪个模板。ItemID 在创建菜单项时生成,这就是为什么在为模板分配页面时,下拉列表中只有菜单项可供选择。

(当试图将同一个页面分配给多个模板时,会发生什么呢?——译者的疑问)

可以删除 Powered by Joomla! 信息吗?

可以,你可以从 footer.php 中删除此信息。但是你不能删除代码中的版权和许可证说明。

什么是模块开关(module switches)? (-1, -2, -3)

模块开关是指 mosLoadModules(string module_name, int module_switch) 函数的第二个参数,指显示模块的方式。-1 表示不作任何修饰,仅用一个 <div/> 容器封装模块的 HTML 代码;-2 表示将模块名称显示在一个 <h3/> 标签中,同时将整个模块封装在一个 <div/> 容器中;-3 表示除将模块名称显示在 <h3/> 标签中之外,用多个 <div/> 容器嵌套封装模块,以通过 CSS 技术显示圆角;当 module_switch 参数缺省时,将使用一个2行1列的表格封装模块,第1行单元格中显示模块标题,第2行单元格中载入模块代码。
(本答案省略了原文中的代码示例,仅供参考。)

原文:http://docs.joomla.org/Template_FAQs

joomla ,

疑土豆网dns被网通劫持

November 22nd, 2008

今天说什么都上不了土豆网了。本来想找一个《最后的王爷》片尾曲。结果发现土豆网上不了。怀疑土豆网dns被北京网通劫持。我先用的是北京网通的dns服务器,随后又换成国际性的opendns,都是打不开。以下是tracert结果
tracert www.tudou.com

Tracing route to www.m.tudou.com [67.215.66.132]
over a maximum of 30 hops:

1    13 ms    14 ms    14 ms  123.119.48.1
2    14 ms    14 ms    13 ms  202.106.49.17
3    14 ms    14 ms    14 ms  bt-227-109.bta.net.cn [202.106.227.109]
4    14 ms    13 ms    13 ms  61.148.153.121
5    14 ms    13 ms    14 ms  202.96.12.157
6    44 ms    44 ms    44 ms  219.158.4.62
7    43 ms    43 ms    43 ms  219.158.4.234
8   249 ms   241 ms   241 ms  219.158.25.58
9   236 ms   237 ms   236 ms  po3-1.core01.lax04.atlas.cogentco.com [154.54.14
.13]
10   237 ms   236 ms   236 ms  te3-1.ccr01.lax04.atlas.cogentco.com [154.54.24.
74]
11   236 ms   236 ms   236 ms  te4-3.ccr01.lax01.atlas.cogentco.com [154.54.24.
69]
12   235 ms   236 ms   235 ms  te3-1.ccr02.sjc01.atlas.cogentco.com [154.54.5.1
85]
13   223 ms   224 ms   223 ms  te8-1.mpd01.sjc01.atlas.cogentco.com [154.54.2.2
9]
14   234 ms   234 ms   234 ms  te3-3.mpd01.sfo01.atlas.cogentco.com [154.54.6.1
33]
15   236 ms   237 ms   238 ms  te4-1.ccr01.smf01.atlas.cogentco.com [154.54.24.
114]
16   254 ms   254 ms   255 ms  te4-3.ccr01.sea01.atlas.cogentco.com [154.54.3.9
0]
17   244 ms   243 ms   243 ms  te4-2.ccr01.sea02.atlas.cogentco.com [154.54.1.1
98]
18   271 ms   271 ms   271 ms  opendns.demarc.cogentco.com [38.104.124.62]
19   268 ms   268 ms   268 ms  hit-servfail.opendns.com [67.215.66.132]

Trace complete.

心情随笔

最后的王爷片尾曲 说命 谁有下载地址啊?

November 22nd, 2008

最后的王爷片尾曲 说命

非常喜欢这首歌。尤其是最后那一嗓子。前面的全是为这最后一嗓子做的铺垫。很有股回肠荡气的味道。

谁有下载地址,不防给共享一下啊。

心情随笔