View previous topic :: View next topic |
Author |
Message |
MohammedSheha Smarty n00b
Joined: 08 Sep 2018 Posts: 4
|
Posted: Sat Sep 08, 2018 1:37 pm Post subject: I want urgent help |
|
|
Hello
i using Smarty templates
i need put Variable here between " "
<meta property="og:video:tag" content="here">
gives me tag of the thread like
<meta property="og:video:tag" content="action">
<meta property="og:video:tag" content="horror">
like this
https://i.imgur.com/GWJ1lyN.png |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sat Sep 08, 2018 9:58 pm Post subject: |
|
|
In your code, you will have this:
Code: | $Smarty->assign('META_GENRE',$product['genre']);
// where $product['genre'] is the 'genre' column of this
// database record |
The template code is:
Code: | <meta property="og:video:tag" content="{$META_GENRE}"> |
|
|
Back to top |
|
MohammedSheha Smarty n00b
Joined: 08 Sep 2018 Posts: 4
|
Posted: Sun Sep 09, 2018 11:18 am Post subject: |
|
|
where put this code , I am useing PHP Melody script
Code: |
$Smarty->assign('META_GENRE',$product['genre']);
// where $product['genre'] is the 'genre' column of this
// database record
|
i put this code only
<meta property="og:video:tag" content="{$META_GENRE}">
and gives me
<meta property="og:video:tag" content=""> |
|
Back to top |
|
gordonisnz Smarty Regular
Joined: 05 Sep 2009 Posts: 70
|
Posted: Sun Sep 09, 2018 1:04 pm Post subject: |
|
|
have you used echo within the PHP script itself - Is the value correct - before going to the template ?
i sometimes have that i need to use echo 3-4 times, going earlier & earlier in the script & often finding some error that does not create the variable in the first place.
i fix the script & quickly remove all the echos..
OR
Code: |
// start of script or routine
$logtext="start of log report\n";
$logtext.="log text goes here\n"; << adds new line to log report after you do something .
// end of script before you go to template
$log=1;
if($log>0){echo "<pre>$logtext</pre>\n";}
|
i add all my log codes to see whats happening & in 1 quick go, set $log=0; and this hides my log report. |
|
Back to top |
|
MohammedSheha Smarty n00b
Joined: 08 Sep 2018 Posts: 4
|
Posted: Sun Sep 09, 2018 1:30 pm Post subject: |
|
|
i used templates\default
I did not understand anything about you
i need put this code in header.tpl
Code: |
<meta property="og:site_name" content="SITE NAME">
<meta property="og:url" content="{$video_data.video_href}">
<meta property="og:title" content="{$meta_title}">
<meta property="og:image" content="{$video_data.thumb_img_url}">
<meta property="og:description" content="{$meta_description}">
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="{$video_data.embed_href}">
<meta property="og:video:secure_url" content="{$video_data.embed_href}">
<meta property="og:video:type" content="text/html">
<meta property="og:video:width" content="1280">
<meta property="og:video:height" content="720">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
<meta property="og:video:tag" content="">
|
go to this link : https://www.aflammbc2.com/watch.php?vid=14a4e06f8 you will see Tags of this thread : hudson, video, against the grain
and Click right on Mouse and select view page source
view-source:https://www.aflammbc2.com/watch.php?vid=14a4e06f8 this code will appear first in this page between // //
i need to show this tags in this a place
Code: |
<meta property="og:video:tag" content="hudson">
<meta property="og:video:tag" content="video">
<meta property="og:video:tag" content="against the grain">
|
|
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sun Sep 09, 2018 5:37 pm Post subject: |
|
|
Quote: | where put this code , I am useing PHP Melody script
$Smarty->assign('META_GENRE',$product['genre']);
// where $product['genre'] is the 'genre' column of this
// database record |
Ideally, you would be asking that in the community-supported Melody forums. |
|
Back to top |
|
MohammedSheha Smarty n00b
Joined: 08 Sep 2018 Posts: 4
|
Posted: Wed Sep 12, 2018 2:08 pm Post subject: |
|
|
bsmither wrote: | Quote: | where put this code , I am useing PHP Melody script
$Smarty->assign('META_GENRE',$product['genre']);
// where $product['genre'] is the 'genre' column of this
// database record |
Ideally, you would be asking that in the community-supported Melody forums. |
I ASK him and no answer |
|
Back to top |
|
|