Startseite
  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche
Startseite › Forum › Drupalcenter.de › Module ›

Problem with Adsense Module. Please Help

Eingetragen von micak (6)
am 10.01.2012 - 16:10 Uhr in
  • Module
  • Drupal 7.x

Hello,
I am not German and can't speak German too. But i didn't get any answer for my issue on drupal.org forum so i decided to ask users here to help me.
I installed Adsense module (http://drupal.org/project/adsense), It works fine but only Revenue sharing part doesn't work fine. I enabled profile module too and defined a single-line textfield block for members to define their adsense code and i named this block, profile_google_adsense_client_id
I also made it private. But when i go to revenue sharing basic page in my admin panel, i get a red error page with below content. Please help me to solve this problem.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_drpl1.profile_fields' doesn't exist: SELECT fid, title FROM {profile_fields} ORDER BY fid; Array ( ) in revenue_sharing_basic_get_profile_fields() (line 147 of /home//public_html/...../sites/all/modules/adsense/old/revenue_sharing_basic/revenue_sharing_basic.admin.inc).
Add new comment ⋅ Categories: Module Development and Code Questions, Drupal 7.x

The developers of this module don't reply at all in drupal.org or even when i conact directly with them and it seems they left this project. I think the code should be changed a bit. I am sure only some small change is needed but as i don't know anything about php, i can't modify it. Can anyone please help me? I really need this module.

‹ Modul Advertisment --> redirecting Modul birthdays, meine User werden nicht älter? ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

drupal.org issue:

Eingetragen von Sense (1518)
am 10.01.2012 - 17:01 Uhr

drupal.org issue: http://drupal.org/node/1398602
Well, you opened the issue just 1 day ago. Please give the maintainers some time so have a look at your issue and do not try to overrun them with your requests. They will give you an answer, just be patient.

sense-design | online solutions | Do not hack core!
Drupalcenter Verhaltensregeln | Threads bitte auf [gelöst] stellen.

  • Anmelden oder Registrieren um Kommentare zu schreiben

reply

Eingetragen von micak (6)
am 10.01.2012 - 17:07 Uhr

Thanks for your reply. I am sure they don't reply. Some other users asked some questions about this module months ago and they didn't get reply yet. Can you please have a look at my problem and help me to solve it?

  • Anmelden oder Registrieren um Kommentare zu schreiben

It seems that the module

Eingetragen von Sense (1518)
am 10.01.2012 - 17:12 Uhr

It seems that the module isn't completely ported to D7 right now, because it is still a DEV version and I haven't got the time to do this right now ... sorry

sense-design | online solutions | Do not hack core!
Drupalcenter Verhaltensregeln | Threads bitte auf [gelöst] stellen.

  • Anmelden oder Registrieren um Kommentare zu schreiben

Yes. And it seems that they

Eingetragen von micak (6)
am 10.01.2012 - 17:28 Uhr

Yes. And it seems that they are not going to update it more. But i am sure a person who knows a bit about php can fix the issue.
When i run the code, i get this error on line 147. I write both errors and the source code of module that you can see the code of module on line 147to find whats wrong.

The error i get is:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'database_drpl2.profile_fields' doesn't exist: SELECT fid, title FROM {profile_fields} ORDER BY fid; Array ( ) in revenue_sharing_basic_get_profile_fields() (line 147 of /home/...../sites/all/modules/adsense/old/revenue_sharing_basic/revenue_sharing_basic.admin.inc).

The source code of revenue_sharing_basic.admin.inc which error occurs while running it, is:
Line 147 is at the end of file and starts with

$result = db_query("SELECT fid, title FROM {profile_fields} ORDER BY fid");
Please help me if you can.

<?php
/**
* @file
* Contains the administrative functions of the revenue_sharing_basic
* module.
*
* This file is included by the basic revenue sharing  module, and includes
* the settings form.
*/

/**
* Menu callback for the revenue_sharing_basic module settings form.
*
* @ingroup forms
*/
function revenue_sharing_basic_settings() {
  include_once(drupal_get_path('module', 'revenue_sharing_basic') .'/help/revenue_sharing_basic.help.inc');

  $form['help'] = array(
    '#type'        => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed'   => TRUE,
    '#title'       => t('Help and instructions'),
  );

  $form['help']['help'] = array(
    '#type'  => 'markup',
    '#value' => revenue_sharing_basic_help_text(),
  );

  $form['required'] = array(
    '#type'        => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed'   => FALSE,
    '#title'       => t('Required parameters'),
  );

  $form['required']['revenue_sharing_basic_client_id_profile_field'] = array(
    '#type'          => 'select',
    '#title'         => t('Google AdSense client ID profile field'),
    '#default_value' => variable_get('revenue_sharing_basic_client_id_profile_field', REVENUE_SHARING_BASIC_CLIENT_ID_PROFILE_FIELD_DEFAULT),
    '#options'       => revenue_sharing_basic_get_profile_fields(),
    '#required'      => TRUE,
    '#description'   => t('This is the profile field that holds the AdSense Client ID for the site owner as well as (optionally) for site users who participate in revenue sharing. You must enabled the profile module and create a new field for this.'),
  );

  $form['percentage'] = array(
    '#type'        => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed'   => FALSE,
    '#title'       => t('Revenue sharing percentage'),
  );

  $options = drupal_map_assoc(range(0, 100, 5));

  $form['percentage']['revenue_sharing_basic_percentage_author'] = array(
    '#type'          => 'select',
    '#title'         => t('Percentage of node views going to author'),
    '#default_value' => variable_get('revenue_sharing_basic_percentage_author', REVENUE_SHARING_BASIC_PERCENTAGE_AUTHOR_DEFAULT),
    '#options'       => $options,
  );

  $form['percentage']['role'] = array(
    '#type'        => 'fieldset',
    '#title'       => t('Percentage of node views going to author with the following roles'),
    '#description' => t('When the author belongs to one or more roles, the percentage of node views using his AdSense Client ID will be the maximum between the author value and the following settings for each role.'),
    '#theme'       => 'revenue_sharing_basic_author_percentage_role',
  );

  $roles = user_roles(TRUE);
  unset($roles[array_search('authenticated user', $roles)]);
  foreach ($roles as $role => $role_desc) {
    $form['percentage']['role']['revenue_sharing_basic_percentage_role_'. $role] = array(
      '#type'          => 'select',
      '#title'         => t($role_desc),
      '#default_value' => variable_get('revenue_sharing_basic_percentage_role_'. $role, REVENUE_SHARING_BASIC_PERCENTAGE_ROLE_DEFAULT),
      '#options'       => $options,
    );
  }

  if (module_exists('referral')) {
    $form['percentage']['revenue_sharing_basic_percentage_refer'] = array(
      '#type'          => 'select',
      '#title'         => t('Percentage of node views going to user who referred the author'),
      '#default_value' => variable_get('revenue_sharing_basic_percentage_refer', REVENUE_SHARING_BASIC_PERCENTAGE_REFER_DEFAULT),
      '#options'       => $options,
    );
  }

  $form['content_types'] = array(
    '#type'        => 'fieldset',
    '#collapsible' => TRUE,
    '#collapsed'   => FALSE,
    '#title'       => t('Content types'),
  );

  $types = node_get_types();
  foreach ($types as $type => $name) {
    $form['content_types']['revenue_sharing_basic_node_type_'. $type] = array(
      '#type'          => 'checkbox',
      '#title'         => $name->name,
      '#default_value' => variable_get('revenue_sharing_basic_node_type_'. $type, REVENUE_SHARING_BASIC_NODE_TYPE_DEFAULT),
    );
  }

  $form['#redirect'] = 'admin/settings/adsense/publisher';

  return system_settings_form($form);
}

/**
* Theme the author percentage part of the settings page.
*
* @ingroup themeable
*/
function theme_revenue_sharing_basic_author_percentage_role($form) {
  $output = '';
  $elements = element_children($form);
  if (!empty($elements)) {
    $header = array(t('Role'), t('Percentage'));
    foreach ($elements as $key) {
      $row = array();
      $row[] = $form[$key]['#title'];
      unset($form[$key]['#title']);
      $row[] = drupal_render($form[$key]);
      $rows[] = $row;
    }
    $output .= theme('table', $header, $rows);
  }

  $output .= drupal_render($form);
  return $output;
}

/**
* Auxiliary function to create the list for the revenue_sharing_basic_client_id_profile_field field
*
* @return
*   array of fields with the field IDs as keys and the field titles as values
*
* @ingroup forms
*/
function revenue_sharing_basic_get_profile_fields() {
  $profile_list = array(0 => 'None');

  $result = db_query("SELECT fid, title FROM {profile_fields} ORDER BY fid");
  while ($row = db_fetch_object($result)) {
    $profile_list[$row->fid] = $row->title;
  }

  return $profile_list;
}

  • Anmelden oder Registrieren um Kommentare zu schreiben

I think you would have to ask

Eingetragen von Sense (1518)
am 10.01.2012 - 17:38 Uhr

I think you would have to ask a paid developer to port this module to D7 for you or to fix the current dev version and post it back to the community.

sense-design | online solutions | Do not hack core!
Drupalcenter Verhaltensregeln | Threads bitte auf [gelöst] stellen.

  • Anmelden oder Registrieren um Kommentare zu schreiben

Do you know any cheap

Eingetragen von micak (6)
am 10.01.2012 - 17:46 Uhr

Do you know any cheap develope who can do this?The problem is not big and it only needs some modifications.

  • Anmelden oder Registrieren um Kommentare zu schreiben

Well, this is in the scope of

Eingetragen von Sense (1518)
am 10.01.2012 - 17:51 Uhr

Well, this is in the scope of the developer. I think there are more things to fix apart from the db_query error, because the profile module doesn't exist in D7 any more. Fields can be added by the field module.

sense-design | online solutions | Do not hack core!
Drupalcenter Verhaltensregeln | Threads bitte auf [gelöst] stellen.

  • Anmelden oder Registrieren um Kommentare zu schreiben

Profile module is exist and

Eingetragen von micak (6)
am 10.01.2012 - 17:59 Uhr

Profile module is exist and when you enable adsense module, it will be enabled too automatically. I tried it on two website and it exists.

  • Anmelden oder Registrieren um Kommentare zu schreiben

In D7? I don't think so.

Eingetragen von Sense (1518)
am 10.01.2012 - 18:03 Uhr

In D7? I don't think so.

sense-design | online solutions | Do not hack core!
Drupalcenter Verhaltensregeln | Threads bitte auf [gelöst] stellen.

  • Anmelden oder Registrieren um Kommentare zu schreiben

Yes. In D7. Be sure about

Eingetragen von micak (6)
am 10.01.2012 - 18:25 Uhr

Yes. In D7. Be sure about it., You can try it too :)

  • Anmelden oder Registrieren um Kommentare zu schreiben

Benutzeranmeldung

  • Registrieren
  • Neues Passwort anfordern

Aktive Forenthemen

  • PHP 8.1 - Deprecated function: rtrim()
  • Preloader / Spnner entfernen Menu Link Modal-Modul
  • Schriftgröße standard einstellen
  • Drupal Website gestalten
  • MariaDB 10.6
  • Entity Reference - Title Felder werden als Link angezeigt
  • Tokens werden in Viev als Link angezeigt
  • [bug entdeckt & workaround gefunden] benutzerdefinierte Felder vom Userprofil tauchen ungefragt auch in den Forumtopics auf...
  • [gelöst] Mass contact Empfängerliste nach Taxonomy Term statt Rolle
  • Update V. 9.3.12 auf V. 9.4 mit Fehler: Modul mySQL fehlt. Bitte Hilfe.
  • Sprachpfad, in Drupal Korrekt einstellen, auch bei den Meta-Tags
  • Update von Drupal 9.3 auf 9.4 oder bei 9.3 bleiben
Weiter

Neue Kommentare

  • Danke fürs Feedback. Gut dass
    vor 2 Tagen 3 Stunden
  • Patch angewandt
    vor 2 Tagen 6 Stunden
  • core_version_requirement: ^8
    vor 4 Tagen 8 Stunden
  • core_version_requirement: ^8
    vor 4 Tagen 8 Stunden
  • ok. Wenn ich das mache
    vor 4 Tagen 8 Stunden
  • Bei gleichem Namen hat das
    vor 4 Tagen 8 Stunden
  • Sorry, dass ich mich hier
    vor 4 Tagen 8 Stunden
  • Habe Patch versucht
    vor 4 Tagen 15 Stunden
  • Hier wird ein Patsch
    vor 4 Tagen 17 Stunden
  • Mit Drupal geht das um 150
    vor 5 Tagen 4 Stunden

Statistik

Beiträge im Forum: 247866
Registrierte User: 19592

Neue User:

  • Davidsnins
  • kudes
  • Tkakah

» Alle User anzeigen

User nach Punkten sortiert:
wla9213
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3845
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 3 Gäste online.

Hauptmenü

  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche

Quicklinks I

  • Infos
  • Drupal Showcase
  • Installation
  • Update
  • Forum
  • Team
  • Verhaltensregeln

Quicklinks II

  • Drupal Jobs
  • FAQ
  • Drupal-Kochbuch
  • Best Practice - Drupal Sites - Guidelines
  • Drupal How To's

Quicklinks III

  • Tipps & Tricks
  • Drupal Theme System
  • Theme Handbuch
  • Leitfaden zur Entwicklung von Modulen

RSS & Twitter

  • Drupal Planet deutsch
  • RSS Feed News
  • RSS Feed Planet
  • Twitter Drupalcenter
Drupalcenter Team | Impressum & Datenschutz | Kontakt
Angetrieben von Drupal | Drupal is a registered trademark of Dries Buytaert.
Drupal Initiative - Drupal Association