AJuda em um codigo PHP + jquery R$30-90 BRL R$30-90 BRL Paid on delivery
A ideia é buscar uma imagem em um banco de dados e exibir atraves de um codigo em jquery.
Segue o codigo:
$(document).ready(function(){
var customizeMeStt, pluginMethodsStt, thumbGalleryStt, colorboxGalleryStt, pluginMethods;
//init thumbnail gallery
thumbGalleryStt = {
'viewportWidth' : '100%',
'viewportHeight' : '100%',
'startScale' : 0.5,
'startX' : 0,
'startY' : 0,
'animTime' : 500,
'draggInertia' : 10,
------------> 'contentUrl' : '[login to view URL]',
'intNavEnable' : true,
'intNavPos' : 'B',
'intNavAutoHide' : false
};
$('#trdCntr').lhpMegaImgViewer(thumbGalleryStt);
$('#galleryThumbImg a').each(function(index){
$(this).mouseover(function(e) {
[login to view URL]();
[login to view URL] = $(this).attr('href');
$('#trdCntr').lhpMegaImgViewer('destroy');
$('#trdCntr').lhpMegaImgViewer(thumbGalleryStt);
});
});
$('#galleryThumbImg img').each(function(index){
$(this).hover(function(){
$(this).stop(true, true).animate({'opacity':.4});
},
function () {
$(this).stop(true, true).animate({'opacity':1});
});
});
});
Veja que o 'contentUrl' exibe uma imagem atraves de um link, eu não quero isso. Preciso que ela exiba a imagem dinamicamente utilizando php.
Tentei os seguintes codigos que funcionam fora do jquery:
esse código exibe a imagem através da $slug = 'foto-de-destaque';
-------------------------------------
<?php
$slug = 'foto-de-destaque';
$size = 'thumbnail';
$meta = 'url';
global $wpcf;
$my_field = new WPCF_Repeater();
$my_field->set(get_the_ID(), wpcf_admin_fields_get_field($slug));
$get_meta = $my_field->_get_meta();
$arr = array();
if(isset($get_meta['custom_order']))
{
$arr = $get_meta['custom_order'];
}
foreach($arr as $k=>$v)
{
$field = wpcf_fields_get_field_by_slug( $slug );
$params = array("thumbnail" > "", "title" => "", "width" => "126", "height" => "96" , "url" => "true");
$params['field_value'] = $v;
$thumbnail = types_render_field_single($field, $params, null, '', $k);
$attachment_id = $wpdb->get_var($wpdb->prepare(
"SELECT ID FROM $wpdb->posts WHERE guid = %s",
$v
));
$alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true);
$foto_destaque_principal .= '<a href="' . $grande . '"><img src="' . $thumbnail . '" style="margin-right: 4px;">' . $alt . '</a>';
}
echo $foto_destaque_principal;
?>
-------------------------------------
Esse código exibe a imagem também, porem não funciona no jquery.
<?php echo types_render_field("foto-de-destaque") ;?>
-------------------------------------
Agora é a vez de vocês, como faço para exibir uma imagem a partir dessa slug foto-de-destaque no 'contentUrl'??
Project ID: 8998938
About the project 4 proposals
Remote project
Active 8 yrs ago
Looking to make some money? Email address Apply for similar jobs Benefits of bidding on Freelancer Set your budget and timeframe
It's free to sign up and bid on jobs
4 freelancers are bidding on average R$129 BRL for this job
Olá amigo, eu posso fazer isso. Tenho mais de 12 anos de experiência em PHP e jQuery.
Posso fazer em apenas um dia.
R$115 BRL in 1 day
5.0 (1 review) A proposal has not yet been provided
R$222 BRL in 5 days
0.0 (0 reviews) Estou a procura de reputação neste sistema de freelancer, estou disposto a desenvolver o mais rápido possivel, e com qualidade, sou desenvolvedor a 3 anos, e cursando ensino superior em Informática Biomédica - USP,
segue meus contatos:
lucasrss9 - Skype,
16 98113-0663 - cel,
Aguardo retorno, abraços.
R$115 BRL in 1 day
0.0 (0 reviews) Se entendi corretamente, você pretende carregar a imagem para uma tag <img>. Ou queria alterar a imagem dinamicamente de uma página já carregada?
Espero que possamos trabalhar em conjunto para concluir o seu projeto! :)
R$65 BRL in 1 day
0.0 (0 reviews)