分享

写回答

发帖

[提问] godaddy免费空间放WordPress后台添加文章的问题

GoDaddy GoDaddy 2265 人阅读 | 4 人回复

发表于 2010-10-30 11:54:00 | 显示全部楼层 |阅读模式

都知道Godaddy免费空间放WP后有强制广告,这个要去掉都不是很大的问题。我现在试了一下,后台控制面板在火狐和google浏览器上是错位的很厉害,基本上不能使用,在IE下还可以,但是有一个关键问题,是在添加文章时,可视化编辑无法使用,文章内容在文本框里和底色的颜色一样,根本看不到,无法编辑,我在网上找了一个答案,但是还是无法解决,请高手指点一下!
以下是我在http://wordpress.org/support/topic/dashboardadmin-css-broken-godaddy-free-hosting-install这里看到的,但是英文不行,根本看不懂,我想是把wp-includes/script-loader.php文件里的几行给换掉,但结果还是不行。



Hello, excuse for my english. The problem on admin inte**ce is in the free hosting solution of godaddy, infact godaddy web server append this code at end of the page:
<<
</iframe></noscript></object></layer></span></div></table></body></html><!-- adsok -->
<script language='javascript' src='https://a12.alphagodaddy.com/hosting_ads/gd01.js'></script>
>>

The procedure of dynamic include, in the admin inte**ce, of CSS and JS produce a file with the code added from godaddy webserver, the browser interpreter fails to recognize the mime type.
The solution is to modify the script that load dynamically JS and CSS, in the file: wp-includes/script-loader.php.
The admin inte**ce is more slowly but work fine ...

That's all!

Hello ckliffames1,
i work with wordpress 2.8.4, italian version.
Replace line 619 in function _print_scripts():
echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n";
with:
// **********************************************
// Clean for godaddy free hosting
$st_data = file_get_contents( $src );
$st_data = substr( $st_data, 0, strrpos( $st_data, '</iframe>' ) );
echo "<script type='text/javascript'>\n";
echo $st_data;
echo "</script>\n";
// **********************************************

and replace line 686 in function print_admin_styles():
echo "<link rel='stylesheet' href='" . esc_attr($href) . "' type='text/css' media='all' />\n";
with:
// **********************************************
// Clean for godaddy free hosting
$st_data = file_get_contents( $href );
$st_data = substr( $st_data, 0, strrpos( $st_data, '</iframe>' ) );
echo "<style type='text/css' media='all'>\n";
echo $st_data;
echo "</style>\n";
// **********************************************

My dashbord work fine, with this changes and godaddy free hosting.

回答|共 4 个

add.c

发表于 2010-10-30 13:51:18 | 显示全部楼层

用Windows的免费主机即可

lian2284

发表于 2010-10-30 17:54:03 | 显示全部楼层

原帖由 add.c 于 2010-10-30 01:51 PM 发表
用Windows的免费主机即可

请问版主,用windows主机运行这些php程序不显广告,但会不会因为不显广告而被k啊?

frisa

发表于 2010-10-30 17:55:27 | 显示全部楼层

我想只要不是故意去除的话就没事

lian2284

发表于 2010-10-30 18:00:04 | 显示全部楼层

原帖由 frisa 于 2010-10-30 05:55 PM 发表
我想只要不是故意去除的话就没事

我感觉我自己有点故意不让织梦生成静态。动态页面就不会显广告了

ssehoop

发表于 2010-11-4 19:50:46 | 显示全部楼层

一直都是用Firefox 刚用IE6看了下后台果然没什么问题了 非常感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则