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

Pro Drupal Development -- Annotate Module

Hello all, and thanks in advance for your continued help! This is my first post so I hope I follow all guidelines properly. Here is my situation. I have recently received the "Pro Drupal Development" book and I am having an issue, or at least I think I am. I have followed all of the instructions, and the annotate module seems to be working. I go to a page and make an annotation. The message indicates that my annotation was saved. I checked in the database to make sure that the annotation was saved and it was saved. However, when I bring up a page to make an amendment to a previous annotation, I am not seeing the original annotation that I had made. Maybe I am wrong, but shouldn't I be seeing the annotation somewhere on the page? Can someone please guide me in the right direction. I have posted my annotate.module code below. Again, thanks for the help.

<?php
// $Id$

/**
* @file
* Lets user add private annotations to nodes.
*
* Adds a text field when a node is displayed
* so that authenticated users may take notes.
*/

/**
* Implementation of hook_menu().
*/
function annotate_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'testing/admin/settings/annotate',
'title' => t('Annotation settings'),
'description' => t('Change how annotations behave.'),
'callback' => 'drupal_get_form',

Pagearray and Thickbox mash

Since nedjo looks like he's pretty darn busy, I thought I'd post in the forums to see if anyone else out there can help me out.

- view this issue -
From the issue:

I would like to be able to use this module with thickbox so that I can display a node within a thickbox. Inputting node/21 (for example) does not work with thickbox because it tries to load the page theme as well and goes into a loop. I thought a good option would be to use pagearray.module in order to get a node's data and then display that in a thickbox of my own style. However, thickbox works by using what is in the href of the a.thickbox to get what you need into the thickbox. So in order to execute the pagearray_page function that pagearray.module provides, pagearray also would need a hook_menu implementation that could pass the $path variable as a callback_argument. I'm unsure of the best way to accomplish this, but I'm thinking it would be good to use something like /pagearray/node/21 in the anchor's href. (<a href='pagearray/node/21' class='thickbox' rel='gallery'>[link image]</a>)

Here is what I've put into the pagearray.module so far, but could use a little direction since this isn't working.
<?php
/**
* implementation of hook_menu
*/
function pagearray_menu($may_cache) {

mod needed..

Is there a module which would allow us to put stumble and digg widgets at the bottom of post posts, if there is one available ..

Re-display Multi-Select List with All previously Selected Values

Hi,

I've used a multi-select text select list( called 'course prerequisites') in a CCK content type (to create a new course) that I created. 'course prerequisites' is a list by title of all existing courses. The user selects multiple values. When the course is edited, this multi-select text select list is shown as last saved....that is the entire list of course titles with highlighted values.

I' ve been trying to do this in a custom node module.

I've been able to automatically populate 'course prerequisites' with the title of all existing courses.

I've been able to create individual records in a table, prereqs(col1 --> nid, col2 --> prereqs) , for each value selected from the multi-select select list, 'course prerequisites'.

However, I've NOT been able to display the multi-select text select list as I would like.(...all course titles with the previously selected titles highlighted) when the node is in edit mode. Only the first item selected from the list is shown highlighted.

How do I do this ? I've been modifying node_load as shown below

function todo_load($node) {
   
   $t = db_fetch_object(db_query('SELECT course_title FROM {prereqs} WHERE nid = %d', $node->nid));

 return $t; 
}

Obviously, only data items for the current node is retrieved.....and included in $node for display...

Ive tried this.....doesn't work..

Help Me

I Am building a article website..is there to catagorise..the article under diffrent topic..Is there any way PLz help...

module setting form does not show updated values

Hi Guys,

I am working on a new module and have created its setting link(mean ?q=admin/settings/print_partners), When i submit its setting form, it does not show the updated values in the fields instead show the default values.

How it will show the updated fields in the setting form after submission.

THe code is.
<?php
function print_partners_menu($may_cache) {
$items = array();

if (!$may_cache) {
$items[] = array('title' => t('Printing Partners'),
'path' => 'admin/settings/print_partners',
'callback' => 'drupal_get_form',
'callback arguments' => array('print_partners_admin_settings'),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
'description' => t('Printing Service Settings.'),
);
}
return $items;
}
///////////////////////////////////////////////////////////////////////////////////////////////
function print_partners_admin_settings() {
$print_api_res = db_query("SELECT pa.*,pad.* from printing_apis pa, printing_apis_details pad where pa.api_id=pad.api_id and pa.api_id='1'");
$print_api_obj = db_fetch_object($print_api_res);

$refer_id = $print_api_obj->refer_id;
$protocol = $print_api_obj->protocol;
$pid = $print_api_obj->pid;

Pages

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