Category Archives: Joomla

Joomla相关

五种去掉免费空间广告的方法

五种去掉免费空间广告的方法:JS,PHP,CSS安全去掉广告法 | 免费资源部落.

五种去掉免费空间广告的方法:JS,PHP,CSS安全去掉广告法

一、利用CSS隐藏免费空间的广告

1、用Chrome的审查元素找到免费空间广告的ID或者是Class。

用CSS去掉空间广告

2、然后给这个层加上 display:none; 就可以了。

去掉空间广告添加CSS代码

二、利用JS隐藏免费空间的广告

1、用JS去掉广告的原理和上面是一样的,只不过是用JS插入CSS。这个方法有一个特殊的作用:访问空间的如果是中文用户,则去除广告,如果是非中文的则显示广告。某些禁止用户去除广告的空间用该方法特别有效。

利用JS来去掉空间广告

2、请在你</body>前面加入以下代码(注意:把CSS改成自己的内容,复制过去的代码,请检查一下中英文标点,中文标点全部换成英文的)。


<script language="JavaScript" type="text/javascript"> 
var lang = navigator.language || navigator.userLanguage;
if(lang.substr(0, 3) == "zh-"){  
document.write("<style type=\"text/css\" media=\"screen\">.page-tooltip{display:none;}</style>");  }
</script>

三、利用PHP隐藏免费空间的广告

1、用PHP代码去掉空间广告相对于JS方法来说,有一个优势:源代码无法被用户直接看到,所以他人无法知道你是不是隐藏了广告。

2、方法一:PHP代码+CSS。用PHP判断用户是否为中文用户,如果是中文用户,则输出CSS隐藏广告的样式,否则则显示广告。代码如下(注意:把CSS改成自己的内容):


<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
if($language == 'zh'){
echo '<style type="text/css" media="screen">.page-tooltip{display:none;}</style> ';
}
?>

3、方法二:PHP代码+JS。这个方法直接让空间的广告JS变为无效,没有了广告JS自然不会出现广告了。代码如下(注意:把CSS改成自己的内容):


<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
if($language == 'zh'){
echo '<noscript><noscript>';
}
?>

四、PHP、JS、CSS去掉广告的高级用法

1、上面三种去掉广告的方法实际上有一个漏洞就是必须知道广告DIV的ID或者是class,像有些免费空间广告代码中并没有给出广告的Class或者ID,这时就要变通一下了。

2、根据观察,免费空间广告DIV用了align="center"。

去掉空间广告观察特征

3、这时我们就可以用JS+CSS的方法,将带有align="center"的DIV给隐藏了。(代码来自Xrea日本免费空间速度测评文章中“馨儿”同学的留言)


<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
if($language == 'zh'){
echo '<style type="text/css" media="screen">[align=center]{display:none;}</style> ';
}
?>

4、又根据观察,免费空间广告的DIV总是包含了 www.xrea.com 这个内容,根据这一特点,我们只需要将含有www.xrea.com的DIV给隐藏即可(代码来自Xrea日本免费空间速度测评文章中“blackfeather”同学的留言)


<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
if($language == 'zh'){
    echo "
       <script type='text/javascript'>
       var ad = document.getElementsByTagName(\"div\");
       for(i=0;i<ad.length;i++){
     var adstr = ad[i].innerHTML;
     if(adstr.indexOf('www.xrea.com') != -1){ ad[i].style.display = 'none'};
      }
      </script>
";
}
?>

5、再次根据观察,发现广告的DIV总是第一个出现在<body>标签后面,这时我们只需要将<body>后的第一个DIV给隐藏了就可以了(代码来自Xrea日本免费空间速度测评文章中“blackfeather”同学的邮件)。


<?php
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
if($language == 'zh'){
echo "
<script type='text/javascript'>
var ad = document.getElementsByTagName(\"div\")[0];
ad.style.display = 'none';
</script>
";
}
?>

去掉空间广告包含一些特征

五、用.Htaccess、noframes、noscript去掉免费空间广告

1、用.htaccess去掉免费空间广告的方法之前有用在Sitemix.jp免费空间上,在.htaccess中添加以下代码即可。


RewriteEngine On
RewriteBase /

LayoutIgnoreURI *.php
LayoutIgnoreURI *.py
LayoutIgnoreURI *.cgi
LayoutIgnoreURI *.htm
LayoutIgnoreURI *.html
LayoutIgnoreURI *.txt

2、noframes、noscript主要用来阻止免费空间广告代码中的frames、script生效,该方法之前也用在Sitemix.jp免费空间上。

3、如果你的页面是Html页面,在<body>两边加<noscript>和</noscript>,变 成<noscript><body></noscript>,如果是php页面,在<body>(或 body标签)两边加<noframes>和</noframes>,形 如<noframes><body></noframes>。

4、在你的页面的</body>前面加上<div style="display:none;">,变成了<div style="display:none;"></body>。此方法可以去掉空间页面底部广告。

六、免费空间去掉广告方法小结

1、一般情况下,针对免费空间的广告可以采取JS和PHP的方式来去掉广告,稍微复杂一点的就是用PHP、JS、CSS去掉广告的高级用法来执行,这种方式安全,不容易被空间商所发现,又能达到隐藏广告的目的。

2、.htaccess添加代码来去掉广告容易导致空间出现问题,不推荐使用。另外,不得不提醒一下的是去掉广告是不符合免费空间使用协定的,空间商有权终止免费空间账户,或者采取各种手段来阻止去除广告的行为。

不用改程式,把文章编辑区变大

台湾 Joomla! 社群 – Joomla!中文技术讨论区 :: Topic: 不用改程式,把文章编辑区变大!(适用于 Joomla! 2.5 ) (1/1)
在 Joomla! 2.5 的管理区编辑文章时,文章编辑区约只分配到画面四分之一的区域,实在不方便。阿宝在 Joomla! 的 Google+ 社群看到网友分享心得,让编辑区域宽度放大到整个视窗!

原文为〈Greatly improve the Joomla! 2.5 article manager〉

动作流程
Step 01:下载档案然后解压缩,将“edit.php”上传至“/administrator/templates/bluestork/html/com_content/article”资料夹,红色字体表示的资料夹需自行建立。

Step 02:下载并安装 JCE(Joomla! Content Editor)。(注 1)

Step 03:将 JCE 指定为需要的会员使用,如“全站设定”画面“预设的编辑器”项目指定则可适用于网站全体会员。

Step 04:在“元件 – JCE Editor”选择“Profiles”编辑设定档,“Default”设定档适用于全体会员。

Step 05:在“Features & Layout”分页的“Editor Layout”区块,于“Editor Width”栏位输入“100%”后储存设定。

Step 06:建立一篇新文章,你就会看到焕然一新的编辑画面了!(注 2)

注 1:原文是以 JCE 做示范,也适用于阿宝常用的 JoomlaCK,后者在预设情况能以中文显示工具提示。

注 2:如果编辑画面没有变更,请重新读取页面几次,或是删除网站端的快取。

The First Community Choice Extensions Winners! – December 2012

The First Community Choice Extensions Winners! – December 2012

After much deliberation and consideration, the JCM Team has come up with the very first Top Ten Community Choice Extensions! We had almost 150 submissions and the competition was tough!

Each month the Joomla Community Magazine team will be selecting up to 10 extensions. Previous selections will not be repeated. These extensions will also be listed as Featured Extensions on the JED (Joomla Extension Directory).

*Author’s note: Links to the individual JED listing have been added on 04 December 2012.

The form for next month can be found at the end of this article. Thank you to everyone who took the time to submit an extension! Keep ’em coming! 

Here are the choices for December:


Extension: ACL Manager

ACL-Manager
Extension Developer:
Sander Potjer

Extension Developer Website: http://www.aclmanager.net

JED URL: http://extensions.joomla.org/extensions/access-a-security/site-access/backend-a-full-access-control/17951

Why do you love this Extension? With this extension it’s a piece of cake to make all kinds of administrator access levels in a Joomla website.

What does this Extension do to enhance your website? The summary of acces levels.

Submitted by: Connie de Buijn

Submitter’s Website: http://webartenco.nl/


Extension: AcyMailing

AcyMailing-Starter
Extension Developer:
Acyba

Extension Developer Website: http://www.acyba.com

JED URL: http://extensions.joomla.org/extensions/content-sharing/newsletter/10341

Why do you love this Extension? Excellent extension to make emailing quality! Support is very good, with a very, very responsive forum. Regular changes, for better efficiency always.

What does this Extension do to enhance your website? Thanks to this extension, my site has a extremely good management newsletters!

Submitted by: Fabrice Zavattero

Submitter’s Website: www.lalumieredesfees.fr


Extension: EasyBlog

EasyBlog
Extension Developer:
StackIdeas

Extension Developer Website: http://stackideas.com/

JED URL: http://extensions.joomla.org/extensions/authoring-a-content/blog/12630

Why do you love this Extension? EasyBlog has been a huge help on our theater web site. They give first rate support and have been most helpful.

What does this Extension do to enhance your website? Makes blog posting easy!

Submitted by: Gala Lindvall

Submitter’s Website: www.ForestTheater.com


Extension: EasyCalcCheck Plus (ECC+)

EasyCalcCheck-PLUS
Extension Developer:
Kubik Rubik

Extension Developer Website: http://joomla-extensions.kubik-rubik.de/ecc-easycalccheck-plus

JED URL: http://extensions.joomla.org/extensions/access-a-security/site-security/captcha/11964

Why do you love this Extension? Easy to use, lightwight, free… and EFFECTIVE!

What does this Extension do to enhance your website? Frees me from SPAM… really.

Submitted by: Ivo Schmid

Submitter’s Website: http://www.Lehrmittelperlen.net


Extension: Fabrik

Fabrik
Extension Developer:
Fabrikar

Extension Developer Website: http://fabrikar.com

JED URL: http://extensions.joomla.org/extensions/contacts-and-feedback/forms/1659

Why do you love this Extension?

Because it is:

  • Free of charge.
  • Easy way to use and manage.
  • Very useful forum.
  • Constantly updates for security issues and enhancing.

What does this Extension do to enhance your website?

It allows me to manage and develop:

  • Databases
  • Forms
  • Lists
  • Statistics
  • Visual Charts

Submitted by: Bader Ajhar

Submitter’s Website: http://www.lamafurnituresy.com/index.php


Extension: JComments

JComments
Extension Developer:
 JComments

Extension Developer Website: http://www.joomlatune.com/

JED URL: http://extensions.joomla.org/extensions/contacts-and-feedback/articles-comments/9985

Why do you love this Extension? Works out of the box. Very useful features. Add the comments to the articles.

What does this Extension do to enhance your website? This is a functionality that Joomla has been lacking in the core.

Submitted by: Fermin Jimenez

Submitter’s Website: www.najar.ca


Extension: Joomla Content Editor (JCE)

JCE
Extension Developer:
 Ryan Demmer

Extension Developer Website: http://www.joomlacontenteditor.net

JED URL: http://extensions.joomla.org/extensions/edition/editors/88

Why do you love this Extension? Absolutely a must have. Editing articles is breezing plus tons of features. And it’s free 🙂 It’s always the first extension I install after installing Joomla. And believe me – I use a lot of extensions.

What does this Extension do to enhance your website? Its image manager makes my site have images in the first place. I work with people whose experience editing content is next to zilch and JCE’s easy ways of inserting various objects (links, images etc) is second to none.

Submitted by: Olek Trembowiecki

Submitter’s Website: www.biblioteka.koszalin.pl


Extension: Komento

Komento
Extension Developer:
 Stackideas

Extension Developer Website: http://stackideas.com/

JED URL: http://extensions.joomla.org/extensions/contacts-and-feedback/articles-comments/20527

Why do you love this Extension? Komento is useful, powerful and free.

What does this Extension do to enhance your website? With Komento you can add comments to articles and share them on social networks. My clients love it!

Submitted by: Lucía Otero

Submitter’s Website: http://www.movilidadelectrica.com/


Extension: Ozio Gallery

Ozio-Gallery
Extension Developer:
 Alessandro Rossi

Extension Developer Website: http://www.opensourcesolutions.es/en/ext/ozio-gallery.html

JED URL: http://extensions.joomla.org/extensions/photos-a-images/galleries/photo-gallery/4883

Why do you love this Extension? Very easy to use, and very powerful for my photo gallery in most of my website.

What does this Extension do to enhance your website? I am able to give that extra touch to the images being able to offer them in an interesting perspective to the navigator, also with the new version that makes the gallery responsive fits very well with mobile devices.

Submitted by: Matteo Montanari

Submitter’s Website: http://www.sensiparrucchieri.it/sensi-vip.html


Extension: sh404SEF

sh404SEF
Extension Developer:
 Yannick Gaultier

Extension Developer Website: http://anything-digital.com/sh404sef/seo-analytics-and-security-for-joomla.html

JED URL: http://extensions.joomla.org/extensions/site-management/sef/10134

Why do you love this Extension? Installation is easy, great documentation, helps my sites with SEF friendly URLs and powerful tweaks when needed.

What does this Extension do to enhance your website? SEF URLs, special page titles.

Submitted by: Tanya Flores

Submitter’s Website: http://www.massageforhealing.com


Submit your favorite Extension for January 2013!
Here’s how it works:

Please submit your all-time, numero uno, favorite Joomla Extension. Tell us why you love it, give us a short explanation of what it does to enhance your website, and the URL of where you are using it.

The JCM editorial team (aka, The White Padded Room Skype chat members) will select up to ten Extensions each month and they will be featured on the JED as well as listed in an article in the JCM. 

No awards, no accolades… just the appreciation of the Joomla community for sharing and caring!

Please use the form below to submit your favorite extension.