I think it would be nice if you could choose the paragraph number instead of 50%. That way it would be consistent where the region get's inserted.

I attach patch for this. It needs some tuning but everything should work fine

Comments

upchuk’s picture

Hey there.

I do not want the possibility to set the paragraph number by default because you can never anticipate the number of paragraphs in a given node.

The latest release gives you the option to override the default placement(50%) per individual node and move it up or down by any number of possible paragraphs for the node.

demoshane’s picture

Yes, it does but only to shift it from middle. Test the patch I did.

If you set paragraph to 999 for example and the node has 4 paragraphs, the region is added after latest block thus you don't need to anticipate the number. Also, if you have nodes that have shift that goes to negative side it defaults to 50%.

upchuk’s picture

Hi,

The purpose of the module was the provide the possibility to inject the region in the middle of the node. From there, I added the possibility to override the default middle placement per node if needed. This is the direction I want for this module.

I might consider building in the option to select by default to be middle or two thirds or one third or so. But I don't want default to be an integer.

Cheers!

demoshane’s picture

The patch I provided keeps default as middle with optional select to override middle with integer. Just give it a test run :)

upchuk’s picture

Check out the dev snapshot for a feature i created: a condition you can add when you create the block inject by which you can choose directly an offset. Lemme know if it works well for you.

D

demoshane’s picture

Is the offset calculated from the middle point? If it is the inject position is still random instead of fixed as 10/2 = 5 +- offset = x. The patch I created allows to define fixed spot (it might have the setting page field as required but that is easy to change though). Default offset would be nice addition on inject region basis. Maybe also a fixed paragraph. That would allow easily the following: region 1 after 2 paragraphs region 2 after 4 paragraphs etc.

upchuk’s picture

I understand it's different than your patch. It's not the same thing. I might consider adding fixed paragraph injection as a next step but a bit more restricted. For example you can specify to insert always after the second paragraph (which is fixed) or before the last 2 paragraphs (which again depends on the number and needs calculation). I think this is a good use case.

But I don't want the user to select paragraph 10 as default because many nodes won't have so many paragraph and it will end up in the end. I'll still think about it and come up with something.

In the meantime, if you want, give the dev snapshot a go and let me know if you get any errors.

Thanks!

cristian100’s picture

First of All Upchuk, this is a beautiful module.

I second Demoshane intention, it is more useful to have a fixed position in so many cases and websites, the best reason is for Adsense placement, it is very recommended to have an adsense block immediatele after the first paragraph, which makes it visible at first screen (most designs), and also in context of an article.

upchuk’s picture

Status: Needs review » Postponed
marcoka’s picture

The module page says:

With release 7.x-1.2 you can provide a number of paragraphs as an offset to the place where the region gets injected in. This means that on an individual node basis you can adjust exactly where the region gets placed.

Isnt that what you wanted?

demoshane’s picture

Yes, that should be it.