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

SQL from external file?

Hi,
I have a large amount of reference data - between 40M-50M - that I want the user to have the option of loading or not loading into the database via a selection in the module admin screen. What is the best way to perform the actual data load? I have a SQL file created from a mysqldump of the already-built tables. Is there a call I can use to just load the file in? Should I fall back to "native" PHP?

Changing link using theme_username

I have the following function that lists users on a site that can upload photos and the categories that their photos are tagged with:


/*
* Get list of users that have photos
*/
function _imagelist_display_users() {
$rid = variable_get('imagelist_upload_role',1);
$user_path = variable_get('imagelist_view_user','photos/user');
$term_path = variable_get('imagelist_view_vocabulary','photos/tags');

$output = '';
//create table headers
$header = array(
array('data' => t('User'), 'field' => 'u.name', 'sort' => 'asc'),
array('data' => t('Categories'))
);
//get list of users that have the designated role for uploading photos
$sql = "SELECT u.uid, u.name FROM users u INNER JOIN users_roles ur ON u.uid = ur.uid WHERE ur.rid = %d";
$sql .= tablesort_sql($header);
$result = db_query($sql, $rid);
while ($data = db_fetch_object($result)) {
//empty array of terms for next user
$terms_array = '';
//create link from user name that points to user gallery
$link = l($data->name,$user_path.'/'.$data->uid);
//for each user, get list of terms assigned to photos uploaded by the user
$sql_terms = "select distinct tn.tid from term_node tn inner join node n on tn.nid = n.nid where n.uid = %d";
$result_terms = db_query($sql_terms,$data->uid);
while ($data_terms = db_fetch_object($result_terms)) {

Does anybody know if there is a sports team module?

Hi.

I´m looking for at module where you can set up a presentation of a team with a list of players. If you click a link with the players name you will get detailed information about this player. I´m also looking for such a module which supports handling of an internal "score board" where you can see the player statistics such as goals, penalty minutes etc.

If there is such a module out there I would very much appreciate some info about it.

Regards Mats

Yahoo! Groups or OrKut-Communities like Module

Hello,

Is there any module by which I can allow users to create groups/communities of their interest and add members to their groups/communities, with features like forum (at-least one forum per group/community), poll, event posting for each community. We should be able to assign all features accessible to the group/community owner and some features to moderators, and they (owner/moderator) can choose how the group/community members can access the features.

Pathauto doesn't run when it's called

Hi,

I'm having a hard time creating a new node programmatically and getting the right alias set for it. Specifically, after $node->save(), I have two problems:
1) Pathauto is not invoked. It needs to be run manually.
2) and even weirder: calling node_pathauto_bulkupdate() after $node->save() worked for a while - now it doesn't anymore and I have no clue what I did to make it stop.

What I would like to do is:
- create a new node programmatically
- have its alias built automatically by pathauto.

Any help appreciated. :)

-Tobias

vote widget on list views? vote count on nodes?

there are two things i want to do.

first is to be able to put the vote up/down widget on each entry of the lists view. i generated a custom view template using the views theming wizard, but even when i type in print $vote_up_down_widget or print $node->content['vote_up_down']['#value'] (the code from content template), nothing happens. i suppose the function for that is not transposed onto views.

Pages

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