Show version in app

Hi,

I think it is not new, but I cannot find answer… :o

Is it possible to show release version of application by default?

I think this:
SC allows to increment version (Project => Increment Version). Is it possible to show this Version number to end-user? Or I need to re-set version number by myself?

Thanks!

Simple.

In the onApplicationInit event of your login app, add the following line:

[version] = $this->nm_app_version;

Make sure that you set the Application->Global Variable entry for “version” to Session and Out.

Now you can use [version] in any app’s header, etc.

Dave

Dave

If I try that I get a popup when the login app displays:

ERROR
Undefined property: sec_Login_apl::$nm_app_version

Any ideas? Looked through generated code and it all looks good - and I confirmed the sc variable is correct in the session data…

Is this helpful?

http://scriptcase.aducom.com/cms/e107_plugins/faq/faq.php?0.cat.6.8

Perfect, thanks Allbert.

Didn’t realise I would need to instantiate a new object of the login form

:slight_smile:

[QUOTE=daveprue;34152]Simple.

In the onApplicationInit event of your login app, add the following line:

[version] = $this->nm_app_version;

Make sure that you set the Application->Global Variable entry for “version” to Session and Out.

Now you can use [version] in any app’s header, etc.

Dave[/QUOTE]

This is the issue that I have with ScriptCase - where is this officially documented ? It certainly is not documented in the help or any other document I have downloaded from NetMake.
If there is another source of information save an except for going through the generated code, please tell us.

… and thanks for the information Dave. It is useful for me too.

[QUOTE=Sean H.;34195]This is the issue that I have with ScriptCase - where is this officially documented ? It certainly is not documented in the help or any other document I have downloaded from NetMake.
If there is another source of information save an except for going through the generated code, please tell us.

… and thanks for the information Dave. It is useful for me too.[/QUOTE]

Is not officially documented because are community contributions AFAIK. You can learn a lot of tricks looking at generated code, and forums are full of priceless snippets.

I wanted to create a little app to collect and query for them, but as always time is a problem. Maybe I will try to try to get some time and do it this weekend.

[QUOTE=adz1111;34192]Perfect, thanks Allbert.

Didn’t realise I would need to instantiate a new object of the login form

:-)[/QUOTE]

You do not need to do an instantiation. The object already exists.

If the code that I gave you is generating an error, then try this:

[version] = $this->Init->nm_app_version;

It depends on your scriptcase version and which event you are running in as to what “$this” represents in a particular script.
It is handy to do a “var_dump($this)” and then look through the generated source to find some of the interesting properties & methods for a particular class of object.

Dave

[QUOTE=daveprue;34267]You do not need to do an instantiation. The object already exists.

If the code that I gave you is generating an error, then try this:

[version] = $this->Init->nm_app_version;

It depends on your scriptcase version and which event you are running in as to what “$this” represents in a particular script.
It is handy to do a “var_dump($this)” and then look through the generated source to find some of the interesting properties & methods for a particular class of object.

Dave[/QUOTE]

Dave:
The above did not work BUT your advice to do the var_dump($this) was the platinum key.

[version] = $this->Ini->nm_app_version;

is what is needed. You typed an extra ‘t’. Thanks ever so much for the eye opener.

Regards,

Sean

[QUOTE=Sean H.;34291]Dave:
The above did not work BUT your advice to do the var_dump($this) was the platinum key.

[version] = $this->Ini->nm_app_version;

is what is needed. You typed an extra ‘t’. Thanks ever so much for the eye opener.

Regards,

Sean[/QUOTE]

Thats what happens when you get old, your memory is the second thing to go. I can’t remember the first thing that goes… :slight_smile:

Dave

[QUOTE=daveprue;34295]Thats what happens when you get old, your memory is the second thing to go. I can’t remember the first thing that goes… :slight_smile:

Dave[/QUOTE]

Come on Dave, you still young, I saw your photo :slight_smile:

[QUOTE=aducom;34185]Is this helpful?

http://scriptcase.aducom.com/cms/e107_plugins/faq/faq.php?0.cat.6.8[/QUOTE]

Hi Albert,

Is this a Scriptcase app? How did you get your menu looking and positioned like that? I’m very interested in a more modern look for SC menus (goodness, some remind me of the days of FoxPro.) Is it even possible to get those menus looking like Bootstrap menus?

Thanks Dave & Sean

:slight_smile:

[QUOTE=scriptcaser;34329]Hi Albert,

Is this a Scriptcase app? How did you get your menu looking and positioned like that? I’m very interested in a more modern look for SC menus (goodness, some remind me of the days of FoxPro.) Is it even possible to get those menus looking like Bootstrap menus?[/QUOTE]

hi scriptcase, if you mean this link

http://scriptcase.aducom.com/cms/e107_plugins/faq/faq.php?0.cat.6.8

that is e107 cms

Albert -thankfully- explained the issue that is being discussed in this thread as “FAQ” library page in aducom site.

Yes, we use e107 cms to embed our scriptcase applications in.

Sorry to veer of the main topic a bit but I see this cms is bootstrap based. So what’s the effect when you embed stuff like SC grid app? Everything resizes/ allows for scrolling on smaller screens and nothing breaks?

Works! Thanks guys! :cool:

“Yes, we use e107 cms to embed our scriptcase applications in.”

How do you do that Albert?