www.uburst.com www.uburst.com

"Custom HTML "

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

uDirectory Configuration Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Custom HTML "
Posted by Bob on Sep-14-00 at 05:46 AM (EST)
I have the deluxe version and have encountered a fairly significant problem that I cannot resolve. When I type my HTML in the box for the header it does not recognize my line feeds. The result is that when the page is displayed, all of the HTML is strung out on one line thus making much of my code not function properly. I have tried cutting, pasting, typing one line at a time and pressing enter after every line with no avail. After it saves the HTML it strings it all out on one line. Is there a solution to this problem?

Thanks,
Bob

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Custom HTML, Bill Weiner, Sep-14-00, (1)
Tags, Bob, Sep-14-00, (2)
RE: Tags, Bill Weiner, Sep-15-00, (3)
Custom HTML & Java, Bob, Sep-17-00, (4)
Custom HTML & Java, Bill Weiner, Sep-18-00, (5)
Fair Enough, Bob, Sep-18-00, (6)
Dumb Question, Bob, Sep-18-00, (7)
RE: Custom HTML & Java, Bill Weiner, Sep-18-00, (8)
Hey it works, Bob, Sep-21-00, (9)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Custom HTML"
Posted by Bill Weiner on Sep-14-00 at 07:30 AM (EST)
Those "TOP HTML", "MIDDLE HTML" and "BOTTOM HTML" fields are special fields in that you actually have to type in the HTML exactly as you want the HTML inserted on the page. That is, instead of using carriage returns to go to the next line.... you'll actually have to use the HTML tag for that:

(BR)

...where the ( ) are actually greater-than/less-than signs (this forum doesn't let me post greater-than/less than signs).

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "Tags"
Posted by Bob on Sep-14-00 at 03:19 PM (EST)
How else would someone type HTML? That is exactly what I am doing. It looks fine until the admin function saves it. When the code is written to the output it strings everything accross one line. Most HTML is fine, but much of Java scripting must start on new lines.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "RE: Tags"
Posted by Bill Weiner on Sep-15-00 at 05:58 AM (EST)
Due to the way uDirectory saves data, all carriage returns (\n and \r control characters) are removed from those HTML fields before the data is saved. I'm not sure how that will affect your JavaScripts, but I believe JavaScripts ignore all spaces, tabs, and newlines (except those that are part of string constants)... so maybe you can just make sure that you use a semicolon (;) after each statement.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "Custom HTML & Java"
Posted by Bob on Sep-17-00 at 08:04 AM (EST)
I appreciate the info, but the Java Scripts that I am using have the proper semicolons in place. They are working scripts, not new custom written scripts. Basic Java Scripts that display date and time will not work under the uDirectory logic.

I guess the larger question here is; why are you stripping those characters out? That is a guaranteed runtime error for Java Scripts. This seems rather contradictory to me because you print the uDirectory HTML portion WITH the line feeds. This can be confirmed by the print code commands in the uDirectory cgi script and by simply "viewing the source" in any browser.

In addition, I currently use a variety of Java scripts with 8 other cgi packages on several of my other sites that work fine because they allow custom HTML to be inserted in the proper format, which is the same way that they print their portion of the output pages. uDirectory is the first script package that I have seen that handles custom HTML in this fashion.

Obviously, this limitation should be explained in the sales package. For the more advanced sites, it is very important to have the option of using advanced custom HTML (which may include forms, java scripts, etc.)in the proper format.

Otherwise, perhaps there is a basic mod that will allow for inserting custom HTML and preserving the format? In other words, can we make a mod to stop the script from stripping the line feeds out and printing the HTML in the same format that it was inserted? I mean after all, you are inserting those characters when you print the uDirectory portion of the output pages. Why not treat custom HTML in the same manner? Seems like a fairly big oversight to me.

Sign Me,
Hope we can work this out!

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . "Custom HTML & Java"
Posted by Bill Weiner on Sep-18-00 at 05:42 AM (EST)
The reason carriage returns are stripped out of the custom HTML fields is due to the way data is stored in the data files (not to be confused with the html files). That is, each configurable category field is stored on a single line in the data file separated from the data keyword via a "bar" delimiter.

As for the use of carriage returns in the custom HTML fields, regular HTML (including forms) do not use carriage returns except in some rare cases like using the "PRE" HTML tags. As for JavaScripts, for the most part, they too do not need carriage returns providing you have the proper semi-colons. In fact, are you sure it is the carriage returns that are causing the problem with your JavaScripts?

What may actually be the problem is that as part of the validation of the HTML fields, we also convert double quotes (") to single quotes ('). This was primarily done so that when you chose to "Edit" a category, the HTML is properly displayed on the "Edit" category form. For the most part, the conversion of double quotes to single quotes is transparent for the custom HTML fields...however, that has caused some problems before with others using JavaScripts... particularly if they originally had single quotes embedded between the double quotes. In that case, a little adjusting of that portion of the custom HTML can usually get around the problem.

So I would suggest submitting a support request with the JavaScript that you are trying to insert in the custom HTML fields.... along with your URL so that we can see how your HTML is being output....and then we may be able to suggest a few changes to get the script to work without the double quotes. Or at worse case, modify the validate_html() subroutine to accomodate your specific needs.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
6 . "Fair Enough"
Posted by Bob on Sep-18-00 at 06:30 AM (EST)
How do I submit a support request?
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
7 . "Dumb Question"
Posted by Bob on Sep-18-00 at 06:40 AM (EST)
I know --- dumb question. Don't reply! I figured it out.

Thanks

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
8 . "RE: Custom HTML & Java"
Posted by Bill Weiner on Sep-18-00 at 11:06 AM (EST)
I took a look at the code you sent and I believe I see what is causing the problem.... the // comments. That is, when uDirectory strips out the carriage returns... the // comments get put on the same line...and therefore everything after the // is being treated as a comment.... Thus the resulting "QbDcTEST is not defined" JavaScript message.

So to get around that problem, just try deleting those two comment lines in the JavaScript.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
9 . "Hey it works"
Posted by Bob on Sep-21-00 at 07:03 AM (EST)
Just wanted to make sure and post a concluding response in case any other folks, or prospective uDirectory buyers, are following this saga. I will take it like a man and say --- yes you were right --- the comments where the culprit in our Java Scripts and I would like to apologize for being a little testy.

Great product and super support!

Thanks a mil Bill!

Bob

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.