Separate HTML templates

Separate HTML templates SearchSearch
Author Message
sam
New member
Username: Samdsouza

Post Number: 16
Registered: 08-2006
Posted on Friday, February 23, 2007 - 02:25 pm:   

Hi

Was going through the older posts and found that there can be seperate HTML templates for seperate users:

"In v5.51, you can place files in USERS\username\HTML ... and any files in that directory will override the files in the main "HTML" directory."

I checked this out in nowsms 2006 and it didnt work. Is there any specific settings required in the smsgw file?

Thanks
Sam
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6925
Registered: 10-2002
Posted on Friday, February 23, 2007 - 09:42 pm:   

Hi Sam,

I just ran a quick test, and it worked for me ...

But then I noticed something, which might be what you are encountering.

You can't override "default.htm". This file is always loaded from the root HTML directory. I suspect it has always been that way since this change was implemented ... just nobody noticed it.

If you can live with "default.htm" creating its frames, then you can replace the contents of those frames. Otherwise, I'd suggest editing the root "default.htm" to do an immediate refresh that redirects it to another page, as any page other than "default.htm" can be replaced via the user directory.

I'll see if we can get this fixed in the next update, but hopefully the work-around is simple enough.

-bn
sam
New member
Username: Samdsouza

Post Number: 17
Registered: 08-2006
Posted on Saturday, February 24, 2007 - 08:06 am:   

Hi Bryce

You are absolutely correct. The default.htm file is getting loaded. But I also noticed that the links on the left hand side in the frame which are loaded with the default.htm file also work.

I mean i created a USERS\username\HTML with only the "send text message" html page in that directory. So ideally it should only call this send text message page. But the links on the left hand side of the default.htm frame calls the pages from the root html folder..viz "Send EMS Message" was working and it did call the specific page form the root folder.

Regards
Sam
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6978
Registered: 10-2002
Posted on Monday, March 12, 2007 - 09:43 pm:   

Hi Sam,

You asked about this feature in another thread where it was noted that an update (http://www.nowsms.com/download/20070309.zip) was released that included a fix for the problem referenced above.

The fix is that when a user connects to the NowSMS web interface, NowSMS always starts the user off with "default.htm" from the root HTML directory. It will not look for an alternative "default.htm" in the user's directory.

I should probably back-up this explanation a little bit with more detail.

The feature in question was originally added for a customer who wanted to have different graphic logos displayed based upon the user account that was logging on. We thought it made more sense to offer some more control over user-specific templates for the web interface.

When a user connects to the NowSMS web interface, NowSMS looks for a corresponding page in the "HTML" subdirectory. If one does not exist, such as a request for the root page, NowSMS uses "default.htm".

The supplied "default.htm" loads a simple frame set that loads "TOCFrame.htm" with the list of links, and "Send Text Message.htm".

With the user directory overrides, NowSMS looks first for a page in USERS\username\HTML. If it finds a copy there, it uses it. Otherwise it looks in the root HTML directory.

Previous to this update, "default.htm" was always loaded from the root HTML directory.


And as I re-read my previous suggested override, I see that there was a simpler way to deal with the problem. While you could not override "default.htm", you could have made a local user-specific copy of "TOCFrame.htm" with a limited set of links.

(Of course, you can also, under the "SMS Users" account definition, limit what options are displayed. It's not 100% complete for defining all available options, but it catches the most common scenarios.)

-bn
sam
New member
Username: Samdsouza

Post Number: 22
Registered: 08-2006
Posted on Tuesday, March 13, 2007 - 01:08 pm:   

Hi Bryce

Yes. The TOCFrame does the trick. Thanks a lot.

Sam