vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Major Additions - Product Review Forums ? Research, Review & Compare Items (https://vborg.vbsupport.ru/showthread.php?t=269808)

The Ottoman 01-18-2012 06:32 PM

If I wanted to add a search by MFG instead of price, I understand that I will need to edit the productforums.php. I am just wondering if you could point me in the direction of what to edit.

Also, I'd like to have the mfg show up in the table that gets displayed.

Ted S 01-18-2012 06:55 PM

Quote:

Originally Posted by Killhunter (Post 2289452)

If you want to add in a browser-side resize by all means go right ahead but IMO that's not a solution as you're not actually resizing the image, you're just forcing it to show up smaller. This means the height could be a mile tall on the image and the full file still has to be downloaded so if it's really large, the site's speed is impacted.

Ted S 01-18-2012 07:00 PM

Quote:

Originally Posted by The Ottoman (Post 2289523)
If I wanted to add a search by MFG instead of price, I understand that I will need to edit the productforums.php. I am just wondering if you could point me in the direction of what to edit.

Also, I'd like to have the mfg show up in the table that gets displayed.

All of this is in productforums.php

First you'll have to add the mfrg to the input variables accepted around line 63 replace:

Code:

$vbulletin->input->clean_array_gpc('r', array(
        'catid'            => TYPE_INT,
        'title'            => TYPE_STR,
        'productid'    => TYPE_UINT,
        'min_price'    => TYPE_INT,
        'max_price'    => TYPE_INT,
        'min_rating'    => TYPE_UINT,
        'max_rating'    => TYPE_UINT,
        'posted'            => TYPE_UINT,
        'mfrg'                => TYPE_STR
    ));

Next we have to search the database using a LIKE so we get some degree of fuzzy matching around 99 add:

Code:

if($vbulletin->GPC['mfrg']){ $conditions .= " AND pfp.mfrg LIKE '%". mysql_real_escape_string($vbulletin->GPC['mfrg']) ."%'"; } // mfrg of product
And then we have to be sure the variable persists from page to page line 164 add:

Code:

$sortaddon .= ($vbulletin->GPC['mfrg']) ? 'mfrg=' . $vbulletin->GPC['mfrg'] . '&' : '';
You'll have to edit the template to add a new form field, name of mfrg

Of course it would be more ideal to generate a list of manufacturers and let people pick via dropdown. Next update can do that.

Ted S 01-18-2012 07:01 PM

Quote:

Originally Posted by The Ottoman (Post 2289511)
Holy crap!, that was easy.

You may however want to adjust your sample XML file to have another sample product in it instead od the single one. It took me a little bit to figure out why Excel was only mapping a single line. If you have two sample products, the XML mapping understands how to handle multiple lines then.

Awesome and will do!

Killhunter 01-18-2012 07:11 PM

Quote:

Originally Posted by Ted S (Post 2289540)
If you want to add in a browser-side resize by all means go right ahead but IMO that's not a solution as you're not actually resizing the image, you're just forcing it to show up smaller. This means the height could be a mile tall on the image and the full file still has to be downloaded so if it's really large, the site's speed is impacted.

And you cant add this or say me how i could do that?

The Ottoman 01-18-2012 07:22 PM

Quote:

Originally Posted by Ted S (Post 2289544)
Of course it would be more ideal to generate a list of manufacturers and let people pick via dropdown. Next update can do that.

Well if that's comning soon, I can easily wait for that.

Thanks!!

Ted S 01-18-2012 08:45 PM

Quote:

Originally Posted by Killhunter (Post 2289548)
And you cant add this or say me how i could do that?

As I said before, adding an entire image uploading, file management, resizing and display class is not simple when it has to work on a infinite number of site configurations all of whom want their own specific file saving and display options -- which is why the mod uses urls right now.

If you want to add your own forced resize open up the review template and add a width="X" height="Y" into the <img> tag where you define either a max width or height... However that will not actually resize the image, it just forces it to look smaller while still downloading the entire file and potentially altering the aspect ratio or distorting the page.

Ted S 01-18-2012 08:46 PM

Quote:

Originally Posted by bigtree (Post 2289460)
Can't we use the vbulletin editor for this? That would make the most sense.

Use the editor for what?

Ted S 01-18-2012 08:48 PM

Quote:

Originally Posted by cowcowcow (Post 2289451)
Eagerly anticipating the next version

Anything in particular you hope to see in the update?

Ted S 01-18-2012 11:36 PM

Is there a feature or tweak you'd like to see make it into this mod? We'll be doing a feature release this week / weekend and while it won't include everything, chime in and we'll try to sneak it in.

Here's what's planned:

Planned Changes [Week of 1/16]
- Profile link to a search of a user's top posts [admin option]
- Post level link to the number of votes, good votes, or ratio for a user's posts [admin option]
- WYSIWYG editor for writing a review
- Search by manufacturer [dropdown]
- Cleaned up search page & results page
- Bug fixes here and there


All times are GMT. The time now is 06:17 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02653 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete