animasola
Forum Replies Created
-
Forum: Plugins
In reply to: displaying all attachmentsI seemed to have found it, it returns an array of attachment objects. Here it is for anyone whoever needs it as well:
Here is the function I created:
global $wpdb; if(!is_numeric($blog_id)) { $blog_id = web_get_blog_id($blog_id); } $wpdb->set_blog_id($blog_id, 1); $args = array( 'post_type' => 'attachment', 'post_mime_tyupe' => 'image' ); if( !$attachments = get_children($args) ) { return false; } else { return $attachments; }
Forum: Plugins
In reply to: displaying all attachmentsRegarding the return, I meant an array of arrays/objects or attachment/post ids
Forum: Plugins
In reply to: hooks and filtersso the wp_function defined in pluggable.php is kinda redundant? coz here it is:
function wp_logout() {
wp_clear_auth_cookie();
do_action(‘wp_logout’);
}anyhow, I kinda got it working. thanks though! ??
Forum: Plugins
In reply to: hooks and filtersthanks!
but now I’m kinda confused. is the hook wp_logout the same as the function wp_logout? it isn’t right? thanks.
Forum: Plugins
In reply to: AuthenticationThanks!
Now here is what I finally need:
Here is our set-up, we have 2 databases, one for our main system and one for WordPress Mu. We set-up it up such that the user id in our main system and wordpress mu are similar to make things easier.
We have a separate authentication page for the users of our main system. What I want is that when the user is authenticated in that main system, he is also authenticated in WordPress Mu. I used the get_userdata($user_id) in pluggable to return $user which is the user data in WordPress Mu.
Now my problem is, with that, at which page should I redirect it such that he will be logged in to the admin panel?
Forum: Plugins
In reply to: AuthenticationThanks, I kinda worked it out yesterday. I just changed the function wp_authenticate in the pluggable.php. I just have one question, where are the SQL statements kept? or at least, which php file contains the connection functions such as mysql_connect and mysql_select_db to connect to the database?
Another problem which I face is that, WordPress is to be a blog module for a bigger system, we need separate blog instances for each user. I tried it a while ago and it seems that there is only one blog instance with multiple users who have access to it. Is there a way to change this?
Forum: Plugins
In reply to: integrating wordpress in another systemanother thing i would like to add, the system we are developing has multiple users and each user is to have a blog. i checked wordpress and it seems that there is only one blog with multiple contributors, or am I wrong? is it possible such that, when integrated into the system, each user will have his or her own instance of a blog independent from the other?
Forum: Plugins
In reply to: integrating wordpress in another systemOk, I was stupid enough not to read. The pluggable functions are found on pluggable.php. I still hope I can get help though. Thanks!