Changeset 14428 for extensions


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

[extensions] - ContactForm - add perso text on form

Location:
extensions/ContactForm
Files:
2 added
10 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   
  • extensions/ContactForm/config.php

    r9070 r14428  
    88$config_tabs[]='config';
    99$config_tabs[]='emails';
     10$config_tabs[]='persoform';
    1011
    1112global $template, $page;
  • extensions/ContactForm/language/en_UK/plugin.lang.php

    r14044 r14428  
    6767$lang['cf_no_mail'] = 'No e-mail address available';
    6868$lang['cf_refresh'] = 'Regenerate e-mail list address';
     69// persoformtab
     70$lang['cf_tab_persoform'] = 'Add text Form';
     71$lang['Add text to the contact form'] = 'Add text to the contact form';
     72$lang['Add text above'] = 'Add text above';
     73$lang['Add text below'] = 'Add text below';
     74$lang['use tag < div id="persoformtop" > to customize your personal text'] = 'use tag < div id="persoformtop" > to customize your personal text';
     75$lang['use tag < div id="persoformbottom" > to customize your personal text'] = 'use tag < div id="persoformbottom" > to customize your personal text';
     76$lang['if plugin ExtendedDescription is actif, you can use tags [lang]'] = 'if plugin ExtendedDescription is actif, you can use tags [lang]';
    6977?>
  • extensions/ContactForm/language/fr_FR/plugin.lang.php

    r14140 r14428  
    6767$lang['cf_no_mail'] = 'Aucune adresse e-mail disponible';
    6868$lang['cf_refresh'] = 'Regénérer la liste des adresses';
     69// persoformtab
     70$lang['cf_tab_persoform'] = 'Ajouter texte perso au Formulaire';
     71$lang['Add text to the contact form'] = 'Ajouter du texte au formulaire de contact';
     72$lang['Add text above'] = 'Texte ajouter au dessus';
     73$lang['Add text below'] = 'Texte ajouter en dessous';
     74$lang['use tag < div id="persoformtop" > to customize your personal text'] = 'utiiser la balise < div id="persoformtop" > pour personaliser le texte';
     75$lang['use tag < div id="persoformbottom" > to customize your personal text'] = 'utiiser la balise < div id="persoformbottom" > pour personaliser le texte';
     76$lang['if plugin ExtendedDescription is actif, you can use tags [lang]'] = 'Si le plugin ExtendedDescription est actif, vous pouvez utiliser les balises [lang]';
    6977?>
  • extensions/ContactForm/themes/cf_form.tpl

    r10035 r14428  
    2828}
    2929{/literal}{/footer_script}
    30 
     30<div id="persoformtop">{$PERSOFORMTOP}</div>
    3131<div id="autre_content" class="contact-form">
    3232  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    7373  </form>
    7474</div>
     75<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
  • extensions/ContactForm/themes/simple-black/cf_form.tpl

    r10035 r14428  
    5555}
    5656{/literal}{/footer_script}
    57 
     57<div id="persoformtop">{$PERSOFORMTOP}</div>
    5858<div id="subcontent" class="contact-form">
    5959  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    100100  </form>
    101101</div>
     102<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
  • extensions/ContactForm/themes/simple-sunset/cf_form.tpl

    r10035 r14428  
    5555}
    5656{/literal}{/footer_script}
    57 
     57<div id="persoformtop">{$PERSOFORMTOP}</div>
    5858<div id="subcontent" class="contact-form">
    5959  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    100100  </form>
    101101</div>
     102<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
  • extensions/ContactForm/themes/simple-white/cf_form.tpl

    r10035 r14428  
    5555}
    5656{/literal}{/footer_script}
    57 
     57<div id="persoformtop">{$PERSOFORMTOP}</div>
    5858<div id="subcontent" class="contact-form">
    5959  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    100100  </form>
    101101</div>
     102<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
  • extensions/ContactForm/themes/simple/cf_form.tpl

    r10035 r14428  
    5555}
    5656{/literal}{/footer_script}
    57 
     57<div id="persoformtop">{$PERSOFORMTOP}</div>
    5858<div id="subcontent" class="contact-form">
    5959  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    100100  </form>
    101101</div>
     102<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
  • extensions/ContactForm/themes/stripped/cf_form.tpl

    r12933 r14428  
    5555}
    5656{/literal}{/footer_script}
    57 
     57<div id="persoformtop">{$PERSOFORMTOP}</div>
    5858<div id="subcontent" class="contact-form">
    5959  <form  method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
     
    100100  </form>
    101101</div>
     102<div id="persoformbottom">{$PERSOFORMBOTTOM}</div>
Note: See TracChangeset for help on using the changeset viewer.