1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please help getting this simple code correct

Discussion in 'PHP' started by enikram, Feb 22, 2015.

  1. #1
    Please help getting this the right way:
    The following image source code in the website is a result of a markup.
    <div class="http://website.com/image.jpg" data-rsBigImg="http://website.com/image.jpg" alt="Alternative Text"/><div class="rsCaption"></div></div>
    Code (markup):


    Markup:
    
    <div class="rsContent">
      {{image_tag}}
      {{thumbnail}}
      {{html}}
      {{animated_blocks}}
      {{#link_url}}
      <a class="rsLink" href="{{link_url}}">{{title}}</a>
      {{/link_url}}
      <div class="rsCaption">
      {{description}}
    </div>
    </div>
    
    Code (markup):

    One issue with it is repeating image link.
    How do I edit the markup to simplify it and perhaps get the following image code(or similar)
    img src="http://website.com/image.jpg" alt="Alternative Text" <div class="rsCaption">
    description goes here</div>
    
    Code (markup):

     
    enikram, Feb 22, 2015 IP
  2. showgun

    showgun Member

    Messages:
    22
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    38
    #2
    OK. And how is it supposed to be?
    {{#link_url}
    <a class="rsLink" href="{{link_url}}">{{title}}</a>
    {{/link_url}}

    What is in {{link_url}} ? Is it a loop or a variable?

    Really hard to figure it out what you want to achieve. Maybe you should post a piece of php code as well.
     
    showgun, Feb 28, 2015 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    NONE of that makes ANY sense whatsoever -- it's all utter and complete gibberish. You have a URI as a class, stupid malfing data- attributes for christmas only knows what, ALT on an element (DIV) that doesn't even have ALT, your alleged PHP "markup" looks like some sort of templating system stupidity (when PHP is a templating system, so what're all those curly brackets even for?!?), unclosed tags...

    What are you trying to accomplish and in what languages? That sure as shine-ola isn't HTML or PHP.
     
    deathshadow, Mar 4, 2015 IP