Exemplo n.º 1
0
  private static BoardModel createDefaultBoardModel(
      String name, String description, String category, String defaultPosterName, boolean nsfw) {
    BoardModel model = new BoardModel();
    model.chan = CirnoModule.IICHAN_NAME;
    model.boardName = name;
    model.boardDescription = description;
    model.boardCategory = category;
    model.nsfw = nsfw;
    model.uniqueAttachmentNames = true;
    model.timeZoneId = "GMT+3";
    model.defaultUserName = defaultPosterName;
    model.bumpLimit = 500;

    model.readonlyBoard =
        name.equals("o") || name.equals("w") || name.equals("abe") || name.equals("ma");
    model.requiredFileForNewThread = !name.equals("d");
    model.allowDeletePosts = true;
    model.allowDeleteFiles = true;
    model.allowReport = BoardModel.REPORT_WITH_COMMENT;
    model.allowNames = !name.equals("b") && !name.equals("bro");
    model.allowSubjects = true;
    model.allowSage = false;
    model.allowEmails = true;
    model.ignoreEmailIfSage = false;
    model.allowCustomMark = IICHAN_SPOILER_MARK_BOARDS.indexOf(name) != -1;
    model.customMarkDescription = "Spoiler";
    model.allowRandomHash = true;
    model.allowIcons = false;
    model.attachmentsMaxCount = name.equals("d") ? 0 : 1;
    model.attachmentsFormatFilters = ATTACHMENT_FILTERS;
    model.markType = BoardModel.MARK_WAKABAMARK;

    model.firstPage = 0;
    model.lastPage = BoardModel.LAST_PAGE_UNDEFINED;

    model.catalogAllowed = !name.equals("d");
    return model;
  }
Exemplo n.º 2
0
 @Override
 public BoardModel getBoard(String shortName, ProgressListener listener, CancellableTask task)
     throws Exception {
   BoardModel model = super.getBoard(shortName, listener, task);
   model.timeZoneId = "GMT+3";
   model.defaultUserName = "******";
   model.readonlyBoard = false;
   model.requiredFileForNewThread = false;
   model.allowDeletePosts = true;
   model.allowDeleteFiles = true;
   model.allowReport = BoardModel.REPORT_WITH_COMMENT;
   model.allowNames = false;
   model.allowSubjects = true;
   model.allowSage = true;
   model.allowEmails = true;
   model.ignoreEmailIfSage = false;
   model.allowCustomMark = false;
   model.allowRandomHash = true;
   model.allowIcons = false;
   model.attachmentsMaxCount = 1;
   model.attachmentsFormatFilters = ATTACHMENT_FORMATS;
   model.markType = BoardModel.MARK_BBCODE;
   return model;
 }