GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Attn Programmers I Will Pay 25USD To Fix One Line Of Code (NEEDED ASAP) (https://gfy.com/showthread.php?t=1177864)

SeanLEE 11-02-2015 08:22 AM

Attn Programmers I Will Pay 25USD To Fix One Line Of Code (NEEDED ASAP)
 
I need help with a site. I will pay 25 usd to the first person who can help me with 1 line of code.

Here is a snippet of the code:

Code:

<?php foreach ($query->result() as $row):?>
<!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=yes" />
    <title><?php echo $row->titulo; ?> - <?php echo $ciudad; ?><?php echo $this->codigo; ?> - <?php echo $this->categoria_model->ObtenerNombreCategoria($row->categoria);?> - <?php echo  $this->website; ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="<?php echo dinv_extracto(strip_tags($row->descripcion),10); ?>">
<meta name="description" content="<?php echo dinv_extracto(strip_tags($row->descripcion),40); ?>">
<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>"/>

The line:
<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>"/>

when I run it through facebook debugger tool it only sees:
<meta property="og:image" content="http://www.hiphopfind.com/upload/gallery.php?imagen=">

It cant pick up the <?php echo $fila['imagen1']

Can someone tell me what line of code I can place before this for it to be able to read this?

I will send 25usd to first person who can help me with this issue.


Thanks In advance!

If you need contact me on skype to fix go: Skype: seanleebiz

2MuchMark 11-02-2015 08:28 AM

Try changing

<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>

to

<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php"?imagen="<?php echo $fila['imagen1']; ?>"

SeanLEE 11-02-2015 08:30 AM

Quote:

Originally Posted by ********** (Post 20623171)
Try changing

<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>

to

<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php"?imagen="<?php echo $fila['imagen1']; ?>"

It looks like you wrote the same line? I understrand what your saying..but the problem is facebook cant read the <?php echo $fila['imagen1']

sarettah 11-02-2015 08:34 AM

There really is not enough code there to be sure what the issue is but my guess would be that instead of echo $fila['imagen1']; You should have echo $row->imagen1; or some such. (I say thatbecause fila means row. It looks like someone modified a script and maybe missed changing up a var to me.

Without seeing what is in the database and what vars are coming from where all anyone can do is guess.

.

sarettah 11-02-2015 08:35 AM

Quote:

Originally Posted by SeanLEE (Post 20623172)
It looks like you wrote the same line? I understrand what your saying..but the problem is facebook cant read the <?php echo $fila['imagen1']

I do believe that facebook is failing to see it because $fila[] does not exist as such. Again, just a guess.

SeanLEE 11-02-2015 08:42 AM

Quote:

Originally Posted by sarettah (Post 20623183)
I do believe that facebook is failing to see it because $fila[] does not exist as such. Again, just a guess.

Yes I didnt want to put the whole code..the file exist...

here is another snippet of code:

<?php if ($numero_imagenes>0) { ?>





<?php




foreach ($data->result_array() as $fila)
{



?>

<?php if (!empty($fila['imagen1']))

{

?>
<div class="d_al"><a href="<?php echo base_url()."upload/gallery.php?imagen=".$fila['imagen1']; ?>" rel="lightbox[gallery]" title="<?php echo $row->titulo; ?>" >
<img src="<?php echo base_url(); ?>upload/image.php?imagen=<?php echo $fila['imagen1']; ?>" border="0"><br>
Enlarge Picture</a></div>


<?php } ?>

when i put this line somewhere after this code it picks up the whole link:
<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>"/>

but i need it to pick it up earlier in the code in the header



I know confusing especially since Im not revealing all code and the such

zerovic 11-02-2015 08:51 AM

did you solve the issue? if not, add me on skype (tamas.redler) or icq (320334087) and i'll help you fix this badboy ;)

tical 11-02-2015 08:54 AM

That's because $fila['imagen1'] is empty in some instances.

It works when you place it in the "...php if(!empty..." block because that code would only run when $fila['imagen1'] is not empty.

If you place your display code before the "...foreach ($data->result_array() as $fila)..." then it won't work because $fila hasn't been created yet.

SeanLEE 11-02-2015 09:00 AM

Quote:

Originally Posted by tical (Post 20623202)
That's because $fila['imagen1'] is empty in some instances.

It works when you place it in the "...php if(!empty..." block because that code would only run when $fila['imagen1'] is not empty.

If you place your display code before the "...foreach ($data->result_array() as $fila)..." then it won't work because $fila hasn't been created yet.

exactly... so can you write a line of code to fix this and ill pay you?

zerovic 11-02-2015 09:01 AM

Ok, so you posted this line, which doesn't seem to be working

Quote:

<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>
and what I see, is that the $fila['imagen1']; don't display anything.

I would like to ask you to add this under this meta property line
Quote:

<?php
if($_GET['dev']) {
print_r($fila);
}
?>
and call the same url adding ?dev=1 to the end of the url

So we can make sure the the array already exists! As you stated, that the code works below, I assume that the array is not created when you try to use it. To make it work, simply create the array before adding the meta property, so it will look like this

Quote:

<?php foreach ($data->result_array() as $fila) { ?>
<?php if (!empty($fila['imagen1'])) { ?>
<meta property="og:image" content="<?php echo base_url(); ?>upload/gallery.php?imagen=<?php echo $fila['imagen1']; ?>
<?php } } ?>
What it does, is basically creates the array based on $data->result_array(), and when $fila['imagen1'] is available, it will display the meta property.

Try it and let's see if it works out for you.

SeanLEE 11-02-2015 09:02 AM

Quote:

Originally Posted by zerovic (Post 20623200)
did you solve the issue? if not, add me on skype (tamas.redler) or icq (320334087) and i'll help you fix this badboy ;)

sent you a message on skype... help me out

SeanLEE 11-02-2015 10:18 AM

Quote:

Originally Posted by zerovic (Post 20623212)
Ok, so you posted this line, which doesn't seem to be working



and what I see, is that the $fila['imagen1']; don't display anything.

I would like to ask you to add this under this meta property line


and call the same url adding ?dev=1 to the end of the url

So we can make sure the the array already exists! As you stated, that the code works below, I assume that the array is not created when you try to use it. To make it work, simply create the array before adding the meta property, so it will look like this



What it does, is basically creates the array based on $data->result_array(), and when $fila['imagen1'] is available, it will display the meta property.

Try it and let's see if it works out for you.


Thanks for your work!!!! Job complete!~ Im VERY happy and I think I just found a new programmer for my team!!!!

Thanks Zerovic your the man!!!! (and you work super fast!)


All times are GMT -7. The time now is 03:13 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123