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):
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.
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.
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
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?
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
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.
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
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.