SnippetMaster Support Forums
Return to main website
 
May 21, 2012, 02:39:18 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?
May 21, 2012, 02:39:18 PM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  Pre-Sales Questions  |  Topic: Making SM not execute a certain JS « previous next »
Pages: [1] Print
Author Topic: Making SM not execute a certain JS  (Read 2491 times)
Frank62

Posts: 17


[-] Making SM not execute a certain JS
« on: March 13, 2008, 04:47:33 PM »

Hey Henry,

Your product has a good chance of becoming my new DIY website maintenance program that I need for my customers. But one thing needs to solved.

The sites I generally make consist of one mother page into which different content files are loaded. That can be done by means of PHP content includes or just loading content pages into an iframe in the mother page. For most customers, it comes down to the second option. To have those content pages always appear inside the mother page, I have to put a redirect javascript in their heads, which looks something like this:

if (parent.frame.length == 0) {window.location = "index.php?content=pagename.html"}

[In the iframe tag then comes something like this: src="<?php echo($content)?>". (I'm doing this all off the top of my head.)]

Now, I'm assuming that SnipperMaster (SM) will execute that javascript too, won't it? And that would mean that my content pages cannot be edited with SM. Or is there a way to have SM not execute the script?

Thanks in advance,
Frank
 
« Last Edit: March 13, 2008, 06:16:09 PM by Frank62 » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3069

SnippetMaster Author


WWW
[-] Re: Making SM not execute a certain JS
« Reply #1 on: March 14, 2008, 12:58:15 AM »

What you could do is use the Snippet Tag feature so that only the portion of code within the body tag (or any other specifically editable region of HTML code) can be editable.  This way, the javascript is not even loaded into the editor, and the customer can't touch anything that you don't allow them to touch.

I hope that makes sense?  You can read more about Snippet Tags here:

http://www.snippetmaster.com/documentation/snippet-tags.html

Henri.  Smile
Report to moderator   Logged
Frank62

Posts: 17


[-] Re: Making SM not execute a certain JS
« Reply #2 on: March 14, 2008, 06:33:02 AM »

OK, that sounds good.

I knew about the Snippet Tags, but I figured that SM would load the whole page, and only let the part between the tags be edited. But if it only loads that part, then that problem is solved.

Two more questions, even though they are not crucial for buying SM:

* Any idea when the spell check feature will be ready?
* I read in another thread that you had deleted two rows of editing buttons (functions) and had put the wanted buttons in one row. Is that something we can do ourselves, as webmasters, and if so, where do I find how to do that? As yet, I only found how to delete/add buttons from/to their row, but now manage rows.
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3069

SnippetMaster Author


WWW
[-] Re: Making SM not execute a certain JS
« Reply #3 on: March 14, 2008, 09:38:12 AM »

Hello,

For the spell check, I hope to have that working for the next release in a few weeks.

Yes, you can modify the editor toolbar buttons by using the "Editor Groups" feature in Snippetmaster.  (Login as admin, click the "admin" link, then Editor Groups" toolbar. Scroll to the bottom of that page and the toolbar buttons are there.

Basically, just put whatever toolbar buttons you want int he top row and leave the bottom rows blank.  This will cause the bottom two rows to be not displayed, and only the top one will be displayed.  I hope that makes sense.  If you leave the top row blank, but have icons on the bottom row(s), then the top row will still be shown, even though it's empty.

Let me know how things go.
Report to moderator   Logged
Frank62

Posts: 17


[-] Re: Making SM not execute a certain JS
« Reply #4 on: March 14, 2008, 10:41:54 AM »

Cool, Henri!

SM is in! It may take a few weeks, but you got yourself new customer, that will sell more copies in the future.

See ya later.   
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 3069

SnippetMaster Author


WWW
[-] Re: Making SM not execute a certain JS
« Reply #5 on: March 14, 2008, 10:48:12 AM »

Sounds great!

If you get stuck with anything, just let me know.

Cheers!  Smile
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  Pre-Sales Questions  |  Topic: Making SM not execute a certain JS « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!