Heyuri / kokonotsuba

Heyuri's BBS software
Other
23 stars 14 forks source link

Better stylesheet management and user selection storage #155

Open kaguy4 opened 1 month ago

kaguy4 commented 1 month ago

Especially if there is a "textboard koko" instance on the subdomain where an 'imageboard koko" exists, each others' cookies may cause issues for the other

anonwaha commented 1 month ago

Perhaps there could be a file(s) (JSON?) that maps template files and CSS files, which will help determine which styles relate to which templates, as well as which reply templates are associated with which "parent" templates

Here's a quick mock-up:

{
  "templates": {
    "kokoimg": {
      "filename": "kokoimg.tpl",
      "css_styles": ["Futaba", "Burichan"]
    },
    "kokotxt": {
      "filename": "kokotxt.tpl",
      "css_styles": ["Pseud0ch", "Pseud0ch sans-serif"]
    },
    "kokotxtreply": {
      "filename": "kokotxtreply.tpl",
      "parent_template": "kokotxt"
    }
  },
  "styles": {
    "Futaba": {
      "filename": "futaba.css"
    },
    "Burichan": {
      "filename": "burichan.css"
    },
    "Pseud0ch": {
      "filename": "pseud0ch.css"
    },
    "Pseud0ch sans-serif": {
      "filename": "pseud0ch2.css"
    }
  }
}

Then the PHP side could potentially use this info to:

Potential issues: