Fork de wikipp, le moteur de wiki en c++, basé sur cppcms. Le fork ajoute la langue française
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

page.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef PAGE_H
  2. #define PAGE_H
  3. #include "master.h"
  4. #include <string>
  5. namespace content {
  6. class page;
  7. class edit_page;
  8. class page_form;
  9. }
  10. namespace apps {
  11. class page : public master {
  12. void save(int id,content::page_form &,cppdb::session &sql);
  13. bool load(content::page_form &);
  14. bool edit_on_post(content::edit_page &);
  15. bool load_history(int,content::page_form &);
  16. protected:
  17. std::string slug;
  18. void ini(content::page &);
  19. void display(std::string slug);
  20. void history(std::string slug,std::string page);
  21. void display_ver(std::string slug,std::string sid);
  22. void edit(std::string slug,std::string version);
  23. void diff(std::string slug,std::string v1,std::string v2);
  24. std::string edit_url();
  25. std::string edit_version_url(int ver);
  26. std::string history_url(int n=0);
  27. public:
  28. page(wiki &w);
  29. std::string diff_url(int v1,int v2,std::string lang="",std::string s="");
  30. std::string page_url(std::string l="",std::string s="");
  31. std::string page_version_url(int ver,std::string l="",std::string s="");
  32. std::string default_page_url(std::string l="en",std::string s="main")
  33. { return page_url(l,s); }
  34. void redirect(std::string locale="en",std::string slug="main");
  35. };
  36. }
  37. #endif