Download & Extend

Port Advertisement to Drupal 7

Project:Advertisement
Version:7.x-1.x-dev
Component:ad module
Category:task
Priority:normal
Assigned:RandalK
Status:active
Issue tags:port to d7. d7 porting

Issue Summary

Are there any plans to port to Drupal 7?

Comments

#1

Status:active» postponed

It's not a priority at this point. Patches are welcome.

#2

Thanks for the update.

#3

D7 compatibility will become a priority for some of my sites when D7 hits beta. The first site to go uses only Ad, Ad Report, Image Ad, and Text Ad. How do you propose handling a D7 version? A team each tackling one bit?

#4

I don't currently have a plan for porting the modules to Drupal 7 at this point. If patches are submitted, I will review them and hopefully they'll quickly be merged into a D7 branch. Once I have a need for a D7 version of the module, then it will become a priority for me.

#5

I'm willing to help on porting if we can assemble a 2 or 3 man team for that.

#6

Hello Alex,
I think the team needs to cover all the modules in the package. What modules do you use?

#7

Mostly image ad module and i'm the maintainer of ad_flash so i can port that also.

#8

Is there any update to this? I'm evaluating the Advertisement module for a website and I'd like to know it has a future before I implement it. Given the state of Drupal right now, that includes a D7 port. Is this a module I can count on moving forward?

#9

Subscribing... I'm also interested in helping with the port to D7, sooner rather than later. Has anyone done any preliminary work on this?

--Ben

#10

I tried porting some unrelated modules to D7 alpha 3 using the supplied documentation and the Fields API. There is a serious gap between the documentation for Fields and alpha 3. The D6 to D7 document is missing big chunks that make the hole in the Titanic look trival. Has anyone found a nice example of a database accessing module converted from D6 to D7 Fields that we could use as an example?

#11

Status:postponed» active

There are now two D7 branches.

  • DRUPAL-7--1 is a place where I'm looking for contributions for a straight port from the DRUPAL-6--2 branch. I do not plan to actively work on this.
  • DRUPAL-7--2 is a complete rewrite of the ad module, fully utilizing Entities and Fields in core to allow the creation of completely custom ad types. In general the goal with this branch is to leverage as many core APIs as possible, and perhaps some contrib modules to streamline the code and make everything more easily extensible. This is the branch that I intend to actively work on as time permits.

Patches are very welcome for both branches! Anyone interested in maintaining the DRUPAL-7--1 branch and doing a straight port of the ad module to help see a stable release quicker, please ping me.

There is no ETA yet for either of these branches, but marking this issue as active again.

#12

Version:6.x-2.x-dev» 7.x-1.x-dev

Re-assigning the ticket to the Port branch.

#13

Subscribing

#14

Subscribing

#15

Suscribing.

I tested D6 version and would love to see a D7 version ;-)

Some documentation is still missing but as the 7--2 branch is modeled after the Drupal Commerce module, some of you may be interested by the fact that a Drupal Commerce sprint will be held in Paris, France (17-21 january 2011).
http://www.commerceguys.com/resources/news/paris-commerce-sprint-january...

People will share their knowledge during this week, and some answers may be useful for Ad module.
I am not a pro developper (rather project manager) but I may give a hand in the future.

#16

sub

#17

Suscribe

#18

Subscribe

#19

Assigned to:Anonymous» RandalK

I'll have a go at making a patch for this.

Should have something tomorrow or the day after.

#20

Title:Port to Drupal 7» Port Advertisement to Drupal 7

#21

Subscribe

#22

Heres a starter, still lots to-do

Whats working:

  • Ad module install
  • Advertisement node type
  • Ad Groups
  • Most of the admin ui
  • ad text module install
  • Blocks
AttachmentSize
port-to-drupal-7-639042.patch 182.92 KB

#23

Suscribing

#24

Suscribing

#25

Subscribing

#26

Hi Randall :)
Thanks for the update ;-)
Just wondering... Your patch:
port-to-drupal-7-639042.patch 182.92 KB,
has to be applied over the latest dev version:
ad-7.x-2.x-dev.tar.gz 30.83 KB 4a55e72bed9dfc08648c601944ba8689

Isn't it?

Thanks!

#27

Subscribe.

#28

subscribe

#29

subscribe

#30

subscribe

#31

subscribe

#32

Sorry for posting back...
In Ref to #26 :

Hi Randall :)
Thanks for the update ;-)
Just wondering... Your patch:
port-to-drupal-7-639042.patch 182.92 KB,
has to be applied over the latest dev version:
ad-7.x-2.x-dev.tar.gz 30.83 KB 4a55e72bed9dfc08648c601944ba8689

Isn't it?

Thanks!

#33

+1

#34

@Anticosti : I highly doubt that this patch is for the 7.x-2.x...This branch is being written from scratch

My guess is that it's should be applied on the 7.x-1.x...(or 6.x if it fails on 7)

Also has anyone tested this patch?

#35

Thanks for the tip Rootatwc ;-)
Tried over 7.1.x dev version... Did not work.

Tried over a 6.2.2 version:
6.x-2.2 tar.gz (160.16 KB) | zip (194.54 KB) 2009-Nov-30
Seems to work.
Here's the output:

/////////////////////////////////////////////////

[user@servername ~]$ cd /home/user/public_html/site/sites/all/modules/ad/
[user@servername ad]$ ls -las
total 468
4 drwxr-xr-x 17 user user 4096 Apr 22 14:07 .
4 drwxr-xr-x 107 user user 4096 Apr 22 14:07 ..
16 -rw-r--r-- 1 user user 14940 Apr 23 2006 LICENSE.txt
4 -rw-r--r-- 1 user user 140 Feb 16 2009 MAINTAINER.txt
4 -rw-r--r-- 1 user user 63 Jan 11 2008 README.txt
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 actions
32 -rw-r--r-- 1 user user 30660 Nov 23 2009 ad.admin.inc
4 -rw-r--r-- 1 user user 326 Nov 30 2009 ad.info
16 -rw-r--r-- 1 user user 13037 Oct 20 2009 ad.install
64 -rw-r--r-- 1 user user 60376 Nov 30 2009 ad.module
16 -rw-r--r-- 1 user user 12789 Nov 30 2009 ad.pages.inc
16 -rw-r--r-- 1 user user 13152 Oct 19 2009 ad_token.inc
20 -rw-r--r-- 1 user user 17705 Nov 23 2009 adcache.inc
12 -rw-r--r-- 1 user user 10995 Nov 23 2009 adserve.inc
4 drwxr-xr-x 3 user user 4096 Nov 30 2009 cache
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 channel
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 documentation
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 embed
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 external
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 html
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 image
4 -rw-r--r-- 1 user user 1758 Jul 9 2009 imageserve.inc
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 owners
188 -rw-r--r-- 1 user user 187313 Apr 22 14:07 port-to-drupal-7-639042.patch.txt
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 remote
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 report
4 -rw-r--r-- 1 user user 1110 Feb 23 2009 serve.php
4 drwxr-xr-x 3 user user 4096 Nov 30 2009 statistics
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 text
4 drwxr-xr-x 2 user user 4096 Nov 30 2009 translations
4 drwxr-xr-x 4 user user 4096 Nov 30 2009 weight
[user@servername ad]$ patch -p0 < port-to-drupal-7-639042.patch.txt
patching file actions/ad_actions.module
Hunk #1 succeeded at 415 (offset 1 line).
patching file ad.admin.inc
Hunk #1 succeeded at 15 (offset 1 line).
Hunk #3 succeeded at 55 (offset 1 line).
Hunk #5 succeeded at 132 (offset 1 line).
Hunk #7 succeeded at 154 (offset 1 line).
Hunk #9 succeeded at 202 (offset 1 line).
Hunk #11 succeeded at 297 (offset 1 line).
Hunk #13 succeeded at 376 (offset 1 line).
Hunk #15 succeeded at 433 (offset 1 line).
Hunk #17 succeeded at 516 (offset 1 line).
Hunk #19 succeeded at 649 (offset 1 line).
Hunk #21 succeeded at 686 (offset 1 line).
Hunk #23 succeeded at 733 (offset 1 line).
Hunk #25 succeeded at 802 (offset 1 line).
Hunk #27 succeeded at 828 (offset 1 line).
patching file ad.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file ad.info.rej
patching file ad.install
Hunk #1 succeeded at 304 (offset 1 line).
patching file ad.module
Hunk #1 succeeded at 18 (offset 1 line).
Hunk #3 succeeded at 97 (offset 1 line).
Hunk #5 succeeded at 134 (offset 1 line).
Hunk #7 succeeded at 200 (offset 1 line).
Hunk #9 succeeded at 317 (offset 1 line).
Hunk #11 succeeded at 367 (offset 1 line).
Hunk #13 succeeded at 467 (offset 1 line).
Hunk #15 succeeded at 492 (offset 1 line).
Hunk #17 succeeded at 692 (offset 1 line).
Hunk #19 succeeded at 734 (offset 1 line).
Hunk #21 succeeded at 779 (offset 1 line).
Hunk #23 succeeded at 821 (offset 1 line).
Hunk #25 succeeded at 867 (offset 1 line).
Hunk #27 succeeded at 891 (offset 1 line).
Hunk #29 succeeded at 938 (offset 1 line).
Hunk #31 succeeded at 1191 (offset 1 line).
Hunk #33 succeeded at 1311 (offset 1 line).
Hunk #35 succeeded at 1377 (offset 1 line).
Hunk #37 succeeded at 1453 (offset 1 line).
Hunk #39 succeeded at 1541 (offset 1 line).
Hunk #41 succeeded at 1578 (offset 1 line).
Hunk #43 succeeded at 1595 (offset 1 line).
Hunk #45 succeeded at 1630 (offset 1 line).
Hunk #47 succeeded at 1679 (offset 1 line).
Hunk #49 succeeded at 1729 (offset 1 line).
patching file ad.pages.inc
Hunk #1 succeeded at 9 (offset 1 line).
Hunk #3 succeeded at 80 (offset 1 line).
Hunk #5 succeeded at 105 (offset 1 line).
Hunk #7 succeeded at 131 (offset 1 line).
Hunk #9 succeeded at 179 (offset 1 line).
Hunk #11 succeeded at 251 (offset 1 line).
patching file ad_token.inc
Hunk #1 succeeded at 26 (offset 1 line).
patching file adcache.inc
patching file adserve.inc
Hunk #1 succeeded at 142 (offset 1 line).
Hunk #3 succeeded at 192 (offset 1 line).
Hunk #5 succeeded at 252 (offset 1 line).
Hunk #7 succeeded at 299 (offset 1 line).
patching file cache/file/ad_cache_file.inc
Hunk #1 succeeded at 26 (offset 1 line).
Hunk #3 succeeded at 194 (offset 1 line).
Hunk #5 succeeded at 253 (offset 1 line).
Hunk #7 succeeded at 307 (offset 1 line).
patching file channel/ad_channel.inc
patching file channel/ad_channel.module
Hunk #1 succeeded at 325 (offset 1 line).
Hunk #3 succeeded at 652 (offset 1 line).
Hunk #5 succeeded at 672 (offset 1 line).
patching file external/ad_external.module
Hunk #1 succeeded at 17 (offset 1 line).
Hunk #3 succeeded at 66 (offset 1 line).
patching file external/external.inc
Hunk #1 succeeded at 9 (offset 1 line).
patching file html/ad_html.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file html/ad_html.info.rej
patching file html/ad_html.install
Hunk #1 succeeded at 33 (offset 1 line).
patching file html/ad_html.module
Hunk #1 succeeded at 14 (offset 1 line).
Hunk #3 succeeded at 44 (offset 1 line).
Hunk #5 succeeded at 111 (offset 1 line).
Hunk #7 succeeded at 142 (offset 1 line).
patching file image/ad_image.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file image/ad_image.info.rej
patching file image/ad_image.install
Hunk #1 succeeded at 108 (offset 1 line).
patching file image/ad_image.module
Hunk #1 succeeded at 13 (offset 1 line).
Hunk #3 succeeded at 67 (offset 1 line).
Hunk #5 succeeded at 126 (offset 1 line).
Hunk #7 succeeded at 177 (offset 1 line).
Hunk #9 succeeded at 193 (offset 1 line).
Hunk #11 succeeded at 239 (offset 1 line).
Hunk #13 succeeded at 312 (offset 1 line).
Hunk #15 succeeded at 379 (offset 1 line).
Hunk #17 succeeded at 416 (offset 1 line).
Hunk #19 succeeded at 479 (offset 1 line).
Hunk #21 succeeded at 513 (offset 1 line).
Hunk #23 succeeded at 588 (offset 1 line).
patching file imageserve.inc
Hunk #1 succeeded at 36 (offset 1 line).
patching file owners/ad_owners.module
Hunk #1 succeeded at 15 (offset 1 line).
Hunk #3 succeeded at 519 (offset 1 line).
patching file report/ad_report.module
Hunk #1 succeeded at 504 (offset 1 line).
patching file serve.php
Hunk #1 succeeded at 20 (offset 1 line).
patching file text/ad_text.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file text/ad_text.info.rej
patching file text/ad_text.install
Hunk #1 succeeded at 46 (offset 1 line).
patching file text/ad_text.module
Hunk #1 succeeded at 13 (offset 1 line).
Hunk #3 succeeded at 61 (offset 1 line).
Hunk #5 succeeded at 92 (offset 1 line).
Hunk #7 succeeded at 158 (offset 1 line).
Hunk #9 succeeded at 301 (offset 1 line).
Hunk #11 succeeded at 328 (offset 1 line).
Hunk #13 succeeded at 345 (offset 1 line).
patching file weight/percent/ad_weight_percent.inc
Hunk #1 succeeded at 21 (offset 1 line).
patching file weight/percent/ad_weight_percent.install
Hunk #1 succeeded at 31 (offset 1 line).
patching file weight/percent/ad_weight_percent.module
Hunk #1 succeeded at 67 (offset 1 line).
patching file weight/probability/ad_weight_probability.install
Hunk #1 succeeded at 28 (offset 1 line).
[user@servername ad]$

#36

Update: Just tried to refresh my modules list and the ad module is recognized as being a 6.x module
Did not tried to install...

#37

there you go it was for 6.x :)

You can manually apply the changes where it failed.
(check the .rej files)

I will check it too later when i go home

#38

Subscribing...

#39

+1

#40

We might be interesting in sponsoring the initial dev for getting the rewrite for d7 up and running. Any plans for doing this?

#41

Subscribing

#42

Subscribing.

Alternatively, are there any other D7 modules that provide a similar set of functionality?

#43

Subscribing

#44

@Anticosti well actually Randalk's patch is for 7.x-1.x
thats what i did to apply it:

cd /path/to/drupal/installation/sites/all/modules
git clone --branch 7.x-1.x http://git.drupal.org/project/ad.git
cd ad
patch -p0 < /path/to/patch/port-to-drupal-7-639042.patch

thanks Randalk you have done nice startup

#45

Alternatively, are there any other D7 modules that provide a similar set of functionality?

Have you found any yet?

#46

@ rootatwc:
Thanks for the update.
I almost successfully applied the patch (~95% ) over a 7.x-1.x
Although... can't create any Ad. There is still a bogus dependency requesting Upload to be installed.

@evilgenius:
For now I might be better off dealing with OpenX (was formerly known as Openads and phpAdsNew)
http://drupal.org/project/openx (D7)
http://drupal.org/project/openx_manager (D6, No D7 version yet)
That means that I will have to manage my ads outside Drupal but still can place these in different regions.
More tedious but will work until Advertisement is D7 ready.

Cheers,

#47

Is it possible for you to give us 'possible timeframe" on this? 3 months? A year perhaps? I have yet to start development on the new site and still wont be able to for the next month or so. It will probably take me around 3 months to finish it. Is it safe to assume that by then it has been fully ported or atleast past initial test (alpha)? Thanks.

#48

subscribing

#49

I have a new project and there is yet to be decided whether we will use the openx module or this...
if we use this,then i will be able to finish Randalk's work within a week..

but if we go for openx, i doubt i can find time before October to port it

#50

Sub
I would like to help with the porting! So if you need my help just ask me here, or mail me.

#51

subscribe

#52

subscribe,

why isn't the 7.x dev version available as a dev release on the project homepage?

#53

Subscribe, hopefully I can help in some way.

#54

@rootatwc - how'd you go making a decision? I've just tested out the patch following your instructions above and here is the status of the module.

Creating ad group - Notice: Undefined index: tid in ad_admin_group_form_submit() (line 817 of E:\www\MYSITE\sites\all\modules\ad\ad.admin.inc).

Text ad - ad body does not save
HTML ad - ad body does not save, ad does not appear
Image ad - fatal error when submitting

The settings seem to be alright, the ad group taxonomy is created and the ad content type is created. Unfortunately the module is not really usable.

#55

Yes i know its not usable, Randalk's patch is just a good startup..my instructions were for someone that want to finish porting this module:)

(about my decision) We haven't decide about that part yet, was busy with the newsletter part:P

@basvredeling it isnt available because its unusable

#56

+1 4 7

#57

Subscribing

#58

Category:feature request» task

#59

Subscribing

#60

I sure hope "Advertisement" will be usable soon....
I have a community project which depends on this mod to get financed by sponsors' ads.
Start feeling I jumped too fast on the D7 bandwagon :)

#61

sub

#62

Subscribing

#63

subscribe

#64

sub

#65

sub

#66

Subscribe

#67

This module for D7 is a must. Has anyone even started to port it d7 yet (and not just patching old version? RandalK? :)

#68

subscribe.

#69

subscribe

#70

scribesub

#71

subscribing

#72

subscribe

#73

It's very important to have this on V7.
I'd be happy to partially finance it.

#74

subscribe

#75

Ok, there is a patch. Could someone run it through Coder?

#76

subscribe!

#77

subscribe!

#78

subscribe

#79

subscribe

#80

Let's Occupy Advertisement! ;-)
Cheers,

#81

ROFLMAO

#82

#83

This looks promising indeed

#84

@davidgenetic
Thanks for sharing this. its looks awesome. will give a try.