MyBB Community Forums

Full Version: Different buttons in different forum threads?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to write a very simple theme so I can change just the button images in the new theme? In other words, I want to run the default theme (1.6) and another theme together so that the forum using the new theme shows different button images in the threads. Otherwise both themes are exactly the same.

Alternatively, is there another way to show different button images in different forums without having to have two themes?

Let’s say I want the New Thread button in one forum thread to be different from the New Thread button in another. Do I need two themes to do this or is there an easier way? Hope that all makes some sense.
you can select a theme for specific forum(s) ; option is available at Edit forum settings (forum management)

see also : [wiki : Style Options]
(2011-11-05, 07:23 PM)ranjani Wrote: [ -> ]you can select a theme for specific forum(s) ; option is available at Edit forum settings (forum management)

see also : [wiki : Style Options]
Thanks but I already knew that. I don’t think I explained what I want to do very well so let me try again . . .

There is one forum in which I don’t want people to be able to create new threads. I could stop them from doing so by using “Permissions” but the “New Thread” button would still appear and when they clicked it they would get the “You do not have permission . . .” page. Rather than annoying them with a button that they can’t use I would rather have the “New Thread” button not appear at all. I was thinking that if I used a different theme for that forum I could make the “New Thread” button a single pixel that they wouldn’t see. I was wondering if a simple theme could be written to just to use a different “New Thread” button but keep everything else the same as the default theme. Or is there an easier way to remove the “New Thread” button from one forum?

^ you may be also knowing below Smile
if that forum is set as category then none will be able to post a thread & new thread button will
be invisible (assuming that it has no threads / present threads will be moved to another forum) ..
(2011-11-05, 08:04 PM)Ynot Wrote: [ -> ]There is one forum in which I don’t want people to be able to create new threads. I could stop them from doing so by using “Permissions” but the “New Thread” button would still appear and when they clicked it they would get the “You do not have permission . . .” page. Rather than annoying them with a button that they can’t use I would rather have the “New Thread” button not appear at all. I was thinking that if I used a different theme for that forum I could make the “New Thread” button a single pixel that they wouldn’t see. I was wondering if a simple theme could be written to just to use a different “New Thread” button but keep everything else the same as the default theme. Or is there an easier way to remove the “New Thread” button from one forum?
You need a plugin for that. Here is an example to do that if you have Template Conditional plugin installed on your forum:
http://mybbhacks.zingaburga.com/showthread.php?tid=630
Or, maybe you can try the plugin attached to that thread.
(2011-11-05, 08:14 PM)ranjani Wrote: [ -> ]^ you may be also knowing below Smile
if that forum is set as category then none will be able to post a thread & new thread button will
be invisible (assuming that it has no threads / present threads will be moved to another forum) ..
It needs to be a forum with threads that members can post replies to.


(2011-11-05, 08:34 PM)RateU Wrote: [ -> ]
(2011-11-05, 08:04 PM)Ynot Wrote: [ -> ]There is one forum in which I don’t want people to be able to create new threads. I could stop them from doing so by using “Permissions” but the “New Thread” button would still appear and when they clicked it they would get the “You do not have permission . . .” page. Rather than annoying them with a button that they can’t use I would rather have the “New Thread” button not appear at all. I was thinking that if I used a different theme for that forum I could make the “New Thread” button a single pixel that they wouldn’t see. I was wondering if a simple theme could be written to just to use a different “New Thread” button but keep everything else the same as the default theme. Or is there an easier way to remove the “New Thread” button from one forum?
You need a plugin for that. Here is an example to do that if you have Template Conditional plugin installed on your forum:
http://mybbhacks.zingaburga.com/showthread.php?tid=630
Or, maybe you can try the plugin attached to that thread.
Thanks - What template do I put this in? . . .

<if $fpermissions['canpostthreads'] == 1 then>
<a href="newthread.php?fid={$fid}"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>
</if>

And will it hide the New Thread button only in Forums that have been New Thread prevented by Permission?

(2011-11-05, 08:39 PM)Ynot Wrote: [ -> ]What template do I put this in? . . .
forumdisplay_newthread template

(2011-11-05, 08:39 PM)Ynot Wrote: [ -> ]And will it hide the New Thread button only in Forums that have been New Thread prevented by Permission?
Yes.

Please remember if you want to use that code, you need Template Conditional plugin installed on your forum first.
(2011-11-05, 08:53 PM)RateU Wrote: [ -> ]
(2011-11-05, 08:39 PM)Ynot Wrote: [ -> ]What template do I put this in? . . .
forumdisplay_newthread template

(2011-11-05, 08:39 PM)Ynot Wrote: [ -> ]And will it hide the New Thread button only in Forums that have been New Thread prevented by Permission?
Yes.

Please remember if you want to use that code, you need Template Conditional plugin installed on your forum first.
Thanks - Tried the plugin and it works fine - Excellent!

Great forum - Great help and advice - Great members - Great software (and I almost went with PHPBB - silly me ;-)