Jump to content

Extension talk:PhpTags Functions

About this board

TimoKausK (talkcontribs)

It would be a very nice thing, to make it possible to read/import a message/page/article and be able to parse this.


Example:

$json=read('Mediakwiki:TextBasedDataInJsonFormat');

$array=json_decode($json,true);

foreach($array as $item){

// do very nice things

}

Reply to "Read Messages"
Johnywhy (talkcontribs)

Can anyone offer a transclude example? -thx

Pastakhov (talkcontribs)
Johnywhy (talkcontribs)

thx. Seems the purpose of `transclude` is to output whatever you want to output to the host page. I guess transclude code would live in a template, correct?

I'm looking for the opposite: a php way to pull in a rendered page.

cheers

Pastakhov (talkcontribs)
Pastakhov (talkcontribs)
Johnywhy (talkcontribs)

thx, i'll be reading those!

Reply to "Transclude Example?"

strange results with str_word_count

1
Auvajs (talkcontribs)

{{PAGENAME}}<br /> {{#phptag:echo str_word_count("{{PAGENAME}}");}}

sometimes it gives strange results:

častá procházka
3

šumící les
3

(The page name has two words but the function gives out 3?)

There are no older topics