I want to modify a webpage made by SPIP, by including php script inside, how to do? And what are loop? how theu work?
inserting php script within SPIP pages!!!
I looked up some information on SPIP. It looks like an interesting content management system, but the documentation seemed limited. Many of the keywords shown in templates seem to be in French (possibly another European language).
A "loop", as they use the word, is a way to display a group of articles or other text items one after the other. If you coded PHP within the body of the loop, presumably it would be applied to each of the articles.
Since SPIP is implemented in PHP, I would assume you can put PHP source code most any place in a template where text would be appropriate. Probably you could add PHP to your article source also. I would recommend experimenting with small snippets of PHP in various places, to see if it works as expected.
I like the feature of displaying the template for each page. I hope some others can provide more insight about this interesting language.
A "loop", as they use the word, is a way to display a group of articles or other text items one after the other. If you coded PHP within the body of the loop, presumably it would be applied to each of the articles.
Since SPIP is implemented in PHP, I would assume you can put PHP source code most any place in a template where text would be appropriate. Probably you could add PHP to your article source also. I would recommend experimenting with small snippets of PHP in various places, to see if it works as expected.
I like the feature of displaying the template for each page. I hope some others can provide more insight about this interesting language.
| SonLight wrote: |
| I looked up some information on SPIP. It looks like an interesting content management system, but the documentation seemed limited. Many of the keywords shown in templates seem to be in French (possibly another European language).
A "loop", as they use the word, is a way to display a group of articles or other text items one after the other. If you coded PHP within the body of the loop, presumably it would be applied to each of the articles. Since SPIP is implemented in PHP, I would assume you can put PHP source code most any place in a template where text would be appropriate. Probably you could add PHP to your article source also. I would recommend experimenting with small snippets of PHP in various places, to see if it works as expected. I like the feature of displaying the template for each page. I hope some others can provide more insight about this interesting language. |
You are totally right!!!
It works. If I asked for it it is because the pages are with an HTML extension. But it works. The SPIP CMS is normally most for frenches. Thanks for your help. Very useful post!!!
You mention you had doubts about how php coding would work
. I guess I would have wondered about that too. If I understand it right, SPIP generates its pages only when they are updated, and stores the generated output (which contains no php code, only pure html) in a cache. This seems to mean that no pages are fully dynamic.
Presumably if a page had to be regenerated for each page view, it would nevertheless be sent to the cache, not the browser, and the server would then send the cached page. I would be interested in hearing more about how well the caching feature works, and if it produces extra overhead in some cases. An example of a page which requires php processing every time it loads is one which outputs the time of day via php code. If there's no way to force that page to regenerate every time, then the page would not function correctly.
| Quote: |
| because the pages are with an HTML extension |
Presumably if a page had to be regenerated for each page view, it would nevertheless be sent to the cache, not the browser, and the server would then send the cached page. I would be interested in hearing more about how well the caching feature works, and if it produces extra overhead in some cases. An example of a page which requires php processing every time it loads is one which outputs the time of day via php code. If there's no way to force that page to regenerate every time, then the page would not function correctly.
