EN - General supportNews length


18.01.2012, 14:30 - DeBeer - webSPELL newbie - 70 Posts
Hello everyone,

Who can help me with my problem?
How can i put a maximum letters in my news? You need press READ MORE to see the full news.

I want it without [break] codes or what ever!
It must go automatic!

Sorry for my bad english

DeBeeR
 
18.01.2012, 15:24 - dlite - webSPELL newbie - 80 Posts
check your admin center. You can find all options for the news length under the title "settings".
 
18.01.2012, 15:36 - Nanny - webSPELL user - 410 Posts
dlite wrote:

check your admin center. You can find all options for the news length under the title "settings".


No !!!


That can be help

open news.php and search

Code:
1.
$content = toggle($content, $ds['newsID']); 


under this code you will need to paste

Code:
1.
2.
3.
4.
if(mb_strlen($content)>200) {
            $content=mb_substr($content, 0, 200);
            $content.='...';
        }



Readmore link
index.php?site=news_comments&newsID=$newsID


$download = Book.exe if "brain.exe" no FileExists then $download EndIf If $download = fail then gtfo

 
18.01.2012, 16:40 - DeBeer - webSPELL newbie - 70 Posts
Nanny wrote:

dlite wrote:

check your admin center. You can find all options for the news length under the title "settings".


No !!!


That can be help

open news.php and search

Code:
1.
$content = toggle($content, $ds['newsID']); 


They are 2 line's with $content = toggle($content, $ds['newsID']);

First of the second?

DeBeeR

under this code you will need to paste

Code:
1.
2.
3.
4.
if(mb_strlen($content)>200) {
            $content=mb_substr($content, 0, 200);
            $content.='...';
        }



Readmore link
index.php?site=news_comments&newsID=$newsID

 
18.01.2012, 16:58 - Nanny - webSPELL user - 410 Posts
Under both

$download = Book.exe if "brain.exe" no FileExists then $download EndIf If $download = fail then gtfo

 
18.01.2012, 19:24 - DeBeer - webSPELL newbie - 70 Posts
Its done but i see the link..

if(mb_strlen($content)>200) {
$content=mb_substr($content, 0, 200);
$content.='index.php?site=news_comments&newsID=$newsID';
}

No readmore button....
http://templates.revengeofsoldiers.nl
 
18.01.2012, 19:45 - BlueaKaKev - Moderator - 1711 Posts
DeBeer wrote:

Its done but i see the link..

if(mb_strlen($content)>200) {
$content=mb_substr($content, 0, 200);
$content.='index.php?site=news_comments&newsID=$newsID';
}

No readmore button....
http://templates.revengeofsoldiers.nl


If you have a Image for the Readmore button try this:
Code:
1.
2.
3.
4.
 if(mb_strlen($content)>200) {
            $content=mb_substr($content, 0, 200);
            $content.='<a href="index.php?site=news_comments&newsID='.$ds['newsID'].'"><img src="lintotheimage" alt="" border="0" /></a>';
        }


but if you have not a image, use this:

Code:
1.
2.
3.
4.
 if(mb_strlen($content)>200) {
            $content=mb_substr($content, 0, 200);
            $content.='<a href="index.php?site=news_comments&newsID='.$ds['newsID'].'">Readmore</a>';
        }


 
18.01.2012, 20:03 - DeBeer - webSPELL newbie - 70 Posts
How can i give my read more button a position?
 
18.01.2012, 22:33 - Pascalmh - Administrator - 3068 Posts
http://weseo.de/blog/read-more
 
17.02.2012, 23:50 - Bane17 - webSPELL user - 126 Posts
DeBeer wrote:

How can i give my read more button a position?


I would liek to know the same lächeln www.iplaynetwork.co.uk/league -> I would like the 'Readmore' to appear on the same line as 'no comments' on the far right.
 
20.02.2012, 10:58 - Bane17 - webSPELL user - 126 Posts
BUMP!
 
20.02.2012, 11:40 - Pascalmh - Administrator - 3068 Posts
I would liek to know the same lächeln www.iplaynetwork.co.uk/league -> I would like the 'Readmore' to appear on the same line as 'no comments' on the far right.


Pascalmh wrote:

http://weseo.de/blog/read-more


Instead of doing this:
Code:
1.
2.
3.
4.
/* Read More by weSEO.de / Pascalmh.de
 http://weseo.de/blog/read-more */
$foo=explode('[break]', $content);
$content = $foo[0].'<a href="index.php?site=news_comments&newsID='.$newsID.'">Read More</a>';


Do this:
Code:
1.
2.
3.
4.
5.
6.
/* Read More by weSEO.de / Pascalmh.de
 http://weseo.de/blog/read-more */
$foo=explode('[break]', $content);
$content = $foo[0];
$readmorelink = '';
if($content!=$foo[0]) $readmorelink = '<a href="index.php?site=news_comments&newsID='.$newsID.'">Read More</a>';


Last line checks if you used [break] in your news, if so $readmorelink is set.
What you've got to do is add $readmorelink into your templates/news.html
 
20.02.2012, 12:41 - Bane17 - webSPELL user - 126 Posts
Pascalmh wrote:

I would liek to know the same lächeln www.iplaynetwork.co.uk/league -> I would like the 'Readmore' to appear on the same line as 'no comments' on the far right.


Pascalmh wrote:

http://weseo.de/blog/read-more


Instead of doing this:
Code:
1.
2.
3.
4.
/* Read More by weSEO.de / Pascalmh.de
 http://weseo.de/blog/read-more */
$foo=explode('[break]', $content);
$content = $foo[0].'<a href="index.php?site=news_comments&newsID='.$newsID.'">Read More</a>';


Do this:
Code:
1.
2.
3.
4.
5.
6.
/* Read More by weSEO.de / Pascalmh.de
 http://weseo.de/blog/read-more */
$foo=explode('[break]', $content);
$content = $foo[0];
$readmorelink = '';
if($content!=$foo[0]) $readmorelink = '<a href="index.php?site=news_comments&newsID='.$newsID.'">Read More</a>';


Last line checks if you used [break] in your news, if so $readmorelink is set.
What you've got to do is add $readmorelink into your templates/news.html


Thanks for the reply, but like the original poster, I want my news posts to automatically break after X amount of characters rather than having to manually type [break] in the middle of every news post.

I have therefore used the code provided by Nanny to achieve this:

if(mb_strlen($content)>200) {
$content=mb_substr($content, 0, 200);
$content.='...';
}
 
25.04.2012, 13:54 - DeBeer - webSPELL newbie - 70 Posts
PUSH!

FIXED!