|
Page 1 of 1
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 [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 in a post to do so.
Last edited by OwnageWorld on Mon 15 Mar, 2010 16:33; edited 2 times in total |
#1 Thu 09 Oct, 2008 19:21 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
xmenfile 
Joined: September 2007
Posts: 482
Location:  Right in front of my computer
|
 Re: News Stopping / [break]: Stop News Where You Want
try to go to CMS>>News Block and adjust numbers of characters.
|
#2 Thu 09 Oct, 2008 20:46 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 Re: News Stopping / [break]: Stop News Where You Want
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?
|
#3 Mon 13 Oct, 2008 21:30 |
|
LiTos 
Joined: November 2008
Posts: 48
|
 Re: News Stopping / [break]: Stop News Where You Want
Would be nice if I could get this too.....
|
#4 Tue 23 Dec, 2008 01:11 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 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!
|
#5 Wed 10 Feb, 2010 15:33 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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?
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#6 Sun 14 Feb, 2010 12:23 |
|
TheSteffen 
Joined: August 2006
Posts: 1625
Location:  Magdeburg
|
 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>
____________ TheSteffen
Often SEARCH is the quickest way to get support.
IcyPhoenix German Support
|
#7 Sun 14 Feb, 2010 18:01 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 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>
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!
|
#8 Tue 16 Feb, 2010 13:03 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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:
Have a try in inserting this.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#9 Wed 03 Mar, 2010 10:03 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 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:
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?
|
#10 Mon 15 Mar, 2010 16:36 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 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.
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#11 Thu 25 Mar, 2010 11:01 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 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.
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!
|
#12 Thu 19 Aug, 2010 16:49 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [Solved]News Stopping / [break]: Stop News Where You Want
Try something like this in viewtopic:
$message = str_replace('<!--break-->', '', $message);
Maybe just after this line:
$message = $postrow[$i]['post_text'];
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#13 Wed 25 Aug, 2010 00:03 |
|
OwnageWorld 
Joined: September 2008
Posts: 82
Location:
|
 Re: [Solved]News Stopping / [break]: Stop News Where You Want
Try something like this in viewtopic:
$message = str_replace('<!--break-->', '', $message);
Maybe just after this line:
$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)....
// 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!
|
#14 Wed 25 Aug, 2010 17:35 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [Solved]News Stopping / [break]: Stop News Where You Want
Move the code after highlight, so you will have something like this:
// 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>>
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*>)#i', '<span class="highlight-w"><b>\1</b></span>', $message);<</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
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#15 Tue 31 Aug, 2010 23:15 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|