News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

September 21, 2019, 01:20:44 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 188921
  • Total Topics: 20754
  • Online Today: 88
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 1
Guests: 49
Total: 50

Author Topic: Read More "Front Page"  (Read 607 times)

0 Members and 1 Guest are viewing this topic.

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 274
Read More "Front Page"
« on: April 25, 2019, 02:53:05 PM »
Hi,

I had @Rocklee install the UX theme for me and do some customizing of the theme. He did a great job, the theme looks good but something happened to the front page in my original theme Default curve. The most current forum post on the front page "Read More" doesn't show the CSS decoration I added over a month ago. And the second to most current "Read More" moved to the right and over text. It along with the other 10 posts all have the CSS text decoration though.

See here, link below and image attached.

Code: [Select]
youthhockeyinfo.com

Anybody have any idea what happened? Rocklee thinks something in the UX theme might be associated with TP that was changed.


Online @rjen

  • Support Team
  • *
  • Posts: 1821
    • FJR-club Nederland
Re: Read More "Front Page"
« Reply #1 on: April 25, 2019, 03:02:05 PM »
To be frank, this is something easily identified checking the page source..

Code: [Select]
are filled.<br /><br /... <p class="tp_readmore">
as it turns out the body text is 'cut' in the middle of a <br > statement, resulting in the <p > paragraph syntax being incorrect, and as a result your css does not take effect here...

Quickest solution: change the post text so it does not cut at that spot...
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 274
Re: Read More "Front Page"
« Reply #2 on: April 25, 2019, 03:15:05 PM »
To be frank, this is something easily identified checking the page source..

Code: [Select]
are filled.<br /><br /... <p class="tp_readmore">
as it turns out the body text is 'cut' in the middle of a <br > statement, resulting in the <p > paragraph syntax being incorrect, and as a result your css does not take effect here...

Quickest solution: change the post text so it does not cut at that spot...

Thank you @rjen

He's in Argentina so I may not get a hold of him tonight. Is this an edit I can do? Which file do I edit and is it in the tiny portal files or the theme files?

Thank you

Online @rjen

  • Support Team
  • *
  • Posts: 1821
    • FJR-club Nederland
Re: Read More "Front Page"
« Reply #3 on: April 25, 2019, 10:39:15 PM »
Since it it the actual post text that you need to update, I am sure you can change it: it is not in a forum file, but this topic text: https://www.youthhockeyinfo.com/index.php?topic=1074.msg2314#msg2314
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 274
Re: Read More "Front Page"
« Reply #4 on: April 26, 2019, 05:59:43 AM »
That's strange because I have basic BBC formatting. Nothing special and no open tags.

Code: [Select]
[img]https://www.youthhockeyinfo.com/images/players.jpg[/img]

Whatever league your club is participating, if you are looking for players to round out teams please respond and we will update the list accordingly. We will re-post on social media daily until spots are filled.

This is for any league, WNYAHL, LIAHL, NJYHL, DVHL, CBHL, PAHL.......etc.

Please note:
[list]
[li]Organization[/li]
[li]Team(s)[/li]
[li]Number of players needed for each team[/li]
[li]Contact name[/li]
[li]Contact Phone or Email[/li]
[/list]

[color=red][b]***If anybody who posts doesn't know how to add an image, we will do it for you after your post is made.[/b][/color]

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 274
Re: Read More "Front Page"
« Reply #5 on: April 26, 2019, 07:23:03 AM »
I made a new post with not enough content for "Read More" to show up. If you look the problem stays with the first two forum posts shown with "Read More" on the front page no matter how the posts are formatted.

Online @rjen

  • Support Team
  • *
  • Posts: 1821
    • FJR-club Nederland
Re: Read More "Front Page"
« Reply #6 on: April 26, 2019, 08:24:48 AM »
Add or remove a word in the first 100 characters of the post
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 274
Re: Read More "Front Page"
« Reply #7 on: April 26, 2019, 08:30:28 AM »
Add or remove a word in the first 100 characters of the post

Very strange, never did that before.

Online @rjen

  • Support Team
  • *
  • Posts: 1821
    • FJR-club Nederland
Re: Read More "Front Page"
« Reply #8 on: April 26, 2019, 08:46:39 AM »
I am on mobile atm, will explain when I am on a keyboard ...
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info

Online @rjen

  • Support Team
  • *
  • Posts: 1821
    • FJR-club Nederland
Re: Read More "Front Page"
« Reply #9 on: April 26, 2019, 09:32:00 AM »
Quick explanation...

When showing posts on the frontpage TP cuts the posts to a number of characters set in your frontpage setting: "Number of characters to display per forum-post: "

Now there is a code that cuts the text at the last ">" character or " " chracter (space) found BEFORE the end of the string...

This bit of code in Tportal.php.
Code: [Select]
$length = $context['TPortal']['frontpage_limit_len'];
if (!empty($length) && $smcFunc['strlen']($row['body']) > $length)
{
$row['body'] = $smcFunc['substr']($row['body'], 0, $length);

// The first space or line break. (<br />, etc.)
$cutoff = max(strrpos($row['body'], ' '), strrpos($row['body'], '>'));

if ($cutoff !== false)
$row['body'] = $smcFunc['substr']($row['body'], 0, $cutoff);

$row['readmore'] = '... <p class="tp_readmore"><strong><a href="'. $scripturl. '?topic='. $row['id']. '">'. $txt['tp-readmore']. '</a></strong></p>';
}


It cannot deal with all cases though: especially the
Code: [Select]
<br /> which has a space in itself..

What you see happens when the last bit of the
Code: [Select]
<br /> string is cut off. Let's say the length is set to 100 characters: the last > is on place 101: it is then cut at the last space found, leaving a partial tag "<br ..."

It has been in the code of TP since before I even knew TP existed, and the cutting of the tag is normally not even visible to users but you have added a style to the 'readmore' tag, which is now not showing because of the open <br ...

 
Running TP1.6.4 on SMF2.0 at: www.fjr-club.nl

Testing TP on SMF2.0
Testing TP on SMF2.1 RC2
Want to check what php version I am testing on? See: PHP Info