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

Error in Modules

Hello

i have following error in my module directory, have anyone an idea?

Parse error: parse error, unexpected $ in /home/astbill/wwwroot/modules/astbill/_astpbx.module on line 1490

thx for help

How extract users roles

Hi, I've a very big problms. In http://drupal.org/node/41738 I found how to see some user variables but I can't find a simple function by which read all record in users_roles table of drupal db WHERE uid is know.
I hope my post is clear enough !
Thanks,
Gianni

Forms API - overriding forms??

Hello. At this page http://drupal.org/node/37775 written awesome things:


Overriding Forms – this section needs work. No code has been written for these features as yet AFAIK
1. Altering form elements
1. Overview
2. Example
2. Custom theming
1. Overview
2. Example
3. Custom validation
1. Overview
2. Example
4. Custom execution
1. Overview
2. Example

path.module's issue

Hi all.

The problem is here. By default node path is like this: www.mysite.com/node/13 . After assigning an alias the path looks: www.mysite.com/countries/russia . But tabs such as "track" and "edit" base on default path :'(

Spellchecker in TinMCE not working in Drupal

Has anyone gotten the TinyMCE spellchecker plugin to work with drupal? The TinyMCE support page has no more advice for me, so I wonder if it is a drupal problem. I'm using the google check and have done all the changes written in the drupal TinyMCE module install readme. But I still get an error message that says: Could not execute AJAX call, server didn't return a valid XML.

I've already made the changes recommended from the TinyMCE forum, which seems to have helped others, but not me.

Any ideas?

javascript within module

hello

I am trying to create a module which displays a tree menu similar to one that we see in windows explorer. I am using tiagara tree menu. Tiagara tree menu is written in javascript and needs two array to initialize it. I am not sure how can I generate javascript array within modules. I get the data from mysql and now want to create a javascript array. Below is the module code in which I am trying to include javascript.

function viewer_content() {

$path = drupal_get_path('module', 'viewer');
theme_add_style($path . '/custom.css');

// Calculate previous and next record
$index = $_SESSION['QBIndex'];
$prev = $index - 10;
$next = $index + 10;
if($prev < 0) $prev = 0;

// in future this should not be here
db_set_active('spy');
$sql = 'SELECT article_id, title, pub_date FROM article order by title';
$result = @mysql_query($sql);
$output .= '

 

';
$output .= '

';
if(empty($result)) return '';
while ($row = @mysql_fetch_array($result)) {
$output .= '
' . l($row['title'], 'node/4/'. $row['article_id']) . '

';
// instead of putting results in a div
// i need to create a javascript array
// and call a java script function which builds a tree menu
// new tree(treeItems, treeIcons)

}
$output .= '

';
db_set_active('default');
//$output .= '

Current Value is ' . $index . '

';

Pages

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