• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
 Post subject: Template Externalizer Tutorial
PostPosted: Wed May 23, 2012 7:43 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Wed Aug 15, 2007 8:51 pm
Posts: 561
Location: Nairobi, Kenya
I just posted a new tutorial about the Template Externalizer module over on Goran Ilic's blog:
http://www.i-do-this.com/blog/74/Template-Externalizer

Jocelyn has fixed all of the outstanding bugs in Externalizer with the latest release and it is really a breeze to use now.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Mon Feb 24, 2014 8:39 pm 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
Thank you for posting the fine overview of the module. It appears to be a very helpful addition.

However, after installation, and the use of your setup.php script (Thank you!), I still cannot get the darn thing to create the directory and put the templates and stylesheets in it.

Does anyone know if there is any reason why CMSMS or the environment might have something to do with the problem?

I am using CMSMS 1.11.10 thru Virtualmin 4.06Pro with LimeSurvey 2.05plus-build140212 and Simple Machines Forum 2.0.7 on a standard LAMP server with CentOS 6.5, Apache version 2.2.15, MySQL version 5.1.73, PHP version 5.3.3, and accessing it locally thru Firefox 27.0 on Fedora 20 with Xfce 4.10.1.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 12:12 am 
Offline
Dev Team Member
Dev Team Member

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 731
Location: OH, USA
\$1:
However, after installation, and the use of your setup.php script
Did you install from your Module Manager or directly from the Development Forge? I don't remember a 'setup.php' script ?

You'll need to make sure the CMS (server) can write files and create a new directory in the /tmp/ directory. Maybe post your system information and the options set in the admin for the module.

_________________
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 2:16 am 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
kendo451 thought it might be a permissions problem too, so he sent me the script. But it didn't help. Even if I created the directory with 777, externalizer still will not write the files into the directory.

I had to install manually from the Forge. The module manager could not access the server of modules above a particular letter. (See other post.)

Exportation folder : /home/mydomain/public_html/tmp/
CHMOD (write) : 0777
Template extension : html
Stylesheet extension : css
UDT extension : php
Operating time : 30

I am using CMSMS 1.11.10 thru Virtualmin 4.06Pro with LimeSurvey 2.05plus-build140212 and Simple Machines Forum 2.0.7 on a standard LAMP server with CentOS 6.5, Apache version 2.2.15, MySQL version 5.1.73, PHP version 5.3.3, and accessing it locally thru Firefox 27.0 on Fedora 20 with Xfce 4.10.1.

I hope that helps some. But I've run across permissions problems before. And what is annoying is that the module gives no feedback when it fails a process.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 4:02 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 731
Location: OH, USA
This is kind of off topic, but it seems like there are a few wonky things happening with other areas of the installation as well, right?

If I was in a similar position, I would create a new 'test' directory, new database, and download a fresh copy CMSMS 1.11.10. Then, install it in the new test directory following the default wizard (no hosting addon installation script service) to see if the same problems occur.

Then, do the same on your computer using a LAMP based server stack like xampp or wampserver to see if you get similar issues.

_________________
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 9:38 pm 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
On my virtual server there are other domains. I have done fresh installs of CMSMS on others to test. However, the Template Exernalizer does not work on those either. These are fresh domains.

The problem appears to be that I don't know what the module is doing, and I have, to my knowledge, no way to track its steps as it processes. Therefore it seems impossible to me to figure it out.

Does it run a hidden script or something that one can step thru?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 9:50 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8167
Location: Fernie British Columbia, Canada
create a udt like this:

\$1:
$config = cmsms()->GetConfig();
$dir = $config['root_path'].'/tmp/foo');
mkdir($dir);
$fn = "$dir/stuff.txt";
$stuff = 'some random data';
file_put_contents($fn,$stuff);


then run it. if that function fails then you'll know the problem. Make sure you have notifications turned on.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Tue Feb 25, 2014 10:52 pm 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
Underwater Demolitions Team? Universal Defense Target? I don't know UDT.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 12:14 am 
Offline
Power Poster
Power Poster

Joined: Sat May 05, 2012 7:29 pm
Posts: 404
Location: India
UDT = User Defined Tag >:D


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 3:51 am 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
Sorry, but it won't take.

"Invalid code entered"


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 1:45 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 731
Location: OH, USA
extra closing parenthesis...

Use this
\$1:
$config = cmsms()->GetConfig();
$dir = $config['root_path'].'/tmp/foo';
mkdir($dir);
$fn = "$dir/stuff.txt";
$stuff = 'some random data';
file_put_contents($fn,$stuff);


Run the UDT from the admin (the gear icon)
If you don't get any errors, white page, etc., go to tmp/foo/ and look for the file called, stuff.txt - open and it should have 'some random data' written into it.

If not, then PHP is not configured correctly....

_________________
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 1:47 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 731
Location: OH, USA
\$1:
On my virtual server there are other domains. I have done fresh installs of CMSMS on others to test. However, the Template Exernalizer does not work on those either. These are fresh domains.


Install the CMS on another server not using the ones above to really test things out. If it works better in that different environment/different server, then you know the problem is with the server environment...

_________________
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 4:20 pm 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
The icon I see looks like a flower on the upper right bar. It says My Account, but don't see any significance there. Since I had to log in as administrator, I figured I was already okay.

The later code worked correctly to create the tag. I just named mine my_tag.

Then I went to Site Admin>Global Settings>Advanced Setup>Allow users to view notifications, and it was already checked on.

Then I went to Extensions>User Defined Tags and selected the little icon that hover-over stated was Run this User Defined Tag. That gave me a screen where I could select Run.

Nothing seemed to happen. So I cranked up Filezilla and logged into my server, and selected /home/mydomain/tmp and found nothing at all. I was getting a little worried until I looked a little deeper into /home/mydomain/public_html/tmp and found /foo/stuff.txt which included "some random data".

Success! All is good at that stage.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 5:47 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Tue Nov 21, 2006 5:05 pm
Posts: 731
Location: OH, USA
\$1:
/home/mydomain/public_html/tmp and found /foo/stuff.txt which included "some random data".

Good. So did you see the 'externalizer' directory in your /tmp/ directory?
That is where the module dumps the template files.

_________________
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Template Externalizer Tutorial
PostPosted: Wed Feb 26, 2014 5:59 pm 
Offline
Power Poster
Power Poster

Joined: Mon Dec 02, 2013 3:26 am
Posts: 328
No, I cannot.

There is:
/cache
/configs
/foo
/templates.c
.htaccess
index.html


But wait....
I got an idea. I re-activated the externalizer and refreshed the listing, darn if they didn't show up there.

I have now learned:
1. Where they are supposed to be
2. They only exist while it is active

Wow! Thank you for that. Huge help indeed.

If only someone had put that info in the instructions...........


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


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 post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting