Changeset 10035 for extensions/ContactForm
- Timestamp:
- Apr 4, 2011, 2:51:28 PM (14 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin/themes/cf_config.tab.tpl
r8689 r10035 1 {html_head} 2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 3 {known_script id="jquery.ui.tabs" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.tabs.packed.js"} 4 {/html_head} 1 {combine_script id="jquery.ui.tabs"} 5 2 6 3 <div class="titrePage"> … … 71 68 <p><input class="submit" type="submit" value="{'cf_validate'|@translate}" name="submit"></p> 72 69 </form> 73 {literal} 74 <script type="text/javascript"> 70 {footer_script}{literal} 75 71 $(document).ready(function() { 76 72 $(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 77 73 $(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 78 74 }); 79 </script> 80 {/literal} 75 {/literal}{/footer_script} -
extensions/ContactForm/admin/themes/cf_emails.tab.tpl
r8689 r10035 1 {html_head} 2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 3 {known_script id="jquery.ui.tabs" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.tabs.packed.js"} 4 {/html_head} 1 {combine_script id="jquery.ui.tabs"} 5 2 6 3 <div class="titrePage"> … … 43 40 <p><input class="submit" type="submit" value="{'cf_validate'|@translate}" name="submit"></p> 44 41 </form> 45 {literal} 46 <script type="text/javascript"> 42 {footer_script}{literal} 47 43 $(document).ready(function() { 48 44 $(".infos").fadeOut(800).fadeIn(1200).fadeOut(400).fadeIn(800).fadeOut(400); 49 45 $(".errors").fadeOut(200).fadeIn(200).fadeOut(300).fadeIn(300).fadeOut(400).fadeIn(400); 50 46 }); 51 </script> 52 {/literal} 47 {/literal}{/footer_script} 53 48 {$CF_DEBUG} -
extensions/ContactForm/classes/cf_plugin.class.php
r9070 r10035 187 187 'cf_messages' => realpath(cf_get_template('cf_messages.tpl')), 188 188 )); 189 $template->block_html_head( '', 190 '<link rel="stylesheet" type="text/css" '. 191 'href="' . CF_INCLUDE . 'contactform.css' . '">', 192 $smarty, $repeat); 193 $template->block_html_head( '', 194 '<script type="text/javascript" '. 195 'src="' . CF_INCLUDE . 'contactform.js' . '">'. 196 '</script>', 197 $smarty, $repeat); 189 198 190 $cf = array( 199 191 'TITLE' => 'contact_form_title', … … 207 199 'SUBJECT' => $infos['cf_subject'], 208 200 'MESSAGE' => $infos['cf_message'], 209 'KEY' => get_ comment_post_key($infos['cf_id']),201 'KEY' => get_ephemeral_key(2, $infos['cf_id']), 210 202 ); 211 203 if (!empty($infos['errors'])) { … … 463 455 $id = trim( stripslashes($_POST['cf_id'])); 464 456 } 465 466 $key = explode( ':', $key ); 467 if ( count($key)!=2 468 or $key[0]>time()-2 // page must have been retrieved more than 2 sec ago 469 or $key[0]<time()-3600 // 60 minutes expiration 470 or hash_hmac( 471 'md5', $key[0].':'.$id, $conf['secret_key'] 472 ) != $key[1] 473 ) 474 { 457 458 if (!verify_ephemeral_key($key, $id)) { 475 459 return false; 476 460 } -
extensions/ContactForm/include/cf_functions.inc.php
r8910 r10035 53 53 I.user_id = U.'.$conf['user_fields']['id'].' and 54 54 I.status in (\'webmaster\', \'admin\') and 55 I.adviser = \'false\' and56 55 '.$conf['user_fields']['email'].' is not null and 57 56 I.user_id <> '.$user['id'].' … … 88 87 I.user_id = U.'.$conf['user_fields']['id'].' and 89 88 I.status in (\'webmaster\', \'admin\') and 90 I.adviser = \'false\' and91 89 '.$conf['user_fields']['email'].' is not null 92 90 order by -
extensions/ContactForm/include/contactform.css
r8479 r10035 43 43 } 44 44 45 /* jQuery ui resizable */ 46 .ui-resizable { position: relative; } 47 .ui-wrapper { border: 0; } 48 .ui-wrapper input, .ui-wrapper textarea { border: 0; } 49 50 /* Global handle styles */ 51 .ui-resizable-handle { position: absolute; display: none; font-size: 0.1px; } 52 .ui-resizable .ui-resizable-handle { display: block; } 53 body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ 54 body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ 55 .ui-resizable-n { 56 cursor: n-resize; 57 height: 6px; 58 width: 100%; 59 top: 0px; 60 left: 0px; 61 background: transparent url('../images/resizable-n.gif') no-repeat scroll center top; 62 } 63 .ui-resizable-s { cursor: s-resize; height: 6px; width: 100%; bottom: 0px; left: 0px; background: transparent url(../../../admin/themes/roma/images/resizable-s.gif) no-repeat scroll center top; } 64 .ui-resizable-e { cursor: e-resize; width: 6px; right: 0px; top: 0px; height: 100%; background: transparent url(../../../admin/themes/roma/images/resizable-e.gif) no-repeat scroll right center; } 65 .ui-resizable-w { cursor: w-resize; width: 6px; left: 0px; top: 0px; height: 100%; background: transparent url(../../../admin/themes/roma/images/resizable-w.gif) no-repeat scroll right center; } 66 .ui-resizable-se { cursor: se-resize; width: 9px; height: 9px; right: 0px; bottom: 0px; background: transparent url(../../../admin/themes/roma/images/resizable-se.gif); } 67 .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: 0px; bottom: 0px; background: transparent url(../../../admin/themes/roma/images/resizable-sw.gif); } 68 .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(../../../admin/themes/roma/images/resizable-nw.gif); } 69 .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(../../../admin/themes/roma/images/resizable-ne.gif); } 45 #cf_message {width:400px;height:200px;} -
extensions/ContactForm/themes/cf_button.tpl
r8479 r10035 1 {html_head}2 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}3 {/html_head}4 5 1 <div class="cf-button"> 6 2 <input type="button" value="{'cf_hide'|@translate}" onclick="hide('cf_messages');"> 7 3 </div> 8 {literal} 9 <script type="text/javascript"> 4 5 {footer_script require="jquery"}{literal} 10 6 function hide(id) { 11 7 var element = document.getElementById(id); … … 15 11 } 16 12 } 17 </script> 18 {/literal} 13 {/literal}{/footer_script} -
extensions/ContactForm/themes/cf_form.tpl
r8479 r10035 1 {html_head} 2 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 9 jQuery().ready(function(){ 10 // Resize possible for textarea 11 jQuery("#cf_message").resizable({ 12 handles: "all", 13 animate: true, 14 animateDuration: "slow", 15 animateEasing: "swing", 16 preventDefault: true, 17 preserveCursor: true, 18 autoHide: true, 19 ghost: true 20 }); 21 }); 22 jQuery().ready(function(){ 23 // Resize possible for textarea 24 jQuery(".cf-input").resizable({ 25 handles: "e", 26 animate: true, 27 animateDuration: "slow", 28 animateEasing: "swing", 29 preventDefault: true, 30 preserveCursor: true, 31 autoHide: true, 32 ghost: true 33 }); 34 }); 35 4 {footer_script}{literal} 36 5 function cf_validate() { 37 6 var items = new Array('cf_from_name','cf_from_mail','cf_subject','cf_message'); … … 58 27 return true; 59 28 } 60 </script> 61 {/literal} 29 {/literal}{/footer_script} 30 62 31 <div id="autre_content" class="contact-form"> 63 32 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();"> -
extensions/ContactForm/themes/simple-black/cf_form.tpl
r8479 r10035 1 {html_head} 2 <!-- {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --> 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 4 {footer_script}{literal} 9 5 jQuery().ready(function(){ 10 6 // Resize possible for textarea … … 58 54 return true; 59 55 } 60 </script> 61 {/literal} 56 {/literal}{/footer_script} 57 62 58 <div id="subcontent" class="contact-form"> 63 59 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();"> -
extensions/ContactForm/themes/simple-sunset/cf_form.tpl
r8479 r10035 1 {html_head} 2 <!-- {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --> 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 4 {footer_script}{literal} 9 5 jQuery().ready(function(){ 10 6 // Resize possible for textarea … … 58 54 return true; 59 55 } 60 </script> 61 {/literal} 56 {/literal}{/footer_script} 57 62 58 <div id="subcontent" class="contact-form"> 63 59 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();"> -
extensions/ContactForm/themes/simple-white/cf_form.tpl
r8479 r10035 1 {html_head} 2 <!-- {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --> 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 4 {footer_script}{literal} 9 5 jQuery().ready(function(){ 10 6 // Resize possible for textarea … … 58 54 return true; 59 55 } 60 </script> 61 {/literal} 56 {/literal}{/footer_script} 57 62 58 <div id="subcontent" class="contact-form"> 63 59 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();"> -
extensions/ContactForm/themes/simple/cf_form.tpl
r8479 r10035 1 {html_head} 2 <!-- {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --> 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 4 {footer_script}{literal} 9 5 jQuery().ready(function(){ 10 6 // Resize possible for textarea … … 58 54 return true; 59 55 } 60 </script> 61 {/literal} 56 {/literal}{/footer_script} 57 62 58 <div id="subcontent" class="contact-form"> 63 59 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();"> -
extensions/ContactForm/themes/stripped/cf_form.tpl
r8478 r10035 1 {html_head} 2 <!-- {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --> 3 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 4 {known_script id="jquery.ui.resizable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.resizable.packed.js"} 5 {/html_head} 1 {combine_css path="plugins/ContactForm/include/contactform.css"} 2 {combine_script id="ContactForm" load="async" path="plugins/ContactForm/include/contactform.js"} 6 3 7 {literal} 8 <script type="text/javascript"> 4 {footer_script}{literal} 9 5 jQuery().ready(function(){ 10 6 // Resize possible for textarea … … 58 54 return true; 59 55 } 60 </script> 61 {/literal} 56 {/literal}{/footer_script} 57 62 58 <div id="subcontent" class="contact-form"> 63 59 <form method="post" action="{$CF.F_ACTION}" class="filter" id="contactform" onsubmit="return cf_validate();">
Note: See TracChangeset
for help on using the changeset viewer.