[GH-ISSUE #800] What Replaced 'HTTP_TEXT'? #669

Open
opened 2026-02-28 01:26:29 +03:00 by kerem · 12 comments
Owner

Originally created by @ghost on GitHub (Jan 8, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/800

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Description

One used to be able to edit HTTP_TEXT[] PROGMEM inside WiFiManager.h to add text, now with latest version it simply says "WiFiManager" and HTTP_TEXT[] is gone. What has replaced it, as a way to add customized text to the landing page BEFORE the calling /wifi/ form action?

Settings in IDE

Module: Wemos D1

Additional libraries: N/A

Originally created by @ghost on GitHub (Jan 8, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/800 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [X] Master - [ ] Development **Esp8266/Esp32:** - [X] ESP8266 - [ ] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [X] ESP12 E/F/S (nodemcu, wemos, feather) - [ ] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [X] 2.4.0 - [ ] staging (master/dev) ### Description One used to be able to edit HTTP_TEXT[] PROGMEM inside WiFiManager.h to add text, now with latest version it simply says "WiFiManager" and HTTP_TEXT[] is gone. What has replaced it, as a way to add customized text to the landing page BEFORE the calling /wifi/ form action? ### Settings in IDE Module: Wemos D1 Additional libraries: N/A
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

no idea, development version might be easier to modify

<!-- gh-comment-id:452342085 --> @tablatronix commented on GitHub (Jan 8, 2019): no idea, development version might be easier to modify
Author
Owner

@ghost commented on GitHub (Jan 8, 2019):

Development branch moved the entries to strings.h but there is still no HTTP_TEXT[] entry.

It would appear that it comes from WiFiManager.cpp lines 423 to 434, but changing this and rebuilding does not reflect any changes.

<!-- gh-comment-id:452355663 --> @ghost commented on GitHub (Jan 8, 2019): Development branch moved the entries to strings.h but there is still no HTTP_TEXT[] entry. It would appear that it comes from WiFiManager.cpp lines 423 to 434, but changing this and rebuilding does not reflect any changes.
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

you mean the header?

not sure what you want to change but it is

HTTP_ROOT_MAIN in strings_en.h

but hardcoded in .cpp in the master branch

<!-- gh-comment-id:452362009 --> @tablatronix commented on GitHub (Jan 8, 2019): you mean the header? not sure what you want to change but it is HTTP_ROOT_MAIN in strings_en.h but hardcoded in .cpp in the master branch
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

you can also set setCustomHeadElement() but it will not replace just append the to <head>
should I add a way to replace the page mast head ?

<!-- gh-comment-id:452362658 --> @tablatronix commented on GitHub (Jan 8, 2019): you can also set `setCustomHeadElement()` but it will not replace just append the to `<head>` should I add a way to replace the page mast head ?
Author
Owner

@ghost commented on GitHub (Jan 8, 2019):

That would be great if it could replace instead of appending.

I'd also request removing the _apName and <h3> hardcoded text and simply replacing it with an entry from PROGMEM. I did like HTTP_TEXT[] as it was named well and obvious what it did.

String page = FPSTR(HTTP_HEAD);
page.replace("{v}", "Options");
page += FPSTR(HTTP_SCRIPT);
page += FPSTR(HTTP_STYLE);
page += _customHeadElement;
page += FPSTR(HTTP_HEAD_END);
page += String(F("<h1>"));
page += _apName;
page += String(F("</h1>"));
page += String(F("<h3>WiFiManager</h3>"));
page += FPSTR(HTTP_PORTAL_OPTIONS);
page += FPSTR(HTTP_END);
<!-- gh-comment-id:452366983 --> @ghost commented on GitHub (Jan 8, 2019): That would be great if it could replace instead of appending. I'd also request removing the `_apName` and `<h3>` hardcoded text and simply replacing it with an entry from PROGMEM. I did like `HTTP_TEXT[]` as it was named well and obvious what it did. ``` String page = FPSTR(HTTP_HEAD); page.replace("{v}", "Options"); page += FPSTR(HTTP_SCRIPT); page += FPSTR(HTTP_STYLE); page += _customHeadElement; page += FPSTR(HTTP_HEAD_END); page += String(F("<h1>")); page += _apName; page += String(F("</h1>")); page += String(F("<h3>WiFiManager</h3>")); page += FPSTR(HTTP_PORTAL_OPTIONS); page += FPSTR(HTTP_END); ```
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

were you using kentaylors branch maybe ?

<!-- gh-comment-id:452367997 --> @tablatronix commented on GitHub (Jan 8, 2019): were you using kentaylors branch maybe ?
Author
Owner

@ghost commented on GitHub (Jan 8, 2019):

Initially I was using an old branch that still had HTTP_TEXT, but went an did a full board (to 2.4.2) and library (to 0.14) update and my customized changes didn't apply. Was always with official releases though.

<!-- gh-comment-id:452370056 --> @ghost commented on GitHub (Jan 8, 2019): Initially I was using an old branch that still had HTTP_TEXT, but went an did a full board (to 2.4.2) and library (to 0.14) update and my customized changes didn't apply. Was always with official releases though.
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

I don't think so, must have been a PR or something, no way text would have been moved from .h to .cpp and I see no history of HTTP_TEXT

<!-- gh-comment-id:452372137 --> @tablatronix commented on GitHub (Jan 8, 2019): I don't think so, must have been a PR or something, no way text would have been moved from .h to .cpp and I see no history of HTTP_TEXT
Author
Owner

@ghost commented on GitHub (Jan 8, 2019):

You're right, I searched through and never saw HTTP_TEXT either. Not sure, but anyway, if we can make these changes, then it will be easier for users to customize the pages.

<!-- gh-comment-id:452373240 --> @ghost commented on GitHub (Jan 8, 2019): You're right, I searched through and never saw HTTP_TEXT either. Not sure, but anyway, if we can make these changes, then it will be easier for users to customize the pages.
Author
Owner

@tablatronix commented on GitHub (Jan 8, 2019):

well that header is only on root, do you expect some thing on every page?

<!-- gh-comment-id:452373381 --> @tablatronix commented on GitHub (Jan 8, 2019): well that header is only on root, do you expect some thing on every page?
Author
Owner

@ghost commented on GitHub (Jan 8, 2019):

No, it's fine to simply leave it on root.

I believe HTTP_HEAD and HEAD_END is on every page and can be used to "globally" customize every page.

<!-- gh-comment-id:452374569 --> @ghost commented on GitHub (Jan 8, 2019): No, it's fine to simply leave it on root. I believe `HTTP_HEAD` and `HEAD_END` is on every page and can be used to "globally" customize every page.
Author
Owner

@ghost commented on GitHub (Feb 25, 2019):

https://github.com/tzapu/WiFiManager/pull/835

<!-- gh-comment-id:466838580 --> @ghost commented on GitHub (Feb 25, 2019): https://github.com/tzapu/WiFiManager/pull/835
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#669
No description provided.