集成 Drupal 和 WHMCS

发布于 2024-10-19 11:39:55 字数 144 浏览 6 评论 0原文

我只是想知道是否有任何挂钩可以将 WHMCS 数据库与我现有的 Drupal 站点集成。

WHMCS 有自己的 CMS,Drupal 也是如此。我已经在 WHM 和 Drupal 中使用了两次相同的 html,因此问题是如果有任何设计更新,我必须更改两次。

I am just wondering if there is any hook to integrate WHMCS database with my existing Drupal site.

WHMCS has its own CMS and so as Drupal. I have used the same html twice for WHM and also for Drupal hence the problem is that I have to change twice if there is any design update.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

橙幽之幻 2024-10-26 11:39:55

答案是不,不存在这样的事情

在 Drupal 中,钩子并不是能够神奇地集成任何东西。钩子只是一个允许代码多次运行的架构概念。钩子不是您要寻找的东西。

您将需要实现创建、读取、更新、删除同步的每一个集成。 Drupal 中的用户得到更新,这应该会触发更新其他 CMS 数据库中的数据的代码。在 WHCMS 中创建一段内容,然后它也需要在 Drupal 中可用。等等等等。

因此,您首先需要非常清楚地定义您想要在两者之间集成和共享的内容。如果只是会话(单点登录),则有多种解决方案可供使用。但如果您需要共享所有内容、评论、搜索结果等,那么您还有很长的路要走。

完全集成两个 CMS 的实际情况是,您通常需要的不仅仅是两个 CMS 代码库的总和作为粘合代码:它需要大量复杂的集成和同步代码,您可能同时编写了两个 Drupal和 WHCMS 从头开始​​。我的建议:甚至不要尝试。

The answer is no, there is no such thing.

A hook, in Drupal is not something magically to integrate anything. A hook is merely a architectual concept to allow code being ran on several occasions. A hook is not what you are looking for.

You will need to implement each and every piece of integration with Create, Read, Update, Delete synchronisation. A user in Drupal gets updated, that should fire code wich updates the data in your other CMS's database. A piece of content is created in your WHCMS, then it needs to become available in Drupal too. And so on and so on.

So, you will first need to define very clearly what you want to integrate and share between both. If it is only the session (single sign on) there are several solutions ready to use. But if you need all content, their comments, search-results and so on to be shared, you have a long way to go.

The reailty with integrating two CMS's entirely, is that you often need more then the sum of the codebase of both CMSs as gluecode: it needs such great amounts of complex integration and synchronisation-code, that in the same time you had probably written both Drupal and WHCMS from ground up. My advice: don't even try.

垂暮老矣 2024-10-26 11:39:55

挂钩主要用于 CMS 操作(创建/更新/删除内容)。听起来您只需要在两个系统之间共享 CSS 和页眉/页脚 HTML 的主题。

您可以将 Drupal 切换为使用 Smarty 模板引擎: http://drupal.org/project/smarty

您然后可以创建一个 Drupal 主题,从 WHMCS 主题导入 header.tpl.php 和 footer.tpl.php。

您可能需要从 WHMCS 端删除一些 Smarty 标记和变量,以简化页眉和页脚,使其可以与 Drupal 一起使用(如果您可以使页眉和页脚成为纯 HTML,您甚至可能不需要在 Drupal 端使用 Smarty),或者在 Drupal 端编写大量预处理代码,您可以使用 WHMCS 数据库中的值填充模板变量。

Hooks are mainly for CMS operations (creating/updating/deleting content). Sounds like you just need to share the theming from the CSS and header/footer HTML across both systems.

You can switch Drupal to use the Smarty template engine: http://drupal.org/project/smarty

You may then be able to create a Drupal theme that imports the header.tpl.php and footer.tpl.php from the WHMCS theme.

You may need to remove some of the Smarty markup and variables from the WHMCS side to simplify the header and footer to the point they can be used with Drupal (if you can make the header and the footer pure HTML, you may not even need to use Smarty on the Drupal side), or write a lot of preprocessing code on the Drupal side you may be able to populate the template variables with values from the WHMCS database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文