A few changes more

This is the place to post questions and comments about the FlexBanner component
Post Reply
doorknob
Posts: 22
Joined: Mon Dec 30, 2013 12:34 pm

A few changes more

Post by doorknob » Thu Feb 20, 2014 12:10 am

Hi Andrew,
As I mentioned in my previous post, I have implemented some extra functionality to support my responsive site. I doing so, I found a few more issues and so I am posting a new update to include some further fixes. If you think the extended functionality would be useful for others, you are welcome to that too if you like. The changes I made are:

1 Fixed the sorting on the list pages, including synchronising the dropdown selector with the column headers. On the banners page, a couple of the headers were also made clickable. Some of the formatting was altered to prevent the caret from wordwrapping
2 Changed sorting for Client, Location and Size to use the description rather than the ID
3 Added clientid to the links table and a corresponding filter option to the links list page
4 Added some missing language strings (and others to support the extra functionality described later)
5 Implemented the missing filter for locationid
6 Fixed a formatting problem in the banners list page that may have already existed in v4.0.9 or may have been introduced in the earlier set of changes I made
7 Corrected duplicate HTML ids in the banner form
8 Fixed a bug in the 'edit' option of the dropdown menu that pops up on detail lines on each of the list pages
9 Fixed bugs in all of the other dropdown menu options on the banners list page
10 Added validation checks to all entities to prevent duplication of the name. Also to prevent duplication of the link URL
11 Added extra columns to the banner list and moved the 'status' column for consistency with the other entities (except category)
12 Added a 'linkname' column to the links table and changed the dropdown to use it instead of the linkurl. This is because many of my urls are so long that there is no visible difference in the first 30 chars, making it impossible to make a correct selection
13 Removed the unique key on the name field of the client table. This is because in J3.2 records are not physically deleted, they are given a state value of -2 instead. If a record is deleted, it would then be impossible to enter a new record with the same name value
14 Edited the sql to include the image dimensions in the size names (otherwise I wouldn't have a clue which one to choose)
15 Added a new entity called 'Campaign' to support the functionality I need for a responsive site. An extra field was added to the banner table to link it to the campaign table.
16 The module was modified to include a new parameter 'Campaign Group'. If no Campaign Group value is selected, the functionality is as before. If two or more module instances are created with a common value for the Campaign Group then the first to be instantiated creates a control class that is shared by the other instances and ensures that the banners selected for the subsequent instances match the campaigns of the banners selected for the first. The selection criteria for the first module is as before except that only banners that are assigned a campaignid can be selected and only one banner from any one campaign is published. For the subsequent modules, the banners are selected to match the same set of campaign ids and in the same sequence (although I only expect to include one banner per module)
17 Added join conditions to the module selection query to exclude banners of the associated client, location or size if not published
18 Changed the module query to exclude 'finished' banners. The existing functionality creates a field in the extract with a value 'valid' that could be used to exclude these records but the field is unused in the module and its helpers so I see it as a bug. In any case, the if statement that references 'finished' also uses logic that assumes that any positive value of 'state' is valid which is wrong ('archived' uses a value of 2)

The zip file also includes a sql script file with database changes

Tested with J3.2.2 but not with J2.5

If you don't already use one, I strongly recommend a text file compare program to extract the differences. I use UltraCompare which is not free but there are several decent open source options.

Regards
Phil
Attachments
com_flexbanners_4.0.10_update_2014-02-20.zip
(87.75 KiB) Downloaded 132 times

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

Re: A few changes more

Post by Andrew998 » Fri Feb 21, 2014 10:23 am

Thanks, I'll certainly use some of this.
Andrew998
Developer

doorknob
Posts: 22
Joined: Mon Dec 30, 2013 12:34 pm

Re: A few changes more

Post by doorknob » Sat Feb 22, 2014 12:56 pm

Andrew,
in views/sizes/view.html.php you forgot to delete line 103. That means that the sort order drop down list for sizes will have two entries for sorting by state, one that works and one that doesn't.
Phil

doorknob
Posts: 22
Joined: Mon Dec 30, 2013 12:34 pm

Re: A few changes more

Post by doorknob » Sat Feb 22, 2014 1:09 pm

Hi Andrew,
You also seem to have omitted the language strings for the duplicated error messages.
Phil

doorknob
Posts: 22
Joined: Mon Dec 30, 2013 12:34 pm

Re: A few changes more

Post by doorknob » Sat Feb 22, 2014 1:17 pm

Hi Andrew,
Thanks for removing the uniquename index on the client table. The update sql removes it from existing tables but the install sql still creates it
Phil

Post Reply