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

SITE DIED, HELP!

I put this bit of code as a block:

<?php
if (user_access('access content')) {
// Count users with activity in the past defined period.
$time_period = variable_get('user_block_seconds_online', 2700);

// Perform database queries to gather online user lists.
$guests = db_fetch_object(db_query('SELECT COUNT(sid) AS count FROM {sessions} WHERE timestamp >= %d AND uid = 0', time() - $time_period));
$users = db_query('SELECT DISTINCT(uid), MAX(timestamp) AS max_timestamp FROM {sessions} WHERE timestamp >= %d AND uid != 0 GROUP BY uid ORDER BY max_timestamp DESC', time() - $time_period);
$total_users = db_num_rows($users);

// Format the output with proper grammar.
if ($total_users == 1 && $guests->count == 1) {
$output = t('There is currently %members and %visitors online.', array (
'%members' => format_plural($total_users,
'1 user',
'%count users'
), '%visitors' => format_plural($guests->count, '1 guest', '%count guests')));
}
else {
$output = t('There are currently %members and %visitors online.', array (
'%members' => format_plural($total_users, '1 user', '%count users' ),
'%visitors' => format_plural($guests->count, '1 guest', '%count guests'))
);
}

// Display a list of currently online users.
$max_users = variable_get('user_block_max_list_count', 10);
if ($max_users) {
$items = array ();

auto insert texonomy id onto content post

i was wondering if is possible to link texonomy id directly onto content post.

for example,

i'm browsing under "tennis", and decided to post something under "tennis"
current method require user to manually select category "tennis" in order to post under "tennis".
what happens i have 100s categories? :) this could be very messy and confusing for users.

is there a way to auto insert category automatically? ex. if i'm under tennis, when I click "create story" the story i create will automatically fall under "tennis"?

Your help is appreciated,

Category and taxonomy out of sync.

Im using the latest versions of drupal and category module as of writing. And a few hours after installing it all my categories and taxonomy are out of sync (I have had the wrapper enabled since the start).

Looking at the missing items in the taxonomy, I think I know what went wrong. There are 2 reasons:
- I deleted a container, then went to the orphans section, and reassigned all of the orphan categories into another container. In my taxonomy those categories are missing.

Images disappear from gallery

Hi
I have this big problem : On the page where all galleries are listed (/images) is written "There are 78 images in this gallery" But when I click on the gallery name, I can see no images but only "There are 0 images in this gallery"

Any idea what's wrong???

PHP and SQL security question?

If I setup a number of sites sharing a single database with a database prefix (site1_, site2_, site3_), could a user of site1, by adding some php code to a page, connect to and view or modify data in another part of the sql database prefixed site2_ ?

Filter menu items by role?

With 4.7.2, can I filter menu items (specifically primary links) by role?

Pages

Subscribe with RSS Subscribe to RSS - Post installation