Using classic templates, publishing via FTP to a custom domain.
使用经典模板,通过FTP发布到自定义域。
I want to add custom elements such as:
我想添加自定义元素,例如:
- a tree view for archived posts (expanding using CSS/JavaScript)
- a tag cloud
- a slideshow of images
存档帖子的树视图(使用CSS / JavaScript扩展)
标签云
图片幻灯片
1 个解决方案
#1
2
I used PHP to process a Blogger blog after it is published via FTP. Any server side language can do this (ASP, ASP.NET, Python, JSP, ...).
在通过FTP发布后,我使用PHP处理Blogger博客。任何服务器端语言都可以这样做(ASP,ASP.NET,Python,JSP,...)。
I wrote a PHP script (blogger_functions.php
) to scan the directory that Blogger FTP's to and generate a snippet of HTML to represent the archive hierarchy ($snippet
).
我编写了一个PHP脚本(blogger_functions.php)来扫描Blogger FTP所在的目录,并生成一段HTML代表存档层次结构($ snippet)。
I added this PHP to the top of my Blogger template:
我将此PHP添加到Blogger模板的顶部:
<?php
<MainPage>
$site_rootpath = "../";
</MainPage>
<ArchivePage>
$site_rootpath = "../../";
</ArchivePage>
<ItemPage>
$site_rootpath = "../../../";
</ItemPage>
include($site_rootpath."includes/blogger_functions.php");
?>
And this to the sidebar part of the template:
这是模板的侧边栏部分:
<?php
echo $snippet;
?>
Then I configured Apache to process the PHP tags in the blog's .html files by putting this in a .htaccess file in the root directory of the blog:
然后我将Apache配置为处理博客根目录中的.htaccess文件中的PHP标记,以处理博客的.html文件中的PHP标记:
AddType application/x-httpd-php .html .htm
With this approach you can use the full power of PHP with a Blogger blog.
通过这种方法,您可以将Blog的全部功能与Blogger博客结合使用。
#1
2
I used PHP to process a Blogger blog after it is published via FTP. Any server side language can do this (ASP, ASP.NET, Python, JSP, ...).
在通过FTP发布后,我使用PHP处理Blogger博客。任何服务器端语言都可以这样做(ASP,ASP.NET,Python,JSP,...)。
I wrote a PHP script (blogger_functions.php
) to scan the directory that Blogger FTP's to and generate a snippet of HTML to represent the archive hierarchy ($snippet
).
我编写了一个PHP脚本(blogger_functions.php)来扫描Blogger FTP所在的目录,并生成一段HTML代表存档层次结构($ snippet)。
I added this PHP to the top of my Blogger template:
我将此PHP添加到Blogger模板的顶部:
<?php
<MainPage>
$site_rootpath = "../";
</MainPage>
<ArchivePage>
$site_rootpath = "../../";
</ArchivePage>
<ItemPage>
$site_rootpath = "../../../";
</ItemPage>
include($site_rootpath."includes/blogger_functions.php");
?>
And this to the sidebar part of the template:
这是模板的侧边栏部分:
<?php
echo $snippet;
?>
Then I configured Apache to process the PHP tags in the blog's .html files by putting this in a .htaccess file in the root directory of the blog:
然后我将Apache配置为处理博客根目录中的.htaccess文件中的PHP标记,以处理博客的.html文件中的PHP标记:
AddType application/x-httpd-php .html .htm
With this approach you can use the full power of PHP with a Blogger blog.
通过这种方法,您可以将Blog的全部功能与Blogger博客结合使用。