Ignore:
Timestamp:
Apr 26, 2012, 1:18:31 AM (12 years ago)
Author:
ddtddt
Message:

[extensions] - ContactForm - add perso text on form

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/classes/cf_plugin.class.php

    r12925 r14428  
    187187        'cf_form'     => realpath(cf_get_template('cf_form.tpl')),
    188188        'cf_messages' => realpath(cf_get_template('cf_messages.tpl')),
     189      ));
     190         
     191          //charge Persoform
     192$PAED = pwg_db_fetch_assoc(pwg_query("SELECT state FROM " . PLUGINS_TABLE . " WHERE id = 'ExtendedDescription';"));
     193if($PAED['state'] == 'active') add_event_handler('AP_render_content', 'get_user_language_desc');         
     194         
     195$query = '
     196select param,value
     197        FROM ' . CONFIG_TABLE . '
     198  WHERE param = "persoformtop"
     199        ;';
     200$result = pwg_query($query);
     201$row = mysql_fetch_array($result);
     202$persoformtop=trigger_event('AP_render_content', $row['value']);   
     203  $template->assign(
     204    array(
     205      'PERSOFORMTOP' => $persoformtop,
     206      ));
     207         
     208         $query = '
     209select param,value
     210        FROM ' . CONFIG_TABLE . '
     211  WHERE param = "persoformbottom"
     212        ;';
     213$result = pwg_query($query);
     214$row = mysql_fetch_array($result);
     215$persoformbottom=trigger_event('AP_render_content', $row['value']);       
     216  $template->assign(
     217    array(
     218      'PERSOFORMBOTTOM' => $persoformbottom,
    189219      ));
    190220   
Note: See TracChangeset for help on using the changeset viewer.