我可以通过 php 构建一些 wiki/google 文档类型编辑器吗???

发布于 2024-11-29 07:09:31 字数 153 浏览 1 评论 0原文

如果我从零开始编码,谷歌文档/维基似乎很困难 那么,是否有任何类型的 api/插件已经具有 php.ini 的这些代码? 另外,wiki如何处理并行编辑?比如说,一个在另一个更新时更新了内容。后者怎样才能得到最新的信息??? 否则一旦后者提交更新,更新的内容将会被删除。

谢谢

it seems that the google doc/wiki is difficult if i code it from the zero
So, are there any kinds of api/plugin already have those code for php.
Also, how can wiki handle the parallel editing?? Say, one have update the content when the other one is updating. How can the latter one get the most updated information ????
Otherwise the updated content will be erase once the latter one submit update .

Thanks

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

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

发布评论

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

评论(1

千年*琉璃梦 2024-12-06 07:09:31

我不确定你问题的第一部分,但至于并行编辑:

在我看来,你基本上是在编写 CMS 系统。与大多数 CMS(CMSii?)一样,您希望每篇文章都有两种可能的状态:签入或签出。这样,您就可以消除 2 个人同时处理同一篇文章的可能性。

因此,基本上,在保存文章条目的数据库表中,您需要一个名为 checked_out 的行,默认为 0

当编辑者点击编辑文章时,您的代码首先检查以确保 checked_out == 0。这样它就知道您是唯一正在处理该特定文章的人。然后,如果它确实允许您处理文章,请将 checked_out 设置为 1。当您单击保存/更新/任何文章时,请确保将 checked_out 设置回 0

对我来说似乎是最简单的解决方案。

I'm not sure about the first part of your question, but as for the parallel editing:

It seems to me that you're basically coding a CMS system. As with most CMSs (CMSii?), you're going to want every article to have two possible states: checked in or checked out. That way, you eliminate the possibility of 2 people working on the same article simultaneously.

So basically, in your database table that holds your article entries, you'd want a row called something like checked_out, which defaults to 0.

When an editor clicks to edit an article, your code first checks to make sure checked_out == 0. That way it knows you're the only one working on that particular article. Then, if it does allow you to work on the article, set checked_out to 1. When you click to save/update/whatever the article, make sure it sets checked_out back to 0.

Seems like the simplest solution to me.

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