SnippetMaster Support Forums
Return to main website
 
December 18, 2007, 07:35:24 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?
December 18, 2007, 07:35:24 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: how to stop snippet master from apending php files with DOC Type etc « previous next »
Pages: [1] Print
Author Topic: how to stop snippet master from apending php files with DOC Type etc  (Read 242 times)
altoyes

Posts: 11


[-] how to stop snippet master from apending php files with DOC Type etc
« on: August 28, 2007, 07:12:09 PM »

hi all:

love this snippet master
just learning to use it now

question:
when i edit a php file, snippet master automatically appends html code
how do i stop it doing this?

thankyou for your time
alto
===============

at the beginning ie 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


and at the end ie

</body>
</html>
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #1 on: August 28, 2007, 08:28:13 PM »

By default, snippetmaster will try to open your files into the WYSIWYG editor.  The editor tries to produce xhtml compliant code, which means that if any required html code (like body tags..) are missing, then it will be added.

The possible solutions to stop this are:

1. Change the default so that files are opened into a regular text box instead of the wysiwyg editor.

2. Use the Snippet Tag feature, and then specify the "WYSIWYG="no"" attribute, which will force Snippetmaster to load the file into a plain text editor only.  (When selecting the file for editing, be sure to select the SNIPPET.  You can find info on snippet tags and attributes here: http://www.snippetmaster.com/documentation/snippet-tag-attributes.html )
Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #2 on: August 28, 2007, 09:47:06 PM »

ok, i will try this out, thankyou


btw is snippetmaster meant to be used with php
or is it usually used with html only?

alto



« Last Edit: August 28, 2007, 09:51:56 PM by altoyes » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #3 on: August 28, 2007, 09:50:38 PM »

Snippetmaster is an HTML editor, and does not support PHP code. 

If your files include PHP code, then I recommend using the "Snippet Tags" to mark only the html areas as editable.  This way, it will not mess up your php code since it will not be edited...

Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #4 on: August 28, 2007, 09:52:32 PM »

Snippetmaster is an HTML editor, and does not support PHP code. 

If your files include PHP code, then I recommend using the "Snippet Tags" to mark only the html areas as editable.  This way, it will not mess up your php code since it will not be edited...




with option 2
is this what you meant? is this the correct code?

<!-- #BeginSnippet name="Name the snippet here" "WYSIWYG="no" -->

        Editable HTML goes between the snippet tags ...

<!-- #EndSnippet -->
« Last Edit: August 28, 2007, 09:57:27 PM by altoyes » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #5 on: August 28, 2007, 09:55:58 PM »

Yes, this is correct.  Except you have extra quotes around the wysiywg tag.  Please see this link for documentation on how the different Snippet Tag Attributes work:

http://www.snippetmaster.com/documentation/snippet-tag-attributes.html

Basically, what you want to do is mark a section of your text file (php code) as "editable" and then tell SnippetMaster to load it in a regular text box instead of the default wysiwyg editor.



Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #6 on: August 28, 2007, 09:58:49 PM »

Yes, this is correct.  Except you have extra quotes around the wysiywg tag.  Please see this link for documentation on how the different Snippet Tag Attributes work:

http://www.snippetmaster.com/documentation/snippet-tag-attributes.html

Basically, what you want to do is mark a section of your text file (php code) as "editable" and then tell SnippetMaster to load it in a regular text box instead of the default wysiwyg editor.


yes i understand all that
thanks for that link
i will look at it thoroughly
how long are you online for?


« Last Edit: August 28, 2007, 10:14:44 PM by altoyes » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #7 on: August 28, 2007, 10:04:44 PM »

I'm online/offline periodically at all times.  Smile  I don't really have a regular schedule...
Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #8 on: August 28, 2007, 10:15:05 PM »

thankyou,

quesion
will this WISIWIG=no
work in the free version?

answer
yes
« Last Edit: August 28, 2007, 10:29:24 PM by altoyes » Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #9 on: August 28, 2007, 10:21:45 PM »

question

i am trying to give my user access - regualar user just for the snippets.

in the settings, what does this mean, is there a snippet list that i should be using?
"
 listed in the Users access control list of the Snippet Tag"


answer
once you create a snippet in the page, with the users name attribute,
 the pages automatically are listed in the Users access control
« Last Edit: August 28, 2007, 10:31:45 PM by altoyes » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2086

SnippetMaster Author


WWW
[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #10 on: August 28, 2007, 11:10:42 PM »

I'm not sure I understand your question.  Any user that is listed in the "Users" Snippet Tag Attribute will be able to edit the snippet.

Let me know if I did not answer your question.  Smile
Report to moderator   Logged
altoyes

Posts: 11


[-] Re: how to stop snippet master from apending php files with DOC Type etc
« Reply #11 on: August 29, 2007, 02:39:39 AM »

hi admin

i was just answering my own question 
too long online Shocked
i could not understand what the following meant
yet all came clear once i logged into the users access
- ah hah ! thats where the list of snippets lives!  Razz

 "listed in the Users access control list of the Snippet Tag"

this is a brilliant programme
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: how to stop snippet master from apending php files with DOC Type etc « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!