SnippetMaster Support Forums
Return to main website
 
May 05, 2008, 02:16:47 AM
* 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 05, 2008, 02:16:47 AM

Login with username, password and session length
Search:  
Advanced search
* Home Help Search Login Register
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Hide 'view in New Window' button? « previous next »
Pages: [1] Print
Author Topic: Hide 'view in New Window' button?  (Read 158 times)
Pangdene

Posts: 21


[-] Hide 'view in New Window' button?
« on: February 22, 2008, 05:20:58 PM »

Hi,

after a user saves their edit they're presented with file has been saved message and two buttons - 'View in New Window' and 'Go back & re-edit'.

I'd like to hide/remove this first button as all this does is show the file in html code format and that will just confuse people!

How can I hide this button?

Thanks
P Smile
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2248

SnippetMaster Author


WWW
[-] Re: Hide 'view in New Window' button?
« Reply #1 on: February 23, 2008, 01:37:12 AM »

If they click the "View in New Window" button, it should popup a new browser window and load the page that was just edited.  (ie: It should not be showing HTML code.)

Can you try this on the demo and see if it works properly for you?  http://www.snippetmaster.com/demo/

If your installation is not behaving the same as the demo, can you send me an email with your installation details so i can login and take a look?

  (Send me a link to this thread, your snippetmaster login info, and step by step to recreate the problem.)

Thanks!
Report to moderator   Logged
Pangdene

Posts: 21


[-] Re: Hide 'view in New Window' button?
« Reply #2 on: February 23, 2008, 02:33:11 AM »

Hi Henri,

I think this is happening because the file the user is editing is not a fully formed html page; I'm trying this out using include files, i.e. the file contains just the html content relevant for that snippet.
This is because I want to try and keep design & content seperate and therefore in the site pages, I've used php include statements to include the inc files.
This means I can deploy design changes without overwriting updated content.

Does that make sense?

On that basis, is there anything I can do to prevent the user from using this 'View in New Window' button - or is there a better way of doing this?

Thanks Henri
Regards
P Smile
« Last Edit: February 23, 2008, 11:08:35 AM by Pangdene » Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2248

SnippetMaster Author


WWW
[-] Re: Hide 'view in New Window' button?
« Reply #3 on: February 23, 2008, 12:20:50 PM »

Ah.. yes, that makes sense.  In that case, the HTML "header stuff" is missing from the file, and so the browser does not know that it is HTML code.. and treats it just like a text file.. so it displays the text to the browser screen.

Hmm.. at the moment, there is no way to preview an "included" file in Snippetmaster, because there's no way to tell the software where the "calling" file is located.  I'm working on a solution, but it's kind of cludgy at the moment so it'll be probably the release after this next one before it's implemented.

Unfortunately, there is no way to hide the "view in new window" button, but I will add that as a feature request.   For now... only thing I can suggest is to try and let the client know that if they hit that button it is not an accurate display of what the page will actually look like.  Sorry.

Smile
Report to moderator   Logged
Pangdene

Posts: 21


[-] Re: Hide 'view in New Window' button?
« Reply #4 on: February 23, 2008, 12:29:46 PM »

Hi Henri,

thanks - I guess we'll do that for now!

May I suggest you consider that SM should be a little more 'friendly' towards it being using in this way, i.e. using includes?
I appreciate that SM may not have started out that way, but it does mean that designers can keep design & content separate.
This would make SM an even better tool for designers?  Wink

Regards
P Smile
Report to moderator   Logged
admin
Forum Administrator
*
Posts: 2248

SnippetMaster Author


WWW
[-] Re: Hide 'view in New Window' button?
« Reply #5 on: February 23, 2008, 12:36:19 PM »

I definately intend to add this functionality so that Snippetmaster can be used with "included" files.  I agree that it's something that's needed.  My problem is that there are a ton of other features already underway, so it's just a matter of getting those done and then eventually getting to this one.

Most likely I'll make it work something like this:

- You will specify in the Snippet Tag an "include" value.  This value will point to the "calling" file.  (The file that actually has the include PHP code in it.)

- When you edit the Snippet in the editor, Snippetmaster will see the include directive in the Snippet Tag, and then use that when doing the preview and "view this file".

It sounds a lot easier then it is for a number of technical reasons (which is why I've put off adding this feature for so long), but once my current workload/features are done, then I'll tackle this one and get it going.

Smile
Report to moderator   Logged
Pangdene

Posts: 21


[-] Re: Hide 'view in New Window' button?
« Reply #6 on: February 23, 2008, 12:40:08 PM »

Hi Henri,

I appreciate that you have a lot of other things on the go right now - I appreciate you considering this request.

Regards
P Smile
Report to moderator   Logged
Pages: [1] Print 
SnippetMaster Support Forums  |  General  |  General Discussion & Support  |  Topic: Hide 'view in New Window' button? « previous next »
Jump to:  

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