HenryHu / pybbs

Python implementation of the BBS server, providing BBS data interface
Other
28 stars 3 forks source link

Feature request -- Random qmd & default qmd id #4

Closed mrroach9 closed 12 years ago

mrroach9 commented 12 years ago

The first part - random qmd can be just inherited from current style, i.e. submitting -1 stands for random qmd.

For the second part, it can either be developed in Rowell using cookies, or designed as an interface in pybbs. However since this is part of the functions in original bbs system, it might be better to stay back-end.

HenryHu commented 12 years ago

Total qmd count is in a complex structure, which I have not written the code to read it. The interface would be the same as you mentioned.

Default QMD id is not a big problem. But do you want to make another call to get the default qmd id? Rowell may have some storage at the server side to store this. Anyway, providing such an interface is easy.

mrroach9 commented 12 years ago

Yes, Rowell can provide this function but not at the server storage, instead it should be stored in cookies or localStorage. This is easy to implement but it cast my concern on the inconsistency problem: people may have different default qmd id between Rowell and term bbs, which brings inconvenience.

HenryHu commented 12 years ago

ok, but this may require an extra call to the server, and an extra delay... Or you may request it once and store it for a while.

mrroach9 commented 12 years ago

You're right. I agree to temporarily store and change the default qmd id locally, which is indeed faster and easier. For now it is ok, though I also agree that we need a permanent solution that is robust, consistent and fast.

HenryHu commented 12 years ago

Random qmd is done. Use negative value for random qmd.

mrroach9 commented 12 years ago

跪拜刚之炼井术士!

HenryHu commented 12 years ago

Now, if you post with qmd #i, it will be stored at the server side, and posting with the term after that would use that qmd. For query default qmd#, I have implemented the feature, but I've not designed the interface.

HenryHu commented 12 years ago

To query default qmd#, see "user/signature_id"

mrroach9 commented 12 years ago

post/new with signature_id currently does not work. Such a posting request will result in no qmd and no change in default qmd_id. Please check it out and fix this.

HenryHu commented 12 years ago

Fixed. A small bug during refactoring code.