Forums / All Other Contributions/Addons / Model List support

Model List support

Started by gjh42 on 6 Dec 2010, 10:46 PM · Views: 5,188

Results 1 to 20 of 43
6 Dec 2010, 10:46 PM
#1
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Model List support

Model List creates a listing of all manufacturers with their products.

* The default layout has a vertical list of manufacturers, and hovering on a manufacturer will drop down a list of its product model numbers in three columns.
* You can set the number of columns for products.
* You can set either product names or product model numbers to display. They will display alphabetically in either case.
* By using the alternate stylesheet rules provided, you can make the manufacturers into a horizontal "bar" type of list, with products dropping down in a vertical list below, or permanently expanded manufacturer/product lists.
* By saving image files named as described, you can substitute images for the manufacturer names.
* The manufacturers and product models are each links to the advanced search results for that term.

The default installation places the model list in define_page_4.php for demo purposes; it can be added to any page location by putting the include() statement in the correct file.

22 Dec 2010, 9:00 AM
#3
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

WOOT! I love this contribution Glenn, Thanks!
:bigups:
I'm fiddling with this on my private server, and I can't seem to make it run on names instead of model numbers, what would I change?

22 Dec 2010, 9:05 AM
#4
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

define('MODEL_LIST_NAME_MODEL', 'model');//to change display comment this and uncomment next line
//define('MODEL_LIST_NAME_MODEL', 'name');
found it in includes\languages\english\extra_definitions\YOUR_TEMPLATE
never mind!

22 Dec 2010, 9:17 AM
#5
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

This looks great :) On sticking it in a sidebox it gets trapped in the row though... Is there any way to float the list out of the row?

22 Dec 2010, 9:44 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Model List support

What gets "trapped in the row"? The manufacturers, or the product lists? It can probably be styled however it is that you want, but I would need to see it live to advise on specifics.

22 Dec 2010, 10:01 AM
#7
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

gjh42:

What gets "trapped in the row"? The manufacturers, or the product lists? It can probably be styled however it is that you want, but I would need to see it live to advise on specifics.

the product lists. I'm using it live on http://opticalnow.ca

I'd like it to hover over the left column 205 px limit...

22 Dec 2010, 10:15 AM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Model List support

In stylesheet_model_list.css, edit this```
.mfrList:hover .mfrListCols {display: block; position: absolute; z-index: 10; width: 98.7%; background: #ffffee; padding: 0.5em 0 0.5em 0.5em; border-bottom: 1px solid #aabbcc;}

22 Dec 2010, 11:12 AM
#9
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

:flex:
Awesome. This was exactly what I needed, it lends presence to seo by having our product names, discretely, plastered on the front page.
Thanks again!:yes:

23 Dec 2010, 8:44 AM
#10
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

As much as I love this plugin, I'm sorry to tell you it's throwing me validation errors.... go to my page http://opticalnow.ca and hit the validated by WC3 link to see the culprit. On my site it's throwing 133 validation errors. (site was valid before installing this and one other plugin)

Error Line 24, Column 18: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

Warning Line 178, Column 57: cannot generate system identifier for general entity "search_in_description"

….php?main_page=advanced_search_result&search_in_description=1&keyword=Acuvue" …

<SCRIPT language=javascript type=text/javascript> This error may occur when there is a mistake in how a self-closing tag is closed, e.g '.../ >'. The proper syntax is '... />' (note the position of the space).

and.. etc. The WC3 validation output should give you enough info to fix. If I can help in any way, please let me know!

23 Dec 2010, 8:52 AM
#11
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

The other plugin was Corner Site Seal. Sorry about crossposting, but I thought it might be relevant.

23 Dec 2010, 9:01 AM
#12
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

I'm betting a lot of those errors are caused by the corner seal - the model_list errors start at line 178.

23 Dec 2010, 2:48 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Model List support

The Model List errors are all caused by a snippet of link code I copied without examining deeply. It needs to have its ampersands escaped.
In /includes/modules/your_template/model_list.php, replace lines 36 and 47:```php
$content .= '<h3><a href="index.php?main_page=advanced_search_result&search_in_description=1&keyword=' . $mfrs_name . '" title="' . MODEL_LIST_ALT_LINK . $mfrs_name . '">' . /$mfrs_name/ title_image_exists($mfrs_name, 'model_list_mfr' . $model_list[$mfr_key]['mfrs_id']) . '</a>' . MODEL_LIST_MFR_COMMENT . '</h3>' . "\n";
//should be
$content .= '<h3><a href="index.php?main_page=advanced_search_result&search_in_description=1&keyword=' . $mfrs_name . '" title="' . MODEL_LIST_ALT_LINK . $mfrs_name . '">' . /$mfrs_name/ title_image_exists($mfrs_name, 'model_list_mfr' . $model_list[$mfr_key]['mfrs_id']) . '</a>' . MODEL_LIST_MFR_COMMENT . '</h3>' . "\n";

  $content .= '  <li><a href="index.php?main_page=advanced_search_result&search_in_description=1&keyword=' . $current_model . '" title="' . MODEL_LIST_ALT_LINK . $current_model . '">' . $current_model . '</a></li>' . "\n";

//should be
$content .= ' <li><a href="index.php?main_page=advanced_search_result&search_in_description=1&keyword=' . $current_model . '" title="' . MODEL_LIST_ALT_LINK . $current_model . '">' . $current_model . '</a></li>' . "\n";

24 Dec 2010, 4:02 AM
#14
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

here's the repaired and modified for sidebox code, with a sidebox built in :bigups:

29 Dec 2010, 2:57 PM
#15
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Model List support

Since I didn't mention it before, Model List is available in Free Addons.
I will update it with the validation fix, and will consider including a readymade sidebox option.

26 Jul 2011, 4:20 PM
#16
damixa avatar

damixa

New Zenner

Join Date:
Jun 2011
Location:
Bournemouth UK
Posts:
44
Plugin Contributions:
0

Re: Model List support

thedjphat:

here's the repaired and modified for sidebox code, with a sidebox built in :bigups:

Hi,
Your site & sidebox looks a lot better than mine.:(
Can you tell me what you edited in css etc etc? or can I be cheeky and ask for a copy of your files?

Thanks
Mike

28 Jul 2011, 11:24 PM
#17
thedjphat avatar

thedjphat

Zen Follower

Join Date:
Nov 2010
Location:
Vancouver, BC
Posts:
108
Plugin Contributions:
0

Re: Model List support

sure, here ya go. :smartalec:

29 Jul 2011, 7:14 AM
#18
damixa avatar

damixa

New Zenner

Join Date:
Jun 2011
Location:
Bournemouth UK
Posts:
44
Plugin Contributions:
0

Re: Model List support

thedjphat:

sure, here ya go. :smartalec:

You are now officially a legend sir! :clap:
Thanks , saved me soooo much time!

13 Aug 2011, 2:21 PM
#19
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Model List support

I'm a bit confused, does this mod display only in a sidebox or can it be displayed in the center column as well?

Thank you,
autoace

15 Aug 2011, 6:02 PM
#20
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Model List support

The official version in Free Addons defaults to displaying the model list in the center column of Define Page 4 (for demo purposes), but you can display it anywhere by putting the "include" statement described in the readme into the appropriate file. The zip attached above in posts 14 and 17 also has files to make a model list sidebox.