News:

Join the Facebook Fan Page.

Main Menu

NameX

Started by Diego Andrés, August 05, 2022, 11:39:45 PM

Previous topic - Next topic

Steve

Quote from: Diego Andrés on February 27, 2023, 10:08:56 PMLikely the last update for the month of February
You still have about 18 hours.  :P
DO NOT pm me for support!

DeadMan...

I tell it how I see it... Don't like it? Hit Alt+F4!

Ninja ZX-10RR

Hi Diego, sorry to be a bother but I need some info whenever you have a minute.

I'm going through this madness: https://github.com/SMFTricks/NameX/compare/v1.0.7...v1.2.2 due to already present customization.

Is it enough to add all the new files and manually edit what is listed on there or do I also need to make db changes? If so, could you tell me which ones?

The bottom line is I'm prepping a production forum and it's just a test for now, but it's already got plenty of customization done on the theme plus mods installed, so it is not an option to just install the new one, meaning I have to update it manually, but I wonder whether it would be fine after all the effort, given it's quite the task.

Thanks in advance.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

DeadMan...

AFAIK, themes don't have database changes. You should not have to worry about that.
I tell it how I see it... Don't like it? Hit Alt+F4!

Diego Andrés

Like DeadMan says, Themes don't make any db changes.
You can completely replace files and folders if you didn't make changes to files.
So if you customized something, my guess is that you'd only need to be careful with those that you changed, like app.css and such.

Edit: I also forgot to mention. From those changes you listed, some are from smf patches so likely you'll find things that you already have if you applied the patch to your theme as well. Or maybe not, just double check. But like my previous statement, maybe these files were never modified by you or mods, so you could just replace them with the updated one.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Ninja ZX-10RR

Went through all of the diffs, that was... Something ;D
Still need to rename the folder and re-route it but yeah. It's gonna be tricky to get the order of things just right, as the production is on 2.0.19 still, with mod installs that make db changes the order I do things really matters, and the theme is one of the biggest parts since it's like the first thing I have to install, meaning I'll most likely install stock 1.2.2 theme version, install all mods on top of it (regardless of errors, if any) and then just replace all files with everything modded.
Thank you by the way :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

jsx

Quote from: Diego Andrés on February 27, 2023, 05:15:10 PMWhich bar?

I meant this menu bar:



/* Ultimate Menu */
.main_icons.um_button_1::before { content: "\47"; }
.main_icons.um_button_7::before { content: "\f086"; }

/* Recent Topics */
.main_icons.recenttopics::before { content: "\f277"; }

This code not too long ago worked properly.

And currently these icons do not display:



But when I enter to the Ultimate Menu settings, the icons are displayed on the bar:



Notice that the Gallery icon does not display, and the Gallery tab is not added via the Ultimate Menu. The Gallery icon displays correctly in the default theme. The Gallery icon is added to the NameX theme.

Diego Andrés

There's never been a gallery icon in the css.
You can add before I do.

/* Gallery */
.main_icons.media::before,
.fa-media::before,
.main_icons.gallery::before,
.fa-gallery::before {
content: "\f87c";
}

Edit: I added them to the package. The icons.css can be updated/replaced.
FYI, I think you could add your custom icons to the custom_edits.css file so you can always completely replace the icons.css file.

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

Quote from: Diego Andrés on February 28, 2023, 10:40:28 PMThere's never been a gallery icon in the css.

I know, but during the installation of the SMF Gallery Pro mod, the icon from this gallery is added to the theme.

Quote from: Diego Andrés on February 27, 2023, 05:15:10 PMIn some cases it could be 'fa fa-action', which would be something like .fa-um_button_1::before, not sure if it changed somehow.

The code .fa-um_button_1 works correctly. Thanks for the tip.

Code to display icons in buttons created in Ultimate Menu:

/* Ultimate Menu */
.main_icons.um_button_1::before,
.fa-um_button_1::before {
    content: "\47";
}
.main_icons.um_button_7::before,
.fa-um_button_7::before {
    content: "\f086";
}

Code to display Recent Topics icon:

/* Recent Topics */
.main_icons.media::before,
.fa-media::before,
.main_icons.recenttopics::before,
.fa-recenttopics::before {
    content: "\f277";
}

Based on your Gallery icon code. :)

Only one thing I don't understand, I don't know why this icon is displayed on my forum: f086 for the Forum button, since this icon is added for this button: f07c - What do you think Diego?

/* Boards */
.main_icons.boards::before,
.large_admin_menu_icon.boards::before,
.menu_icon.fa-forum::before,
.main_icons.menu_tpforum::before,
.fa-forum::before {
    content: "\f07c";
}

Steve

Quote from: Diego Andrés on February 28, 2023, 10:40:28 PMThere's never been a gallery icon in the css.
You can add before I do.
What about an Arcade icon? I looked at font awesome but they have so many and I don't know what style you used for the others.
DO NOT pm me for support!

Diego Andrés

Quote from: Steve on March 01, 2023, 07:35:28 AMWhat about an Arcade icon? I looked at font awesome but they have so many and I don't know what style you used for the others.
Will have a look later.

Quote from: jsx on March 01, 2023, 05:04:12 AMOnly one thing I don't understand, I don't know why this icon is displayed on my forum: f086 for the Forum button, since this icon is added for this button: f07c - What do you think Diego?
Likely TP is adding its own selector to add the icon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Added icons for arcade and battle.
Updated fontawesome to v6.3.0

No changelog.

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

Quote from: Diego Andrés on March 01, 2023, 09:34:20 AMLikely TP is adding its own selector to add the icon.

You're right. The code for this icon is in tp-style.css

/* font awesome icons for FA themes*/
.fa-forum:before {
  content: "\f086"; }

Diego, I have one more question. In SMF 2.1 there are colored icons in the menu, just look at the default SMF 2.1 theme. If I wanted to implement such colored icons to NameX, how do I do it? On fontawesome they are only in black.

Diego Andrés

Quote from: jsx on March 02, 2023, 04:36:42 AMDiego, I have one more question. In SMF 2.1 there are colored icons in the menu, just look at the default SMF 2.1 theme. If I wanted to implement such colored icons to NameX, how do I do it? On fontawesome they are only in black.

It's essentially a font so you can change the color like regular text.
#main_menu li i.fa::before, #main_menu li span.main_icons::before {
  color: red;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

DeadMan...

Have to make a couple edits to get the Users Online Today (by SMFPacks.com) mod to show correctly with the modified info center.

icons.css

Code (Find) Select
/* Info Center icons */
.fa-recent_posts::before,
.main_icons.recent_posts::before {
content: "\f550";
}
.fa-online_users::before {
content: "\f500";
}
/* Profile Account */

Code (Replace) Select
/* Info Center icons */
.fa-recent_posts::before,
.main_icons.recent_posts::before {
content: "\f550";
}
.fa-online_users::before {
content: "\f500";
}
.fa-uot_users_online_current_day::before {
content: "\f0c0";
}
/* Profile Account */

UsersOnlineToday.template.php

Code (Find) Select
<div class="sub_bar">
<h4 class="subbg">
<span class="main_icons people"></span> ', $txt['uot_users_online_'.$modSettings['uot_setting_period']], '
</h4>
</div>

Code (Replace) Select
<div class="sub_bar">
<h4 class="subbg">', $txt['uot_users_online_'.$modSettings['uot_setting_period']], '
</h4>
</div>
I tell it how I see it... Don't like it? Hit Alt+F4!

DeadMan...

@Diego Andrés, is there a way to do custom board icons?
I have my own images I'd like to use, but the way the board inde template is set up, I have no idea how I'd change to use them.
I tell it how I see it... Don't like it? Hit Alt+F4!

Diego Andrés

You can add/load your own function/s to the boardindex.template file.

/**
 * Outputs the board icon for a standard board.
 *
 * @param array $board Current board information.
 */
function template_bi_board_icon($board)
{
global $context, $scripturl;

echo '
<a href="', ($context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>';
}

/**
 * Outputs the board icon for a redirect.
 *
 * @param array $board Current board information.
 */
function template_bi_redirect_icon($board)
{
global $context, $scripturl;

echo '
<a href="', $board['href'], '" class="board_', $board['board_class'], '"', !empty($board['board_tooltip']) ? ' title="' . $board['board_tooltip'] . '"' : '', '></a>';
}


Those are from the default theme, you can adjust them to whatever you need.
If you don't want to change the redirect icon, you can omit that function.

SMF Tricks - Free & Premium Responsive Themes for SMF.

DeadMan...

@Diego Andrés, I tried putting that into the file, and depending on where, I can add image URL to it and have it show, but then it shows both my image and the theme's image.

Also, I have on, off and redirect images.

How looks when add code:
You cannot view this attachment.

How want it to look:
You cannot view this attachment.
I tell it how I see it... Don't like it? Hit Alt+F4!

Diego Andrés

You have to remove the css for the others too.
Try this:

.board_icon a.board_on::before, .board_icon a.board_off::before {
  content: "";
  display: none;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

DeadMan...

#139
This will show the off image I have, but I need it to show the on image when there's new posts.
All 3 of my images are separate images.

Also, it somehow messes up the tabbed categories I have.
Too bad could not just replace the images via css.

I found a way to do it with just css:

.board_icon a.board_on::before {
  content: url(https://domain.tld/images/on.png) !important;
  visibility: visible;
}
.board_icon a.board_off::before {
  content: url(https://domain.tld/images/off.png) !important;
  visibility: visible;
}
.board_icon a.board_redirect::before {
  content: url(https://domain.tld/images/redirect.png) !important;
  visibility: visible;
}
I tell it how I see it... Don't like it? Hit Alt+F4!

Advertisement: