PDA

View Full Version : featured links (mainpage)


munt
06-10-2006, 12:05 AM
hey guy
i have the latest 2 featured listings on my directory to appear on front page
the problem is that this one guy keeps submitting a featured listing then not paying

is there a way to mod this code to exclude pending featured links?

{foreach from=$feat3 item=link name=links}
<img border="0" width="111" height="87"
src="<A href="http://pthumbnails.alexa.com/image_server.cgi?site=webspassage.com&size=small&url={$link.URL}"><br><img">http://pthumbnails.alexa.com/image_server.cgi?site=webspassage.com&size=small&url={$link.URL}"><br><img src="<A href="http://www.webspassage.com/images/icons/featured.gif"><a">http://www.webspassage.com/images/icons/featured.gif"><a href="{$link.URL}" id="{$link.ID}">{$link.TITLE}</a><br><br />
{/foreach}

Optimit
06-10-2006, 12:13 AM
It would have to be coded to aquire the link status from the db. I am not completely sure how to do it all, but I will see if I can come up with something.

Of course, if one guy keeps doing it intentionally, you could always ban his IP.

anon
06-10-2006, 12:31 AM
Content visible to registered users only.

I'm not sure if your PHP call is pulling the necessary DB fields.

but from what i made bold above, your php is pulling teh status, and if the status is equal to two, which means the link is 'active' then you should be ok.

if you want to change the PHP, then add to your call AND STATUS = 2

^^that will only pull the featured links that are active via php, and you won't need to check via smarty.

Rob

munt
06-10-2006, 03:56 AM
i added that anon and now it doesnt show any featured links
approved ones or not..

i got spammed by some guy
over 100 false featured links and some regular links...

anon
06-10-2006, 02:15 PM
as noted, you might not be pulling the necessary fields (e.g. STATUS) in your call.

Optimit
06-10-2006, 02:32 PM
Munt, check your php files for this.

Content visible to registered users only.

And an0n can double check, but you may want to change it to something like this.

Content visible to registered users only.

KartKorner
06-10-2006, 02:43 PM
Looks good to me. Closely matches mine:

Content visible to registered users only.

anon
06-10-2006, 02:47 PM
Content visible to registered users only.
Thanks, Opti.

I'll be back in full swing soon to start helping out again. vacatioooon is overrrrrrrrr.... :D

edit: and umm.. if he changes the php call, there will no longer be a need for the {if} {/if} statement anymore.

munt
06-10-2006, 09:57 PM
cheers! Anon and Optimit (again)
i will make your sites featured
just woke up.. another 90 unpaid featured links to delete manually...

Optimit
06-10-2006, 09:59 PM
Munt, can you send me a PM with this guys info that you have? Some site URL and such.