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

Recent

Welcome to TinyPortal. Please login or sign up.

May 02, 2024, 01:50:03 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,176
  • Total Topics: 21,220
  • Online today: 120
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 100
  • Total: 101

¿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

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!