I'm thinking about adding a weight to an ad within an ad group. The reason for this is that the client would like to have ad be displayed in a random order, but would like certain ads to appear more often than others. The way I think I could implement this is to add a weight field to the Simple Ad content type, and then modify the view sort criteria somehow to do a weighted random sort. I haven't worked through the details yet, but I'm curious if you can think this approach makes sense? I just started taking a look at the module, so I just want to make sure that I'm on the right track.

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

minnur’s picture

Hi! Looks like you are on the right direction.
You may also try add custom order. See simpleads.api.php (this will work only for automatically generated blocks, NOT for blocks created in Views)

minnur’s picture

@Spry_Julia, Do you still need assistance with this ? If not, please close this issue.

Thank you.

JuliaKoelsch’s picture

Status: Active » Closed (works as designed)

Sorry about that -- I'll close it for now. This feature has been put on hold. If it comes up and I have questions, I'll let you know. Thanks for your help!

jaskegreen’s picture

This is exactly what I need as well. What needs to be added to the api file to make the sorting by weight work so higher ranked ads show more often?

Cheers,
Jason

minnur’s picture

@jaskegreen you will need add some logic to SQL query and you probably will need to add a new entity field and "Join" that field in your custom SQL query.

jaskegreen’s picture

Err, haven't done custom SQL in a long while. I don't really have the time right now to make this happen. If anyone has the itch and is able to rank the ads, it would be of great service to all.

Cheers

tiagojsag’s picture

+1 for this feature

firfin’s picture

Status: Closed (works as designed) » Active

Marked and closed #1881250: Weighting of Campaigns as a duplicate.
edit: Apparantly this is an unrelated issue, sorry.

Did anyone get this functionality working with SimpleAds ?

I think the Random Weight or Probabilistic Weight modules might help getting to a working solution for this.

Client request : "Some ads are more random than others." :-)

firfin’s picture

Marked #1894414: Display probability as a duplicate.

barurumm’s picture

Issue summary: View changes

Anyone with a working solution?

dtamajon’s picture

FileSize
8.98 KB

I have created a patch to allow sort ads using draggableviews. The idea is you can create your own draggableview to sort the ads, and then select that view on the block as the order mode.

I have done it over 7.x-1.9 version.

This is a first version with my current needs, so any test and improvements are welcome.

dtamajon’s picture

Just to say, the first time you edit an existing ads block, you will see 2 errors given that there are 2 new fields. After you save the block, the error will not appear again. And of course, it does not happen with a new ads block.

dtamajon’s picture

FileSize
11.32 KB

In the previous patch, not sorted ads were not included in the results. Now, those results are included and you can choose if you want them at the beginning or at the end of the list.

minnur’s picture

Status: Active » Closed (won't fix)