News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

NameX

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

Previous topic - Next topic

gevv

Hi,


I'm moving the recent post up. But it appears both above and below. The method I used for the solution did not work.

BoardIndex.template.php search;

echo '
<div id="boardindex_table" class="boardindex_table">';


Replace;
   echo '
   <div id="boardindex_table" class="boardindex_table">';
   template_ic_block_recent();

Recent messages move up ok.



The code I used to prevent it from appearing in the subsection does not work.

BoardIndex.template.php search;

$func = 'template_ic_block_' . $block['tpl'];
$func();

Replace;
$func = 'template_ic_block_' . $block['tpl'];
if($func == 'template_ic_block_recent')
echo'';
else
$func();
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Diego Andrés

Try the if with continue;

$func = 'template_ic_block_' . $block['tpl'];
if($func == 'template_ic_block_recent')
continue;
else
$func();

If that doesn't work, I'll have a look later.

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

PHP errors occur because the coding structure is different. When adding codes into DIV

NameX_v1.2.7 BoardIndex.template.php;

   
    $func = 'template_ic_block_' . $block['tpl'];
        echo '
        <div id="block-' . $block['txt'] . '" class="windowbg">
            ', $func(), '
        </div>';





Parse error: syntax error, unexpected 'template_ic_block_' (T_STRING), expecting ';' or ',' in C:\wamp64\www\smf\Themes\NameX_v1.2.7\BoardIndex.template.php on line 197

      $func = 'template_ic_block_' . $block['tpl'];
      echo '
      <div id="block-' . $block['txt'] . '" class="windowbg">
            $func = 'template_ic_block_' . $block['tpl'];
      if($func == 'template_ic_block_recent')
      continue;
      else
      $func();   
      </div>';
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Diego Andrés

I'll test it tomorrow.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Quote from: gevv on September 25, 2023, 04:36:52 PMNameX_v1.2.7 BoardIndex.template.php;

Code (Search) Select
// Info Center Elements for tabs
    foreach ($context['info_center'] as $block)
    {
        echo '
            <li class="title_bar">
                <a href="#block-' . $block['txt'] . '" class="titlebg">
                    ', themecustoms_icon('fa fa-'. $block['txt']) , '
                    <span>', $txt[$block['txt']], '</span>
                </a>
            </li>';
    }

    echo '
            </ul>';

    // Load the blocks
    foreach ($context['info_center'] as $block)
    {
        $func = 'template_ic_block_' . $block['tpl'];
        echo '
        <div id="block-' . $block['txt'] . '" class="windowbg">
            ', $func(), '
        </div>';
    }
Code (Replace) Select
// Info Center Elements for tabs
    foreach ($context['info_center'] as $block)
    {
        if ($block['txt'] === 'recent_posts')
            continue;
        echo '
            <li class="title_bar">
                <a href="#block-' . $block['txt'] . '" class="titlebg">
                    ', themecustoms_icon('fa fa-'. $block['txt']) , '
                    <span>', $txt[$block['txt']], '</span>
                </a>
            </li>';
    }

    echo '
            </ul>';

    // Load the blocks
    foreach ($context['info_center'] as $block)
    {
        $func = 'template_ic_block_' . $block['tpl'];

        if ($func === 'template_ic_block_recent')
            continue;
       
        echo '
        <div id="block-' . $block['txt'] . '" class="windowbg">
            ', $func(), '
        </div>';
    }

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

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

Diego Andrés

Forgot to post last week update.

1.2.8 - 01 October 2023
  • Improvement Minor layout improvements for boards layout.
  • Improvement Theme Settings tabs minor tweaks.
Full list of changes

SMF Tricks - Free & Premium Responsive Themes for SMF.

emilot

Hello,

Is there a fix for this (Info Center info) issue, in mobile view?

Thanx and congrats for this awesome theme!

Diego Andrés

What's the viewport size? SMF itself is only looking to support down to 320px as the minimum limit.
You could try adding this in your NameX/css/custom/custom_edits.css file (or create it).

#info_center_blocks {
  display: inline-flex;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

emilot

Quote from: Diego Andrés on October 22, 2023, 04:20:05 PMWhat's the viewport size? SMF itself is only looking to support down to 320px as the minimum limit.
You could try adding this in your NameX/css/custom/custom_edits.css file (or create it).

#info_center_blocks {
  display: inline-flex;
}

Hmmm...i put Forum width at 80%.

This is the reason? (no it wasn't)

Thank you!

emilot

Quote from: Diego Andrés on October 22, 2023, 04:20:05 PMWhat's the viewport size? SMF itself is only looking to support down to 320px as the minimum limit.
You could try adding this in your NameX/css/custom/custom_edits.css file (or create it).

#info_center_blocks {
  display: inline-flex;
}

With your solution everything come back to normal!!

Thank you for your quick support   ;D

jsx

@Diego Andrés

I have a question about changing the display of avatars to square. Why did you change this?

Diego Andrés

It hasn't changed.

/* Avatar */
/* Border */
--avatar-border-radius: 50%;

Did you have a different outcome with a MOD or edit?

SMF Tricks - Free & Premium Responsive Themes for SMF.

jsx

Ok, I have no idea what was wrong with me yesterday, but today it's ok.

I added this code to the app.css file:

.boardindex_table .lastpost p span.last_post {
    display: flex;
    gap: 0.25em;
}

https://github.com/SMFTricks/NameX/compare/v1.2.7...v1.2.8#diff-6e968e1daffd770aa63e2bf8086cb69ccdfe24cd647fae037f6a3a00be43b3ca

But I see that in the app.css file from NameX 1.2.8 there is this code, i.e. there is also flex-wrap here:

.boardindex_table .lastpost p span.last_post {
display: flex;
gap: 0.25em;
flex-wrap: wrap;
}

So I copied this code from the app.css file from NameX 1.2.8

user58389239

I've noticed a quirk related to the "signature" section. Words don't seem to wrap / break correctly. See this screenshot, the words "damage" and "after" are split between 2 lines.

Diego Andrés

#315
I seem to recall this issue, is your theme updated?
I'll test later to make sure it's indeed fixed.

I used the wrong value when I patched it some time ago.
I added a new package with the fix, I didn't add a changelog entry so it's the same version...
See the commit

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

Hello,


Can the background and content section be full width on small screen phones?

5.7 inc 720x1440;

You cannot view this attachment.

Full width example (image editing :) )

You cannot view this attachment.

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

Diego Andrés

I'll check this later today and leave you a solution soon.

SMF Tricks - Free & Premium Responsive Themes for SMF.

user58389239

Quote from: Diego Andrés on November 26, 2023, 12:54:01 PMI seem to recall this issue, is your theme updated?
I'll test later to make sure it's indeed fixed.

I used the wrong value when I patched it some time ago.
I added a new package with the fix, I didn't add a changelog entry so it's the same version...
See the commit

Looks like I am on v1.2.7. I'll manually apply the fix for now until I can do a full update (which takes some work since I have a custom color).

Thanks!

Diego Andrés

Quote from: user58389239 on November 28, 2023, 10:48:24 AMLooks like I am on v1.2.7. I'll manually apply the fix for now until I can do a full update (which takes some work since I have a custom color).

Thanks!

Small changes in 1.2.8 from 1.2.7
https://github.com/SMFTricks/NameX/compare/v1.2.7...v1.2.8

In total with that last commit it'd be 5 file edits I think.
Although the last commit will be a part of 1.2.9 if it exists in the future, but many will have this fix already applied manually or with new installations.  :P

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: