Atozed Forums

Full Version: Hide version number
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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?
TIWServerController OnMetaTag:

Code:
//---------------------------------------------------------------------------
void __fastcall TIWServerController::IWServerControllerBaseMetaTag(TIWApplication *ASession, const UnicodeString AMetaName, UnicodeString &vMetaValue)
{
  if(AMetaName == "generator") { vMetaValue = ""; }
}
//---------------------------------------------------------------------------
(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!!
(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.
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
(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
(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.
(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
(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...
(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;
Pages: 1 2