This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Xstatic Module - It is available?

What is the status of the Xstatic module? Has Keith dropped the issue or is it stuck in the pipeline?

See http://drupal.org/node/15223 for more information on Xstatic

Jim

keen php/mysql eye needed to tweak a code snipped to update a database field if one exists or insert if it doesn't

Hey..

Need help tweaking a bit of code in a module I'm playing with.

What I need to do is

a) check to see if a field exists in a table

b) if one exists...update it with a new setting

c) if the field doesn't exist, insert a new one.

am googled to death searching through help sites for php & mysql and thought I would post up here in case someone would spot it quickly.

the table striucture is as follows and is designed to store a link as the "home page" link of the site...i.e. the next time they log in they are redirected to that page.

table name =  frontlink
column 1 = uid  
column 2= front_url

So the table stores a "front url" for each user and is keyed by the user ID.

below is the function to write the information to the database and table. I'm a novice at this so I pasted an existing "save" function from another module and edited it. (apologies in advance)


function quicklinks_front_save($edit) {
global $user;

$edit['old_front_url'] = urldecode($edit['old_front_url']);
if ($edit['old_front_url'] && db_result(db_query("SELECT COUNT(uid) FROM {frontlink} WHERE uid = %d AND front_url = '%s'", $user->uid, $edit['old_front_url']))) {
db_query("UPDATE {frontlink} SET front_url = '%s' WHERE uid = $user->uid AND front_url = '%s'");
drupal_set_message(t('Your front page has been updated.'));
}
else {

Rendering a menu from an administrator-defined block ?

Hello everyone,

I want to display a different menu, depending on the user-chosen language.

Using conf_url_rewrite I've managed to set a global variable with the selected language,
based on the URL requested by the client. The language gets prepended to outgoing URLs.
Now I want to create an administrator-defined block that uses
this global variable to determine which menu must be shown.

Does anyone know the optimal way to render a disabled menu
( created with Drupal's menu system ) from within an administrator-defined block ?

I can't import linuxsir.org RSS to Drupal 4.6x

I can't import linuxsir.org RSS to Drupal 4.6

I want to import http://www.linuxsir.org RSS to my site .I test it ,it can't be import to drupal .

can anyone help me ?
thanks

bnnb from china.

warning: strtr(): The second argument is not an array. in /opt/apache/htdocs/main/includes/common.inc on line 547.

warning: strtr(): The second argument is not an array. in /opt/apache/htdocs/main/includes/common.inc on line 547.

warning: xml_set_element_handler(): supplied argument is not a valid XML Parser resource in /opt/apache/htdocs/main/modules/aggregator.module on line 460.

warning: xml_set_character_data_handler(): supplied argument is not a valid XML Parser resource in /opt/apache/htdocs/main/modules/aggregator.module on line 461.

warning: xml_parse(): supplied argument is not a valid XML Parser resource in /opt/apache/htdocs/main/modules/aggregator.module on line 463.

warning: xml_get_error_code(): supplied argument is not a valid XML Parser resource in /opt/apache/htdocs/main/modules/aggregator.module on line 464.

warning: xml_get_current_line_number(): supplied argument is not a valid XML Parser resource in /opt/apache/htdocs/main/modules/aggregator.module on line 464.

warning: Cannot modify header information - headers already sent by (output started at /opt/apache/htdocs/main/includes/common.inc:385) in /opt/apache/htdocs/main/includes/common.inc on line 193.

Top answered/viewed nodes with hight position in front page

It is possible to make nodes (blog postings, articles and etc.) to be sorted in front page (site.com/node) sortet by their rating? If I have a blog posting, that is higly interested and with lot of comments, then this posting to be in hight position on front page. I don't want to make it sticky, I want this posting, based on its popularity to go to sticky position.

Dates and timezones in Event module - where is this issue?

I've been mulling over a problem with dates and timezones using the Event module, and would like to put across some thoughts and ask where current thinking is on this issue.

It seems to me that, when a user creates an Event in Drupal, there are potentially a number of different times (and timezones) involved:
1) UTC time (this is the kind of zero baseline, and really the only thing that can be relied on)
2) Local timezone on the server.
3) The user's local timezone (as specified in Drupal user profile).
4) The timezone where the event is to take place.
5) The timezone of the anonymous user looking at the event.

Here is a scenario - somebody tell me if I have got my sums or assumptions wrong!

Suppose that I have enabled "Configurable time zones" in "Settings", and set the default time zone to +0200 (because most of my users are in Continental Europe - and we are on summer time)

Suppose now that my web site is hosted in the USA (New York: -0500).
A user in the UK (+0100 on British Summer Yime) now creates an event which is to take place at midday the next day, in Calcutta (India: +0530)

Let us suppose that the user has set his (UK) timezone profile, then the event will be timed at BST 1200 (ie UTC 1100)

Now a user from India logs in, and notices that there is an event in Calcutta. Since his profile has his timezone set to local time (UTC +0530), he sees the event advertised at UTC 1100 +0530, ie at 16:30, and turns up only to find that it has already finished.

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions