[Solved]News Stopping / [break]: Stop News Where You Want »  Show posts from    to     

Icy Phoenix


Old Support Topics - [Solved]News Stopping / [break]: Stop News Where You Want



OwnageWorld [ Thu 09 Oct, 2008 19:21 ]
Post subject: [Solved]News Stopping / [break]: Stop News Where You Want
Hey all!

What I would like to see, and what im missing a bit, is making the news stop showing on the front page where I want it!

On ezportal (in the old days) you had a mod named the "[break]-mod" which in short fetch'd everything untill it saw "[break]". So you don't have to fill in a number, like 400 characters, but you can typ "[break]" where you want to stop showing the news.

Example Front page news:

"Hey, I like Icy Phoenix because... [break]
"click here for the full text".

And if you click, you can see the full message, but you never see the [break] tag!
Could this be done on icy Phoenix? And someone knows how?

Thnx in advance!

EDIT: Thank you MG!

You can break any news posts on the portal page where you would like the intro to stop by using the code: just type <!--break--> in a post to do so.


xmenfile [ Thu 09 Oct, 2008 20:46 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
try to go to CMS>>News Block and adjust numbers of characters.


OwnageWorld [ Mon 13 Oct, 2008 21:30 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
xmenfile wrote: [View Post]
try to go to CMS>>News Block and adjust numbers of characters.

I know hehe.
But what I would like to have, is that you type a certain word, and it "breaks" the text on the portal. So on every newspost, you can decide for yourself how long it is...

Nobody knows this mod?


LiTos [ Tue 23 Dec, 2008 01:11 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
Would be nice if I could get this too.....


OwnageWorld [ Wed 10 Feb, 2010 15:33 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
Im still definitely interested in this one.
How much would someone like to receive for making this small addon for me?
I guess someone with some knowledge about this, can make this easily! (hope so...)

Thanks in advance!


Mighty Gorgon [ Sun 14 Feb, 2010 12:23 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
Please provide more details about what you need.

You just need this to be shown in News Block in home page?


TheSteffen [ Sun 14 Feb, 2010 18:01 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
If I understand right, he means, that you can put a code in the first post

Like [break] or [break]Read More[/break]

So you can decide by yourself how long a portal post can be.

But than it should be unvisible in viewtopic.php ;-)
Or only <hr>


OwnageWorld [ Tue 16 Feb, 2010 13:03 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
TheSteffen wrote: [View Post]
If I understand right, he means, that you can put a code in the first post

Like [break] or [break]Read More[/break]

So you can decide by yourself how long a portal post can be.

But than it should be unvisible in viewtopic.php ;-)
Or only <hr>

Yep, that would be exactly what I am looking for! Some post would be longer on the portal, others only need a short introduction, where they can only view the complete post if you open them.

There was such a mod for ezportal (can not find it anymore on the WWW :( ), but it was inserted as an BBCode, to break post where you want them. It would be invisible if you read the post using the portal, and it would be invisible in viewtopic.php .
I think/ hope you would make a lot of people happy with this one. I definitely would!

Greets!


Mighty Gorgon [ Wed 03 Mar, 2010 10:03 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
I have found something like this in the code... you can try, but I'm not assuring that it will work:

Code: [Hide] [Select]
<!--break-->


Have a try in inserting this.


OwnageWorld [ Mon 15 Mar, 2010 16:36 ]
Post subject: Re: News Stopping / [break]: Stop News Where You Want
Mighty Gorgon wrote: [View Post]
I have found something like this in the code... you can try, but I'm not assuring that it will work:

Code: [Hide] [Select]
<!--break-->


Have a try in inserting this.

Thank you! This worked!

The only problem is that it is shown in "search" and in "forum post"...":)
Could this be solved too?


Mighty Gorgon [ Thu 25 Mar, 2010 11:01 ]
Post subject: Re: [Solved]News Stopping / [break]: Stop News Where You Want
I may have a look at it some time in the future, but I'm not assuring that.


OwnageWorld [ Thu 19 Aug, 2010 16:49 ]
Post subject: Re: [Solved]News Stopping / [break]: Stop News Where You Want
Mighty Gorgon wrote: [View Post]
I may have a look at it some time in the future, but I'm not assuring that.

Do you, or anybody else, know how this can be solved?
The break tag works!

But now you always see "<!--break-->" in every post. You cant make it smaller text or a white text because you will see a half BBcode on the portal page. The word can not be replaced, because then it does not work...

Example 1 in viewtopic on forum after the first picture, but also if you use "search" with more characters, you will see it...
On portal view the <!--break--> tag is gone! :) (as it should be...)

Someone else knows some tricks to get around this <!--break--> tag in a topic? Could it be filtered when someone views the message in topicview?

Thanks in advance!


Mighty Gorgon [ Wed 25 Aug, 2010 00:03 ]
Post subject: Re: [Solved]News Stopping / [break]: Stop News Where You Want
Try something like this in viewtopic:
Code: [Hide] [Select]
$message = str_replace('<!--break-->', '', $message);


Maybe just after this line:
Code: [Hide] [Select]
$message = $postrow[$i]['post_text'];


OwnageWorld [ Wed 25 Aug, 2010 17:35 ]
Post subject: Re: [Solved]News Stopping / [break]: Stop News Where You Want
Mighty Gorgon wrote: [View Post]
Try something like this in viewtopic:
Code: [Hide] [Select]
$message = str_replace('<!--break-->', '', $message);


Maybe just after this line:
Code: [Hide] [Select]
$message = $postrow[$i]['post_text'];

Hey MG,

Thank you for the response! Too bad this did not work...
But somewhere under the suggested code I found these lines already in the coding (on viewtopic.php)....
Code: [Hide] [Select]

// BEGIN CMX News Mod
// Strip out the <!--break--> delimiter.
$delim = htmlspecialchars('<!--break-->');
$pos = strpos($message, $delim);
if(($pos !== false) && ($pos < strlen($message)))
{
$message = substr_replace($message, html_entity_decode($delim), $pos, strlen($delim));
}

// END CMX News Mod

This is located under the postrow code line.

Someone knows why this is not working? Why the break tag is not stripped out?

Thanks in advance!


Mighty Gorgon [ Tue 31 Aug, 2010 23:15 ]
Post subject: Re: [Solved]News Stopping / [break]: Stop News Where You Want
Move the code after highlight, so you will have something like this:

Code: [Hide] [Select]
// Highlight active words (primarily for search)
if ($highlight_match)
{
// This has been back-ported from 3.0 CVS
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<span class="highlight-w"><b>\1</b></span>', $message);
}

// BEGIN CMX News Mod
// Strip out the <!--break--> delimiter.
$delim = htmlspecialchars('<!--break-->');
$pos = strpos($message, $delim);
if(($pos !== false) && ($pos < strlen($message)))
{
$message = substr_replace($message, html_entity_decode($delim), $pos, strlen($delim));
}
// END CMX News Mod




Powered by Icy Phoenix