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

Pager_query does not return the first row

does anyone know why pager_query would not return the first row in its results? Running this query in phpmyAdmin or Heidi returns the proper rows but using the pager_query function of drupal skipps over the first result row. So you get 9 rows rather than 10

$sql = "SELECT g.recipient, g.created, g.message, g.author
FROM {guestbook} g
WHERE g.recipient = ".$uid."
ORDER BY g.created DESC";
$result = pager_query($sql);
$output .= count($result);

TIA

CCK Fields in a Block?

Right now, I'm using CCK for an upcoming technology / gadget review website with the information of each product listed at the bottom in custom fields. What I'd like to do is move this information to the sidebar in a block of some sort for each post with these fields. Is this possible?

enable a new module

i am new to drupal. how can i enable new modules, i can't enable them, after uploading the files i do not see the modules uploaded in the admin section.

New Music Community

My friends and I are planning to develop a new music community website in support of unsigned bands in our area. We have some web dev skills but we're new to Drupal and could really use some advice (and maybe some help) to put our plans into effect. We're looking at allowing DJs and Bands to publish their own pages, the ability for bands to upload videos that can be converted to FLV (I have already tested this out but not on Drupal) on the fly, maybe quizzes, voting on favourite music videos, bands and DJs. We would like to show which DJ is on air and what is playing...

What is your callback strategy from hook_menu? node_x callbacks or custom callbacks and why

Thanks for your time in advance.

I am new to drupal 4.7 ,but from a coders view, I am very excited about this product.
I am still not able to see the forest for the trees however and hence this post.

I am writing a custom module that implements a new node type for a client.

In this project, I am "the data guy" vs "the presentation guy". my role is to store, retrieve
and manipulate data and keep the underlying db normalized and sane.

From a data perspective, I need to keep my modules custom tables in sync with the node and users table whenever a node is added/edited/updated/deleted and same for the users use cases.

On the SQL side, it is very simple, but on the DRUPAL side, I need to decide on a best practices strategy for implementing callbacks that handle these base db tasks.

For example, on the IBM tutorial site, their hook_menu implementation included many callbacks to node_page. However, at my jobsite, a previous developer developed a module that invoked only custom callbacks.

What is your advice? custom callbacks or the default node_x functions for manipulating a custom node type?

Here is my knowledge base to date:

I have taken a first pass in studying:

  • ibm's tutorial
  • new module development guide on this site
  • forms api

how to access $form[level1][element_name] in hook_form in hook_insert

Hello,

I am new to module development and have not seen the following posted.

as a starting point I read the IBM tutorial at http://www-128.ibm.com/developerworks/ibm/library/i-osource6/#insert

There, they have a hook_form implementation that has a single layer form.
it looks like...

Pages

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