Attn Programmers I Will Pay 25USD To Fix One Line Of Code (NEEDED ASAP)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SeanLEE
    Confirmed User
    • Feb 2006
    • 1556

    #1

    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
    I spammed in threads!
  • 2MuchMark
    Mark of 2Much.net
    • Aug 2004
    • 51012

    #2
    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']; ?>"

    Comment

    • SeanLEE
      Confirmed User
      • Feb 2006
      • 1556

      #3
      Originally posted by MarkPrince
      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']
      I spammed in threads!

      Comment

      • sarettah
        see you later, I'm gone
        • Oct 2002
        • 14351

        #4
        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.

        .
        All cookies cleared!

        Comment

        • sarettah
          see you later, I'm gone
          • Oct 2002
          • 14351

          #5
          Originally posted by SeanLEE
          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.
          All cookies cleared!

          Comment

          • SeanLEE
            Confirmed User
            • Feb 2006
            • 1556

            #6
            Originally posted by sarettah
            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
            I spammed in threads!

            Comment

            • zerovic
              Confirmed User
              • Apr 2010
              • 1115

              #7
              did you solve the issue? if not, add me on skype (tamas.redler) or icq (320334087) and i'll help you fix this badboy ;)
              php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

              Comment

              • tical
                Confirmed User
                • Feb 2002
                • 6504

                #8
                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.
                112.020.756

                Comment

                • SeanLEE
                  Confirmed User
                  • Feb 2006
                  • 1556

                  #9
                  Originally posted by tical
                  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?
                  I spammed in threads!

                  Comment

                  • zerovic
                    Confirmed User
                    • Apr 2010
                    • 1115

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

                    <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
                    <?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

                    <?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.
                    php, html, jquery, javascript, wordpress - contact me at contact at zerovic.com

                    Comment

                    • SeanLEE
                      Confirmed User
                      • Feb 2006
                      • 1556

                      #11
                      Originally posted by zerovic
                      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
                      I spammed in threads!

                      Comment

                      • SeanLEE
                        Confirmed User
                        • Feb 2006
                        • 1556

                        #12
                        Originally posted by zerovic
                        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!)
                        I spammed in threads!

                        Comment

                        Working...