Forum Replies Created

Viewing 15 posts - 16 through 30 (of 45 total)
  • Posted in:
  • jascin
    Member
    Post count: 47
    This reply has been marked as private.
    jascin
    Member
    Post count: 47
    This reply has been marked as private.
    jascin
    Member
    Post count: 47

    here’s the example.

    Attachments:
    You must be logged in to view attached files.
    jascin
    Member
    Post count: 47
    This reply has been marked as private.
    jascin
    Member
    Post count: 47

    Here it is

    Attachments:
    You must be logged in to view attached files.
    jascin
    Member
    Post count: 47
    jascin
    Member
    Post count: 47

    excerpt from

    in reply to: MODIFY Contact 7 for mymail_snippet #115712
    jascin
    Member
    Post count: 47

    would this be the right approach? I know making a plugin would take so much if i want it robust, but this is very specific and selective.

    in reply to: MODIFY Contact 7 for mymail_snippet #115706
    jascin
    Member
    Post count: 47

    Thank, you so. I already went and did the following.

    here’s the code
    <?php // Opening PHP tag – nothing should be before this, not even whitespace
    /*
    Plugin Name: mymail-contact
    Plugin URI: crestviewphotography.com
    Description: Mymail
    Author: Jasper
    Author URI: http://net.tutsplus.com
    Version: 1.0
    /*
    /*
    * requires a checkbox with the the name “newsletter” in your CF7
    */
    function wpcf7_my_validate( $result, $tag ) {
    $type = $tag[‘type’];
    $name = $tag[‘name’];

    if ( ‘newsletter’ == $name ) {

    $subscribe = isset($_POST[$name]);

    if(function_exists(‘mymail’) && $subscribe){
    $userdata = array(
    ’email’ => $_POST[’email’],
    ‘firstname’ => $_POST[‘firstname’],
    ‘lastname’ => $_POST[‘lastname’],
    );
    $list_ids = array(123, 456); // your list ids
    $overwrite = true;
    $subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
    if(!is_wp_error($subscriber_id)){
    mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
    }
    }
    }

    return $result;
    }
    add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );

    function getRefererPage( $form_tag )
    {
    if ( $form_tag[‘name’] == ‘referer-page’ ) {
    $form_tag[‘values’][] = $_SERVER[‘HTTP_REFERER’];
    }
    return $form_tag;
    }
    if ( !is_admin() ) {
    add_filter( ‘wpcf7_form_tag’, ‘getRefererPage’ );
    }

    the problem i have is identifying what are the elements into the code. for example, what are those values the codes i bold. I’ve attach the codes i have. I need a little direction here.

    Attachments:
    You must be logged in to view attached files.
    in reply to: MODIFY Contact 7 for mymail_snippet #115685
    jascin
    Member
    Post count: 47

    BTW, can the Mymail snippet can be converted as a plugin? instead of making the child theme? my theme breaks when i activate the child theme.

    in reply to: MODIFY Contact 7 for mymail_snippet #115622
    jascin
    Member
    Post count: 47

    My child theme is not functioning right….
    http://s28.postimg.org/79n5et6x9/child_theme_is_not_functioning_right.png

    CSS STYLE FILE I PUT

    /* LICENSE & DETAILS

    ==================================================

    Theme Name: Neighborhood

    Theme URI: http://neighborhood.swiftideas.net

    Description: A Retina Responsive Multi-Purpose WordPress Theme – Designed & Developed by Swift Ideas ( http://www.swiftideas.net )

    License: GNU General Public License version 3.0

    License URI: http://www.gnu.org/licenses/gpl-3.0.html

    Version: 1.93

    Author: Swift Ideas

    Author URI: http://www.swiftideas.net

    Template: neighborhood

    All files, unless otherwise stated, are released under the GNU General Public License

    version 3.0 (http://www.gnu.org/licenses/gpl-3.0.html)

    ==================================================

    */

    @import url(“../neignborhood/style.css”);

    in reply to: MODIFY Contact 7 for mymail_snippet #115620
    jascin
    Member
    Post count: 47

    SCRATCH EVERYTHING! I finally know how to make a child theme. I am now procedding to “Please insert this code at functions.php of child theme” What should the functions.php hold?

    This is what i input

    <?php // Opening PHP tag – nothing should be before this, not even whitespace
    /*
    * requires a checkbox with the the name “newsletter” in your CF7
    */
    function wpcf7_my_validate( $result, $tag ) {
    $type = $tag[‘type’];
    $name = $tag[‘name’];

    if ( ‘newsletter’ == $name ) {

    $subscribe = isset($_POST[$name]);

    if(function_exists(‘mymail’) && $subscribe){
    $userdata = array(
    ’email’ => $_POST[’email’],
    ‘firstname’ => $_POST[‘firstname’],
    ‘lastname’ => $_POST[‘lastname’],
    );
    $list_ids = array(123, 456); // your list ids
    $overwrite = true;
    $subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
    if(!is_wp_error($subscriber_id)){
    mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
    }
    }
    }

    return $result;
    }
    add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );

    function getRefererPage( $form_tag )
    {
    if ( $form_tag[‘name’] == ‘referer-page’ ) {
    $form_tag[‘values’][] = $_SERVER[‘HTTP_REFERER’];
    }
    return $form_tag;
    }
    if ( !is_admin() ) {
    add_filter( ‘wpcf7_form_tag’, ‘getRefererPage’ );
    }

    Im slowly progressing. Thanks. i just need to figure this code out.

    in reply to: MODIFY Contact 7 for mymail_snippet #115492
    jascin
    Member
    Post count: 47

    would this be the right approach.http://www.youtube.com/watch?v=Za5YAUMqWvo or here the direction i followed http://www.gregreindel.com/wordpress-custom-functions-file/

    this is the procedure i done.
    1. Create a folder within your child theme named “lib”
    2. Within the new “lib” folder, create a file named “my_functions.php”

    <?php

    /**
    * My Custom Functions
    */

    Save.
    3. Paste this code in your themes current functions.php file

    // Add My Custom Functions File
    include_once( get_stylesheet_directory() . ‘/lib/my_functions.php’ );

    Save.
    4. I added the this int my_functions.php

    * requires a checkbox with the the name “newsletter” in your CF7
    */
    function wpcf7_my_validate( $result, $tag ) {
    $type = $tag[‘type’];
    $name = $tag[‘name’];

    if ( ‘newsletter’ == $name ) {
    $subscribe = isset($_POST[$name]);

    if(function_exists(‘mymail’) && $subscribe){
    $userdata = array(
    ‘email’ => $_POST[’email’],
    ‘firstname’ => $_POST[‘firstname’],
    ‘lastname’ => $_POST[‘lastname’],
    );
    $list_ids = array(123, 456); // your list ids
    $overwrite = true;
    $subscriber_id = mymail(‘subscribers’)->add($userdata, $overwrite);
    if(!is_wp_error($subscriber_id)){
    mymail(‘subscribers’)->assign_lists($subscriber_id, $list_ids);
    }
    }
    }

    return $result;
    }
    add_filter( ‘wpcf7_validate_checkbox’, ‘wpcf7_my_validate’, 10, 2 );

    would this be correct? i put this under neighborhood. i don’t know whats a child theme.

    in reply to: MODIFY Contact 7 for mymail_snippet #115173
    jascin
    Member
    Post count: 47
    This reply has been marked as private.
    in reply to: Blog Gallery – masonry support, request feature. #114842
    jascin
    Member
    Post count: 47

    That method would take hours. I have photos inserted into the blog. Would it support the feature. Here’s an example.

    jQuery Masonry WordPress Gallery Plugin Demo

Viewing 15 posts - 16 through 30 (of 45 total)