Adding user help/documentation or tooltip

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Xord
User
Posts: 3

Adding user help/documentation or tooltip

Post by Xord »

Does anyone have any ideas on how to provide end-users with table field help or documentation.

Currently, I have a database table containing my documentation for each php table - with an indexed field containing the filename - which corresponds to the relevant documentation required for whatever add/edit/delete page the user is currently viewing.

The tedious way I am adding this to my generated code is to edit each generated page that I want documentation on, adding in a: require_once("documentation.php"); line at the top of each page (that contains a database lookup passing the current page name to WHERE page_name=xxx), and a function call I wrote that neatly displays the first 250 characters of the "help file" for that page in a table, with a MORE button to unhide the rest.

It works quite well, however whenever I regenrate my code, of course I lose this....

Any suggestions on implimenting this or any other ideas for displaying help (perhaps a mouseover on the fieldname?!?)

Thanks


digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Post by digitalphotoworld »

Funny, I did exact the same ;-)

Try this jquery-code in CLIENT SCRIPTS -> GLOBAL -> PAGES WITH HEADER/FOOTER -> STARTUP SCRIPT

$("#RootMenu").after("<div><?php echo getCaption(ew_CurrentPage(),CurrentPageID()) ?></div>");

Replace getCaption with the name of your function and pass only the needed information to it.
Your function should return the html-code you want to show to the user.


danielc
User
Posts: 1601

Post by danielc »

You may use the tooltip feature. However, you need to add extra field in your table. Or you can use the Title column. Refer to Field Setup in help file.


Xord
User
Posts: 3

Post by Xord »

The problem with the tooltip field, is that (well, in my tests) it only appears on the VIEW page, ONCE my edit/add page has posted... AND makes the text field look like a hyperlink... not very pretty at all. I wish it were slightly dotted underline (like a wiki) or something (like an icon)... anyhoooo, I'll try script right now - and report!


Webmaster
User
Posts: 9430

Post by Webmaster »

danielc wrote:
Or you can use the Title column. Refer to Field Setup in help file.


uisgeb
User
Posts: 11

Post by uisgeb »

Uh, ok. I see the "Title" column referred to in the description of the Edit Tag, but there is no field column header called "Title" in the program or the example image. :-/ What am I missing?


jbalbas
User
Posts: 24

Post by jbalbas »

Hi Xord:
In your first contribution you wrote:

The tedious way I am adding this to my generated code is to edit each
generated page that I want documentation on, adding in a:
require_once("documentation.php"); line at the top of each page
(that contains ...
...

It works quite well, however whenever I regenrate my code, of course I lose
this....

Have you considered using this way of solving this situation PERMANENTLY?
This can be acomplished by adding code to Server-events | Global | All pages, and all the pages will share these routines. You might need to branch your program to respond correctly depending on the table/page (function) you are in, but once programed, it will not be lost when you regenerate.

I'd like to take a look at your routine to display the first 250 chars of help, with MORE button. Will you share it with me? jbalbas (at) gmail.com. Thanks anyway.

Regards,
Joe


Post Reply