close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

limit irite output

Thread began 3/18/2009 10:01 am by muddysmurf | Last modified 3/19/2009 1:26 pm by Ray Borduin | 1907 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?

Sign in to reply to this post

Ray BorduinWebAssist

You could write a function to automatically add close tags to any opened tags that were not closed properly and make sure you don't ever cut out mid-tag.... but if you aren't a fairly good scriptor it may be difficult to accomplish. Certainly the small amount of script you have now wouldn't suffice.

Php has a relatively good xml parsing engine, so that would certainly help... you may even be able to find a script that does this by searching the web it can't be all that uncommon.

Sign in to reply to this post

muddysmurf

another problem :( i'm feeling pretty stupid on this one. lol

It has to do with uploading images with irite. I've got it working locally on php/mysql/apache. I change everything over that I need to, to upload it, and the image doesn't show up.

I have the irite folder inside an admin folder. Inside the irite folder is the userfiles folder that the images go into.

admin/iRite/userfiles

Now, i add /public_html in front of admin and it still doesn't work. I grabbed that link directly off the ftp address...am I missing something?

Sign in to reply to this post

Ray BorduinWebAssist

Do the images get uploaded, they just don't display?

If you view the generated src for the image on the page, what exactly is wrong with it?

Sign in to reply to this post

muddysmurf

I upload everything as is with the config.php change to the server and I would think that the image would show up just like it does locally, but it doesn't.

Well I go to the update page, and go to upload a new image but it gives me an error of
Error creating folder "/public_html/admin/iRite/userfiles/image/" (Can't create directory)

Now the question is, where does the image folder come from? It's not written in the config.php file for iRite. Both the absolute and relative goes to /userfiles.

and I noticed that iRite makes a new folder named userfilesimages but then that link does userfiles/images (when trying to upload the images, I've tried doing the image info tab and the upload tab, both with the same error message)

I've went in and changed the permissions to 777 on all thinking that would help write to the folder, but it doesn't.

I've even tried adding the http address fully to the userfiles folder and it does the same error message.

Sign in to reply to this post

Ray BorduinWebAssist

Try manually creating that folder on the server. Maybe it will work once it exists and you won't have to worry about why it wasn't created properly.

Sign in to reply to this post

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...