MyBB Community Forums

Full Version: "Read" status and PHP code in postbit_separator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys,

I have two questions. The first is -

When a post is made, its forum folder is marked with an icon that indicates that there is an unread post there. Let's say we have this forum structure...

ROOT
  -> FORUM
     -> SUBFORUM

Let's say a post is made in SUBFORUM. The SUBFORUM and FORUM folders both indicate that there is an unread post. After I read the post, unless I visit the SUBFORUM listing, both FORUM and SUBFORUM will still indicate that I have an unread post, although it is not the case. Is it possible to change the "read" status of a post during the viewing of the thread instead of the forum?


The second question I have -
I have been trying to get some PHP code into the postbit_separator of my template. However, the code is never parsed and I'm not sure where exactly does the "refusal" to parse take place. Is it possible to add PHP into the template?


Thanks in advance,
As for the second question, no, it's not really possible to add PHP code, I don't think. The closest you can get is a modification that allowed you to use <if> and <else /> tags and stuff. But other than that, not really.
Isn't it possible to like replace the postbit_separator template and hardcode something in totally?
Bump? Can anyone help?
PHP Can't be used in templates. Any code you want evaluated then you need to do in the PHP files.

As for the first problem, it's a bug that has been in all versions of MyBB due to the complexity of such a system. It has been corrected in 1.4, however the changes to make it work are quite large.
Oh well. Guess I'll have to dynamically create div tags and use AJAX then.
Sounds like there're lots of promises in 1.4. Hope it comes out soon!

Thanks for your help, Chris!