Guys is it possible to use conditional to check post length.
I want to show one message when post length is under 1000 and another when it's over 1000
<if strlen($post['message']) < 1000 then>post is under 1000 characters...<else>post has 1000 characters or more</if>
Should work in any postbit template.
Destroy baby how to split this code into 2 codes because I want to use different code!
<if strlen($post['message']) < 1000 then>post is under 1000 characters...<else>post has 1000 characters or more</if>
Thanks
Also please help me with this one.
I want to show a code after first thread but I need to check first if second thread exists before showing code after first post
<if ($threadcounter - 1) % $mybb->settings['threadsperpage'] == "0" then>
code after first thread
</if>
<if ($threadcounter - 2) % $mybb->settings['threadsperpage'] == "0" then>
code after second thread
</if>
How to combine these codes into one?
Split? I don't really understand and see purpose, but I guess you mean like this?:
<if strlen($post['message']) < 1000 then>post is under 1000 characters...</if>
... other code here ...
<if strlen($post['message']) >= 1000 then>post has 1000 characters or more</if>
As for 2nd, I guess you mean first thread not post? This should work:
<if $threadcount >= 2 && ($threadcounter - 1) % $mybb->settings['threadsperpage'] == "0" then>
code after first thread if 2nd exists
</if>
I love you Destroy can I marry your brain?
Thanks man I appreciate this very much