NetTalk Central

Author Topic: Using variables in Netalk  (Read 5405 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Using variables in Netalk
« on: February 08, 2010, 11:24:59 PM »
I have created a generic webserver which I am deploying to (currently) 3 users. I would like to find out if the following are possible:
1. On my Index page the page title is a constant (e.g. 'CourierA') This obviously is the title that appears on the tab of the browser. I would like to make this a variable.
Question. Can I. If so how?
2. The location of my web folder can vary (e.g. 'web' or 'C:\user\files') dependant on the user. I can't insist that the users change.
Question Can I use a variable in the NetTalk or NetSimple Object extension in my Webserver procedure and if so where would I prime it? I see there is an Override Server Settings embed point which is a start.

If I can't sort out the above then I have to maintain 3 versions of the same application which is just not clarionlike ;-)

Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Using variables in Netalk
« Reply #1 on: February 09, 2010, 12:40:02 AM »
Hi Mike, If I'm reading your post right:

1. Just put in a local data (variable), like loc:pagetitle, instead of constant text.

2. You can change the location to anything you want, SO LONG AS it is a folder above your executable, and in the web (or whatever directory you specify). Your users cannot get to a folder underneath the one you specify as your web folder.

That said, I am not entirely sure I've read correctly, what you really are trying to accomplish. Please elaborate if I didn't catch on to what you want to do.
Mike Grigsby
Credify Systems
Central Oregon, USA

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Using variables in Netalk
« Reply #2 on: February 09, 2010, 12:53:13 AM »
For anyone who is interested.
1. is sorted. Create a table with a field which stores the location of the web folder. Open the file in the Webserver procedure, read the record after opening the file and in the Override default server settings embed type in s_web._SitesQueue.Defaults.WebFolderPath = CLIP(fieldnameofweblocation). Close the table.
2. is a problem The header routine is
Header Routine
  packet = p_web.w3Header()
  ! Start of "W3 Header Override"
  ! [Priority 5000]

  ! End of "W3 Header Override"
  packet = clip(packet) & '<head>'&|
      '<title>'&clip('Jedidja Couriers')&'</title>'&|
      '<meta http-equiv="Content-Type" content="text/html; charset='&clip(p_web.site.HtmlCharset)&'" /><13,10>'
  packet =  clip(packet) & p_web.IncludeStyles()
  packet =  clip(packet) & p_web.IncludeScripts()
  packet = clip(packet) & '</head><13,10>'
  p_web.ParseHTML(packet,1,0,Net:SendHeader+Net:DontCache)
  packet = ''
which doesn't seem to allow the changing of the title. I hope I am wrong. Can anyone comment?

Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Using variables in Netalk
« Reply #3 on: February 09, 2010, 01:19:17 AM »
Mike
Thanks for the reply. I was putting in my comment at the same time as you replied. My problem with the second issue is that if I call the page name on my index page  'terry' for example then that is the name that appears on the web browser. If however I am another client using the webserver I want 'Mike' to appear as the name.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Using variables in Netalk
« Reply #4 on: February 09, 2010, 01:45:11 AM »
Store your page title in a SSV and then display using this Tag instead of text.

<!-- Net:s:SessionVariable -->

see docs for more info

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Using variables in Netalk
« Reply #5 on: February 13, 2010, 08:07:10 AM »
Thanks Kevin, or as we say in South Africa, Baie dankie
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186