Smarty variables.

4 views
Skip to first unread message

jose

unread,
Sep 20, 2008, 11:35:51 AM9/20/08
to Care2X
Greetings.

Excuse my bad english.
I'm triying to modify the content of the variable $sRegOptions, used
in the file reg_show.tpl, in order to add new items to that menu, but
i don´t know where it's defined. I would also like to know were are
commonly defined most 'smarty variables'.

Thanks in advance.

Gjergj Sheldija

unread,
Sep 20, 2008, 11:39:17 AM9/20/08
to care...@googlegroups.com
Hi jose,

their value is defined during the code, so you have to check the code to
see what
values they take.
on the other hand to see where these are used you have to look at the
templates directory
which is located here : gui/smarty_template/templates/default if you are
using the default template
os here gui/smarty_template/templates/mac1 if you are using the mac template

hope this helps

regards
gj.

jose de jesus

unread,
Sep 20, 2008, 12:57:05 PM9/20/08
to care...@googlegroups.com
Hi.

I know the variable is being used in the template reg_show.tpl and it's somewhere in gui/smarty_template/templates/
default, what i don´t know is where it is being defined ( the variable $sRegOptions ), i haven´t succeded in finding the file or the portion of the code where the content of the variable $sRegOptions is being assigned with content.

Thanks a lot for your time and your help.

jose de jesus

unread,
Sep 20, 2008, 3:05:33 PM9/20/08
to care...@googlegroups.com
The file in question was patient_register_show.php in the modules/patient_registration directory

jose

unread,
Sep 28, 2008, 2:44:36 PM9/28/08
to Care2X

I'm need some directions.

What i'm triying to do is to add adtional options to the menu that is
inside of the variable $sRegOptions. Anyway, i can always add a new
sub-menu directly in the form. Those options should be able to show
new forms i have designed, and that i already wrote separately in .tpl
form. I also created the new tables i need in the database.

My critical doubts are:

1. Those new forms in .tpl form i have created, how can i summon
those in the code and made them appear properly inside the care2x main
frame. I have worked a little with Smarty to learn it, but i want to
be sure to respect the conventions of work for care2x ( where to
include the tpl forms, ect).

2. Once those forms are part of the project i was thinking on doing
the insertions of the data myself with php. What should be the proper
way to do it again respecting the structure and conventions of care2x,
i should write a class with said information ?

3. What's the purpose of the gui_bridge folder that is included inside
the module folders, what kind of files should be put in there ?

Thanks for the patiente, i'm not very experimented in php.

On 20 sep, 21:05, "jose de jesus" <josejoeldeje...@gmail.com> wrote:
> The file in question was patient_register_show.php in the
> modules/patient_registration directory
>
> On Sat, Sep 20, 2008 at 6:57 PM, jose de jesus <josejoeldeje...@gmail.com>wrote:
>
> > Hi.
>
> > I know the variable is being used in the template reg_show.tpl and it's
> > somewhere in gui/smarty_template/templates/default, what i don´t know is

Gjergj Sheldija

unread,
Sep 28, 2008, 3:13:50 PM9/28/08
to care...@googlegroups.com
hi jose

jose wrote:
> I'm need some directions.
>
> What i'm triying to do is to add adtional options to the menu that is
> inside of the variable $sRegOptions. Anyway, i can always add a new
> sub-menu directly in the form. Those options should be able to show
> new forms i have designed, and that i already wrote separately in .tpl
> form. I also created the new tables i need in the database.
>
> My critical doubts are:
>
> 1. Those new forms in .tpl form i have created, how can i summon
> those in the code and made them appear properly inside the care2x main
> frame. I have worked a little with Smarty to learn it, but i want to
> be sure to respect the conventions of work for care2x ( where to
> include the tpl forms, ect).
>
>
try to put everything inside the gui directory, in the same place the
other templates are.
btw, try to follow the directory structure, example the modules under
the modules and so on.
> 2. Once those forms are part of the project i was thinking on doing
> the insertions of the data myself with php. What should be the proper
> way to do it again respecting the structure and conventions of care2x,
> i should write a class with said information ?
>
yes, you absolutely should write a class for that. but only if you are
creating something totaly new.
in the case you just have added something to , say, the encounter
object, it would be best
to add some function in the encounter object.
> 3. What's the purpose of the gui_bridge folder that is included inside
> the module folders, what kind of files should be put in there ?
>
that is a long answer to a short question :)
it's a short of short cut to enable different input / show screens on
the patient
data. you see a very clear example taking a look at how the birth chart
is implemented.
> Thanks for the patiente, i'm not very experimented in php.
>

Reply all
Reply to author
Forward
0 new messages