简体   繁体   English

modx演化外部数据库

[英]modx evolution external database

I have 3 seperate modx evolution website. 我有3个独立的modx进化网站。 All 3 websites are completely different and therefore run off a seperate database. 这3个网站完全不同,因此要使用单独的数据库。 However for the news and events pages of each website i would like them to all run from the database of the 1 of the 3 websites. 但是对于每个网站的新闻和事件页面,我希望它们都可以从3个网站中的1个的数据库中运行。 I this possible? 我可以吗? is there an extra already created for this purpose? 是否已经为此目的创建了一个额外的?

I have looked into the possibility of using an RSS feed, but would rather have them running directly from the database as this would allow a news article to be added from any of the 3 websites. 我研究了使用RSS feed的可能性,但希望它们直接从数据库运行,因为这将允许从这三个网站中的任何一个添加新闻文章。

Thanks, Sean. 谢谢,肖恩。

you can create your extra tables in one modx instance & access them externally ~ however they will need to be on the same file system. 您可以在一个modx实例中创建您的额外表并从外部访问它们,但是它们必须位于同一文件系统上。 I am not aware of a method to do this VIA http/API etc. See here. 我不知道通过http / API等执行此操作的方法。请参见此处。

http://rtfm.modx.com/display/revolution20/Loading+MODx+Externally http://rtfm.modx.com/display/revolution20/Loading+MODx+外部

What you will want to do is create your extra table and extend modx using xPDO, it's a fair bit of work to get setup initially but worth it in the long run. 您将要做的是创建额外的表并使用xPDO扩展modx,这是一项相当大的工作,最初需要进行设置,但从长远来看值得。 This is the best example for getting started, although you will not be extending anything [but modx] it does give you useful examples of creating your schema and registering it with modx. 这是入门的最佳示例,尽管您不会扩展任何内容(但modx除外),但确实为您提供了创建模式并将其注册到modx的有用示例。

http://rtfm.modx.com/display/revolution20/Extending+modUser http://rtfm.modx.com/display/revolution20/Extending+modUser

and

http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components http://rtfm.modx.com/display/revolution20/使用+自定义+数据库+表+中+您的+ 3rd +聚会+组件

Finally, there IS an extra that will generate all your schema files for you, however I can't seem to find what it is called... sorry. 最后,还有一个可以为您生成所有架构文件的附件,但是我似乎找不到它的名字...对不起。 If you have multiple tables using foreign keys it may not be all that useful to you as it won't create the relationships in the files it generates. 如果您有多个使用外键的表,则可能对您没有什么用,因为它不会在生成的文件中创建关系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM