Atozed Forums
Hide version number - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Hide version number (/thread-1831.html)

Pages: 1 2


Hide version number - joel - 07-29-2020

I need to hide the version number in the html.

<meta Name="GENERATOR" content="IntraWeb v15.2.6 Serial 123124">

I think there is a property on servercontroller to do this.   Does anyone know what it is?


RE: Hide version number - MJS@mjs.us - 07-29-2020

TIWServerController OnMetaTag:

Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
  if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------



RE: Hide version number - Comograma - 07-29-2020

(07-29-2020, 07:11 AM)MJS@mjs.us Wrote: TIWServerController OnMetaTag:

Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
  if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
Doesn't work!!



RE: Hide version number - MJS@mjs.us - 07-29-2020

(07-29-2020, 09:50 AM)Comograma Wrote:
(07-29-2020, 07:11 AM)MJS@mjs.us Wrote: TIWServerController OnMetaTag:

Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
  if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
Doesn't work!!

Did a quick check... works for me.



RE: Hide version number - DanBarclay - 07-29-2020

In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:


Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
    if AMetaName='generator' then
      begin 
        vMetaValue := 'My New Stuff';
      end;
end;


Dan


RE: Hide version number - Comograma - 07-31-2020

(07-29-2020, 09:08 PM)DanBarclay Wrote: In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:


Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
    if AMetaName='generator' then
      begin 
        vMetaValue := 'My New Stuff';
      end;
end;
Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.

Dan



RE: Hide version number - joelcc - 07-31-2020

(07-31-2020, 11:19 AM)Comograma Wrote:
(07-29-2020, 09:08 PM)DanBarclay Wrote: In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:


Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
    if AMetaName='generator' then
      begin 
        vMetaValue := 'My New Stuff';
      end;
end;
Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.

Dan

It works for me without issues.

Thanks everyone.


RE: Hide version number - DanBarclay - 07-31-2020

(07-31-2020, 11:19 AM)Comograma Wrote:
(07-29-2020, 09:08 PM)DanBarclay Wrote: In Delphi, as others have posted, use the OnMetaTag event in Servercontroller:


Code:
procedure TBSIServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
    if AMetaName='generator' then
      begin 
        vMetaValue := 'My New Stuff';
      end;
end;
Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.

This should work fine for you in current releases.  What is your IW version?   As I recall this was added in one of the 15.x releases, but you can check the release blogs to be sure.   Does your ServerController list an OnMetaTag event?

Dan


RE: Hide version number - Alexandre Machado - 08-02-2020

(07-31-2020, 11:19 AM)Comograma Wrote: Doesn't work. I even try to do a trace with the debugger but it doesn't even reachs there.

I tested on your demo project and it works fine.

Have in mind that it only works in IntraWeb Ultimate licenses...


RE: Hide version number - TPiotr - 08-05-2020

(07-29-2020, 01:36 AM)joel Wrote: I need to hide the version number in the html.

<meta Name="GENERATOR" content="IntraWeb v15.2.6 Serial 123124">

I think there is a property on servercontroller to do this.   Does anyone know what it is?
Use:
Code:
procedure TIWServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AMetaName = 'GENERATOR' then vMetaValue := '';
end;
or for the future:
Code:
procedure TIWServerController.IWServerControllerBaseMetaTag(
  ASession: TIWApplication; const AMetaName: string; var vMetaValue: string);
begin
if AnsiLowerCase(AMetaName) = 'generator' then vMetaValue := '';
end;