WordPress Link Directory Edit

WordPress Link Directory Edit
I’m running WordPress Link Directory (http://wordpress.org/extend/plugins/wordpress-link-directory/) and need a conditional if/else statement added at one point in the script where it checks to see if the URL contains the keyword download and if it does then it displays one bit of code, and if it doesn’t then it displays a slightly different bit of code. I need to be able to display the same link directory on two different pages in WordPress but one without a specific line of code.

I need to display this if the URL contains “download”:
$page.='<td bgcolor=#AAB882 width=”100%” style=”padding: 3px;”><b><span style=”font-size: 16px;” valign=top><a style=”font-size: 16px;” target=”‘.$Target.'” href=”‘.$Link[‘url’].'”‘.$NoFollow.’>’.stripslashes($Link[‘title’]).'</a></SPAN></b><table border=0 bgcolor=#ffffff><tr><td valign=top><img src=”http://open.thumbshots.org/image.aspx?url=’.$Link[‘url’].'” width=”120″ height=”90″ border=”1″></td><td>’.$Link[‘description’].’ ‘.$LinkFlagging.'<p><a style=”text-decoration: underline;” target=”‘.$Target.'” href=”‘.$Link[‘url’].'”‘.$NoFollow.’>Click Here to Download Bonus</a></p></td></tr></table></td>
</tr></table>’;

Or display this, if the URL does not contain “download”:
$page.='<td bgcolor=#AAB882 width=”100%” style=”padding: 3px;”><b><span style=”font-size: 16px;” valign=top>’.stripslashes($Link[‘title’]).'</SPAN></b><table border=0 bgcolor=#ffffff><tr><td valign=top><img src=”http://open.thumbshots.org/image.aspx?url=’.$Link[‘url’].'” width=”120″ height=”90″ border=”1″></td><td>’.$Link[‘description’].’ ‘.$LinkFlagging.'</td></tr></table></td>
</tr></table>’;

I think this is a very small edit to add an if/else statement, but I’m not good with PHP so I can’t make it.

Leave a Reply

Your email address will not be published. Required fields are marked *