MyBB-Plugins Forums

Full Version: Default New Thread Layout 1.2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(09-07-2009, 07:27 AM)Pirata Nervo Wrote: [ -> ]Actually I don't think so, I find it useful for threads but doesn't have a use for replies imo.
If you give me a good example I might add it

An option to enable for exact subforum (by fid).
On my forum we have specific rules in one of forums. Posts in thread are written with template, i.e. http://www.mybboard.pl/watek-www-tworzymy-com-pl
Hmm I see what you mean. I might make a plugin one day
I made myself that I have different templates for category

Can you cast an eye what i've just written?:
PHP Code:
    $count substr_count($mybb->settings['dntl_forums'], ',') + 1;
    
$forums explode(','$mybb->settings['dntl_forums']);
    
$messages explode(','$mybb->settings['dntl_default']);
    for (
$i 0$i $count$i++)
     {
         
$forum explode(' '$forums[$i]);
        if (
in_array($fid$forum))
        {
            
$message $messages[$i];
        }
     } 
If you explain how you separate it by each forum, it will be easier to do what you want me to do.
what do you want me to do??
I need to be able to make different templates for example: Category 1 and 2 as template A, category 3 and 4 as template B.
That's not possible without other things, just forget it or add an admin cp page, a new table in the database, and make it to assign templates to forums.
Or you can just do it like seperate the forums ids between commas and separate templates between | and assign each forum id to each template.
I wrote this:
PHP Code:
$count substr_count($mybb->settings['dntl_forums'], ',') + 1;
    
$forums explode(','$mybb->settings['dntl_forums']);
    
$messages explode('&&'$mybb->settings['dntl_default']);
    for (
$i 0$i $count$i++)
     {
         
$forum explode(' '$forums[$i]);
        if (
in_array($fid$forum))
        {
            
$message $messages[$i];
        }
     } 

And work
So, what do you want me to do? lol
Damn!
Both of you are Great Big Grin
Pirata + Julek = Amazing Thread Layout (note).

Just split with comma for forum and character && for template Big Grin

Code:
$count = substr_count($mybb->settings['dntl_forums'], ',') + 1;
    $forums = explode(',', $mybb->settings['dntl_forums']);
    $messages = explode('&&', $mybb->settings['dntl_default']);
    for ($i = 0; $i < $count; $i++)
     {
         $forum = explode(' ', $forums[$i]);
        if (in_array($fid, $forum))
        {
            $message = $messages[$i];
        }
     }

to replace

Code:
$forums = explode(',', $mybb->settings['dntl_forums']);
    if (!in_array($fid, $forums))
        return;
    
    $message = $mybb->settings['dntl_default'];
Oh I understand it now, thanks for posting the code Julek and Pasal
Smile
Pages: 1 2 3 4 5