Forum Replies Created

Viewing 15 replies - 31 through 45 (of 66 total)
  • Thread Starter justmigrating

    (@justmigrating)

    Sumit-

    I was unable to get that to work. However, I found this code on a “hooks” site, which I put in my functions.php file:

    function wpes_enabled($enabled) {
    if (!empty($_GET[‘disable_wpes’])) {
    return FALSE;
    }
    return $enabled;
    }
    add_filter(‘wpes_enabled’, ‘wpes_enabled’);

    And I added the following input to my blog searchform:
    <input type=”hidden” name=”disable_wpes” value=”true” />

    Now, my member search uses the WPES plugin and my blog search does not, which gives me what I want.

    Thread Starter justmigrating

    (@justmigrating)

    Sumit- Thank you for replying, but I don’t think this helps. I have two search forms, each with a hidden field of search-type, and two search files (search-blog.php and search-members.php). Search-blog.php searches blog posts and search-member.php searches only member pages (this is a membership site). My theme’s search.php file has the following code so WordPress know which search file to load.

    if(isset($_GET[‘search-type’])) {
    $type = $_GET[‘search-type’];
    if($type == ‘blog’) {
    load_template(TEMPLATEPATH . ‘/search-blog.php’);
    } elseif($type == ‘members’) {
    load_template(TEMPLATEPATH . ‘/search-members.php’);
    }
    }

    I like your plugin because for my member page search, I can specify the search only on title and meta keys, and not the content, which is something I can’t figure out how to code on my own (my custom search includes the content of member pages, which I don’t want). But I can’t figure out how to use your plugin for my member page search, and also have a separate standard search for blog posts.

    Thread Starter justmigrating

    (@justmigrating)

    Never mind the above comment. I found that I had to include the user_id field from my custom table in my Publisher to have the User link work, but I don’t want the user_id field displayed, mainly because it doesn’t display important information and now I have two extra fields being displayed in my publisher table: the User link column and the User Id. Is there a way I can turn the User Id column into the user hyperlink? Or is there a way to hide the User Id field from being displayed?

    Thread Starter justmigrating

    (@justmigrating)

    I found how to add the link (didn’t see that I had to edit the Publisher). So, now I have a User link added to my table display, but I get an error of invalid user ID. I have a column in my custom table (user_id) that corresponds to the ID field in the WP users table. This is my link in Explorer:

    User

    When I mouse over the link in the table, the ID=$$user_id$$ rather than the actual ID of the user.

    Thread Starter justmigrating

    (@justmigrating)

    Nickolas- I got my results working using WP_Query. My arguments were wrong. I needed to use ‘author’ not ‘post_author’. So I have what I need! Thanks for a great plugin.

    Thread Starter justmigrating

    (@justmigrating)

    Nickolas – thank you, but I realized this morning this won’t work for what I am trying to do. The wfu_userdata table doesn’t list the user’s ID so I have no way to query a specific user. Plus, the wfu_userdata table doesn’t reflect when a site admin deletes a user’s images. So, I am now trying to get the same information using the native WP posts table, but I’m still having a bit of trouble. It returns the user’s uploaded images, but also additional images that have nothing to do with that particular user. I am wondering how to make this query more specific so that only images uploaded by a specific user using your plugin will be returned. I am studying the posts table but I am not seeing any field that would be specific to your plugin.

    $blogusers = get_users();
    foreach ( $blogusers as $user ) {
    $user_id = $user->ID;
    $args = array(
    ‘post_author’ => $user_id,
    ‘post_type’ => ‘attachment’,
    ‘post_status’ => ‘inherit’
    );
    $query = new WP_Query( $args );
    if ( $query ->have_posts() ) {
    $img_string = ‘<div id=”user-gallery”>’;
    while ( $query->have_posts() ) : $query->the_post();
    $img_string .= get_the_title() . ‘‘;
    endwhile;
    $img_string .= ‘</div>’;
    } else {
    // echo ‘no photos uploaded by ‘ . $user_id;
    }
    wp_reset_postdata();
    } // end FOR loop

    Thread Starter justmigrating

    (@justmigrating)

    Never mind. Changing the roles allowed to use the uploader made it work again.

    Thread Starter justmigrating

    (@justmigrating)

    Thinkun – Yes! This worked. Thank you so much.

    For anyone else who comes across this question, and wants their custom table from the WP Data Access plugin to be displayed on the backend of WordPress, put the following code in your theme’s functions.php file:

    // add custom link to WP Dashboard menu
    add_action( ‘admin_menu’, ‘register_custom_menu_link’ );

    // create admin page for custom link
    function register_custom_menu_link() {
    add_menu_page( ‘Custom Table Name’, ‘Custom Table Name’, ‘manage_options’, ‘custom_table_name’, ‘custom_table_name_function’, ‘dashicons-images-alt’, 70 );
    }

    // create function for admin page that displays custom table
    function custom_table_name_function() {
    echo ‘<h1>Title of Table</h1>’;
    echo do_shortcode( ‘[wpdataaccess pub_id=”1″]’ );
    }

    Thread Starter justmigrating

    (@justmigrating)

    So, after spending several hours on this, I am admitting defeat. I can’t find any code snippets to help me create an iframe from the WP Dashboard menu so I can display my custom table from the backend. And the WPDA_Publisher_Form.php file is over my head.

    I want my custom table to be accessible from the WP Dashboard (and not simply linking to the page the table is on–I’ve done that) so that my client can access the custom table without having to switch between the backend and the front end of their site. If anyone knows how to create a popup or iframe from the WP Dashboard where I can embed my custom table, let me know! Thanks.

    Thread Starter justmigrating

    (@justmigrating)

    Hi Peter – thanks for responding.

    I am putting together a membership site for a non-profit organization. I created a custom table of their membership and am using your plugin to display the table. This information is only for the organization’s admin though, which is why I’d prefer it display on the backend rather than on a post or page. Then the organization’s admin will have everything they need on the backend (sortable member table, PayPal transactions, setting membership levels, etc).

    I will look into how to use an iframe on the backend (never done that before) and also at the WPDA_Publisher_Form.php file.

    Thread Starter justmigrating

    (@justmigrating)

    The client paid GoDaddy to fix the problem. No idea what GoDaddy did — maybe it even was something unique to GoDaddy. But thanks anyway!

    Thread Starter justmigrating

    (@justmigrating)

    Thanks Eric for looking. I custom-coded the ability in the theme’s page.php file for now, but I prefer to rely on plugins for client websites so they don’t have to go back to me for assistance down the road.

    Thread Starter justmigrating

    (@justmigrating)

    Thank you so much, Tom.

    Yes, I had { overflow:hidden; } in my #topwrap div. Removed that and the flyout menus work fine! Feeling red-faced right now. LOL.

    Jennifer

    Thread Starter justmigrating

    (@justmigrating)

    Tom-

    Thank you!!! You are the best! That works beautifully. **happy dance**

    Jennifer

    Thread Starter justmigrating

    (@justmigrating)

    Well, I’m flummoxed. The touchscreen part of my custom jQuery code had been working before and now zip. Commenting out line 277 did not help (as you suspected since my custom jQuery code is now loaded after the maxmegamenu.js file loads).

    Did the latest update change anything to do with how the Max Mega Menu deals with touchscreen devices? Maybe I have a conflict now.

    This is my code:

    /* check if user device is touch screen or not */
    function isTouchDevice() { // this code works
    return (‘ontouchstart’ in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || (window.DocumentTouch && document instanceof DocumentTouch));
    };

    /* swap main menu images — use click if a touchscreen, hover if not */
    if (isTouchDevice()) {
    jQuery(document).ready(function() {
    jQuery(“.mega-menu-item-55 a.mega-menu-link”).click(function() {
    jQuery(document).ready(function() {
    jQuery(“#feature-text”).hide();
    jQuery(“#feature-image”).attr(“src”, “http://jdaviswebdesign.com/education/wp-content/uploads/menu-image1.jpg&#8221;);
    });
    });
    // repeat for each main menu item…
    jQuery(“#headerwrap, #content”).click(function() { // return to original feature image
    jQuery(document).ready(function() {
    jQuery(“#feature-text”).show();
    jQuery(“#feature-image”).attr(“src”, “http://jdaviswebdesign.com/education/wp-content/uploads/menu-image.jpg&#8221;);
    });
    });
    });
    } else {
    // begin code for non-touchscreen devices using hover — this part works
    }

    Jennifer

Viewing 15 replies - 31 through 45 (of 66 total)