Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

I want urgent help

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
MohammedSheha
Smarty n00b


Joined: 08 Sep 2018
Posts: 4

PostPosted: Sat Sep 08, 2018 1:37 pm    Post subject: I want urgent help Reply with quote

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
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Sat Sep 08, 2018 9:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
MohammedSheha
Smarty n00b


Joined: 08 Sep 2018
Posts: 4

PostPosted: Sun Sep 09, 2018 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message
gordonisnz
Smarty Regular


Joined: 05 Sep 2009
Posts: 70

PostPosted: Sun Sep 09, 2018 1:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
MohammedSheha
Smarty n00b


Joined: 08 Sep 2018
Posts: 4

PostPosted: Sun Sep 09, 2018 1:30 pm    Post subject: Reply with quote

i used templates\default
I did not understand anything about you Sad

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
View user's profile Send private message
bsmither
Smarty Elite


Joined: 20 Dec 2011
Posts: 322
Location: West Coast

PostPosted: Sun Sep 09, 2018 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
MohammedSheha
Smarty n00b


Joined: 08 Sep 2018
Posts: 4

PostPosted: Wed Sep 12, 2018 2:08 pm    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP