|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Jan 2013
Posts: 2,624
|
I´m fucking about in wp with custom fields calling the video url for the flowplayer plugin and I´m getting Parse error: syntax error, unexpected T_STRING on.....
Code:
<?php
flowplayer('[flowplayer src=<?php echo get_post_meta($post->ID, '_wpb_video', true); ?>]');
?>
Code:
<?php flowplayer('[flowplayer src=/videos/example.flv]'); ?>
so I assumed its because I´m calling php again on the echo.. I tried Code:
<?php flowplayer('[flowplayer src=echo get_post_meta($post->ID, '_wpb_video', true)]'); ?>
it´s not pulling the echo so I tried $string This doesn´t break anything I actually get the page but it pulls echo as the filename Code:
<?php
$string= " <?php echo get_post_meta($post->ID, '_wpb_video', true); ?> ";
flowplayer('[flowplayer src=echo $string;]'); ?>
Code:
<?php
$string= "flowplayer('[flowplayer src=";
$string .="echo get_post_meta($post->ID, '_wpb_video', true)";
$string .="]')";
echo $string;
?>
which gives me Code:
flowplayer('[flowplayer src=echo get_post_meta(142, '_wpb_video', true)]')
so do I need to include <?php and ?> in the string? and it so how? or how do make it so it s doesnt post the code within "" if I do something like Code:
<?php
$string= "<?php flowplayer('[flowplayer src=";
$string .="echo get_post_meta($post->ID, '_wpb_video', true)";
$string .="]')" ?>;
echo $string;
?>
But because of my limited php knowledge thats me stuck.. anyone got any ideas. |
|
|
|
|
|
#2 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Code:
flowplayer('[flowplayer src=<?php echo get_post_meta($post->ID, \'_wpb_video\', true); ?>]');
__________________
seks.ai for sale - ping me |
|
|
|
|
|
#3 |
|
Just Doing My Own Thing
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 25,365
|
|
|
|
|
|
|
#4 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Did you actually echo the function??
__________________
seks.ai for sale - ping me |
|
|
|
|
|
#5 |
|
Confirmed User
Industry Role:
Join Date: Jan 2013
Posts: 2,624
|
wow that was quick.. thx for the replies.
The flowplayer is pulled as Code:
<?php flowplayer('[flowplayer src=videos/example.flv]'); ?>
foliovision. com/seo-tools/wordpress/plugins/fv-wordpress-flowplayer and works, it´s when I start messing with the content, switching it to pulling from a custom field it all goes pear-shaped and that is getting pulled on an echo. Code:
<?php flowplayer('[flowplayer src=<?php echo get_post_meta($post->ID, '_wpb_video', true); ?>]'); ?>
I tried Code:
]<?php flowplayer('[flowplayer src=<?php echo get_post_meta($post->ID, \'_wpb_video\', true); ?>]'); ?>
thx. |
|
|
|
|
|
#6 |
|
Registered User
Industry Role:
Join Date: Mar 2013
Posts: 26
|
Something like this should work php wise :
<?php $postMeta = get_post_meta($post->ID, '_wpb_video', true); ?> flowplayer('[flowplayer src=<?php echo $postMeta ?>]');
__________________
pervypig.com |
|
|
|
|
|
#7 |
|
(>^_^)b
Industry Role:
Join Date: Dec 2011
Posts: 7,225
|
<?php
flowplayer('[flowplayer src=<?php echo get_post_meta($post->ID, '_wpb_video', true); ?>]'); ?> You're getting the parse error because you are trying to php echo inside an already open php call.. Try to concatenate the strings instead. ![]()
__________________
Join the BEST cam affiliate program on the internet! I've referred over $1.7mil in spending this past year, you should join in. ![]() I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
|
|
|
|
|
|
#8 | ||
|
Confirmed User
Industry Role:
Join Date: Jan 2013
Posts: 2,624
|
Quote:
Code:
flowplayer('[flowplayer src=/2/2E/2EBBC2H3H0/8/0/7/1/c11708/fb43ba21e2/11708_01/01/11708_01_120sec_00.mp4]');
Quote:
Serves me right for trying to be clever.. hehe. |
||
|
|
|
|
|
#9 |
|
Confirmed User
Industry Role:
Join Date: Jan 2013
Posts: 2,624
|
Solved it
![]() Code:
<?php
$vid = get_post_meta($post->ID, '_wpb_video', true);
$splash = get_post_meta($post->ID, '_wpb_poster', true);
{ echo flowplayer( '[flowplayer src="' . $vid . '" width=580 height=326 splashend=show splash="' . $splash . '" autoplay=true]'); } ?>
this works. |
|
|
|