Custom Board Icons

Started by live627, September 06, 2023, 07:14:30 PM

Previous topic - Next topic

live627

Link to the mod

Custom Board Icons
This modification gives you the ability to change the default board icons to ones you choose.

Observe that you don't need custom icons for every board.

Settings

There are no settings. Install to enable, uninstall to disable.

Configuration
The place to upload icons is the bottom of the edit boards page.

TwitchisMental

Great work and thank you for making this MOD for 2.1.4 :).

gevv

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

keyboard

Слaва
Украинi

Senkusha

Does this allow for differentiation of New topics versus Read topics?
-- Senkusha
The Kawaii Klub
The Creative Anime Role Playing Community.
(SMF v. 2.1.4, PHP v. 8.0)

TwitchisMental

Quote from: Senkusha on December 07, 2023, 06:20:29 PMDoes this allow for differentiation of New topics versus Read topics?
I do not recall a setting for it, but you could use CSS to achieve this.

something like -

.cbi_off {
  opacity: 0.4;
}


keyboard

Quote from: TwitchisMental on December 07, 2023, 07:43:50 PM
Quote from: Senkusha on December 07, 2023, 06:20:29 PMDoes this allow for differentiation of New topics versus Read topics?
I do not recall a setting for it, but you could use CSS to achieve this.

something like -

.cbi_off {
  opacity: 0.4;
}




This is important to me but I do not have the Skill Set to do this !!!  Is it possible for the Developer to recode the Mod and implement the change ?
Слaва
Украинi

Sesquipedalian

You just paste that bit of code into your index.css file. That's it.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

keyboard

Perhaps I can be tutored to do this.

I have accessed my cPanal and see this
You cannot view this attachment.



Where would I find the index.css ?




Слaва
Украинi

Diego Andrés

public_html/{forum_path_or_root}/Themes/default/css/index.css

forum_path_or_root: Means that this is the root, unless your forum is in a subdirectory.

SMF Tricks - Free & Premium Responsive Themes for SMF.

lonelyjuly

Is it possible to have different icons independently per theme? Or is it the same across the whole site?

TwitchisMental

Quote from: lonelyjuly on December 12, 2023, 04:40:39 PMIs it possible to have different icons independently per theme? Or is it the same across the whole site?
With this mod it would be the same no matter what theme..

However you could do the same trick with just CSS for each individual theme that you have installed.

keyboard

Quote from: keyboard on December 09, 2023, 12:06:48 PM
Quote from: TwitchisMental on December 07, 2023, 07:43:50 PM
Quote from: Senkusha on December 07, 2023, 06:20:29 PMDoes this allow for differentiation of New topics versus Read topics?
I do not recall a setting for it, but you could use CSS to achieve this.

something like -

.cbi_off {
  opacity: 0.4;
}




This is important to me but I do not have the Skill Set to do this !!!  Is it possible for the Developer to recode the Mod and implement the change ?


I think it would still be a better idea if the Developer would just inject this code in during the install .... It sure would "Complete" the Mod.
Слaва
Украинi

keyboard

I will send 10 Kilo's of Sausage to the Developer's email if he could update the program to insert the modification.

 :)  :)  :)  :)
Слaва
Украинi

pingtoip

hxxp:izmirtelevizyonservis.com [nonactive]

Dave J

#15
One thing I have noticed is that when the images are set as 'replace board icon' when there is a new post/topic there is no indication. I tried replacing

.board_icon a.board_on2 {
    background-position: -45px 0;
}
.board_icon a.board_off {
    background-position: 0 -45px;
}


with

.board_icon a.board_on {
  border: 4px limegreen solid;
}

.board_icon a.board_on2 {
  border: 4px orange solid;
}


in the css but it didn't work

Update


OK working with the code Tim posted I've used

.cbi_on {
  border: 4px limegreen solid;
}
.cbi_on2 {
  border: 4px orange solid;
}

If there's a new post/topic then the green square shows

Obviously the line colour and size can be adjusted to suit your needs

NOTE: The above additional code needs to be added to each themes index.css



Dave J

I've now added the following code to the mod install21.xml file

<file name="$themedir/css/index.css">
<operation> <!-- End of File -->
<search position="end" />
<add><![CDATA[

/*cbi code for on off notification*/

.cbi_on {
  border: 3px limegreen solid;
}
.cbi_on2 {
  border: 3px orange solid;
}

]]></add>
</operation>
</file>

All tested and works OK

clubkadettspain

Hi, first thanks for this great mod, i installed on my forum but it mantain also the default image with the new one i uploaded.. what can i do to fix?


clubkadettspain

sample image where i modify first icon board and it mantains default one also.
Is should replace it true? and not mantain both.


clubkadettspain

i saw that this happens on my custom themes, not on the default theme, there was something on the code that should be added on custom themes to apply them correcty.

clubkadettspain

I fixed it modifying the index.css file on the custom theme on the line where .board_icon was definied i reemplace all this part from the default theme index.css modified by this mod.

Diego Andrés

Should this MOD include some inline CSS to remove the background image from .board_icon a when there's a custom icon set?
I guess it could be something like class="board_cbi cbi_%s" .board_icon a.board_cbi {background: none;} ?

SMF Tricks - Free & Premium Responsive Themes for SMF.

JRMBelgium

Quote from: clubkadettspain on June 13, 2024, 06:58:27 PMsample image where i modify first icon board and it mantains default one also.
Is should replace it true? and not mantain both.



This bug still hasn't been fixed. Gonna remove the mod until it is.

keyboard

Yes.... I wound up removing it too.....  I wanted desperately for it to work !
Слaва
Украинi

Senkusha

One thing I've noticed.  I'm using the ReSeller theme, and this mod seems to work decently, until you have a Redirect board.  I've combed over the Theme files, and the developer can not reproduce the problem.  The only difference I see is this mod could impact the Topics/Posts count instead of Redirections count stat.  The first image is the ReSeller Theme, the second image is the Default template.

You cannot view this attachment.
You cannot view this attachment.
// Show some basic information about the number of posts, etc.
 echo '
 <div class="board_stats">
 ', function_exists('template_bi_' . $board['type'] . '_stats') ? call_user_func('template_bi_' . $board['type'] . '_stats', $board) : template_bi_board_stats($board), '
 </div>';

Above here, is the code in the Default template.php file, which is identical to the code in the ReSeller template.php file.  I'm not sure what could be the issue here.

I've poked around in the Subs-CBI.php file, and found this, but I'm not sure where else to look:
function template_bi_cbi_stats($board)
{
 if (function_exists('template_bi_' . $board['old_type'] . '_stats'))
 call_user_func('template_bi_' . $board['old_type'] . '_stats', $board);
 else
 template_bi_board_stats($board);
}


-- Senkusha
The Kawaii Klub
The Creative Anime Role Playing Community.
(SMF v. 2.1.4, PHP v. 8.0)

Advertisement: