Initial conversion was performed using the deadwood project, with some manual cleanup. The entire code base needs to be audited, and functionality needs to be broken out into smaller include files where applicable.

Comments

danba’s picture

File is missing from 6.x-1.x-dev:
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/ad/node.pages.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/topbigde/public_html/includes/menu.inc on line 344

moshe weitzman’s picture

Any updates?

jeremy’s picture

I've been on vacation for 2 weeks returning today, and I've seen no patches contributed. So, slow progress yet.

conniec’s picture

Hurrah, Jeremy!

I just saw that you are converting your fantastic module for D6.

I don't have enough programming knowledge to help with troubleshooting, etc, but I'll be glad to test on my testsite and report back results. Downloading Dev module now.

Connie

dchaffin’s picture

I'm in need of getting this working in D6.4. I may be able to help if you can point me in a direction. I'm somewhat new to Drupal module development, but I am quite comfortable with PHP, am getting used to "Drupalish" code and am trying to learn more. Let me tell you where I am with it and then let me know where I might begin to look to help.

I've installed the module and enabled Ad, Click filter, Image Ad and Report. I created an ad group, set the display type to jQuery and created one ad in the group I created. I then went to Admin>Blocks and told it to display the ad group in a region on my page. I still have no ad showing up at all. There is not even any HTML being rendered at all. I tried the default ad group and I've tried both groups in multiple block regions. Nothing works.

Do you have any idea what my issue is or where I could begin to troubleshoot?

Thanks.

dchaffin’s picture

StatusFileSize
new130.64 KB

OK, I edited ad.module slightly and got my ads working finally. There were only two real steps I performed to make this work (after much testing to find the issue). First, the implementation of hook_theme() was commented out with the TODO block describing the work to be done. I un-commented the ad_theme function and then my whole site disappeared.

After much experimentation, I discovered the problem was with the theme_ad_display function was not working properly. There were two things I did here: first, I changed the function call '_drupal_add_js()' to 'drupal_add_js()'. This finally got some HTML rendered out, but it didn't like the URL and wouldn't load anything. I copied the URL it was trying to load into a new browser tab and got nothing. I replaced the &s in the URL with &s and it worked. I looked further into the module, but couldn't find a place to change this. I ended up putting in a str_replace function to change these. My final function looks like this ...

/**
 * Function to display the actual advertisement to the screen.  Wrap it in a 
 * theme function to make it possible to customize in your own theme.
 */
function theme_ad_display($group, $display, $method = 'javascript') {
  static $id = 0;

  // The naming convention for the id attribute doesn't allow commas.
  $group = preg_replace('/[,]/', '+', $group);
  // URLs for images don't seem to like & - use & instead
  $display = str_replace("&", "&", $display);

  if ($method == 'jquery') {
    drupal_add_js('misc/jquery.js', 'core', 'header', FALSE, $cache);
    return "\n<div class=\"advertisement group-$group\" id=\"group-id-$id\">\n <script type=\"text/javascript\">\n //<![CDATA[\n  $(document).ready(function(){ jQuery(\"div#group-id-$id\").load(\"$display\"); });\n //]]>\n </script>\n</div>\n";
  }
  else {
    return "\n<div class=\"advertisement group-$group\" id=\"group-id-$group\">$display</div>\n";
  }
}

Again, I'm somewhat new to the module development thing, so I'm not real clear on the patch process yet. I'm attaching my modified ad module directory if someone wants to incorporate it.

manuel garcia’s picture

suscribing... available for testing etc

Babalu’s picture

subscribing

Babalu’s picture

i became the same error how #1
with the version from #6 too

jeremy’s picture

@dchaffin: thanks for the contribution, however unless you upload patches it's highly unlikely that your contribution will be reviewed/used. Fortunately generating patches is easy, and there is a wealth of information on how to do it available here.

equalspeterd’s picture

subscribe. In active deployment project which will depend on getting this ported to 6.4 willing to help out any way I can

Frank.Poulsen’s picture

StatusFileSize
new1.21 KB

I am currently working on a project where we need an advertising module, and instead of reinventing the wheel, we decided to try and get the ad module working in Drupal 6.

I had to make to minor modifications:
1. Uncomment to ad_theme() function
2. Add a new menu to the ad_menu() function

The 2nd modification is to enable the redirect, that otherwise comes up as a missing page. I assume this is caused by a change to the menu hook in Drupal 6. I dont know the Drupal 5 menu hook in details, and I dont know the original behaviour of the menu hook, but when I added the menu to the current hook, it works.

We are now able to add image ads, add the links and track click and views. We also tested the scheduling functions

I have attached the changes as a patch. This is the first patch, I have posted, so feel free to test and comment.

westblad’s picture

I have tested both the ad.module.patch contributed by Frank.Poulsen and the code modification suggested by dchaffin, and unfortunately problems persists for me on Drupal 6.5:

1) The ad content type does not display if allocated to a region on the block editing page. Essentially, I still have the same result as described by dchaffin in his post #5. But, I have tried other display types than jQuery and with the Raw display type an image ad does show, however, along with unwanted text lines "view counter". With the display type set to Javascript nothing is shown. With display type set to IFrame extra whitespace is added to the page where the image should be, but no image. One can, however, make an ad content type display on the front page in the main content region by promoting it. But this is not where you want ads to be most of the time.

2) An ad group cannot be edited or deleted. The page for these tasks cannot be evoked. Clicking on an edit link for an ad group in the list on the Ads page under the Groups tab is inoperative. Nothing happens.

I have successfully activated and used this module with Drupal 5. I would certainly very much appreciate (I'll sing and dance) if someone would make it work for Drupal 6.

Frank.Poulsen’s picture

I forgot to mention this in my previous post:

I am using the JavaScript setting, 1 group, and Drupal 6.5, but it works with the Raw setting as well. If I understand you correctly, the code modifications (mine or dchaffin), actually enables you to display the image under the raw setting, is that correct?

Also (although you probably already did this to be able to see your image at all), its important to clear your cache after the updates for Drupal to pick up the modifications.

You might be able to use the Raw setting, that apparently works for you, and change the template. I havent tried it.

Are you able to add a link to your image, or is that not necessary for your project?

westblad’s picture

Sorry if I was a bit unclear in my post #13.

Without the uncommenting of the ad_theme() function, nothing is displayed. With the activated ad_theme() function I am able to display the image ad with the raw display type, not with any other type (javascript, jquery, iframe). I clear all cached data after code updates. And I have tried different themes (including the default one) with the same result.

Frank.Poulsens modification of the ad_menu() enables linking the image to an external web page, which is good. I could hide the div tags with CSS which displays the text "view counter" under the raw display type setting. However, since it is not possible to edit the group settings (the group editing page cannot be displayed) I can't change the weight, i.e., the order, of the image ads. This ordering functionality is very important for us since advertisers pay more for having their ad closer to the top of the page, and descending toward the bottom.

Somebody please.

ps. Tested with Drupal 6.5, IIS 5, on Windows 2003 Server. The module works fine on this setup with Drupal 5.x

famousb’s picture

StatusFileSize
new54.17 KB

Guys,
i haven't even gotten to the point of trying to display the ads on my site yet, i'm still trying to ensure the administration of them is at least functioning properly...

from the D6 install version, after i manage to create 2 test ads, then go to Content Management -> Ads, the list page is not displaying properly, as i get all of the info about the two test ads on one line, and then the two checkboxes directly below them, such as:

test text ad1test ad1defaultdefaulttextimageactiveactiveeditedit

(see attached .jpg for further clarification).

i found in ad.module where the form is created with function ad_admin_ads(), but do not know enough about Drupal and PHP to actually figure out how to fix it... i'm more of trial and error...

this is the current code for ad_admin_ads()

function ad_admin_ads() {
  $filter = ad_build_filter_query();
  $result = pager_query('SELECT a.*, n.* FROM {ads} a INNER JOIN {node} n ON a.aid = n.nid '. $filter['join'] .' '. $filter['where'] .' ORDER BY n.changed DESC', 50, 0, NULL, $filter['args']);

  $form['options'] = array('#type' => 'fieldset',
    '#title' => t('Update options'),
    '#prefix' => '<div class="container-inline">',
    '#suffix' => '</div>',
  );
  $options = array();
  foreach (module_invoke_all('ad_operations') as $operation => $array) {
    $options[$operation] = $array['label'];
  }
  $form['options']['operation'] = array('#type' => 'select', '#options' => $options,  '#default_value' => 'approve');
  $form['options']['submit'] = array('#type' => 'submit', '#value' => t('Update'));

  $destination = drupal_get_destination();
  while ($ad = db_fetch_object($result)) {
    $ads[$ad->aid] = '';
    $form['title'][$ad->aid] = array('#value' => l($ad->title, 'node/'. $ad->aid));
    $form['group'][$ad->aid] = array('#value' => _ad_get_group($ad->aid));
    $form['adtype'][$ad->aid] = array('#value' => $ad->adtype);
    $form['adstatus'][$ad->aid] = array('#value' => $ad->adstatus);
    $form['operations'][$ad->aid] = array('#value' => l(t('edit'), 'node/'. $ad->aid .'/edit', array('query' => $destination)));
  }
  $form['ads'] = array('#type' => 'checkboxes', '#options' => $ads);
  $form['pager'] = array('#value' => theme('pager', NULL, 50, 0));
  return $form;
}

does anyone know the fix for this?

jrglasgow’s picture

StatusFileSize
new5.9 KB

This patch straightens out the theme problem and the redirect problem.

jeremy’s picture

I've committed a modified, untested version of #17. Please don't make stylistic changes at the same time as trying to make bug fixes as that confuses things. Hopefully this is a step in the right direction, but more patches will be necessary to get the module fully working.

Flying Drupalist’s picture

What's the status of the port? Can we test this module now?

tgcondor’s picture

Please inform when the module is ready for alpha or pre-alpha testing. I am willing to help by testing. If I manage to get something working that doesn't at first then I'll share a patch with the group. And thanks to all who are keeping the development moving forward!

fessio’s picture

Sorry guys, but is it possible to make the redirect work anyhow? `Cause I get the "Page not found" error. It's strange that the $items["ad/redirect/%/%"] doesn't work, meaning that drupal doesn't even try to call the ad_redirect function when the above URL is accessed. Any ideas? Thanks

zilla’s picture

subscribing realized i'd rather use this than google ad manager after all! no interest in pushing dozens of google remote scripts for block inclusions even if they do have reliable servers ;)

sersim’s picture

StatusFileSize
new26.5 KB

Hi,
these 2 files are based on the 6.x-1.x-dev version released on 2008-Nov-20 and fix the following bugs:
- redirect not working;
- Destination URL and other fields not displayed in the new/edit ad form

I've tried text, html, image and embedded ads, and they work.
The group edit form is not displayed and I don't find how the feature "display ads based on node ids (nids), or taxonomy terms (categories)" can be used. Maybe it's not implemented yet.

I'm new to module development, so I hope I've not broken anything.

aflores3’s picture

subscribe

I got here trying to find solution to comment #1. Realized there is more to be done

danyg’s picture

sersim, thank you very much. I hope it will be built in next dev version, because it works.

jeremy’s picture

Status: Active » Needs work

Sersim: Thanks, however please upload unzipped patches, as zip files with complete files are not especially useful to me and are generally ignored. More information on how to create patches can be found here.

sersim’s picture

StatusFileSize
new598 bytes
new33.59 KB

Ok, these are the patches. I've done them with Eclipse, I hope they work.
You should apply these patches on the CVS file.
They fix the #1 problem too: the fatal error after clicking on the menu links 'html advertisement', 'image advertisement', 'text advertisement'.
I suggest you clear the cache (Administer > Site configuration > Performance) after applying the patch.

Jeremy, do you confirm that "display ads based on node ids (nids), or taxonomy terms (categories)" is not implemented yet?

NidSquid’s picture

"You must specify a valid Destination URL" message keeps appearing.

sersim, thanks for your patches - I applied them and was able to get the url fields to show up when trying to create my ad. But now, after I try to save my ad, it keeps telling me I need to specify a valid Destination URL even though I have supplied one as requested.

I am trying to create a text ad to start and no matter what url I try, I continue to get this message. I tried just simply http://www.google.com for example.

Am I doing something wrong?

Thanks.

EDIT: if I disable Validate URLs from the Ad settings, it works.

aflores3’s picture

sersim,
I have successfully installed & added html ads using your patches. Thank you.

I will continue to test and report bugs.

sersim’s picture

NidSquid, try this patch

NidSquid’s picture

Thank you sersim, I will try it.

OneTwoTait’s picture

subscribing... waiting for a release that works. :)

Anonymous’s picture

Hi,
i read all the comments and apply all the patches to the current dev release but none worked for drupal 6.6. when i clicked on the image banners it searches in the website instead of bringing the user to the ad site . anybody can post a link to full working one that has solved the "image advertisement" problem and the image banner link not redirecting the ad site.
Thanks for any help

sersim’s picture

Hi UncleSam,
I use the patched ad module on Drupal 6.6 and it works.
I suggest you apply the following patches:
- ad.module_patch.txt and ad.module_patch.txt in the comment #27 of this issue;
- the ad.text patch;
- the ad.embed patch;

After that, you have to clear the cache: Administer > Site configuration > Performance

Let me know if it works for your installation.

neochief’s picture

StatusFileSize
new1.99 KB
new56.31 KB
new598 bytes

Fixed:
- Added support of %ad_group menu placeholder
- Ad Groups editing and deleting (which was commented)
- Redirect issues in form submits
- Added the $form_state into some form functions
- Some glitches with localization support
- Changed almost all confisuing code such as $a = "$variable" to more slick $a = $variable
- Meybe anything more, but too minor to remember
- Fixed click_filter module

Combined those with sersim's patch and attaching all latest patches in this thread.
Everythings seems to be working fine.

P.S. I spent 3 hours combining things together. Here's a graphical diff (800Kb) to ease somebody's life, who will do things in such way.

Anonymous’s picture

hi
all the patches are for text embed and the ad.module itself but none for ad.image.module which I'm using . and after clearing the caching i'm still getting "image advertisement" link clicking error
Thanks

neochief’s picture

@Jeremy

Please, commit those patches to the dev version, because there are too many changes made to proceed development comfortably.

jeremy’s picture

I am trying to make time to review the patches, but things are busy with the holidays and it's not clear when I'll have sufficient time for this. Perhaps next week. One big concern I have unrelated to the patches is that I have recently committed some significant changes to the 5.x development tree, and the 6.x branch is now way out of sync.

superflyman’s picture

subscribing

WildBill’s picture

Subscribing

ericjam’s picture

plz fix soon :D And it would be easier if u could just post the updated file instead of .patch, I don't have Unix

todd nienkerk’s picture

Subscribing. I need to test this module in D6.x for a client. I'd rather go with a native Drupal solution instead of something like OpenX.

neochief’s picture

StatusFileSize
new123.42 KB

Here's the full patched module which I'm using right now on the live site, it includes all above changes.

OneTwoTait’s picture

Great. Using ad.zip from #43 allows me to use Image ads and see reports.

Unfortunately, the Embedded ads aren't available. On "Administer >> Content Management >> Ads >> Settings" there is no "Embedded ads" link.

neochief’s picture

Sorry, but some of such sub-modules as "Embedded ads" may not work. I've been concentrated only on major sub modules during this development session.

sersim’s picture

@taite11 I've posted a patch for the Embedded ads at #34

I hope that Jeremy will have the time to commit the patches.

OneTwoTait’s picture

StatusFileSize
new120.99 KB

Thansk sersim.

I made that patch (manually by adding the line... I assume that works). Here's the zip file from #43 plus the patch just mentioned.

StoreV’s picture

#47 worked for me - thanks very much!

dave kopecek’s picture

I can confirm that #47:

  • Enabled "edit" link on admin/content/ad/groups
  • Fixed delete groups - Groups can now be deleted from admin/content/ad/groups/GROUPNUMBER/edit
  • Fixed Redirects on image ads
  • Fixed Statistics - Clicks are now being counted and displayed on admin/content/ad/statistics

This is FANTASTIC. Thanks to everyone who contributed to the patches.

One question: Are clicks supposed to be displayed on the REPORTS tab ( /node/NODE_ID/report ) ? I'm getting a bar graph with the number of views, but no click info.

Anonymous’s picture

StatusFileSize
new98.52 KB

Hi,
#47 solved many bugs . but it still remains the #1 problem :
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/ad/node.pages.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/topbigde/public_html/includes/menu.inc on line 344

Why?
Line 1277 of ad.module : 'file' => '../../../..//modules/node/node.pages.inc',
the relative path of "node.pages.inc" has been hard coded related to the location of ad.module. but not everybody put their modules folders under "sites/all/modules". i put mine under "sites/all/modules/contrib" for the contributed modules, "sites/all/modules/custom" for my custom modules. So the way to solve it for everybody is to provide a dynamic relative path that still get the file no matter where you put ur modules files. Attached is my solution

neochief’s picture

Yeap, there are couple others, but personally I will not place patches further before commiting available changes to dev. version to not make our chaos in this issue bigger :)

clo75’s picture

Hi,

I have problems to get AD images correctly in Drupal 6.6.

I see the image test in the ad node editing interface, setting it as "active" but when I hit the "preview" I get the message "Unable to locate image" and of course when I publish it I was unable to get the ad image displayed correctly (in regular node or in blocks regions). Tried different options (Filtered HTML, Full HTML, Javascript, Raw...) and give correct ad display permissions. Tried also on differents installations (on line and local)

So I tried #43, #47 and #50 with Drupal version 6.8 , but none of them was able to display ad images on my configuration . Still get get the message "Unable to locate image" even when I cleared the cache.

Any clue ? Thanks.

MedicSean37’s picture

I've d/l the files from post 50, 47, then 43. None of the version will allow me to see the add creationg form at node/add/ad/image or ..../text. I've uninstalled and reinstalled with no improvement.

Anonymous’s picture

try to check the number of ads allowed to be displayed in the blocks. also make sure u're enabled the ad blocks to be shown in the block u want it to be shown on

MedicSean37’s picture

I did both. I still can't see the actual form. It gives absolutely no errors. No page not found, No access denied. No Watchdog logs. It's as if everything works, except actually viewing the form.

Stef01’s picture

Hi,

My main issue was the redirects on image ads not working. #47 solves this problem.
At least: when ad caching is not being used! So, in 'ads > global settings > cache' I have to set it to 'none'. As soon as I enable the caching to files the redirects don't work anymore.
Without caching, the URL that an ad redirects to is like "http://www.site.com/ad/redirect/115/t28/".
With file caching enable, the URL changes to "http://www.site.com/ad/redirect/115//", with a 'File not found' as a result when clicked on.

Any ideas what could be the reason? I would like to enable the caching for better performance.

demo9’s picture

subscribing...

#47 solves my problem for now (what I need now works)... but I eagerly await the 'official' updated dev version... Keep up the great work everyone! I'd love to help but my php skills (or lack there of) are getting in the way.

holesovice’s picture

Hi,
I was having problems with a couple of issues.
txt ads not working
You must specify a valid Destination URL.
Using history
and editing of the groups.

#27 worked to get rid of the "You must specify a valid Destination URL." issue.
But now after #47 when trying to edit a txt ad I am getting "You must specify a valid Destination URL".

Don't know if I am the only one with this problem.

Also, I don't know if this is the place to report it but, when on the "global settings" page there are 15 errors being returned.

The module IS looking very interesting. And I would like to help with testing, so, if there is anything I can do....

bgadmin’s picture

salimane, it is a great job! thanks a lot.... now i will going to visit your site to see is there some more extras! Excellent Work

jeremy’s picture

StatusFileSize
new96.64 KB

Converted the latest tarball into a patch so I can review. Attached.

jeremy’s picture

Status: Needs work » Reviewed & tested by the community

Here's what I'm committing. Sadly the 6.x branch is very out of sync with the 5.x-dev branch now -- merging in all the changes will be a rather major challenge.

jeremy’s picture

StatusFileSize
new63.01 KB

Here's what I'm committing. Sadly the 6.x branch is very out of sync with the 5.x-dev branch now -- merging in all the changes will be a rather major challenge.

jeremy’s picture

Status: Reviewed & tested by the community » Active

Committed, ready for the next round of fixes... :)

neochief’s picture

I'm close to completion of full convertion of Advertisement into D6. It includes dozens of changes and fixes, db schemas for all modules. I'll prepare patch and upload it with patched files today.

keith.smith’s picture

subscribe

neochief’s picture

StatusFileSize
new110.4 KB
new302.59 KB

At last, I finished my 2 week development session. Here's the results:

Completed:

  • Divided ad.module into 3 files — ad.module, ad.admin.inc, ad.pages.inc
  • All modules are now using Schema API for DataBase manipulations.
  • All modules are now using D6 hook_menu and it's features like router objects loading.
  • All modules are now using D6 form implementation, validators and submit functions.
  • Fixed lots of localization glitches.
  • Cleaned up hooks' and functions' dyoxygen documentation.
  • Reworked type difinitions in hook_adapi.
  • Fixed ad listing operations.
  • Cleaned and fixed owners functionality. Moved it into separate module ad_owners.
  • Cleaned and fixed ad_notify module.
  • Reworked ad_remote module. Now it's tab can be found at Ads administration menu and it's interface and implementation became more elegant.
  • Everything passing coder without errors.
  • A lot more changes too minor to remember.

Still possible needs work:

  • ad_weight_percent.module — (I didn't got what this module for)
  • Views integration.
  • Need to generate a new .pot file.
  • Some thougts:

    • Maybe we should remove stats from node edition form? Does someone really needs it there?
    • Maybe we should remove $edit in ad_image? Same.
    • Do we really need DB locks at ad_owner_permissions_form_submit()?
    • Attaching patch and archive with all patched files. Before installation, you should remove your existing ad module folder, because some files was removed and some added. Also, you should use update.php to update database (even if you already have Ad D6), because of some minor changes in database columns (such as some INT became TINYINT, etc.)

      As for the patch, I hope it will apply, though it's almost 300Kb and changes most of module's files :)

neochief’s picture

Status: Active » Needs review

As everything works for me on live site and since now I can commit to the module, I can roll this patch by myself to dev. version. But it would be nice if someone check this out just in case.

jeremy’s picture

Status: Needs review » Needs work

You have not yet been given commit privileges to this module -- I will review your patch soon, but I'm busy at the drupal.org upgrade sprint and haven't been able to do so yet.

Patience. I will review soon.

At a very quick initial and trivial glance, your patch is incorrectly updating the .info files. Please strip them from your patch.

neochief’s picture

StatusFileSize
new293.65 KB

Ah, yes, sorry, my bad. Stripped them from patch.

As for the privileges — I thought so too, until didn't done this by mistake :)
I don't know, where I can actually commit as one of developers as I didn't saw this functionality on drupal.org up today.

jeremy’s picture

As you have an approved CVS account, you can add/modify modules/NAME/po/ files. This is how the drupal.org infrastructure has been designed.

jeremy’s picture

Status: Needs work » Needs review

Moving back to "needs review" status.

neochief’s picture

Thanks for explanation, Jeremy.

manuel garcia’s picture

I have successfully upgraded the module from 6.x-1.x-dev (2009-Jan-26) to the one provided on #66, on a local install for testing porpuses. I have clicked around a bit, though no time to fully test everything atm. I have not tested the patch, but I thought I'd let you know that the upgrade went fine :) - thanks !!

Results:

The following queries were executed

ad module

Update #6001

  • ALTER TABLE {ad_clicks} DROP INDEX status
  • ALTER TABLE {ad_clicks} CHANGE status `status` TINYINT unsigned NOT NULL DEFAULT 0, ADD INDEX status (status)
  • ALTER TABLE {ad_hosts} DROP INDEX status
  • ALTER TABLE {ad_hosts} CHANGE status `status` TINYINT unsigned NOT NULL DEFAULT 0, ADD INDEX status (status)
  • ALTER TABLE {ad_statistics} DROP INDEX hostid</li><li class="success">ALTER TABLE {ad_statistics} CHANGE hostid `hostid` VARCHAR(32) NOT NULL DEFAULT '', ADD INDEX hostid (hostid)
  • ALTER TABLE {ad_hosts} DROP INDEX hostid
  • ALTER TABLE {ad_hosts} CHANGE hostid `hostid` VARCHAR(32) NOT NULL DEFAULT '', ADD INDEX hostid (hostid)
jeremy’s picture

Status: Needs review » Needs work

Another superficial change that needs to be removed from the patches -- you're stripping all my copyrights. Sorry, but I won't merge that portion of your patch. The code is still under the GPL, but my (c) will be staying in.

jeremy’s picture

Issues:
- It seems that a call to drupal_uninstall_schema('ad') is missing in ad.install.
- you are adding back in a call to the nonexistent _drupal_add_js(), and removing lines from the changelog, backing out a recent commit
- s/standart/standard/
- do not strip my (c)'s

Comments:
- I'm very happy to see that you've gone ahead and split the module into ad.page.inc style files.
- I like how you've split out the ad_owners functionality into its own module
- It seems that you didn't get to perform your cleanup on ad.admin.inc yet, with TODO's left, missing comment, etc.
- In general you have done some very nice and very thorough cleanup, nice work!

This patch is obviously a huge step forward, not only for stabilizing a 6.x release but also for cleaning up the code and standardizing on Drupal's coding style throughout the module. I have not actually done any functionality testing, I only read through the patch. But once the minor issues I've listed above are addressed I will merge and we can fix any functionality bugs that may exist later.

As for views support, that is welcome but needs to be implemented in this external project (you have CVS commit permissions there, so feel free to make ad_view commits if you're interested).

I'm okay with moving the stats from the node edit form.

I do not understand what you mean re ad_image.

As Drupal 6 no longer requires LOCK's, we should indeed move them from the Ad module. The locks need to be reviewed to be sure we're not introducing a race that can corrupt things.

A major effort left is to port the new modules and functionality in the 5.x-dev tree into 6.x. But I am going to "simplify" this by reworking the 5.x branches turning the new development effort in 5.x-dev into 5.x-2 (leaving 5.x-1 at 5.x-1.6).

Thanks!!

jeremy’s picture

All development to the ad module that has happened since the 6.x code was branched from the 5.x code has been moved into the 5.x-2.x branch in CVS. This allows us to focus on stabilizing the 6.x-1.x code first before moving on to porting the 6.x-2.x changes.

neochief’s picture

Yes, I striped all of the copyrights in files with my changes. Yes, the reason was in GPL. Actually, I don't care on this license stuff, except the fact that big part (if even not half) of the module's code is now have not only single authorship.

Also I removed all of the MAINTAINER.TXT files except one in module root. Thoese files was present in some modules, but not in others. So I just cleaned up this part.

Anyway, I can bring copyrights back into the module, if you insist. It's not big deal personally for me, but I rather leaved one big copyright notice somewhere in the module's root.

jeremy’s picture

Review the Linux kernel source code files for an example of (c) (or multiple) in each file. My (c)'s will stay, and the code remains GPL'd.

I'm fine with a single MAINTAINER file.

I'm happy with people writing their own logic/features/submodules and adding thier own (c) into the files they add if they like. So far nobody has contributed to the module in this way (and likely if they did I would want the sub-module to live in its own project anyway -- the core project has too many modules already imo).

This is important to me, if you are opposed to it let me know and I'll respect your wishes and not merge your patch.

neochief’s picture

Okay, Jeremy, I just wanted to know your position to this. I'll bring all copyrights back.

As for the ad_image, $edit which I'm talking about is in ad_image_validate_size() function.

For your comments:
- drupal_uninstall_schema('ad') is present. It is not in patch, because it's already been in the file. In patched file you can find it just at start of ad_uninstall().
- I'll change _drupal_add_js() in nearest patch.
- I'll replace 'standarT', just error from russian habit — in russian this word with T on end :)
- Bring back copyrights.

These and other changes I'll make today and upload patch so we could have a ready 6.x-dev.

jeremy’s picture

Status: Needs work » Reviewed & tested by the community

Okay, please only make those changes and then commit the patch. You are now an Ad module maintainer. Welcome! And again, thank you!

neochief’s picture

Great, thanks!

neochief’s picture

neochief’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new63.78 KB

And one last thing — translation template. I generate it after applying patch in #346454: Rename "Views" term to "Impressions" (which is not commited yet), so it's mandatory for the release too. I can commit all of these after confirmation.

neochief’s picture

ad.pot commited. The only thing taking us from beta-release is now ad_weight_percent module.

Mrzeigler’s picture

Subscribing, with great appreciation to those who are getting this project D6-ready.

neochief’s picture

StatusFileSize
new793 bytes

Found a fresh bug — Ad owners tab is showing not only in Ad nodes. Here's a patch.

jeremy’s picture

Status: Needs review » Needs work

This should show up for uid 1 who has all permissions. This should also show up for any user that has 'administer advertisements' permissions.

Why are you showing this tab to people with 'access statistics' permissions? I think it should only be visible if they have 'manage owners' permission for that particular ad..?

neochief’s picture

StatusFileSize
new789 bytes

I beg a pardon, wrong patch ("midnight-coding-effect"). Here's a correct one.

jeremy’s picture

You may as well edit this line, too:

     'access arguments' => array(1, 'manage owners'),

You no longer need to pass in 'manage owners' there.

Once that's fixed, looks great! Commit when ready.

neochief’s picture

Commited. Thanks for review!

jeremy’s picture

Status: Needs work » Fixed

Closing this issue -- let's track it in smaller issues now as we find and stamp out the remaining bugs.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.