Ejemplo n.º 1
0
 @Override
 public BoardModel getBoard(String shortName, ProgressListener listener, CancellableTask task)
     throws Exception {
   BoardModel model = super.getBoard(shortName, listener, task);
   model.allowCustomMark = true;
   model.customMarkDescription = "Spoiler";
   return model;
 }
 @Override
 public BoardModel getBoard(String shortName, ProgressListener listener, CancellableTask task)
     throws Exception {
   Map<String, SimpleBoardModel> map = getBoardsMap(listener, task);
   SimpleBoardModel simpleModel = map.get(shortName);
   BoardModel model = new BoardModel();
   model.chan = getChanName();
   model.boardName = shortName;
   model.boardDescription = shortName;
   model.uniqueAttachmentNames = true;
   model.timeZoneId = "UTC";
   model.defaultUserName = "******";
   model.bumpLimit = 500;
   model.readonlyBoard = true;
   model.firstPage = 0;
   model.lastPage = BoardModel.LAST_PAGE_UNDEFINED;
   model.searchAllowed = false;
   model.catalogAllowed = false;
   if (simpleModel != null) {
     model.boardDescription = simpleModel.boardDescription;
     model.boardCategory = simpleModel.boardCategory;
     model.nsfw = simpleModel.nsfw;
   }
   return model;
 }
Ejemplo n.º 3
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;
  }
Ejemplo n.º 4
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;
 }