This topic is locked
[SOLVED]

 Dynamically Change Welcome_Page Menu Comments

9/5/2016 5:47:52 AM
PHPRunner General questions
A
acpan author

Hi,
I would like to dynamically change the comments on the boxes for the welcome_page.
Currently it seems to accept only static text or image url. I can only change the menu title at the modify menu event, eg:
$menuItem->setTitle("Address (" . $_SESSION["bal"].")");
I would hope to have
$menuItem->setComments(" Signup Count (" . $_SESSION["counter"].")");
but there is no such command.
Any way to do that?
Thanks

AC

A
acpan author 9/12/2016

I found the solution. using "<div id = 'anyname'></div>" in place of the comments

and use Ajax to get the data from an external call to a php script.

romaldus 9/12/2016



I found the solution. using "<div id = 'anyname'></div>" in place of the comments

and use Ajax to get the data from an external call to a php script.


could you share the solution you found to this forum?

A
acpan author 9/13/2016



could you share the solution you found to this forum?


// i had a problem with the event for javascript on load of the welcome page, so i use this method below instead:

  1. Go to include folder of the output and look for:
    menunodes_welcome_page.php
  2. Edit the file and in the each of the welcome menu boxe section, look for the comments and replaced with a SESSION variable:
    $menuNode["comments"] = $_SESSION["test1"];
  3. Then set the session variable to any value after login sucessful event.
    This way, you can assign the database value or any value you define dynamically to the welcome page menu comment.
    Hope this help.
    AC

romaldus 9/14/2016



// i had a problem with the event for javascript on load of the welcome page, so i use this method below instead:

  1. Go to include folder of the output and look for:
    menunodes_welcome_page.php
  2. Edit the file and in the each of the welcome menu boxe section, look for the comments and replaced with a SESSION variable:
    $menuNode["comments"] = $_SESSION["test1"];
  3. Then set the session variable to any value after login sucessful event.
    This way, you can assign the database value or any value you define dynamically to the welcome page menu comment.
    Hope this help.
    AC


Thanks