Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Configuring smarty to new server (newbie)

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
benp992
Smarty n00b


Joined: 29 Jun 2012
Posts: 4

PostPosted: Fri Jun 29, 2012 9:53 am    Post subject: Configuring smarty to new server (newbie) Reply with quote

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
View user's profile Send private message
gzom-spam
Smarty Rookie


Joined: 06 Jul 2012
Posts: 11

PostPosted: Fri Jul 06, 2012 10:51 pm    Post subject: find string Reply with quote

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
View user's profile Send private message
benp992
Smarty n00b


Joined: 29 Jun 2012
Posts: 4

PostPosted: Fri Jul 06, 2012 11:01 pm    Post subject: Reply with quote

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 Smile

Many thanks
Back to top
View user's profile Send private message
gzom-spam
Smarty Rookie


Joined: 06 Jul 2012
Posts: 11

PostPosted: Fri Jul 06, 2012 11:25 pm    Post subject: Reply with quote

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
Quote:
$smarty
, 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
View user's profile Send private message
gzom-spam
Smarty Rookie


Joined: 06 Jul 2012
Posts: 11

PostPosted: Fri Jul 06, 2012 11:38 pm    Post subject: Reply with quote

Probably for you most interesting will be Example 2.9, there is a configuration.
Back to top
View user's profile Send private message
benp992
Smarty n00b


Joined: 29 Jun 2012
Posts: 4

PostPosted: Fri Jul 06, 2012 11:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
gzom-spam
Smarty Rookie


Joined: 06 Jul 2012
Posts: 11

PostPosted: Fri Jul 06, 2012 11:57 pm    Post subject: Reply with quote

I have showed you old way of configuration. In docs is new way.
But the most important is statement
Quote:
new Smarty();
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
View user's profile Send private message
benp992
Smarty n00b


Joined: 29 Jun 2012
Posts: 4

PostPosted: Sat Jul 07, 2012 12:01 am    Post subject: Reply with quote

Yeh thanks Smile, 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP