TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 05:56:33 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 80
  • Total: 81
  • @rjen

Elkarte TinyPortal Testing

Started by tino, January 05, 2021, 01:55:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

McFly

Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

tino

Quote from: McFly on March 09, 2022, 09:13:59 AM
Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\

Ok thanks, I hope to have some time this weekend to have a stab at fixing some of these errors.

tino

Quote from: McFly on March 09, 2022, 09:13:59 AM
Addendum: No error is reported under PHP7, but no changes to block settings are applied, e.g.: the display of online time in the user block. Under PHP8, the error mentioned above then appears. :-\

Pushed some small fixes for these issues. Seems most were typo's or me not using the correct variable so fairly easy.

McFly

I just looked at the BlockAdmin.php on my test systems ... the line 498 that is replaced, or extended, in the fix is commented out there with two slashes. So nothing can work like that either. ;D
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

McFly

#164
I can't leave it alone.  ???

I noticed at the PHP calendar block the compressed bar with the month name. This is caused by a fixed declared height of 31 pixels in line 754 following for "h2.category_header, ...". This is due to the graphical gradient in the default SMF themes. But with the CSS gradients used by ELK this is no longer necessary. So I reduced "h2.category_header, ..." to the most necessary ("overflow: hidden;").

While briefly skimming other layout abnormalities, I came across quite a few padding with exactly one percent. Should better be changed to .3em to .5em. That way the margin depends on the font and not on the screen width.

In this context I also changed the function template_categories() to a tableless layout. :doh:


// Article Categories page
function template_categories()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings, $boarddir, $boardurl, $language;

echo '
<form accept-charset="', 'UTF-8', '" name="tpadmin_news" action="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory" method="post" enctype="multipart/form-data" onsubmit="syncTextarea();">
<input type="hidden" name="sc" value="', $context['session_id'], '" />
<input type="hidden" name="tpadmin_form" value="categories">
<div class="cat_bar">
<header class="category_header">
<div class="floatleft">' . $txt['tp-artcat'] . '</div>
<div class="floatright150 centertext">' , $txt['tp-actions'] , '</div>
</header>
</div>
<section id="edit-category" class="admintable admin-area">
<div class="information smalltext">' , $txt['tp-helpcats'] , '</div>';
if(isset($context['TPortal']['editcats']) && count($context['TPortal']['editcats'])>0)
{
$alt=true;
foreach($context['TPortal']['editcats'] as $c => $cat)
{
echo '
<div class="content padding-div">
<div class="floatleft">
' , str_repeat("- ",$cat['indent']) , '
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=categories;cu='.$cat['id'].'" title="' .$txt['tp-editcategory']. '">' , $cat['name'] , '</a>
' , isset($context['TPortal']['cats_count'][$cat['id']]) ? '(' . ($context['TPortal']['cats_count'][$cat['id']]>1 ? $txt['tp-articles'] : $txt['tp-article']) . ': '.$context['TPortal']['cats_count'][$cat['id']].')' : '' , '
</div>
<div class="floatright150 centertext">
<a href="' . $scripturl . '?cat=' . $cat['id'] . '" title="' . $txt['tp-viewcategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPfilter.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=categories;cu='.$cat['id'].'" title="' .$txt['tp-editcategory']. '"><img src="' . $settings['tp_images_url'] . '/TPconfig_sm.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory;child;cu=' . $cat['id'] . '" title="' . $txt['tp-addsubcategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPadd.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=newcategory;copy;cu=' . $cat['id'] . '" title="' . $txt['tp-copycategory'] . '"><img src="' . $settings['tp_images_url'] . '/TPcopy.png" alt="" /></a>&nbsp;
<a href="' . $scripturl . '?action=admin;area=tparticles;sa=delcategory;id='.$cat['id'].';' . $context['session_var'] . '=' . $context['session_id'] . '" onclick="javascript:return confirm(\''.$txt['tp-confirmcat1'].'  \n'.$txt['tp-confirmcat2'].'\')" title="' . $txt['tp-delete'] . '"><img src="' . $settings['tp_images_url'] . '/TPdelete2.png" alt="" /></a>
</div>
</div>';
$alt = !$alt;
}
}
echo '
</div>
</section>
</form>';
}


In addition still a little CSS extended:


.floatright150 {
float: right;
min-width: 150px;
width: 20%;
}


Just had a look at the index.css of ELK an changed a little bit. Some declarations were redundant.
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

tino

Thanks!! CSS is definitely not my forte. I'd like to change to flex or a grid layout but no idea if or when I will.

McFly

Quote from: tino on March 16, 2022, 07:36:12 PM
Thanks!! CSS is definitely not my forte. I'd like to change to flex or a grid layout but no idea if or when I will.

Hm ... I have already tried an exclusively tableless layout only with DIVs around for TP 1.3 and still some of it is in the back of my mind. And also somewhere in the nirvana of my work computer.  ^-^
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

McFly

#167
Had some time during the break today.  :)

I hope I have not overlooked anything. The layout is further adapted to the standard ELK theme. <header> for the headers and <section> for the content for example. Nothing had to be changed on the CSS for this except one:


.tp_block21 {
margin: 1px 0 0 0;
padding: 4px 8px 8px 8px;
}


Edit:

Ah ... Command back. It's not so easy to eliminate the sins of the forefathers of a round design with all its nestings of <tr>, <td> and countless <span> ...

There's a bit more work waiting.  :o
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

McFly

By the way, after applying the last changes, the following result appears. All settings, for example, visibility of avatars in the user block or users online in the stastistics block, are deleted and can no longer be activated.  :hmm:
"I'm not going to censor myself to comfort your ignorance."

Testsites (may be online or not ;-) )
ElkArte 1.1.x & TP on Apache2.4.48, PHP 8.1.2 FPM/FastCGI, MariaDB 10.5.12

tino

Quote from: McFly on March 18, 2022, 07:25:28 AM
By the way, after applying the last changes, the following result appears. All settings, for example, visibility of avatars in the user block or users online in the stastistics block, are deleted and can no longer be activated.  :hmm:

Is that my changes or yours for the display?