Muchos cambios. Adaptación a la propuesta.

git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_Web/trunk@28 77ab8c26-3d69-2c4d-86f2-786f4ba54905
This commit is contained in:
David Arranz 2011-08-12 17:29:09 +00:00
parent f6bca8dd5a
commit 5ee16b2ef3
8 changed files with 313 additions and 312 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -5,7 +5,7 @@ Plugin URI: http://www.seodenver.com/contact-form-7-hidden-fields/
Description: Add hidden fields to the popular Contact Form 7 plugin.
Author: Katz Web Services, Inc.
Author URI: http://www.katzwebservices.com
Version: 1.2
Version: 1.2.1
*/
/* Copyright 2011 Katz Web Services, Inc. (email: info at katzwebservices.com)

View File

@ -12,7 +12,7 @@ Contact Form 7 - Add useful modules such as hidden fields and "send all fields"
### Add Hidden Fields to Contact Form 7
The Contact Form 7 plugin has over 4.2 <em>million</em> downloads, yet the great plugin still lacks a simple feature: hidden fields. This plugin adds hidden fields to Contact Form 7 once and for all.
The Contact Form 7 plugin has over <em>4 million</em> downloads, yet the great plugin still lacks a simple feature: <strong>hidden fields</strong>. This plugin adds hidden fields to Contact Form 7 once and for all.
#### Inserting dynamic values
@ -28,7 +28,7 @@ You can also choose to have the value of the hidden field dynamically populated
Now, when someone contacts you using your Contact Form 7 contact form, you can have lots more information about their visit - and you'll see it when you receive the email that tells you you've been contacted.
### Easily Email All Submitted Fields
### Easily Send All Submitted Fields At Once
####Save time setting up your form emails...and never miss a field!
@ -58,6 +58,9 @@ Using the <strong>Send All Fields</strong> module, you simply need to add `[all-
== Changelog ==
= 1.2.1 =
* Added support for checkboxes with Send All Fields (`[all-fields]`)
= 1.2 =
* Hidden fields are now displayed inside a hidden `<div>` instead of Contact Form 7's default `<p>`. This makes hidden fields more hidden :-)
* Added brand-new module: Send All Fields. Allows you to add a `[all-fields]` tag to your email message that includes every submitted field in one tag.
@ -75,6 +78,9 @@ Using the <strong>Send All Fields</strong> module, you simply need to add `[all-
== Upgrade Notice ==
= 1.2.1 =
* Added support for checkboxes with Send All Fields (`[all-fields]`)
= 1.2 =
* Hidden fields are now displayed inside a hidden `<div>` instead of Contact Form 7's default `<p>`. This makes hidden fields more hidden :-)
* Added brand-new module: Send All Fields. Allows you to add a `[all-fields]` tag to your email message that includes every submitted field in one tag.

View File

@ -5,7 +5,7 @@ Plugin URI: http://www.seodenver.com/contact-form-7-hidden-fields/
Description: Send all submitted fields in the message body using one simple tag: <code>[all-fields]</code>
Author: Katz Web Services, Inc.
Author URI: http://www.katzwebservices.com
Version: 1.2
Version: 1.2.1
*/
/* Copyright 2011 Katz Web Services, Inc. (email: info at katzwebservices.com)
@ -59,6 +59,9 @@ function hidden_wpcf7_before_send_mail($array) {
$postbody = ''; if($html) { $postbody = '<dl>'; }
foreach($post as $k => $v) {
if(is_array($v)) {
$v = implode(', ', $v);
}
if($html) {
$postbody .= "<dt style='font-size:1.2em;'><font size='3'><strong>{$k}</strong>:</font></dt><dd style='padding:0 0 .5em 1.5em; margin:0;'>{$v}</dd>";
} else {

View File

@ -1,255 +0,0 @@
<?php
/**
* Template Name: Contact
* The main template file for display contact page.
*
* @package WordPress
*/
/**
* if not submit form
**/
if(!isset($_GET['your_name']))
{
if(!isset($hide_header) OR !$hide_header)
{
get_header();
}
/**
* Get Current page object
**/
$page = get_page($post->ID);
/**
* Get current page id
**/
if(!isset($current_page_id) && isset($page->ID))
{
$current_page_id = $page->ID;
}
$page_description = get_post_meta($current_page_id, 'page_description', true);
$page_sidebar = get_post_meta($current_page_id, 'page_sidebar', true);
if(empty($page_sidebar))
{
$page_sidebar = 'Contact Sidebar';
}
$caption_class = 'page_caption';
$caption_style = get_post_meta($current_page_id, 'caption_style', true);
if(empty($caption_style))
{
$caption_style = 'Title & Description';
}
if(!isset($hide_header) OR !$hide_header)
{
?>
<div class="<?php echo $caption_class?>">
<div class="caption_inner">
<?php
$page_desc = get_post_meta($current_page_id, 'page_desc', true);
switch($caption_style)
{
case 'Description Only':
if(!empty($page_desc))
{
?>
<div class="caption_header">
<h2 class="cufon"><?php echo $page_desc; ?></h2>
</div>
<?php
}
break;
case 'Title Only':
?>
<div class="caption_header">
<h1 class="cufon"><?php the_title(); ?></h1>
</div>
<?php
break;
case 'Title & Description':
?>
<div class="caption_header">
<h1 class="cufon"><?php the_title(); ?></h1>
</div>
<div class="caption_desc">
<?php echo $page_desc; ?>
</div>
<?php
break;
}
?>
<br class="clear"/>
</div>
</div>
<!-- Begin content -->
<div id="content_wrapper" class="content_bg">
<div class="inner">
<!-- Begin main content -->
<div class="inner_wrapper">
<?php
}
?>
<div class="sidebar_content">
<?php
if(!isset($hide_header) OR !$hide_header)
{
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php the_content(); break; ?><br/><br/>
<?php endwhile;
}
?>
<form id="contact_form" method="post" action="<?php echo curPageURL(); ?>" style="margin-top:10px">
<p>
<label for="your_name"><?php _e('Name'); ?></label><br/>
<input id="your_name" name="your_name" type="text" style="width:94%"/>
</p>
<p style="margin-top:20px">
<label for="email"><?php _e('Email'); ?></label><br/>
<input id="email" name="email" type="text" style="width:94%"/>
</p>
<p style="margin-top:20px">
<label for="message"><?php _e('Text'); ?></label><br/>
<textarea id="message" name="message" rows="7" cols="10" style="width:94%"></textarea>
</p>
<p style="margin-top:20px">
<input type="submit" value="<?php _e('Submit');?>"/><br/>
</p>
</form>
<div id="reponse_msg"></div>
<br/><br/>
</div>
<div class="sidebar_wrapper">
<div class="sidebar_top"></div>
<div class="sidebar">
<div class="content">
<ul class="sidebar_widget">
<?php dynamic_sidebar($page_sidebar); ?>
</ul>
</div>
</div>
<br class="clear"/>
<div class="sidebar_bottom"></div>
</div>
</div>
<!-- End main content -->
<br class="clear"/>
<?php
if(!isset($hide_header) OR !$hide_header)
{
?>
</div>
</div>
<!-- End content -->
<?php get_footer(); ?>
<?php
}
?>
<?php
}
//if submit form
else
{
/*
|--------------------------------------------------------------------------
| Mailer module
|--------------------------------------------------------------------------
|
| These module are used when sending email from contact form
|
*/
//Get your email address
$contact_email = get_option('pp_contact_email');
//Enter your email address, email from contact form will send to this addresss. Please enter inside quotes ('myemail@email.com')
define('DEST_EMAIL', $contact_email);
//Change email subject to something more meaningful
define('SUBJECT_EMAIL', 'Email from contact form');
//Thankyou message when message sent
define('THANKYOU_MESSAGE', 'Thank you! We will get back to you as soon as possible');
//Error message when message can't send
define('ERROR_MESSAGE', 'Oops! something went wrong, please try to submit later.');
/*
|
| Begin sending mail
|
*/
$from_name = $_GET['your_name'];
$from_email = $_GET['email'];
$message = 'Name: '.$from_name.PHP_EOL;
$message.= 'Email: '.$from_email.PHP_EOL.PHP_EOL;
$message.= 'Message: '.PHP_EOL.$_GET['message'];
if(!empty($from_name) && !empty($from_email) && !empty($message))
{
mail(DEST_EMAIL, SUBJECT_EMAIL, $message);
echo THANKYOU_MESSAGE;
echo '</p>';
exit;
}
else
{
echo ERROR_MESSAGE;
exit;
}
/*
|
| End sending mail
|
*/
}
?>

View File

@ -1,6 +1,6 @@
<?php
/**
* Template Name: Portfolio
* Template Name: Proyectos
* The main template file for display portfolio page.
*
* @package WordPress

View File

@ -0,0 +1,241 @@
<?php
/* Template Name: Colaboradores */
function cleanSource($src) {
return str_replace('http://localhost/lqdvi', '', $src);
}
if (!isset($hide_header) OR !$hide_header) {
get_header();
}
$pp_webcam_url = get_option('pp_webcam_url');
$pp_capturas_style = get_option('pp_capturas_style');
if (empty($pp_capturas_style)) {
$pp_capturas_style = '1';
}
$pp_capturas_img_width = get_option('pp_capturas_img_width');
if (empty($pp_capturas_img_width)) {
$pp_capturas_img_width = 240;
}
$pp_capturas_img_height = get_option('pp_capturas_img_height');
if (empty($pp_capturas_img_height)) {
$pp_capturas_img_height = 240;
}
if (!isset($hide_header) OR !$hide_header) {
get_header();
}
$caption_class = "page_caption";
$portfolio_sets_query = '';
/**
* Get Current page object
* */
$page = get_page($post->ID);
/**
* Get current page id
* */
if (!isset($current_page_id) && isset($page->ID)) {
$current_page_id = $page->ID;
}
$caption_style = get_post_meta($current_page_id, 'caption_style', true);
if (empty($caption_style)) {
$caption_style = 'Title & Description';
}
if (!isset($hide_header) OR !$hide_header) {
?>
<div class="<?php echo $caption_class ?> capturas">
<div class="caption_inner">
<?php
$page_desc = get_post_meta($current_page_id, 'page_desc', true);
switch ($caption_style) {
case 'Description Only':
if (!empty($page_desc)) {
?>
<div class="caption_header">
<h2 class="cufon"><?php echo $page_desc; ?></h2>
</div>
<?php
}
break;
case 'Title Only':
?>
<div class="caption_header">
<h1 class="cufon"><?php _(the_title()); ?></h1>
</div>
<?php
break;
case 'Title & Description':
?>
<div class="caption_header">
<h1 class="cufon"><?php _(the_title()); ?></h1>
</div>
<div class="caption_desc">
<a href="<?php echo $pp_webcam_url; ?>"><?php _e($page_desc); ?></a>
</div>
<?php
break;
}
?>
<br class="clear"/>
</div>
</div>
<!-- Begin content -->
<div id="content_wrapper" class="content_bg">
<div class="inner">
<!-- Begin main content -->
<div class="inner_wrapper capturas"><br class="clear"/>
<?php
} else {
echo '<br class="clear"/>';
}
?>
<!-- Begin portfolio content -->
<?php
$menu_sets_query = '';
$captura_items = get_option('pp_capturas_items');
if (empty($captura_items)) {
$captura_items = 12;
}
$captura_sort = get_option('pp_capturas_sort');
if (empty($captura_sort)) {
$captura_sort = 'DESC';
}
//prepare data for pagination
$offset_query = '';
if (!isset($_GET['page']) OR empty($_GET['page']) OR $_GET['page'] == 1) {
$current_page = 1;
} else {
$current_page = $_GET['page'];
$offset = (($current_page - 1) * $captura_items);
}
$args = array(
'numberposts' => $captura_items,
'order' => $captura_sort,
'orderby' => 'date',
'post_type' => array('capturas'),
'offset' => $offset,
);
$page_photo_arr = get_posts($args);
//Get all portfolio items for paging
$args = array(
'numberposts' => -1,
'order' => $captura_sort,
'orderby' => 'date',
'post_type' => array('capturas'),
);
$all_photo_arr = get_posts($args);
$total = count($all_photo_arr);
if (isset($page_photo_arr) && !empty($page_photo_arr)) {
?>
<?php
foreach ($page_photo_arr as $key => $captura_item) {
$image_url = '';
if (has_post_thumbnail($captura_item->ID, 'large')) {
$image_id = get_post_thumbnail_id($captura_item->ID);
$image_url = wp_get_attachment_image_src($image_id, 'large', true);
//$image_url[0] = cleanSource($image_url[0]);
$small_image_url = get_bloginfo('stylesheet_directory') . '/timthumb.php?src=' . cleanSource($image_url[0]) . '&amp;h=' . $pp_capturas_img_height . '&amp;w=' . $pp_capturas_img_width . '&amp;zc=1';
$permalink_url = get_permalink($captura_item->ID);
$titulo = _($captura_item->post_title);
$texto = pp_substr(strip_tags(strip_shortcodes($captura_item->post_content)), 50);
if ($texto != "") {
$texto = "&#013;" . $texto;
}
$last_class = '';
$line_break = '';
if (($key + 1) % $captura_items == 0) {
$last_class = ' last';
if (isset($page_photo_arr[$key + 1])) {
$line_break = '<br class="clear"/><br/><br/><br/>';
} else {
$line_break = '<br class="clear"/>';
}
}
?>
<div class="<?php echo $last_class ?> captura" style="height: <?php echo $pp_capturas_img_height;?>px; width: <?php echo $pp_capturas_img_width;?>px;">
<img src="<?php echo $small_image_url; ?>" title="<?php echo $titulo.$texto; ?>" class="fade"/>
</div>
<?php
}
?>
<?php
echo $line_break;
}
//End foreach loop
?>
<?php
$base_link = get_permalink($post->ID);
echo gen_pagination($total, $current_page, $base_link, TRUE, $captura_items);
}
//End if have portfolio items
?>
</div>
<!-- End main content -->
<br class="clear"/><br/><br/>
</div>
<?php
if (!isset($hide_header) OR !$hide_header) {
?>
</div>
<!-- End content -->
<?php get_footer(); ?>
<?php
}
?>