Steve Edwards | 4 Jul 03:06
Favicon

Accessing Field Value for CCK Field

I have a CCK text field into which I would like to insert a value when the node creation form for the content type is displayed.  All of the fields are blank at this point,  However, upon inspecting the $form array inside hook_form_alter, none of the fields are listed, so I can't alter them.  What can I use to modify one of the CCK form fields since it isn't listed in $form?

Thanks.

Steve
--
[ Drupal support list | http://lists.drupal.org/ ]
Luke | 4 Jul 00:11

Partial Vocabulary Admin Access?

Hello

I have certain editorial users, to whom I would like to give the ability 
to reorder, add, and delete terms in a vocabulary. However I do not 
want them to be able to add or delete vocabularies, or even perform those 
above tasks on terms in other vocabularies.

Example:
I have vocabularies "test1" and "test2".
In test1 are terms "a", "b", and "c".
In test2, there are terms "d", "e", and "f".

Users with a particular role, can add terms to test1, and can change 
weights of "a", "b", and "c".  However those users can not do anything to 
terms in test2.

Basically, I need a vocabulary editor role, preferably with the ability to 
limit which vocabularies can be edited by that role.

This is on a D5 site, but may go to D6 at some point.

Any ideas on how this might be done?

Luke

--
[ Drupal support list | http://lists.drupal.org/ ]

Tony Bazeley | 3 Jul 07:28
Favicon

White screen of death

Hi all,

Attempting to access my drupal site shows a completely blank page - no timeout - just a blank page.

I did a much overdue upgrade to Drupal 6.13,
On completion was able to log in OK, change themes (back to 4 seasons), get out of maintenance mode, and test that a couple of pages worked OK.

I then upgraded  to the latest rootcandy theme (the theme was disabled and the system option was selected as the administrative theme)

This is where the trouble started

Initially all output was unthemed. I logged in as administrator and went to the themes page - when I did this WSOD commenced on all page requests.
I can now access nothing

I have checked the WSOD page http://drupal.org/node/158043
I can't see anything in the apache error log files.

http://www.example.com/admin/reports/dblog yields a blank screen

I have also edited index.php to enable errors as suggested on the WSOD page - no change

Removed the rootcandy theme from /sites/all/themes - but still no change

Any help would be greatly appreciated.

Thanks
Tony



--
[ Drupal support list | http://lists.drupal.org/ ]
Michel Morelli | 2 Jul 12:20

Performance: is better a node_load or a direct SQL query ?

Hi all. I have a content type with 15+ fields. In some situations I need 
to retrieve only 3 fields. 

So, is better (perfomance, security, portability, etc etc) a call to 
node_load() function or a direct SQL query on the right table ?

M.

--

-- 
Michel 'ZioBudda' Morelli                       michel <at> ziobuddalabs.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ziodrupal.net       			MSN: michel <at> ziobuddalabs.it                   
						JABBER: michel <at> ziobuddalabs.it

--
[ Drupal support list | http://lists.drupal.org/ ]

Michel Morelli | 2 Jul 11:50

How to select an item in a form' selected list.

Hi all. I have a form. In this form I have a selected list field.
Two question:

1) How can I set the "selected" item when I create the form?
2) How can I set or reset the "selected" item via a form alter function 
? I think that this solution is equal to the first.

M.

--

-- 
Michel 'ZioBudda' Morelli                       michel <at> ziobuddalabs.net
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net                         ICQ: 58351764  
http://www.ziobuddalabs.it                      Skype: zio_budda
http://www.ziodrupal.net       			MSN: michel <at> ziobuddalabs.it                   
						JABBER: michel <at> ziobuddalabs.it

--
[ Drupal support list | http://lists.drupal.org/ ]

John Callahan | 2 Jul 02:32

book navigation

I am using the core book module and have exactly one book.  I would like 
to show a block containing the book navigation (or table of contents) 
open to the current page/node I'm on.   The problem is that the default 
Book navigation block behaves like I'd want but  shows the book name as 
the first entry and first level chapters under that (and collapsed if 
using DHTML Menu).  I would much rather have the first level chapters as 
the primary entries and I'll use the book title as the block title.

I've used this piece of code as a block; it does the exact same thing as 
the default book navigation block.

<?php
$book_top_page=168;
$tree = menu_tree_all_data(book_menu_name($book_top_page));
print menu_tree_output($tree);
?>

The following code below shows exactly what I need but does NOT open to 
the current page. (code snippet found on d.o)

Are there any modules or code snippets that can do this?  Any 
suggestions how I can modify the code below to open the item/page based 
on the current node?  (such as adding active-trail class where 
necessary)   Thanks.

- John

<?php
$book_top_page = 168;
$levels_deep = 3;
$emulate_book_block = true;

if (!function_exists('book_struct_recurse')){
function book_struct_recurse($nid, $levels_deep, $children, 
$current_lineage = array(), $emulate_book_block = true) {
$struct = '';
if ($children[$nid] && ($levels_deep > 0 || ($emulate_book_block && 
in_array($nid, $current_lineage)))) {
$struct = '<ul>';
      foreach ($children[$nid] as $key => $node) {
      if ($tree = book_struct_recurse($node->nid, $levels_deep - 1, 
$children, $current_lineage, $emulate_book_block)) {
      $struct .= '<li>';
      $struct .= l($node->title, 'node/'. $node->nid);
      $struct .= $tree;
      $struct .= '</li>';
      }
      else {
      if ($children[$node->nid]){
      $struct .= '<li>'. l($node->title, 'node/'. $node->nid) .'</li>';
      }
      else {
      $struct .= '<li>'. l($node->title, 'node/'. $node->nid) .'</li>';
      }
      }
      }
      $struct .= '</ul>';
return $struct;
}
}
}

$current_lineage = array();

$result = db_query(db_rewrite_sql('SELECT n.nid, n.title, n2.nid parent, 
ml.weight
FROM {node} n
INNER JOIN {book} b ON n.nid = b.nid
INNER JOIN {menu_links} ml ON b.mlid = ml.mlid
INNER JOIN {book} b2 on b2.mlid = ml.plid
INNER JOIN {node} n2 on b2.nid = n2.nid
WHERE n.status =1
ORDER BY ml.weight, n.title'));

while ($node = db_fetch_object($result)) {
if (!$children[$node->parent]) {
$children[$node->parent] = array();
}
array_push($children[$node->parent], $node);

/*  This function is broken, and for my purposes, not needed **********
if (arg(0) == 'node' && is_numeric(arg(1)) && arg(1) == $node->nid) {
  $_temp = book_location($node);
  foreach ($_temp as $key => $val){
    $current_lineage[] = $val->nid;
  }
  $current_lineage[] = arg(1);
}
*/
}

echo book_struct_recurse($book_top_page, $levels_deep, $children, 
$current_lineage, $emulate_book_block);

?>
--
[ Drupal support list | http://lists.drupal.org/ ]

Eric Cornely | 1 Jul 11:44

How a module can offer its own webservice ?

Hello,

I built my first module which stores data in its own tables using 
db_query(...).

Now, i'd like to manage thoses tables through a webservice which would 
be a part of my module but i'm wondering how to achieve it.

As it is my first module i'm not really familiar with the API so how 
could i integrate a uri in drupal site which would lead to a php5 web 
service and how could i get access to db_query() in that script ?

I thought about : 
http://localhost/drupal/sites/default/modules/myfirstmodule/service.php

Or maybe is there a special hook in modules that does not lead to a 
drupal page with theming etc. Until now i only could create blocks.

If anybody has hints, i would appreciate.

Thanks,

Eric
--
[ Drupal support list | http://lists.drupal.org/ ]

podcast feed

hello.

I have created a view of podcasts on my website. the podcast is made using cck and file field. I then installed ffpc and then create a podcast feed display for that view. I don't know why, but I keep getting this when I try to view my podcast feed:
Fatal error: Cannot access empty property in /home/.../public_html/sites/all/modules/ffpc/ffpc_plugin_row_podcast.inc on line 86

anybody has any clues why?

-- All The Best, Mohammed Al-shar'
--
[ Drupal support list | http://lists.drupal.org/ ]
aurfalien | 30 Jun 02:57

passing vars part 2

Hi,

So I've taken it a step farther by doing this;

exec('sudo /path/create_user.sh '.($username));

But I would like to back ground this so it doesn't hang the process if  
it should fail.  Plus I read thats its advisable to back ground exec  
calls.

I've tried several incarnations w/o success.

Any ideas?

- aurf

--
[ Drupal support list | http://lists.drupal.org/ ]

Sauro Cesaretti | 29 Jun 20:25

Problems with ubercart and subscriptions modules

Hi all,

I have tried to install subscription moudle because I need to handle
subscriptions in one e-commerce web site.
In particular, I'd like that when a user piad a subscription, the rules
associated with its user will automatically change and the it'll have more
permissions.
the payment process is handled with ubercart module.
I have tried to check the code of the subscription module but I cannot
understand if this feature is implemented.
I'm sorry if it's a simple request but I'm still a beginner in developing
moudles.
Thanks in advance
Regards, Sauro

--
[ Drupal support list | http://lists.drupal.org/ ]

Ivan Goretha | 29 Jun 15:17
Favicon

How to configure Drupal with reverse proxy (Apache 2.2 with mod_proxy)

Hi,

I have a project that requires a reverse proxy server be installed in front of Drupal.
I have set the following parameters in settings.php in Drupal:

$base_url = 'http://www.mywebsite.com';
$conf = array(
   'reverse_proxy' => TRUE,
   'reverse_proxy_addresses' => array('192.168.1.1', ),
 );


where 192.168.1.1 is the IP address of www.mywebsite.com.
The IP address of Drupal is 192.168.1.2 and the IP address of the database is 192.168.1.3.
Drupal and database servers can't be accessed from public.

When I go to http://www.mywebsite.com, I can see Drupal log in page.
However I am unable to login from this page.
After I enter my username and password and click Submit, I will be returned to the same page.
However if I go to http://192.168.1.2 website directly, I can login like usual.

Proxy config on Apache (webserver):

<IfModule mod_proxy.c>
ProxyRequests Off
ProxyPass / http://192.168.1.2/
ProxyHTMLURLMap http://192.168.1.2 /

<Location />
   ProxyPassReverse /
   SetOutputFilter proxy-html
   ProxyHTMLURLMap / /
   RequestHeader unset Accept-Encoding
</Location>

ProxyHTMLLogVerbose On

</IfModule>

Does anybody know how to get around this problem?
Any advice will be really appreciated.
Thanks!

Regards,
Ivan



What can you do with the new Windows Live? Find out
--
[ Drupal support list | http://lists.drupal.org/ ]

Gmane