How can i write out username and date of question?

Comments

stella’s picture

Status: Active » Fixed

In your theme configuration (admin/build/themes/settings) you can choose which content types "Post information" should be displayed on. Post information consists of the username of the poster and the date on which it was posted. Just enable this option for the "FAQ" content type.

Cheers,
Stella

chrispooh’s picture

Thank you, Stella.

It's on, and it appears on the node page, but it shows only for the answer. I would like to see the date and username at the question, too.

Chrispooh

stella’s picture

The information isn't for the "answer" it's for the node itself. It's probably set to the time the node was published, which if you're using FAQ Ask module would be the time the question is answered. There's no other post information stored. When editing a node, and if you have the correct permissions/access, you can modify the post time and username. Maybe this is something you should look into instead. There's nothing the FAQ module can do on this matter.

Cheers,
Stella

chrispooh’s picture

Thank you the fast answer. So i can't write out the date and username of questions, and answers, together? It would be great. I will try something, because it is very important for me. If i have a solution, i will write it.

Chrispooh

stella’s picture

Not that I know of, sorry. If you're using the FAQ Ask module, Nancy might have an idea.

chrispooh’s picture

Thank you, i will ask Nancy :)

Chrispooh

nancydru’s picture

Project: Frequently Asked Questions » FAQ_Ask
Version: 5.x-2.9 » 5.x-1.x-dev
Status: Fixed » Active

Moving this to my queue.

nancydru’s picture

For the most part I have to agree with Stella, we don't [ordinarily] keep multiple time stamps. However, I can think of two ways this might be done.

First, a node keeps both its created time and last changed time. So a small theme change should be able to display both time stamps.

Second, if revisions is enabled, one could add a bit of code (again, probably in the theme) to show all revision times.

And a small plug here: Have you looked at the RealName module?

chrispooh’s picture

Thank You, Nancy. The solution of dates is very good. The last problem is the names. I wold like to write out the username of ask and of question, too. Have You an idea?
Does drupal store the username of changer?

Chrispooh

nancydru’s picture

I would have to experiment to know for sure, but the only way I know to do this is to use revisions. When you have revisions turned on the node_revisions table will keep track of everyone who edits the node. So you could check this in a little bit of code in your theme.

chrispooh’s picture

Great, i will try.
Thanks!

chrispooh

nancydru’s picture

Status: Active » Fixed

No further information.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

aterz’s picture

Hi,

I too, I'm interested in Coding my theme but I have no idea where to begin..can you please suggest me how to do that (or even do it for me, I could pay you with paypal)

thanks for any help!
Andrea

nancydru’s picture

Status: Closed (fixed) » Active

Okay, I'll need to do some playing with this, but here is some code from the IndexPage module which shows all authors of a node.

          $items = $uids = array();
          $revs = db_query("SELECT DISTINCT(r.uid) FROM {node_revisions} r WHERE r.nid=%d ORDER by r.vid DESC", $n['nid']);
          while ($rev_uid = db_result($revs)) {
            $uids[] = $rev_uid;
          }
          $authors = db_query("SELECT u.* FROM {users} u WHERE u.uid IN (". implode(',', $uids) .")");
          while ($account = db_fetch_object($authors)) {
            $items[] = theme('username', $account);
          }
          if (count($items) > 1) {
            $line[] = theme('item_list', $items);
          }
          else {
            $line[] = $items[0];
          }
nancydru’s picture

Status: Active » Closed (won't fix)

I'm sorry, I no longer have time to support the 5.x branch. If someone else wants to create a patch, I will commit it.