Remove "Banner image" Column from FlexBanner Banner Manager

This is the place to post questions and comments about the FlexBanner component
MarsFrog
Posts: 15
Joined: Wed Sep 18, 2013 5:11 pm

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by MarsFrog » Thu Sep 19, 2013 12:46 pm

I have used CPanel to access the files and I have deleted or changed the following from the default.php located in /com_flexbanners/views/client/tmpl/

I saved the changes and refreshed but the Banner Image column is still there. Is there something I am missing to delete?

DELETED
<th align="left" width="110" nowrap>
<?php echo JText::_('FLEXBANNER_BANNERIMAGE'); ?>
</th>


CHANGED
<tr>
<td colspan="13">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
from 13 to 12


DELETED

<td>
<?php if (preg_match("/swf|html/", $item->imageurl)) {
echo $this->escape($item->imagealt);
} else { ?>
<img src="<?php echo JURI::root(). "images/banners/" . $this->escape($item->imageurl); ?>" alt="<?php echo $this->escape($item->imagealt); ?>" width="110"/>
<?php }?>
</td>

Andrew998
Posts: 1400
Joined: Wed Jan 07, 2009 10:43 am

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by Andrew998 » Thu Sep 19, 2013 12:50 pm

Firstly you haven't said whether you are interested in the view for the front end or back end. You are making changes for the front end view only. Otherwise the changes are correct.

Secondly why are you changing the file in the component? This will get overwritten the first time you update the component. As I said, you need to do this using a template override in the html directory of your template.
Andrew998
Developer

MarsFrog
Posts: 15
Joined: Wed Sep 18, 2013 5:11 pm

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by MarsFrog » Thu Sep 19, 2013 12:58 pm

Aaaaah ok I think I understand. The back end is what only I can see and the front end is for advertisers view?

If this is the case it is the backend I am trying to change.

I changed the file in the component just to rule out a mistake in my folder naming in the html directory of my template.

Where would I find the back end files?

Andrew998
Posts: 1400
Joined: Wed Jan 07, 2009 10:43 am

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by Andrew998 » Thu Sep 19, 2013 1:00 pm

In the administrator directory. The structure is the same.
Andrew998
Developer

MarsFrog
Posts: 15
Joined: Wed Sep 18, 2013 5:11 pm

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by MarsFrog » Thu Sep 19, 2013 2:43 pm

Brilliant thanks that has done it. I can't work out how to alter the Administrator files using the html folder technique but I have changed the view and have kept a back up of the file on my computer.

Thanks for your help.

Andrew998
Posts: 1400
Joined: Wed Jan 07, 2009 10:43 am

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by Andrew998 » Thu Sep 19, 2013 2:49 pm

You need to find the folder for your admin template (which is probably administrator/templates/bluestork). In there you will see a folder called html. Within that you need to create folder /com_flexbanners/fexbanners/. Then simply put your new default.php file in it. That then overrides the default view in the component and will not be overwritten when you update the component.

So the file will be:
administrator/templates/bluestork/com_flexbanners/fexbanners/default.php
Andrew998
Developer

MarsFrog
Posts: 15
Joined: Wed Sep 18, 2013 5:11 pm

Re: Remove "Banner image" Column from FlexBanner Banner Mana

Post by MarsFrog » Thu Sep 19, 2013 3:52 pm

Perfect. Thank you again for all your help.

The front end has been explained in full previously but for anyone trying to remove the "Banner image" Column from FlexBanner Banner Manager BACKEND this is what worked for me...

You need to copy the default.php from administrator/components/com_flexbanners/views/flexbanners/tmpl/ into administrator/templates/bluestork/html/com_flexbanners/flexbanners/ (bluestork is the name of my admin template yours may be different)

Now make the following changes in the copied version of default.php

DELETE
<th align="left" width="110" nowrap>
<?php echo JText::_('ADMIN_FLEXBANNER_BANNERIMAGE'); ?>
</th>


CHANGE
<td colspan="14">
<?php echo $this->pagination->getListFooter(); ?>

from 14 to 13

DELETE
<td>
<?php if (preg_match("/swf|html/", $item->imageurl)) {
echo $this->escape($item->imagealt);
} else { ?>
<img src="<?php echo JURI::root(). "images/banners/" . $this->escape($item->imageurl); ?>" alt="<?php echo $this->escape($item->imagealt); ?>" width="110"/>
<?php }?>
</td>

Post Reply