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

Add Userpoints

Is there a PHP code or a module to add userpoints to a users account?

Users can't see containers in list when creating forum topics

When the forum access module is installed, users have to have the "Administer forums" permission in order to see the forum containers in the category list when they go to create a new forum topic. For example, I have a container called "Administrators and Moderators Only" and two forums within called "Help" and "Important Updates." I also have a container called "Web Site" which contains another "Help" forum. So, when a moderator (who does not have administer forums permission) goes to create a new topic, the drop-down category list says:

How to only allow digits in a textfield

I want to have a text field where users have to enter their mobile number, how do I allow inly digits?

$form['eticket'.$i]['mobil'.$i] = array(
#type' => 'textfield',
'#title' => t('Mobile'),
'#default_value' => '',
'#size' => 30,
'#maxlength' => 64,
'#required' => true,
'#description' => t('Mobile number'));

Trying to create a new view

Ok, im using fivestar with views and im trying to create a new view that sorts by the number of votes content recieved (ie. content A recieved 1 vote while content B recieved 2 votes, so B is displayed first since it has a greater number of votes)

I have a problem with the code i came up with. For some reason one of the nodes always pops up twice, and one of them is always left out.

This is the code i came up with:

Basic node query

What is the php for "get a list of node ids authored by the current user of type a, b, and c"?

Should I write the select statement directly, or is there an API function I should know about?

Can I use a view to do this programatically? I looked at the views API docs, but it looks like its for exposing module data to a view, not the other way around.

thanks,
Dylan

How to return an jpeg as a responce to a REST request?

Simply put, the following HTML code should show a picture of a string "ABC18"
<image src="http://mydrupalsite.com/mymodule/string-to-image/ABC18">

I am new to drupal and have no idea how to generate an image on the fly and return it. I think I need a hook mymodule_menu with REST path 'mymodule/string-to-image' pointing to my function... But how should I handle this custom string? And how should I generate an image on the fly and return it with a proper content type from Drupal?

Any advice will be deeply appreciated.

Pages

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