Skip to Content.
Sympa Menu

lyceum-users - Re: [Lyceum-users] Determine Blog Owner

lyceum-users AT lists.ibiblio.org

Subject: Lyceum-users mailing list

List archive

Chronological Thread  
  • From: John Joseph Bachir <jjb AT ibiblio.org>
  • To: Vix <garinungkadol AT gmail.com>
  • Cc: lyceum-users AT lists.ibiblio.org
  • Subject: Re: [Lyceum-users] Determine Blog Owner
  • Date: Tue, 27 Feb 2007 01:56:35 -0500 (EST)


If you or Juan submit the code and an explanation in a ticket, then I will likely integrate it into Lyceum, yes :)

http://wiki.lyceum.ibiblio.org/index.php/Trac_Guide

Regarding where to add your custom functions-- i recommend making a new file, maybe called "custom_functions.php", and sticking it in src/lib, and then including it via wp-settings.php.


On Thu, 22 Feb 2007, Vix wrote:

Sorry for the late reply.
Juan's code did the trick.

Will this be made into a function at some point?
And while I'm on this subject where do I add my custom functions that
I'd like to use in all blogs and the portal as well.

Vix



Message: 1
Date: Thu, 8 Feb 2007 01:32:54 -0500 (EST)
From: John Joseph Bachir <jjb AT ibiblio.org>
Subject: Re: [Lyceum-users] Determine Blog Owner
To: Juan Arias <juanito_budapest AT yahoo.es>
Cc: Vix <garinungkadol AT gmail.com>, lyceum-users AT lists.ibiblio.org
Message-ID: <Pine.LNX.4.64.0702080132340.9293 AT tribal.metalab.unc.edu>
Content-Type: text/plain; charset="iso-8859-1"

nope, there is no built-in functionality. Juan's code looks good.


On Mon, 5 Feb 2007, Juan Arias wrote:

What information. do u have initally ? I mean, if the user is logged in, we
can have his/her $user_ID, and then, a nice
get_currentuserinfo() may do the trick . . . That fills the global $userdata
with current user?s information from the DB, but not user?s
blog URL, for what i have found a nifty. query, based on the global $user_ID.

But i think what u need is blog owner?s info off blog?s name, isn?t it ? I
don?t remember if i did come across some function doing that,
but u can always make a query that returns current blog?s owner $user_ID:

$user_ID_data= $wpdb->get_results("
??? ??? ??? SELECT DISTINCT
??? ??? ??? ??? $wpdb->users.ID
??? ??? ??? FROM $wpdb->blogs
??? ??? ??? ??? INNER JOIN $wpdb->usermeta ON ($wpdb->blogs.id =
$wpdb->usermeta.blog)
??? ??? ??? ??? INNER JOIN $wpdb->users??? ?? ON ($wpdb->users.ID =
$wpdb->usermeta.user_ID)
??? ??? ??? WHERE
??? ??? ??? ??? blogs.slug = '$current_blog_slug' // <-- U need to
initialize this variable !!
??? ??? ??? ??? ")
??? ??? ??? ;
? $current_blog_owners_ID = $user_ID_data[0]->ID ;

And that?s it :D

Juanito.

PD : Im pretty sure there has to be a function that does this, but as i am
unable to track'em all, i just began to use personal queries
for some things like this. jjb has to know? . . .

_______________________________________________
Lyceum-users mailing list
Lyceum-users AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/lyceum-users


--
John Bachir
http://lyceum.ibiblio.org/
http://blog.johnjosephbachir.org/
aim/yim/msn/jabber.org/gtalk: johnjosephbachir
713-494-2704
irc://irc.freenode.net/lyceum




Archive powered by MHonArc 2.6.24.

Top of Page