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

interactive module ?

Hello all.

I have a database on news article and want to create a simple module that can list all the titles and there publication date. Since there will be thousands of article, I am planning to show titles of only 10 news article at a time and include "next 10" and "prev 10". I am not sure how can I maintain the current value and decide which button was clicked. Below is the code of what I am up to. Particularly look at getOutput() function. I have two questions
1. Am I doing right or there is better way to do this
2. Currently my code is not working properly. What might be the reason

<?php
// help section
function viewer_help($section) {
$output = '';
switch ($section) {
case 'admin/modules#description':
$output .= t('Module defines custom blocks for [site]');
break;
}
return $output;
}

function viewer_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {

case 'list':
$block[0]['info'] = t('Quick Browse');
break;

case 'view':
$block['subject'] = t('Quick Browse');
$block['content'] = getOutput();
break;
}
return $block;
}

// this is where i am creating a form, and buttons
function getOutput() {
$value = 0;
if(isset($_POST['index'])) $value = $_POST['index'];
$form = '

';
$form .= form_hidden('index', $value); // I thought creating a hidden variable might help but is not helping

Shadows bookmarking support in Drupal?

Is anyone working on a module or port of the Delicious module to support Shadows social bookmarking? (shadows.com)... I just discovered this as part my expanding use of Flock and I will have to say, Shadows is quite remarkable... looks like there is a WordPress plug-in, so it would be super groovy to adapt the Delicious module to Shadows... Anyone working on this? If not, perhaps I can find some spare time this summer to adapt.

Content Construction Kit Question

I installed this CCK module and it works fine. I have couple questions that i need some help if some body can:

1. how do i get rid of the field names? i created a content type > add fields such as "body" to store content of a node > when the node is displayed the field name is also display "body".

user_profile.tpl.php and ldap_integration

Hello everybody,
I am trying to customize the user profile template by cleaning up some of the fields.

All our users' data is populated via the ldap_integration module, and I'm trying to condense values such as Address, City, Zip, State, etc. into a single field instead of having a page of separate fields.

Current profile display is:

checking for file in 'files' directory

I'm developing a module and I'm looking for the simplest way to check to see if a particular file exists within Drupal's 'files' directory. This is probably a no-brainer for many of you out there.

how do I suppress odbc messages in drupal?

I am trying to suppress ODBC error messages in my drupal module. I have change my php.ini settings to not display errors and just log them but I keep getting my errors printed in a themed fation on my module. How can I suppress this errors?

TANX!

Pages

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