MyBB-Plugins Forums
Default New Thread Layout 1.2 - Printable Version

+- MyBB-Plugins Forums (http://forums.mybb-plugins.com)
+-- Forum: Archived Forums (http://forums.mybb-plugins.com/Forum-Archived-Forums)
+--- Forum: MyBB 1.4.x (http://forums.mybb-plugins.com/Forum-MyBB-1-4-x)
+---- Forum: Paid Plugins (http://forums.mybb-plugins.com/Forum-Paid-Plugins)
+---- Thread: Default New Thread Layout 1.2 (/Thread-Default-New-Thread-Layout-1-2)

Pages: 1 2 3 4 5


RE: Default New Thread Layout 1.2 - DamYan - 09-10-2009

(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


RE: Default New Thread Layout 1.2 - Diogo Parrinha - 09-10-2009

Hmm I see what you mean. I might make a plugin one day


RE: Default New Thread Layout 1.2 - Julek12 - 10-03-2009

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];
        }
     } 



RE: Default New Thread Layout 1.2 - Diogo Parrinha - 10-04-2009

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??


RE: Default New Thread Layout 1.2 - Julek12 - 10-04-2009

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.


RE: Default New Thread Layout 1.2 - Diogo Parrinha - 10-04-2009

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.


RE: Default New Thread Layout 1.2 - Julek12 - 10-04-2009

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


RE: Default New Thread Layout 1.2 - Diogo Parrinha - 10-04-2009

So, what do you want me to do? lol


RE: Default New Thread Layout 1.2 - Pasal - 10-05-2009

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'];



RE: Default New Thread Layout 1.2 - Diogo Parrinha - 10-09-2009

Oh I understand it now, thanks for posting the code Julek and Pasal
Smile