Jump to content

Help - Newbie at work!


rf2k

Recommended Posts

Ok first things first, i am absolutely hopeless when it comes to PHP and you are all much smarter than me....hence why im here.  I have an advertising website and when a user is not displaying an image with their link i want it to display a default one from Adhitz.  Can this be done?  I have a feeling this is the part of code that i need to edit but dont know how

 

<div class="ad-title">

                            <span class="pointer" onclick="window.open('index.php?view=surfer&t={$ad.token}','_blank');">{$ad.title|stripslashes}</span>
                        </div>
                        {if $adcategory[c].hide_descr != 1}
                        <div class="ad-content">
                        <table cellpadding="5" width="100%">
                        <tr>
            {if !empty($ad.img) && $ad.img != 'http://}
            <td valign="top" width="100">
            <img src="{$ad.img}" style="max-height:100px; max-width:100px" />
            </td>
            {/if}
                 <td valign="top">{$ad.descr|stripslashes}</td>
                 </tr>
                 </table>
                        </div>
                        {/if}
                        <div class="ad-footer">
                        Earn ${$ad.value}
                        </div>
 
 
And this is the code i want to put in when people arent using their own banner / image
 

I would imagine that you would need to add an "else" component to the following:

{if !empty($ad.img) && $ad.img != 'http://}
<td valign="top" width="100">
<img src="{$ad.img}" style="max-height:100px; max-width:100px" />
</td>
{/if}
 
I'm not sure what that would look like since the above code isn't quite PHP. It's more like placeholder text that's converted into PHP.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.