Wish List
<?phpfunction beforeaddition(&$object){ if ($object->objecttype == 'link' && !$object->expire && $object->type == 'thattype') $object->expire = time() + 86400 * 10;}?>
<tr> <td class="labelscolumn"><span class="labels">{LANG_SUGGESTLINK_EXPIRE}:</span><br>{LANG_SUGGESTLINK_EXPIREHELP}</td> <td class="optionscolumn"><input type="text" size="5" name="expire" value="{LINKEXPIRE}" /></td></tr>
<IF {LINKTYPE} is thattype><input type="hidden" name="expiredays" value="10" /></IF>
This thread is closed, so you cannot post a reply.
Comments on Wish List
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Would it be possible to have a "Default Days to Expiration" applicable to just one particular link type?
I want to have a classifieds section whereby they are only available for so long, but no default timing on the rest of the site.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
You could make a beforeaddition.php file in your plugins directory with this content:
Where 10 is changed to desired number of days and thattype is the type.
Alternatively it can be done from the template side (as 4.0 requires): in the suggest link template, remove and then insert at the top or bottom where it's not restricted to administrators.