Gallery: 嵌入:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
第7行: 第7行:
参见:'''[[Gallery:Themes|外观主题向导]]''' | '''[[Gallery:Tpl_Reference|模板相关参考]]''' | '''[[Gallery:How_Tos#Website_Integration|指导 - 可视化整合]]'''
参见:'''[[Gallery:Themes|外观主题向导]]''' | '''[[Gallery:Tpl_Reference|模板相关参考]]''' | '''[[Gallery:How_Tos#Website_Integration|指导 - 可视化整合]]'''


If you also want to place some random images of G2 on other pages of your website, you can use the external imageblock from the [[Gallery:Modules:imageblock|imageblock module]].
如果你想在网站的其他页面中放入随机的G2图片,你可以使用[[Gallery:Modules:imageblock|imageblock模块]]中的外部imageblock。


If visual embedding is not enough and you need to '''integrate G2's user management and authentication system''' and other parts with another PHP application, you can do that by using G2's GalleryEmbed class which is an interface between G2 and the application in which G2 should be embedded in.
如果可视化嵌入不够的话,你需要'''整合G2的用户管理和验证系统'''以及使用另外一个PHP应用程序整合其他的部分。你还可以使用G2的GalleryEmbed class,它是介于G2和应用程序之间的一个界面,G2应该嵌入其中。


Another option for PHPNuke users is to use [http://www.htd.net/modules.php?name=Downloads&d_op=getit&lid=5 IFRAME v1.0] which requires very little editing and you can place your entire Gallery2 inside of an (IFRAME) for display on your main site without having to match CSS or any other site specific information. Just follow the readme file included in the package.
PHPNuke用户的另一选择就是使用[http://www.htd.net/modules.php?name=Downloads&d_op=getit&lid=5 IFRAME v1.0]。它只需极少的编辑而你则可以将整个Gallery2置入一个(IFRAME)中并显示在主站中,且无须符合CSS或任何其他的网站特定信息。只须遵照软件包中的自述文件所述即可。


== Existing Integrations ==
== Existing Integrations ==

2008年7月17日 (四) 16:05的版本

嵌入Gallery2

Gallery2可以完美地嵌入到你的网站中。你可以自定义一个已有的外观主题从而使得G2符合网站的外观风格。你还可以在功能上将G2整合到网站中。G2可以很轻易地被嵌入到其他的应用程序中。并且它还提供一个界面用来与网站/PHP运作的应用程序进行对话

可视化整合vs.功能性整合

如果你所需要的只是在网站中可视化地嵌入G2,比如在网站次级页面的顶部/左边/右边或中间添加菜单。那么你就只能在themes/matrix/templates/中编辑主要的主题模板,并通过调整CSS样式来确保字体大小和颜色的符合。

参见:外观主题向导 | 模板相关参考 | 指导 - 可视化整合

如果你想在网站的其他页面中放入随机的G2图片,你可以使用imageblock模块中的外部imageblock。

如果可视化嵌入不够的话,你需要整合G2的用户管理和验证系统以及使用另外一个PHP应用程序整合其他的部分。你还可以使用G2的GalleryEmbed class,它是介于G2和应用程序之间的一个界面,G2应该嵌入其中。

PHPNuke用户的另一选择就是使用IFRAME v1.0。它只需极少的编辑而你则可以将整个Gallery2置入一个(IFRAME)中并显示在主站中,且无须符合CSS或任何其他的网站特定信息。只须遵照软件包中的自述文件所述即可。

Existing Integrations

Thanks to dedicated integration developers there are some more or less complete integrations available. For most of these you need to separately install Gallery 2 and the other application (CMS, portal, forum, wiki, ...) and then connect the two by using the integration for that application. For most applications you can use a module/extension/plugin, some less elaborate applications are not that modular and require that you edit some files. But you should never have to edit G2 files.

See: List of Available Integrations

Embedding Gallery in Other Applications

Gallery is designed specifically to manage your multimedia online. Gallery is not a content management system or a blog or a website editor. However, there's no reason why Gallery can't be the multimedia management portion of a much larger system which does much more context content management or blogging, etc. Many such systems focus on their core competency and provide a very weak multimedia management system. Gallery is designed to work within those larger systems and provide the functionality that they lack.

How we actually go about embedding Gallery into another program depends heavily on which program we are going to work with. More and more PHP based applications are modular and for these you can integrate G2 just by installing G2, the other application and additionally a module in that other application that integrates / wraps G2 into that application.

One of the most important goals when writing a (G2) integration should always be to make sure that no files have to be edited / replaced by the user. Only a very modular approach ensures that the user can maintain both applications independentely and upgrade quickly when a new (security) release is available for any of the 3 components (G2, emApp, and the integration).

See:

Also see: Embedding Development Roadmap

Short URLs in Embedded G2

Enabling short URLs (rewrite module) in embedded G2 is often not that easy. Therefore we have documented the necessary steps.

See: Configuring URL Rewrite for Embedded G2

Code Snippets

See: GalleryEmbed related Code Snippets