SimplePortal

Support => English Support => Topic started by: Aw06 on April 12, 2010, 08:52:22 AM

Title: Read More After cutoff
Post by: Aw06 on April 12, 2010, 08:52:22 AM
How can i get the read more cut off dots to fall exactly behind the Cutoff word/letter

Example..

This.
This is a test this is where it cu
...

To This.
This is a test this is where it cu...
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 12, 2010, 11:54:58 AM
Can you link to a real example? I have always seen the cutoff dots always fall right after the cutoff word or letter.
Title: Re: Read More After cutoff
Post by: Aw06 on April 12, 2010, 12:19:14 PM
Can you link to a real example? I have always seen the cutoff dots always fall right after the cutoff word or letter.

http://shopinja.com .. see article on portal
Title: Re: Read More After cutoff
Post by: grafitus on April 12, 2010, 12:38:44 PM
It doesn't article in URL. I'm blind? OMG. :O :dead:
Title: Re: Read More After cutoff
Post by: Aw06 on April 12, 2010, 01:16:41 PM
It doesn't article in URL. I'm blind? OMG. :O :dead:

There is only one article.. can't miss it
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 12, 2010, 02:48:30 PM
Maybe it looks different when you log in.
To guest it looks like:
Title: Re: Read More After cutoff
Post by: Aw06 on April 12, 2010, 02:58:17 PM
O my bad, sorry, that board was hidden from guest... look now :-[
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 12, 2010, 03:01:50 PM
I see what you mean.  I haven't seen that before.
Title: Re: Read More After cutoff
Post by: Aw06 on April 13, 2010, 10:21:36 AM
ok, lets hope Sinan can take a look at it
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 14, 2010, 02:34:46 PM
The message body seems to be enclosed in
Code: [Select]
<div align="justify">message body</div> tags.  So, when the dots are put afterwards, they have to start on a new line. That's just how browsers are supposed to render a <div>
 
I don't know what has caused this. Is it in the message body? Or do you have some other mod or customization that has affected PortalArticles or parse_bbc?

Title: Re: Read More After cutoff
Post by: Aw06 on April 14, 2010, 02:44:44 PM
no other mods that changed PortalArticles or parse_bbc AFAIN
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 14, 2010, 03:05:57 PM
How about the post itself? I cannot see the contents of the post, because I don't have any buttons to quote it. 
 
If you look at the html, you will see
Code: [Select]
 
<div align="justify">BUSINESS enterprises

PortalArticles doesn't put that in there. Where did it come from?
Do you have the justify bbcode mod installed? Anything that adds or changes bbcode will affect parse_bbc.
Title: Re: Read More After cutoff
Post by: Aw06 on April 14, 2010, 03:51:15 PM
Well i have a mod that allows the floating of images, that pic in the article is floated left so the text wraps around it.
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 14, 2010, 05:29:15 PM
I do not know which mod that is, but I suspect it could be the source of the problem -- it is wrapping the message body in the <div> and </div> tags.
 
And, since the "..." link is not part of the message body, it must be added after the div. So that means it must start on a new line.
 
So I think this is not a problem with SimplePortal or with your justified text mod. The two are not designed to work together the way you would like them to do.
 
One thing you could try is customization of PortalArticles.php
This customization is something you would have to maintain whenever you upgrade SimplePortal. Something like this ought to work.
Code: (find) [Select]
$row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_message']) . '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . '">...</a>';
Code: (replace) [Select]
$row['body'] .= '[url=' .  $scripturl . '?topic=' . $row['id_topic'] . '.0" title="' . $row['subject'] . ']...[/url]';
 $row['body'] = parse_bbc($row['body'], $row['smileys_enabled'], $row['id_message']) ;
Title: Re: Read More After cutoff
Post by: Aw06 on April 14, 2010, 05:59:37 PM
Ok, that worked, but generated many errors in the logs, guess i will just live with how it is...

Thanks
Title: Re: Read More After cutoff
Post by: AngelinaBelle on April 14, 2010, 06:34:57 PM
I'm sorry I did not think that suggestion through more thouroughly.
 
Are you ready to mark this one as solved?
 
We can revisit it again in the future, if you need it.
 
SimplePortal 2.3.8 © 2008-2024, SimplePortal