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

taxonomy_menu into keyword albums: using drupal taxonomy to display gallery2

Hi-

I am trying to figure out the best way to oragnize my Gallery 2 by catergories. I have thought about using the custom fields in Gallery2 and then calling those from Drupal, but I think the quickest would be to use the Gallery2 keyword albums.

I was hacking at the taxonomy menu module and figured out a way to display keyword albums using Drupal's taxonomy:

taxonomy_menu:

  $access = user_access('access content');

    foreach (taxonomy_get_vocabularies() as $vocabulary) {
      if (variable_get('taxonomy_menu_show_'. $vocabulary->vid, 1)) {
        $path = 'taxonomy_menu/'. $vocabulary->vid;
        $items[] = array('path' => $path, 'title' => t($vocabulary->name),
          'callback' => 'taxonomy_menu_page', 'access' => $access,
          'weight' => $vocabulary->weight);

I changed that to:

$access = user_access('access content');

foreach (taxonomy_get_vocabularies() as $vocabulary) {
      if (variable_get('g2Keyword_menu_show_'. $vocabulary->vid, 1)) {
        $path = 'http://localhost/main/?q=gallery&g2_view=keyalbum.KeywordAlbum&g2_keyword='. $vocabulary->name;
        $items[] = array('path' => $path, 'title' => t($vocabulary->name),
          'callback' => 'g2Keyword_menu_page', 'access' => $access,
          'weight' => $vocabulary->weight);

Using Gallery2 without embedding

Hi,

I want to use the Gallery2 module to have access to the imageblock, statistics etc. and to sync users. But I want Gallery2 to open externally, not embedded, because it is destroying my template.

Is there any option I missed? I also tried to change the paths in the module files, but I cant't find the place where they are created.

Problem selecting comments from alternative database

I have a small module for Drupal 4.7 that gets a list of latest comments from a different Drupal 5.0 database (db2) on the server and puts the in a block. The query code is given below. The second Drupal 5 installation shares users, sessions, role, authmap and sequences tables with the 4.7 installation.

Update disknode files

I use disknode in 4.7. To update the files I tried to install an FTP-Process this process
copy the new files (only the size is changing) but after this the downloades files using the disknode-link are corrupted.

Is there no other way then updating these files manually each time they change?

cant Add CCK field by modules

hi,

guys i want to implement a module for one of my project tht should add new CCK fields to existing drupal installation.

should this be achieved by module.install or is there any code that i can write in my module to do that.

plz suggest me the right way to achieve this functionality

Sharad

Using _POST in a CALLBACK to filter out some things

Hello,

I am developing a really cool Karma module (if I say so! :-D ).
I am having a bit of a problem with a (hopefully minor) issue.
I would like to show a page with the top ranking users. So, I have:

     $items[] = array(
       'path' => 'karma_users',
       'title' => t('Users by karma'),
       'description' => t('Users by karma'),
       'callback' => 'simple_karma_view_users',
       'access' => user_access('view users by karma'),
       'type' => MENU_NORMAL_ITEM)

And then a simple:

function simple_karma_view_users(){
  $result=pager_query(

    db_rewrite_sql('SELECT recipient_uid,sum(karma) as k from {simple_karma} WHERE  '.simple_karma_sql_duration('created') .' AND  recipient_uid <> 0 GROUP BY recipient_uid ORDER BY k DESC')
    , 100  );
  $data_row=array();
  while ($data = db_fetch_object($result)) {
    #drupal_set_message("R: ".$data->recipient_uid);
    #drupal_set_message("K: ".$data->k);

    $data_row[]=  array(
        theme('username', user_load(array('uid' => $data->recipient_uid ))),
        $data->k
     );
  }

  return "".theme_table(array(), $data_row, array(), NULL).theme('pager', NULL, 10, 0);

NOW, what I want to do is give the ability to filter by date. So, the user can select a FROM and a TO date.

Pages

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