View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

limit irite output

Thread began 3/18/2009 10:01 am by muddysmurf | Last modified 3/19/2009 1:26 pm by muddysmurf | 1760 views | 5 replies

muddysmurf

limit irite output

I just want to put a certain amount of characters on my home page, so it doesn't take up too much room and then link to the page where my full content is written. I'm using iRite for my client to enter their data. Well I ran into a slight snag last night.

I'm using this code to shorten my iRite content:
<?php
$tmp=mysql_query("SELECT * FROM myTable ORDER BY id_myTable DESC");
while($row=mysql_fetch_array($tmp)){

$text = $row_rsmyTable'text_myTable'];

$var = ("$text");
$varlength = strlen($var);
$limit = 200;
if ($varlength > $limit) {
$var = substr($var,0,$limit);
}
}
echo "$var...";
?>

It works great, BUT there's an issue. When it cuts off the text, it apparently leaves some of the tags off that iRite writes to format the content.

Is there a way around this? or am I going to have to add another text field on the back end so they can enter a smaller portion of their content to put on the home page?

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...