• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Set variable to contain text of any post

Filosofen

New member
Messages
4
Likes
0
Points
1
#1
There should be possible to set variables to be the content of a given posts, so one can process the content.

There can be a menu where one configure $POST-SNIPPET[x] to be content of post with given id;

Example:

$POST-SNIPPET[1] = 1500;
$POST-SNIPPET[2] = 1501;
$POST-SNIPPET[3] = 1502;
$POST-SNIPPET[4] = 1503;
$POST-SNIPPET[5] = 1504;

Then one can use $POST-SNIPPET[1] in the php code for processing the content of post with ID 1500 later!

It is very important that one can set a cache time for the content, so one does not need to fetch same content from database too frequently. Cache can be set in minutes. This makes it very fast to get content of another article, then process it and display the result! For example on want to display the result between two anchors of another article <a id="begin" to <a id="end", one get the article content and then use php function to copy out the content one want to reuse in another article.
 
Last edited: