Drupal is up and running but how do I ...?

How to customize the php snippet "Display (x) random users with their name and avatar"

Hello,

I have been trying to use the php snippet "Display (x) random users with their name and avatar" found here: http://drupal.org/node/29246

I have created a new block and then pasted the php snippet into it.

Here is the site: www.conorin.com/site

I'm rather puzzled that I am getting the following error:

user error: Unknown table 'n' in where clause
query: SELECT * FROM drupal_users u WHERE (n.language ='en' OR n.language = '') ORDER BY RAND() LIMIT 0, 3 in /home/conorin/public_html/site/includes/database.mysql.inc on line 66.

and this is line 66 of database.mysql.inc: trigger_error(check_plain(mysql_error($active_db) ."\nquery: ". $query), E_USER_ERROR);

...also, when I look at the script below, I can't find the WHERE clause in the php! Any suggestion would be MUCH appreciated!!!!

Thanks, Jason

<?php
/*
* This php snippet loads up a random user object and displays their name and avatar.
* $count controls (x) number of users to display
* $no_avatar controls the path to the default avatar image to display.
*
* tested and works with drupal 4.6.x
*/
$count = 3;
$no_avatar = "misc/no-avatar.png";
$result = db_query_range(db_rewrite_sql("SELECT * FROM {users} u ORDER BY RAND()"), 0, $count);
while ($user_info = db_fetch_object($result)) {
if($user_info->uid){
if($user_info->picture){
print 'Only local images are allowed.picture.'">';

Setting up of categories

Hey,

I've done the following on the categories page:

Name Type Operations
content page edit vocabulary add term preview form
article (edit term)
book-review (edit term)
film-review (edit term)
interview (edit term)
profile (edit term)

I've set the 'page' path to [cat]/[title]

So domains are whatever.com/interview/name-of-interview

When I go to whatever.com/interview/

It doesnt list all the interviews, I remember a long time ago it used too...

Can anyone help?

How do I change the front page to look like others I have seen

What module are most people using for their first page on their site? I want mine to look like most other drupal sites rather tha the default. I used page, and wrote a paragraph. Then later, when I added a comment, it added a 1 Comment link below my original comment rathern than having the comment above or below my original message. Is it the blog module that allows for the running list of comments? Just curious, I would like to get this working better.

Thanks

Norm

Please help identifiy issues in error log

I recently configured Drupal for my site and enjoy it greatly. But I am looking to figure out what is wrong here. This is a screencap of my error log:

Error Log

Make Cutenews data to MySQL

Hello Y'all,

Like so many others who is about to use Drupal - I'm going from Cutenews to Drupal. Again like so many of those guys who do that - have a hard time converting the date (news) from Cutenews to Drupal - and I was wondering (hence there isn't a converter yet) - how difficult would it be to make a manual conversion?

What I mean is, that when installing Drupal we have to load the datebase.mysql manually into our databases. Can't you do a similar thing with Cutenews by doing som modifications?

how to add a column to user's page

I'd like to add, in the user's list in user page, a column over the 'user name', 'status', 'role', ecc ones
In this column i'd like to put an element that i added by the profile module.
I imagine I must modify something in the user.module, but my php is very low.....
someone can tell me how I can try to modify it?
Thank you in advance

Pages

Subscribe with RSS Subscribe to RSS - Post installation