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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,950
  • Latest: Marius
Stats
  • Total Posts: 195,796
  • Total Topics: 21,282
  • Online today: 106
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

¿Error css or a bad configuration?

Started by Rock Lee, August 17, 2020, 10:27:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rock Lee

Link to my forum: LocalHost
SMF version: 2.0.17
TP version: 1.6.7
Default Forum Language: Spanish Latin UTF8 / English
Theme name and version: Default
Browser Name and Version: Firefox 79
Mods installed: none

I do not know if it is an error as such but trying some things on a localhost (reinstall everything again) do not finish to square.

It seems to put a very large image or a lot of text it cannot process or it finishes accommodating everything, create another category and it is visualized well with at least 1 post.

I have to do more tests but I do not know if it is an error, a bug, or referring to something (I will leave this topic in the form of a thread in the future).


Regards! :D

@rjen

What exactly are you trying to do that causes the issues? Cannot make that out from your description
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

Quote from: @rjen on August 17, 2020, 10:30:45 PM
What exactly are you trying to do that causes the issues? Cannot make that out from your description

Nothing weird I started posting images, with random text. I wanted to modify how much the categories can be seen and I came across this. It seems that the hierarchies/inheritances conflict on the theme, in theory it should appear like this on this page but it does not.


Regards!

@rjen

Sorry, cannot understand what you are doing. Since it is local I will not ask for a link.

Please describe step by step what you do in TinyPortal to create this result.

Are you using articles, blocks? How did you create them?
Where do you see a large image or text? How did you put that in?

If you are using articles, what type of article are you using? HTML, BBC or PHP?
If it is a block, what type of block?

If you want us to help you, you should provide a clear description of the issue and how to reproduce it...

Perhaps a screen shot of the complete screen would help, because just looking at three images of a footer section tells us nothing more then that it seems that there is one or more unclosed <divs> in the page somewhere...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

As they say a picture is worth a thousand words https://www.bombercode.net/Sitio/index.php?action=tpmod;dl=cat1 Sigo agregando elementos sin mas y empieza a deformarse. It's a clean forum I just downloaded TP and installed it. This by default only change does not show the portal. And the text you copied is just:

Quote
¿Qué es Lorem Ipsum?

Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocido usó una galería de textos y los mezcló de tal manera que logró hacer un libro de textos especimen. No sólo sobrevivió 500 años, sino que tambien ingresó como texto de relleno en documentos electrónicos, quedando esencialmente igual al original. Fue popularizado en los 60s con la creación de las hojas "Letraset", las cuales contenian pasajes de Lorem Ipsum, y más recientemente con software de autoedición, como por ejemplo Aldus PageMaker, el cual incluye versiones de Lorem Ipsum.
¿Por qué lo usamos?

Es un hecho establecido hace demasiado tiempo que un lector se distraerá con el contenido del texto de un sitio mientras que mira su diseño. El punto de usar Lorem Ipsum es que tiene una distribución más o menos normal de las letras, al contrario de usar textos como por ejemplo "Contenido aquí, contenido aquí". Estos textos hacen parecerlo un español que se puede leer. Muchos paquetes de autoedición y editores de páginas web usan el Lorem Ipsum como su texto por defecto, y al hacer una búsqueda de "Lorem Ipsum" va a dar por resultado muchos sitios web que usan este texto si se encuentran en estado de desarrollo. Muchas versiones han evolucionado a través de los años, algunas veces por accidente, otras veces a propósito (por ejemplo insertándole humor y cosas por el estilo).

If you want, I'll give you an account so you can watch.


Regards!

@rjen

So the downloads then, thanks.

I recognize this issue now.
The files view uses a 'stripped' summary of the download files description: stripped to 400 characters.

If you are using the HTML editor and you paste texts with formatting this may happen because the description text is cut off between a <div> ... and a </div>

The problems starts here: https://www.bombercode.net/Sitio/index.php?PHPSESSID=a488675da104e1ed3869c78599c3768d&action=tpmod;dl=item14

and is repeated in more files...

This is the opening description...
Quote<!--  StartFragment  -->
</p>
<div>
   <h2>
      ¿Qué es Lorem Ipsum?
   </h2>
   <p>
      Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocido usó una galería de textos y los mezcló de tal manera que logró hacer un libro de textos especimen. No sólo sobrevivió 500 años, sino que tambien ingresó como texto de relleno en documentos electrónicos, quedando esencialmente igual al original. Fue popularizado en los 60s con la creación de las hojas &quot;Letraset&quot;, las cuales contenian pasajes de Lorem Ipsum, y más recientemente con software de autoedición, como por ejemplo Aldus PageMaker, el cual incluye versiones de Lorem Ipsum.
   </p>
</div>

And it cut like this...
Quote<!--  StartFragment  -->
</p>
<div>
   <h2>
      ¿Qué es Lorem Ipsum?
   </h2>
   <p>
      Lorem Ipsum es simplemente el texto de relleno de las imprentas y archivos de texto. Lorem Ipsum ha sido el texto de relleno estándar de las industrias desde el año 1500, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocido usó una galería de textos y los mezcló d

You see the opening <div> and does not have an ending </div>?

The only way to fix this at the moment is to check the description txt (in source view) and fix it in the text... make sure that there is also a closing div in the first 400 characters. Or (recommended): do not past html formatted text, but paste plain text and do the formatting yourself...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on August 19, 2020, 07:56:31 AM
So the downloads then, thanks.

I recognize this issue now.
The files view uses a 'stripped' summary of the download files description: stripped to 400 characters.


Nice catch @rjen.  I was thinking it was something to do with the cut off, but wasn't sure of the limit.  Maybe we should document this scenario, assuming there's no fix for it. 

@rjen

Quote from: lurkalot on August 19, 2020, 08:51:59 AM
Nice catch @rjen.  I was thinking it was something to do with the cut off, but wasn't sure of the limit.  Maybe we should document this scenario, assuming there's no fix for it.

Actually you brought this up a while ago. It was discussed as an improvement opportunity for 2.0.0.

https://www.tinyportal.net/index.php?topic=36303.msg297403#msg297403

still on the backlog though...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Yep I remember that now, when I added a link and it cut the code off in mid flight so to speak.  This does make using the html editor somewhat difficult to use in this scenario. Maybe why I either use the bbc or no editor at all..

tino

Quote from: @rjen on August 19, 2020, 09:43:42 AM
Quote from: lurkalot on August 19, 2020, 08:51:59 AM
Nice catch @rjen.  I was thinking it was something to do with the cut off, but wasn't sure of the limit.  Maybe we should document this scenario, assuming there's no fix for it.

Actually you brought this up a while ago. It was discussed as an improvement opportunity for 2.0.0.

https://www.tinyportal.net/index.php?topic=36303.msg297403#msg297403

still on the backlog though...

There is a fix of sorts for the other issue, it will not cut a link short anymore.

The div thing is harder to do without a full parser to count all the opening tags and add the missing ones and the output will look weird.

My preference is for html to be allowed but only a subset of html so no div tags, but that isn't so flexible. So it's really down to the user to check. 

Rock Lee

If it seems when using the HTML editor it makes a cut where it should not leaving that error, when not using or with BBCode it works as it should showing a continuous line. Where can I put to show 3 columns? in the same section. (I guess I can't see the report of the error, I was curious ha)


Regards!

@rjen

The report I linked to was in the team section, meant for Lurkalot.

Not sure what you mean with 3 columns...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

Ah well, although it only happens with the HTML one, then removing all is normalized only the cuts are rare (depending on the text but it is the least).I mean something like:



Also I want to ask the value of 400 characters can be modified?


Regards!

@rjen

The downloads module does not have configurable layouts, so you cannot choose for a three column layout in settings.
The layout is driven by css though. If you want three colums you can edit the tp-style.css.

Find this section


.dlitemgrid {
display: inline-block;
padding: 1em 1% 1em 0;
overflow: hidden;
vertical-align: top;
width: 48%;
}


and change the width to 32% ...
You may need to test and change some more...

The number of characters is also coded.

If you want to change it, open the file TPdlmanager.php and find line 998


$request = $smcFunc['db_query']('', '
SELECT dl.id, LEFT(dl.description, 400) as ingress,dl.name, dl.category, dl.file,
dl.downloads, dl.views, dl.link, dl.created, dl.last_access,
dl.author_id as authorID, dl.icon, dl.screenshot, dl.filesize, mem.real_name as realName


change the number 400 to the number of characters you like..

Mind you: whenever you update TinyPortal to a new version you will need to make the change again...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

Well I am going to edit the css so I thought it was not the right thing so I asked. Great, I'll test the amount that best suits what I need, and I'll keep it in mind with each update. Thanks for your time :D!


Regards!

@rjen

Just had an idea. In the next version of TP we can change the page layout and instead of cutting the description short which sometimes leads to this issue, we can limit the div showing the description to a fixed number of lines...

The result looks good, and prevents this issue from happening completely. Depending on the theme and the description it may result in the tekst showing a partial line though...

examples found here...
https://test2.fjr-club.nl/index.php?action=tportal;sa=download;dl=cat1
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

It seems to work although if it is somewhat long, with url of images or university newsletters (they have very long links) and I do not know that it affects just cut in the url. It would be a question to look better and if I have any idea I will contribute it.


Regards!

@rjen

The long URL's will show for as far as they fit into the window, just like images. The link wil also work when looking at the category page, which they do not if the are cut in half now. Mind you the category page is meant to show a shortened preview of the download description. Clicking the download name will bring the visitor to the full text anyway
Running Latest TP on SMF2.1 at: www.fjr-club.nl

lurkalot

Quote from: @rjen on August 19, 2020, 09:47:48 PM
Just had an idea. In the next version of TP we can change the page layout and instead of cutting the description short which sometimes leads to this issue, we can limit the div showing the description to a fixed number of lines...

The result looks good, and prevents this issue from happening completely. Depending on the theme and the description it may result in the tekst showing a partial line though...

examples found here...
https://test2.fjr-club.nl/index.php?action=tportal;sa=download;dl=cat1

Looks neat and tidy @rjen, I like the idea.  8)

Rock Lee

Quote from: @rjen on August 19, 2020, 10:23:01 PM
The long URL's will show for as far as they fit into the window, just like images. The link wil also work when looking at the category page, which they do not if the are cut in half now. Mind you the category page is meant to show a shortened preview of the download description. Clicking the download name will bring the visitor to the full text anyway

Yes, although I increase the character limit and now it is going well, as it is internal for a maximum of 100 people (it is from my university) it is going more than well. I will try to look at the code a little more to see if I can break something to report any errors and I realized I also have to polish my translation, some are wrong or meaningless in Latin Spanish. Very technical English without context, I can't easily translate well :uglystupid2:


Regards!

@rjen

The change in the handling of the short description in the downloads has been added to the code in TP 2.0.0.

Since it is not a bug a such but a functionality change I will not add this to the 1.6.x branch (which is bugfix only)
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

Perfect then it will be a matter of just waiting for the 2.0.0 branch to update, in addition to supporting with the translation into Latin Spanish O0.


Regards!

@rjen

We expect 2.0.0 to be released soon.

There are quite some language file changes and additions in 2.0.0, so we welcome any language file contributions  O0
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

If looking at the one you uploaded I notice several changes, I was going to use it as a base but I better wait for it to be launched to have everything clearer and can be used for Spanish speakers 8).


Regards!

@rjen

Quote from: Rock Lee on August 21, 2020, 07:19:37 PM
If looking at the one you uploaded I notice several changes, I was going to use it as a base but I better wait for it to be launched to have everything clearer and can be used for Spanish speakers 8).


Regards!

If you like I can post the English files for you. They will not change anymore
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Rock Lee

It would be great if you do that. If I have time to translate it.


Regards!

This website is proudly hosted on Crocweb Cloud Website Hosting.