PDA

View Full Version : postbit_display_complete variable [Help]


cakirts
02-01-2014, 04:11 PM
Hi all,

postbit_display_complete under the name I created a plugin. (vb 3.8.7)

preg_match("/src=\"([^\"]+)/i", $post[message] ,$resimler);
$tek = $resimler[1];
foreach ($resimler[0] as $tek)
{
$tek = str_replace("src=\"","", $tek);
}

$tek variable only works in "postbit_legacy" template. I of this variable "headinclude" I want to work in the template. But somehow I could not. How these variables "headinclude" in the template can run?

My English is not good. I used Google Translate.

kh99
02-01-2014, 06:36 PM
postbit_display_complete is called for each post (and you create the $tek variable based on the message from one post), but there is only one headinclude per page, so I don't understand how you could use $tek there.

If you want to use something in headinclude, you could create it using hook location parse_templates, but there will not be any $post available there.

vBNinja
02-01-2014, 06:56 PM
What are you trying to do?

cakirts
02-01-2014, 07:28 PM
The first picture of the subject as follows "headinclude" I want to add. "$tek" variable from the link you want to add the following code:
<meta property="og:image" content="$tek">

$tek "postbit_legacy" template in the works. But, This code "headinclude" does not work when you add.

kh99
02-01-2014, 08:51 PM
Maybe you can put the meta tag in the SHOWTHREAD template instead of headinclude. You can put it inside the <head> tags.

cakirts
02-01-2014, 09:22 PM
Maybe you can put the meta tag in the SHOWTHREAD template instead of headinclude. You can put it inside the <head> tags.
I thought I try it before. Thanks to you, I can do what I want. Really, thank you very much. :up: :up: :up: