Forum Replies Created
-
AuthorPosts
-
MissyMember
Back again…and almost there, hoping you may have some advice for me…I have listed my members by company name, turned them into links that when clicked open a modal overlay in jquery…but I am a complete novice in jquery and have no idea how to pass values from php and vice versa, so currently my overlay comes up but only displays the info for the first member record…thought you might have an idea since the shortcode list uses an overlay…AGAIN THANKS!!! Love the support you provide for your users who want to go offroading!!! lol
<h2>List of Members:</h2>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>
<ul>
<?php
global $wpdb;
$order = 'company_name';
$members_table_name = $wpdb->prefix . "wp_eMember_members_tbl";
$resultsets = $wpdb->get_results("SELECT * FROM $members_table_name ORDER BY $order", OBJECT);
foreach ($resultsets as $member):
?>
<?php if($member->membership_level == 3) { ?>
<li><a href="#" class="modalInput" rel="#profile2" ?>"><?php echo $member->company_name; ?></a>
</li>
<!-- Profile Overlay -->
<div class="modal2" id="profile2">
<h2><?php echo $member->company_name; ?></h2>
<dl>
<dt>Address:</dt>
<dd><?php echo $member->address_street; ?>
<?php echo $member->address_city; ?> ,Fl
<?php echo $member->address_zipcode; ?></dd>
<dt>Phone Number:</dt>
<dd><?php echo $member->phone; ?></dd>
</dl>
<!-- close button -->
<p>
<button class="close"> Close </button>
</p>
</div>
<script>
$(document).ready(function() {
var triggers = $(".modalInput").overlay({
// mask tweaks
mask: {
color: '#ebecff',
loadSpeed: 200,
opacity: 0.9
},
closeOnClick: false
});
});
</script>
<?php
}
endforeach; //
?>
</ul>MissyMemberTHANKS!!
I was able to get my list with this:
<?php
global $wpdb;
$members_table_name = $wpdb->prefix . "wp_eMember_members_tbl";
$resultsets = $wpdb->get_results("SELECT * FROM $members_table_name", OBJECT);
foreach ($resultsets as $member):
?>
<?php if($member->membership_level == 3) { ?>
<li><?php echo $member->company_name; ?></li>
<?php
}
endforeach;
?>MissyMemberI have only pulled info from the WP tables…first time pulling from a plugins table
Initially I think I had…
$user_ids = $wpdb->get_col("SELECT member_id FROM $wpdb->wp_eMember_members_tbl ORDER BY company_name");
echo $user_ids->company_name;MissyMemberLOL…honestly that was my just my latest attempt I was just trying to pull anything by then…I tried a bunch, at this point I had knocked all of my code to a simple pull just to see if I could connect, once I am pulling the records I can code out everything else, basically I want to pull all level 3 members, ordered by company name, and echo just the company name…just need a basic list at this point
Eventually I want to link the company name to work similar to the member list shortcode opening a lightbox with the companies info…but I can get there once I can pull from the table
-
AuthorPosts