Hello There, Guest! › Register

MySubscriptions 2.2 released.
Looking for a custom plugin for your site? Ask here for a quote.

Default New Thread Layout 1.2
#21

(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
#22

Hmm I see what you mean. I might make a plugin one day
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#23

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

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??
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#25

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.
#26

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.
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#27

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
#28

So, what do you want me to do? lol
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.
#29

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

Oh I understand it now, thanks for posting the code Julek and Pasal
Smile
To download our paid plugins and receive support you must be a paid subscriber. Click here for more information.




Users browsing this thread: 1 Guest(s)