Ignore:
Timestamp:
Oct 15, 2010, 4:20:39 PM (14 years ago)
Author:
plg
Message:

feature 1897 added: the core "Contact Webmaster" link in footer is replaced by
a link to the ContactForm page. It works with a smarty prefilter, so it should
work with all themes.

The configurable template variable name was removed. It is hard coded as
$ContactFormLink. I've seen no example using another variable name. It was
hard to understand for users in the administration panel and not very useful.
The corresponding language keys were removed from all languages.

bug 1916 fixed: apply the same rule for link display in footer as in menu. If
the administrator has allowed the ContactForm page for guests, let's display
it in the menu + footer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/cf_functions.inc.php

    r6547 r7197  
    140140  }
    141141}
     142
     143function contactForm_prefilter($content, &$smarty) {
     144  $search = '#{if\s+isset\s*\(\s*\$CONTACT_MAIL\s*\)\s*}.*?{/if}#s';
     145  $replacement = '{if isset($ContactFormLink)}{$ContactFormLink}{/if}';
     146
     147  return preg_replace($search, $replacement, $content);
     148}
    142149 
    143150function cf_clean_obsolete_files($obsolete_file_list) {
Note: See TracChangeset for help on using the changeset viewer.