Hi, I would like to submit a feature request to have an "include\exclude the following pages" option for Visibility under the Banners Management section.

To maintain backward compatibility, the default option would be to "include the following pages."

With this method, it would allow more flexible control over where the banners gets displayed. Attached is a sample of what it'll look like.

Thanks and keep up the great work!

Comments

OneSharpeGuy’s picture

StatusFileSize
new3.5 KB

This is an ugly hack that hiding of a banner on specific pages. I modified sites/all/themes/marinelli/logics/banner.inc to allow for banner exclusion. I'm no PHP guru, but it works for my purposes. If the path starts with an exclamation point, the banner will not show on path matching what ever follows the (!), ie
enter node/14 for banner visibility and the banner will show on any path except for node/14

mavimo’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new2.54 KB

Patch into attachment

mavimo’s picture

Assigned: Unassigned » mavimo
dsdart’s picture

This is the first patch I've ever applied to Drupal, so maybe I missed something, but I am getting an error now instead of images:

Notice: Undefined index: image_visibility_invert in marinelli_show_banners() (line 109 of ...\sites\all\themes\marinelli\logics\banners.inc).

I changed that line to the following to get rid of the error but not sure how to actually fix the patch:

if (isset($banner['image_visibility_invert']) && !$banner['image_visibility_invert']) {

mavimo’s picture

Version: 7.x-3.0-beta9 » 7.x-3.0-beta11
StatusFileSize
new2.35 KB

This is the new patch for marinelli 7.x-3.0-beta11 let us know if you have some problem n apply this patch to last version of marinelli.

MochaMan’s picture

I would like to try this patch. I have very little understanding of git. Is there a tool that makes the application of a patch easy?

mavimo’s picture

@MochaMan: I try to run this command (on linux/unix shell) and all work fine.

Clone marinelli repository
git clone --branch 7.x-3.x http://git.drupal.org/project/marinelli.git

Go into the folder
cd marinelli

Select current release (you can see all tag by using git tag -l command):
git checkout 7.x-3.0-beta11

Download patch:
wget http://drupal.org/files/issues/invert-visibility-settings-1088650-2.diff

Apply patch
git apply -v invert-visibility-settings-1088650-2.diff

Let us know if you have some other question and give some feedback about this feature ;)

Lioz’s picture

Status: Reviewed & tested by the community » Fixed

pushed in the next release

Status: Fixed » Closed (fixed)

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

paweld’s picture

I applied the patch. Something is wrong with it. Now, when I load my homepage I get an error page: "Fatal error: Call to undefined function marinelli_show_banners() in [...] \sites\all\themes\marinelli\template.php on line 126"

paweld’s picture

Category: feature » bug
Status: Closed (fixed) » Needs review
Victoria9’s picture

Is there a module I can download this doesn't work with Godaddy as the host instead of a localhost

manoloka’s picture

Hi there,

How is this feature request going? Is there any working patch?

I think it'd be expected some behaviour just like what blocks visibility does.

scsmith’s picture

Issue summary: View changes

Can anyone confirm the patch in #5 works with 7.x-3.0-beta12. I tried it, but doesn't seem to function properly....I admit I might have done something wrong, but before I messed up my site I thought I'd see if anyone has it working.

To clarify, it DOES work, but I seem to lose the ability to "rotate" images....for example 2 banners on excluding /blog - only one image shows, doesn't rotate as it used it.

I hope this becomes a FEATURE in the next release because without it, the banner system is "confusing". If I set up a banner for a specific url (i.e. blog/), it will continue to show the "" banners, unless I specifically define the banner to be on ALL pages except that one, and on a large site, that is nearly impossible!

*EDIT* - Sorry - after further testing, I can confirm it works with 7.x-3.0-beta12. it was my mistake. I had replaced the original with the patched folder and forgot to include the JS needed to make it work. Please ignore, but hope this becomes a "standard feature" in the next update!