Great module! Thanks for making it. I am working to drupalize http://www.OdessaPage.com
On your demo I noticed that you have made a very nice list of authors
that links to their profiles, which appear to be linked to their taxonomy terms.
I did not notice a recepie anywhere for getting that done.
Can somebody point me in the right direction?

Comments

romca’s picture

Hi baraban,

the function is a part of the standard module (theme_ejournal_show_author) you can override it from your inc file
preconditions:

1) in the ejournal authors administration, you must associate users accounts with their taxonomy entries
2) you should have profile.module switched on (part of core drupal) and configured

if you have these and somebody goes to
/ejournal/1/term/1?edit%5Btype%5D=author

then the ejournal display profile of the user together with its articles.

hth :)

baraban’s picture

Romca, Thanks for answering. It was very helpful! But I did not understand your answer completely.

I need to produce a PAGED LIST OF ALL AUTHORS that link to these profiles. How do I do that?

Also, as far as profiles themselves go, I have done both 1) and 2), but when I go to http://www.odessapage.com/new/ru/ejournal/1/term/4?edit%5Btype%5D=author

I get an error:
warning: Invalid argument supplied for foreach() in /home/hepa/public_html/new/modules/user.module on line 683 and only the truncated profile gets dispalyed. What do you think could be the problem there?

romca’s picture

Ciao,
I am sorry I can't read russian (yet) -

as to the question of how to get a page of authors that links to profiles, it is quite simple ;-)
point your browser here and you will see
http://www.odessapage.com/new/ru/ejournal/1/list/2

so the link is /ejournal//list/

If you want to override the default layout, put the function "theme_ejournal_list_vocabulary" inside of your active include (look for inspiration in the ejournal.module)

----

regarding the error message, you should check your version of ejournal.modulev(and grab the newest if possible). Probably there is PHP5 and some argument should be sent as an array but is not an array. Or you can check the theme_show_ejournal_author
There should be piece of code like this:

....
    $names = array();
    while ($author = db_fetch_object($authors)) {
      
    $names[] = $author->name;
      
    if ($account = user_load(array('uid' => $author->uid, 'status' => 1))) {
	
	$fields = array();
	if(function_exists('profile_load_profile')) {
	  if ($data = module_invoke('profile', 'user', 'view', '', $account)) {
	    foreach ($data as $category => $content) {
	      $fields[$category] .= $content;
	    }
	  }
	}

	$output .= theme('user_profile', $account, $fields);
      }
            
      if($author->tid) {
        $tids[] = $author->tid;
      }
    }
......

best,

roman

baraban’s picture

Thanks! This is absolutely ideal - you are wonderful.
This is a huge module, very powerful, well thought out
and feature rich and it has almost no bugs - totally amazing!

One tiny bug that I did find was that you forgot to escape the users array in curlies in the line:

$authors = db_query("SELECT td.name, td.tid, u.uid, u.name as uname, u.mail, u.status FROM {ejournal_authors} ea INNER JOIN {term_data} td ON ea.tid=td.tid INNER JOIN {users} u ON ea.uid=u.uid WHERE td.name='%s'", $fullname);

Also, it would be great to have more documentation. Without your help, I would have never been able to figure out where that author list function was hidden!

BTW, I completely rewrote the profile presentation code to suit our very specific needs better and somewhere in the process that stupid error I was asking you about went away. My guess is that it was there because we made different assumptions on the names of the profile fields.

Anyway, you rock! Thanks a bunch.

gregoirec’s picture

Hello,
I use the version 5 of the e journal module and don't understand how exactly to "associate users accounts with their taxonomy entries". Could you explain what steps to follow to achieve this ?
My best,
Grégoire

romca’s picture

Version: 4.7.x-1.x-dev » 5.x-1.0
Status: Active » Fixed

Hello Gregoire,

sorry for the delay. I must have been extemely busy around february, march. This is a second post I missed. Perhaps just to record it for others - maybe one day somebody will find time to prepare documentation ;-)

You can associate users' accounts with node terms -- so it is user_account <--> taxonomy_term

0. make sure you enabled the ejournalauthors.module
1. ejournal needs to know which taxonomy holds the Author names (in the ejournal edit form, just assign the dictionary for authors, first you need to create it)
2. each of your authors must have user account (and optionally, profile - if you enabled the profile module)
3. in the /admin/ejournal/ you should see the tab "Authors"
if you go there, you will be able to see list of your users on the left and on the right you can choose the correct taxonomy term (doing this, you will make the link user_account <--> taxonomy_term)
4. ejournal will handle the rest

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.