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

SQL count from 2 tables w/ 1 query?

I currently have this code, but I was hoping to combine it into 1 query... I just can't figure out how to do it. Anybody know?

$result1 = db_query("SELECT COUNT(*) from {group_members} WHERE uid = '%d' && gid = '%d'", $user->uid, $node->gid);
$result2 = db_query("SELECT COUNT(*) from {group_requests} WHERE uid = '%d' && gid = '%d'", $user->uid, $node->gid);
if (db_result($result1) == '0' && db_result($result2) == '0') {

Thanks,
Billy

move the primary tabs in xtemplate

I'd like to move the primary tabs up so they're above the node title and below the breadcrumb. I'm using xtemplate. does anyone know what file I should edit?

Translating the month name in the event module.

I would like to translate the names of the month to a different language in the event module. Changing the name of the days was pretty easy by just changing the $weekdays array. Strangley any changes to the $months array do not effect anything?! Does anyone know where I can change the names of the month?

Google Adsense as a php include

I currently post the adsense script into each node and set the preview character length for content to be 400 characters so that on my mainpage no adsense shows up but once you go into the node you see ads. However, the problem with this is if I want to change the text or background color I have to do it on every node. I have been trying to do that this as an include file but it breaks the preview section on the mainpage. So instead of being just 400 characters it displays the entire contents of the node along with the functioning adsense.

HDI use localization to customize tags?

I've been trying to use the localization module to customize my tags. I've gotten some of them to change, but not others.

I want to chage "story" to "Essay." I did a search for story, and it came up with 1 tag that was only story. I added Essay translation to the customized tags translation, and set that to the default translation. Unfortunately, I don't see it saying "Essay" anywhere. The key place I would like it to chage is in the create content menu.

assigning content to a vocabulary without terms

Well, my subject line says it all: I want to add content to a vocabulary and don't seem to get to do it.

I have a menu created by the module taxonomy_menu and with that I get a nice listing:

vocabulary
-term
--subterm
--subterm
-term
-term
vocabulary
vocabulary
-term
--subterm
-term
-term
vocabulary
vocabulary

Is it possible to assign a node to a vocabulary? If not: what is the way to do this?

Cheers,

Wubbonios

Pages

Subscribe with RSS Subscribe to RSS - Post installation