[GH-ISSUE #1029] Alternate method for startWebPortal #876

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

Originally created by @GiPe66 on GitHub (Apr 4, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1029

Hi,

It should be nice to have an alternate method startWebPortal(const char *title) to specify the title line of the menu when portal is in web mode.

In this case the local IP address si displayed and may not be necessary considering it is also displayed in the footer. Replacing it by a text given when starting the webPortal may give a better focussed information for the application.

Also the current startWebPortal() will go on giving the localIp address.

Thanks for your attention.

Originally created by @GiPe66 on GitHub (Apr 4, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1029 Hi, It should be nice to have an alternate method startWebPortal(const char *title) to specify the title line of the menu when portal is in web mode. In this case the local IP address si displayed and may not be necessary considering it is also displayed in the footer. Replacing it by a text given when starting the webPortal may give a better focussed information for the application. Also the current startWebPortal() will go on giving the localIp address. Thanks for your attention.
Author
Owner

@tablatronix commented on GitHub (Apr 5, 2020):

The ip only shows if you do not use a hostname, so thats an option atm

<!-- gh-comment-id:609108582 --> @tablatronix commented on GitHub (Apr 5, 2020): The ip only shows if you do not use a hostname, so thats an option atm
Author
Owner

@GiPe66 commented on GitHub (Apr 5, 2020):

@tablatronix, Thanks for the fast answer.

If I well understand, in the code

str.replace(FPSTR(T_v),configPortalActive ? _apName : WiFi.localIP().toString()); // use ip if ap is not active for heading

as I am in webPortal mode, configPortalActive is false, so I always get the IP address.

<!-- gh-comment-id:609383460 --> @GiPe66 commented on GitHub (Apr 5, 2020): @tablatronix, Thanks for the fast answer. If I well understand, in the code ` str.replace(FPSTR(T_v),configPortalActive ? _apName : WiFi.localIP().toString()); // use ip if ap is not active for heading ` as I am in webPortal mode, configPortalActive is false, so I always get the IP address.
Author
Owner

@tablatronix commented on GitHub (Apr 5, 2020):

What version is this? Ill check

<!-- gh-comment-id:609495792 --> @tablatronix commented on GitHub (Apr 5, 2020): What version is this? Ill check
Author
Owner

@tablatronix commented on GitHub (Apr 5, 2020):

Looks like I never implemented that, oops

<!-- gh-comment-id:609497445 --> @tablatronix commented on GitHub (Apr 5, 2020): Looks like I never implemented that, oops
Author
Owner

@GiPe66 commented on GitHub (Apr 6, 2020):

Maybe a method to set a name should be simpler and enough...

<!-- gh-comment-id:609509777 --> @GiPe66 commented on GitHub (Apr 6, 2020): Maybe a method to set a name should be simpler and enough...
Author
Owner

@tablatronix commented on GitHub (Apr 6, 2020):

I will work on it tomorrow , but it will be development branch only

<!-- gh-comment-id:609557796 --> @tablatronix commented on GitHub (Apr 6, 2020): I will work on it tomorrow , but it will be development branch only
Author
Owner

@GiPe66 commented on GitHub (Apr 6, 2020):

No problem, I'm only using this branch considering the non-blocking mode.
Thanks for all this nice job.

<!-- gh-comment-id:609659497 --> @GiPe66 commented on GitHub (Apr 6, 2020): No problem, I'm only using this branch considering the non-blocking mode. Thanks for all this nice job.
Author
Owner

@tablatronix commented on GitHub (Apr 6, 2020):

hmm best option would be to allow replacing the entire header, but it only is used on the root page.

const char HTTP_ROOT_MAIN[] PROGMEM = "<h1>{v}</h1><h3>WiFiManager</h3>";

  • User custom header html
  • User flag to show on all pages

Or callout?

<!-- gh-comment-id:609906142 --> @tablatronix commented on GitHub (Apr 6, 2020): hmm best option would be to allow replacing the entire header, but it only is used on the root page. `const char HTTP_ROOT_MAIN[] PROGMEM = "<h1>{v}</h1><h3>WiFiManager</h3>";` - [ ] User custom header html - [ ] User flag to show on all pages Or callout?
Author
Owner

@GiPe66 commented on GitHub (Apr 6, 2020):

Yes, your option seems interesting and gives more flexibility to customize the pages, mainly avoiding the <h1> tag. Thanks.

<!-- gh-comment-id:609959448 --> @GiPe66 commented on GitHub (Apr 6, 2020): Yes, your option seems interesting and gives more flexibility to customize the pages, mainly avoiding the `<h1>` tag. Thanks.
Author
Owner

@tablatronix commented on GitHub (Apr 6, 2020):

I am tempted also to change H1 to the user title, and the h3 to the hostname/ip

<!-- gh-comment-id:610022232 --> @tablatronix commented on GitHub (Apr 6, 2020): I am tempted also to change H1 to the user title, and the h3 to the hostname/ip
Author
Owner

@GiPe66 commented on GitHub (Apr 6, 2020):

H1 is really BIG... It should be nice to let the user define the header and the size of the font; So your proposal to possibly replace the full header is for me a good option.

<!-- gh-comment-id:610037424 --> @GiPe66 commented on GitHub (Apr 6, 2020): H1 is really BIG... It should be nice to let the user define the header and the size of the font; So your proposal to possibly replace the full header is for me a good option.
Author
Owner

@tablatronix commented on GitHub (Apr 6, 2020):

Well the good thing about development branch is it is easy for you to touch anything in strings without touching code and you can change it all. Problem is when you want to change stuff on the fly, these are mostly constants in flash, soo that becomes a problem

<!-- gh-comment-id:610040760 --> @tablatronix commented on GitHub (Apr 6, 2020): Well the good thing about development branch is it is easy for you to touch anything in strings without touching code and you can change it all. Problem is when you want to change stuff on the fly, these are mostly constants in flash, soo that becomes a problem
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#876
No description provided.