Banner on Directory Detail Page

Discussion in 'Directories' started by jminscoe, Dec 24, 2007.

  1. #1
    Ok I have a client and what we want is if a person is a featured he can show his banner on his detail page the thing is I cannot get it to work here is what I have
    {if $BANNER gt 0}
    <a href="{$URL|escape|trim}" target="_blank"><img src="{$BANNER|escape|trim}" /></a>
    {/if}
    Code (markup):
    I also tried
    {if $Featured gt 0}
    <a href="{$URL|escape|trim}" target="_blank"><img src="{$BANNER|escape|trim}" /></a>
    {/if}
    Code (markup):

     
    jminscoe, Dec 24, 2007 IP
  2. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #2
    try the phpLD forums.
     
    mikey1090, Dec 24, 2007 IP
  3. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi Mike
    I have it listed there also but so far the codes they have sent me haven't worked
     
    jminscoe, Dec 24, 2007 IP
  4. dargre

    dargre Peon

    Messages:
    1,007
    Likes Received:
    161
    Best Answers:
    0
    Trophy Points:
    0
    #4
    how can system know what is $BANNER variable?
    Do you have it defined?
    If not then what do you expect to be displayed?

    First new field to LINK table should be added.
    Then new definition for LINK BANNER in 'tables.php'
    Then at least new text box on submit page for banner URL.
    This is very basic as you should also have some restrictions concerning banner filetype and dimensions.

    Then in detail.php - defined variable for '<img>'

    - D.
     
    dargre, Dec 24, 2007 IP
  5. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #5
    I don't use phpLD, but it seems like the test that is done on the listings page to push the featured listings to the top would give you the variable you need. (Or you could check the tables.)

    If I were doing this, logically I would check to see if the listing is featured and then using that if then else structure display the banner or not.

    I would also name the banner xxx.jpg where xxx=the directory listing #/database entry # as this will not change and will make bookkeeping easier - trust me.

    I think you are making it harder than it has to be with that $Banner stuff.
     
    YMC, Dec 24, 2007 IP
  6. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #6
    in tables I have this
    	  'BANNER'    => 'C(255) NULL'         ,
    Code (markup):
    on submit page there is a place for banner url and in detail I have tried both variation above it will submit the banner but I just can't get it to show on the details pages of the featured clients

    and as for site it is located here dominicanclick.com
     
    jminscoe, Dec 24, 2007 IP
  7. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #7
    Can you get it to display for any listing? Meaning don't do the featured check and see if the variables are working right?

    You logic might be working fine, but the file upload and naming may be at fault somewhere.

    Looking at it again - where's the directory the file sits in is $Banner the name of the file only or the entire URL location?
     
    YMC, Dec 24, 2007 IP
  8. enQuira

    enQuira Peon

    Messages:
    1,584
    Likes Received:
    250
    Best Answers:
    0
    Trophy Points:
    0
    #8
    enQuira, Dec 24, 2007 IP
  9. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I have tried all option its just not showing the image it just shows the square with the red x in it.
    I am not sure if this helps but here is the code that shows where its at in the dir links edit tpl
    <td class="label required"><label for="BANNER">Banner:</label></td><td class="smallDesc"><a href="http://www.javiervicente.blogspot.com" target="_blank"><img src="http://www.dominicanclick.com/banners/GIF-Publicidad.gif" /></a><br /><input type="text" id="BANNER" name="BANNER" value="http://www.dominicanclick.com/banners/GIF-Publicidad.gif" class="text"/>
    Code (markup):
    and to see the page I am talking about is here
    dominicanclick.com/detail/link-42.html
     
    jminscoe, Dec 24, 2007 IP
  10. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #10
    The image path is not getting populated to the page. Looking at the generated source code it shows the image file as "".

    Seems like $Banner is not right somehow or your if then else logic is backwards.
     
    YMC, Dec 24, 2007 IP
  11. enQuira

    enQuira Peon

    Messages:
    1,584
    Likes Received:
    250
    Best Answers:
    0
    Trophy Points:
    0
    #11
    did you modify detail.php as needed?
    did you follow the steps in post 4 or in my post above?
     
    enQuira, Dec 24, 2007 IP
  12. paidhosting

    paidhosting Peon

    Messages:
    4,822
    Likes Received:
    483
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Talk to Dan from monster-submit.com he can surely help out with things like this. tell him i sent u he might be able to do it for free.

    Cheer
     
    paidhosting, Dec 24, 2007 IP
  13. jminscoe

    jminscoe Peon

    Messages:
    1,223
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #13
    @dargre he has your sponsored banner mod can that be used somehow to get this to work
     
    jminscoe, Dec 24, 2007 IP
  14. dargre

    dargre Peon

    Messages:
    1,007
    Likes Received:
    161
    Best Answers:
    0
    Trophy Points:
    0
    #14
    If that would be my mod - it has no such smarty variable like $BANNER.
    Also my mod doesn't play with submit or detail page though it's really easy to apply.

    All this talking is nonsense.
    There's too much questions about what the man has or doesn't have in his files.
    1. if field in table is created
    2. what is banner variable - url to homepage or url to image or it is converted to <img> on submit for saving.
    3. is it really saved in database when defined on submit page.
    4. if it is pushed do $data array on 'detail.php'
    5. if pushed and it's banner url - then if <img> variable is created.

    We can ask hours.
    And I do not have hours to spend on answering while seeing files could be done in minutes.
     
    dargre, Dec 24, 2007 IP
    jminscoe likes this.