SnippetMaster Support Forums
Return to main website
 
February 19, 2018, 04:15:30 PM
* Show unread posts since last visit.
* Show new replies to your posts.
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 19, 2018, 04:15:30 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Strips html? « previous next »
Pages: [1] Print
Author Topic: Strips html?  (Read 5582 times)
Brad

Posts: 4


[-] Strips html?
« on: August 29, 2002, 10:10:09 PM »

First of all, let me just say that I've been looking for something like this for a *long* time.  Let me be the first to congratulate you for starting this project.  Nice job!

Now for the question.  Does this app strip existing html inside the <snippet> tags?  I only ask because it appears to be doing just that on one of my pages.  For example:

Code:

<SNIPPET>
<table width="50%" cellspacing="2" cellpadding="2" border="0">
  <tr><!-- Row 1 -->
    <td align="center">First cell I'd like a client to be able to edit...</td>
  </tr>
  <tr><!-- Row 2 -->
    <td align="center" bgcolor="#E8F0F0">Second cell I'd like a client to be able to edit...</td>
  </tr>
</table>
</SNIPPET>


After updating this page via Snippetmaster, I find that the table tags are removed and the only thing remaining is the text.  I suppose I could simply move the snippet tags to surround only the text, but in the example above I have two cells that the client needs to edit.  So how do I get around this?
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Strips html?
« Reply #1 on: August 29, 2002, 10:52:36 PM »

Hi there!  Thanks for the compliment!

I'm not sure what is causing the problem you describe.. I've created a test page that seems to be working perfectly with the code you supplied.  You can see it by going through the demo on the site and then selecting the "test1.html" file.

The contents of the whole html file is here:
Code:
<html>
<head>
<title>SnippetMaster Demo Page</title>
</head>
<body>
<SNIPPET>
<table width="50%" cellspacing="2" cellpadding="2" border="0"> <tr><!-- Row 1 -->
<td align="center">First cell I'd like a client to be able to edit...</td></tr>
<tr><!-- Row 2 --> <td align="center" bgcolor="#E8F0F0">Second cell I'd like a
client to be able to edit...</td></tr> </table>
</SNIPPET>
</body>
</html>

Can you make sure your snippet tags are on their own line?
Report to moderator   Logged
Brad

Posts: 4


[-] Strips html?
« Reply #2 on: August 29, 2002, 11:34:06 PM »

Thanks for the quick reply!  I tried it again at your suggestion and everything is fine now.  I also figured out what had caused the problem initially.

I had placed the <snippet> tags *inside* the table, trying to only give the client access to the table's 2nd row, like this:

Code:

<table width="50%" cellspacing="2" cellpadding="2" border="0">
  <tr><!-- Row 1 -->
    <td align="center">I don't want the client to be able to edit this row...</td>
  </tr>
<SNIPPET>
  <tr><!-- Row 2 -->
    <td align="center" bgcolor="#E8F0F0">I'd like the client to be able to edit this one though...</td>
  </tr>
</SNIPPET>
</table>


As it turns out, this can't be done with the script.  That's what was wiping out the table code altogether.  Once I placed the <snippet> tags outside the <table> tags, everything magically worked.  This may be something you want to look into, or not.  For this particular site, it's not a big deal since I know the client well.  It might come in handy sometime if we were able to put the <snippet> tags "intra-table" though.  Just a thought.  Either way, it's still a great script.
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Strips html?
« Reply #3 on: August 29, 2002, 11:54:59 PM »

Glad to hear it's working ok now.

I think your suggestion is a good one, unfortunately it will never work because SnippetMaster is designed to work with complete HTML tags.  It uses an HTML engine to render the code inside the WYSIWYG editor, so it the HTML is incomplete then it won't work.  

One possible "workaround" is to use a server include for your text inside the cell, and then enable the text file with SnippetMaster.

For example, inside your cell you could use an SSI call to include a file called, "text.txt".  Then inside your text.txt file you would put the snippet tags around whatever text you wanted to enable.

Hope that helps.  Don't forget to rate the script or write a review at hotscripts if you have a chance.  

http://www.hotscripts.com/review/?linkid=17534&returnto=http://www.hotscripts.com/Detailed/17534.html

or rank the program: http://www.hotscripts.com/Detailed/17534.html

Thanks!
Report to moderator   Logged
Brad

Posts: 4


[-] Strips html?
« Reply #4 on: August 30, 2002, 12:18:02 AM »

Oh I see.  Well if it works that way then you're right, the snippet tags must enclose a complete HTML "thought" to work properly.

Once again, thanks for the help - I'm hooked now so you'll probably hear from me again sometime.  Wink

Oh, and consider it rated.  Cool
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3169

SnippetMaster Author


WWW
[-] Strips html?
« Reply #5 on: August 30, 2002, 12:21:28 AM »

Thanks Brad.  If you have any other suggestions or come across bugs or whatever.. don't forget to let me know.

Cheers!
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Strips html? « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!