| View previous topic :: View next topic |
| Author |
Message |
benp992 Smarty n00b
Joined: 29 Jun 2012 Posts: 4
|
Posted: Fri Jun 29, 2012 9:53 am Post subject: Configuring smarty to new server (newbie) |
|
|
Hi
I am a complete newbie when it comes to smarty and would appreciate a nudge in the right direction.
I am switching a website a friend of mine has had for a while to a new server for them, yet I am running into a few difficulties.
Could someone give me a few pointers as to which files I need to edit to configure to the new server and the current database. I can then cross reference this with what I have already done and see where I am going wrong/what I am not doing. At the moment i am testing this on a test server but receiving errors when changing config details etc..
Any assistance appreciated.
Many thanks |
|
| Back to top |
|
gzom-spam Smarty Rookie
Joined: 06 Jul 2012 Posts: 11
|
Posted: Fri Jul 06, 2012 10:51 pm Post subject: find string |
|
|
If I understand correctly your problem, then you should look for string/code like this:
| Quote: |
$smarty->template_dir
$smarty->config_dir
$smarty->cache_dir
$smarty->compile_dir
|
and change or create your specific configuration/directories.
Best from Gzom
P.S. Sorry for my English, but it's not my mother tongue. |
|
| Back to top |
|
benp992 Smarty n00b
Joined: 29 Jun 2012 Posts: 4
|
Posted: Fri Jul 06, 2012 11:01 pm Post subject: |
|
|
Hi
Thanks for the response.
I have located what I think you mentioned in the smarty.class.php file, however I am still unsure what needs to change. All the files are identical, the only details which have changed is the root directories, the domain and the database, which I have switched in the config.php.
Are there any other files which need to be modified when switching a server?
Sorry for the newbie questions, I have never used smarty framework
Many thanks |
|
| Back to top |
|
gzom-spam Smarty Rookie
Joined: 06 Jul 2012 Posts: 11
|
Posted: Fri Jul 06, 2012 11:25 pm Post subject: |
|
|
Hi,
First, smarty is not a framework, it is template engine.
Second in most cases you do not change smarty engine itself, but only configuration of you web app.
Third search also for line that creates smarty instance like
| Code: | | $smarty = new Smarty(); | and $smarty is the name of the smarty object and also it can be different than , but also its the most common name for smarty instance.
And for fourth read documentation in http://www.smarty.net/docs/en/installing.smarty.basic.tpl or anything about configuration.
Best,
Gzom |
|
| Back to top |
|
gzom-spam Smarty Rookie
Joined: 06 Jul 2012 Posts: 11
|
Posted: Fri Jul 06, 2012 11:38 pm Post subject: |
|
|
| Probably for you most interesting will be Example 2.9, there is a configuration. |
|
| Back to top |
|
benp992 Smarty n00b
Joined: 29 Jun 2012 Posts: 4
|
Posted: Fri Jul 06, 2012 11:49 pm Post subject: |
|
|
Hi
Thanks again, just looked through the docs and it does seem that 2.9 is what I havn't modified.
Just trying to locate this within the files.
Many thanks |
|
| Back to top |
|
gzom-spam Smarty Rookie
Joined: 06 Jul 2012 Posts: 11
|
Posted: Fri Jul 06, 2012 11:57 pm Post subject: |
|
|
I have showed you old way of configuration. In docs is new way.
But the most important is statement where you create instance, mostly after that you configure the smaty.
Please search for a manual for newbie, because for every app configuration can be in different place, an no one can give you details.
Best,
Gzom |
|
| Back to top |
|
benp992 Smarty n00b
Joined: 29 Jun 2012 Posts: 4
|
Posted: Sat Jul 07, 2012 12:01 am Post subject: |
|
|
Yeh thanks , its the new Smarty(); that I am currently looking for.
The layout is completely different, the bulk of the config files seem to be in one directory, along with the appconfig etc.. just looking through to search for the string new Smarty();
Thanks again |
|
| Back to top |
|
|