alialib
Forum Replies Created
-
Forum: Plugins
In reply to: Looking for “Search Users” pluginYep I’m looking too!! Come on people, let’s make this work. Let’s get our brains out…
Forum: Plugins
In reply to: [Plugin: Aleph] Needed features?Hi Detective,
OK, that sounds simple enough. However, I’m not great at PHP and MySQL. I’ve never written a plugin before, and don’t really speak the lingo (am learning!). Below is my first attempt. Firstly though, this is what I’ve now got in my template-tags.php file:
add_action('init', 'my_aleph_views', 100); function my_aleph_views() { aleph_register_user_view('Business', 'Business Users', 'wp_user_level=administrator'); }The new plugin looks like this, and doesn’t work!
<?php /* Plugin Name: CIMYUSERS Plugin URI: http://www.aliblackwell.com Description: Joins the CIMY and WordPress User Fields Version: 0.1 Author: Ali Blackwell + Detective Author URI: http://www.aliblackwell.com */ SELECT * FROM wp_user JOIN wp_cimy_uef_fields ON wp_user.id=wp_cimy_uef_fields.id ?>When I activate the plugin it says:
Parse error: syntax error, unexpected T_STRING in /home/totallyt/public_html/shoreditchradio.co.uk/site/wp-content/plugins/cimyusers.php on line 11
I’ve tried different syntax, but I can’t get it working. Any ideas? I appreciate you’re probably very busy, and you’ve already been amazing producing this wonderful plugin, but I’d be immensely grateful of your help!
Many thanks,
Ali
Forum: Plugins
In reply to: [Plugin: Aleph] Needed features?p.s. awesome plugin by the way!!
Forum: Plugins
In reply to: [Plugin: Aleph] Needed features?Hello everybody,
Detective, your magnifying glass and wise brain please! I am trying to configure a search page which displays users based on their CIMY meta data. In the FAQ on the plugin homepage it says:
After the plugin is loaded, you can add new lists/views using a special function called aleph_register_view:
dd_action('init', 'my_aleph_views', 100); function my_aleph_views() { aleph_register_user_view('view_slug', 'My User List', 'user_key=some_meta_key'); }…The third parameter is the “user query”, in this case, we are querying for users that have a custom user_meta of key some_meta_key.
I’ve tried everything to make it reference the CIMY Extra Field (which is called “role”) but can’t work it out. Any ideas? Your help would be massively appreciated; I’m building a radio station website with DJ profiles… it should be cool! But there’s also local business profiles, so I’d like to separate them into two user lists using a search query. Any ideas?
So far I’ve got:
function my_aleph_views() { aleph_register_user_view('business', 'Business Users', 'user_cimy_field_role2=$role2'); }in my template-tags file. It correctly outputs a search page, and a heading called “Business Users” in the widget, but I can’t for the life of me get the third bit working.
Many thanks indeed,
Ali