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

Need help with the Upload module and role quotas.

Hello,

Can anyone help out with modifying the upload module with audio module? I am trying to seperate each users upload into a /files/user/ folder. I also need help in that the file quota's per user role are not limiting uploads as they should. Does anyone know of a forum topic that discusses this?

Thank you,

Matthew

How do you assign a user to a new role and assign/set permissions for that role within code

The title says it all but i'll clarify.

Lets say i have a user. Normally i can go in via admin panels and assign user to a given role and then check off the permissions.

I basically want to be able to do the same thing but via code.

Can anyone point me to the right hooks or offer up a snippet?

thanks

Customizing Calendar Module

I'm displaying a non-interactive "bookings calendar" page using Calendar and Views, and need to control several elements of the display. For each item, I've figured out a way to hack it, but my solutions are inelegant, and I have to believe there's a better way even though many hours of mucking around under the hood did not lead me to it.

1. Force view to "Year" (Calendar defaults to "Month" view)
I did this in template.php, implementing theme_calendar_display() and checking the value of param $view->name against the hard-coded name of my view and setting $view->calendar_type = 'year'.

function phptemplate_calendar_display(&$view, ...){
  if ($view->name == {hard-coded value}) $view->calendar_type = 'year'; //**UGLY!**
  ...

2. Disable "Year Month Week Day" links / views
I did this also in template.php:

function phptemplate_calendar_show_nav($view, ...){
  if ($view->name == {hard-coded value}) {/* don't show nav links */}
  ...

3. Force page title to view name instead of calendar module's default ("Year", "Month", etc.)
I did this in page.tpl.php, using a custom function, declared in template.php:
<?php
/**
* Determine if custom page title should be displayed
* @param $title
* Current/default page title
* @return Correct title
*/

Looking for a module

I'm looking for a module for Drupal 5 in order to allow some user accounts to administer some nodes.
Some users must have their nodes.
A admin/user must manage the rights.
Which module can I choose?

Form Looks A Mess

Hi,

I have a form with a textfield and submit button. I'd like to have the submit button next to the textfield. Not below.

Unfortunately, I can't quite get the alignment right, and have a feeling that <table>'s aren't the way to go. But I don't know how to use <div>'s to get the horizontal alignment right.

Could anyway give me some pointers?

The code I'm currently using is:

function theme_kat_keyword_form($form){

Is it possible to change username to any other profile field in Who is Online and Who is New modules?

I need these to show real name rather than username. Is it possible to do within the control panel, or I should rewrite the module? Thank you.

Pages

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