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)

Morrus 11-15-2014 05:27 PM

Additional question - how on earth do you persuade vBulletin to display the created date on the product details/reviews page?

Ted S 11-15-2014 11:32 PM

To make the location into a link, you'll just need to update the prodforums_matches_bit template again:
<a href="{vb:raw review.location}">click me</a>

You may also want to add some validation to the location string to insure it's a valid formatted URL. This can be done by adding to the hook location productforums_writereview_top (which will insure it stays intact if you upgrade the plugin down the road).

You can use one of many common regex strings (just google php regex for urls) for the check function depending on what you want to allow.

Ted S 11-16-2014 03:04 AM

Quote:

Originally Posted by Morrus (Post 2522835)
Additional question - how on earth do you persuade vBulletin to display the created date on the product details/reviews page?

Use the variable createddate which vBulletin's template engine can format.

https://www.vbulletin.com/docs/html/...mplates_syntax

Morrus 11-16-2014 11:31 AM

Quote:

Originally Posted by Ted S (Post 2522928)
Use the variable createddate which vBulletin's template engine can format.

https://www.vbulletin.com/docs/html/...mplates_syntax

I tried both {vb:raw createddate} and {vb:var createddate} but neither of them work.

(vb:date createddate} just gives me Thu, 01 Jan 1970 00:00:00.

I tried them all with posteddate too. This isthe full list of things I've tried so far:

{vb:raw posteddate}
{vb:var posteddate}
{vb:raw createddate}
{vb:var createddate}
{vb:date createddate}
{vb:date posteddate}
{vb:var product.creatteddate}
{vb:var product.posteddate}
{vb:raw product.creatteddate}
{vb:raw product.posteddate}

I need to figure this out, partly because I want to add further product fields (pagecount, format, etc.) I'm learning stuff as I go, and getting this little bit wrking will hopefully mean I then know how to do it with other things.

Morrus 11-16-2014 12:01 PM

1 Attachment(s)
Quote:

Originally Posted by Ted S (Post 2522899)
To make the location into a link, you'll just need to update the prodforums_matches_bit template again:
<a href="{vb:raw review.location}">click me</a>

You may also want to add some validation to the location string to insure it's a valid formatted URL. This can be done by adding to the hook location productforums_writereview_top (which will insure it stays intact if you upgrade the plugin down the road).

You can use one of many common regex strings (just google php regex for urls) for the check function depending on what you want to allow.

prodforums_matches_bit isn't the right one - I meant where the actual review is. I guess it's a postbit template?

I've attached an image which hopefully explains it!

Morrus 11-16-2014 01:52 PM

Another question. Sorry!

I see this code in productforums.php:

Quote:

$history = $db->query_first_slave("SELECT reviewid FROM " . TABLE_PREFIX . "pf_review WHERE productid = '". $db->escape_string($vbulletin->GPC['productid']) ."' AND userid = ". $vbulletin->userinfo['userid']);
Now, can I copy that over to the product listing part of the file? And, if so, is there then a way I can use that $history thing (variable?) in the template to determine whether or not to display a link to review a product or a note that the user already has reviewed it?

Shinkaze 11-16-2014 08:25 PM

1 Attachment(s)
Very cool (and needed) mod. I just installed it and am setting everything up. However the image uploader does not appear to work well with my version of vB (4.2.2). I have set the CHMOD for the upload directory a directed to 777, but am still getting a failed to open stream error on upload of images?

Morrus 11-16-2014 08:59 PM

It's not the vBulletin version. I'm on 4.2.2 also, and it works fine. You issue is not related to your version of vBulletin.

Shinkaze 11-16-2014 09:05 PM

Quote:

Originally Posted by Morrus (Post 2523042)
It's not the vBulletin version. I'm on 4.2.2 also, and it works fine. You issue is not related to your version of vBulletin.

In that case here is some of my PHP info?
PHP Code:

PHP Version 5.5.17
System     Linux  x86_64
Build Date     Sep 19 2014 09
:49:15 
GD Support     enabled
GD Version     bundled 
(2.1.0 compatible


Morrus 11-16-2014 09:12 PM

Quote:

Originally Posted by Shinkaze (Post 2523044)
In that case here is some of my PHP info?
PHP Code:

PHP Version 5.5.17
System     Linux  x86_64
Build Date     Sep 19 2014 09
:49:15 
GD Support     enabled
GD Version     bundled 
(2.1.0 compatible


Sadly, you're mistaking me for something more than somebody else who happened to install it on the same version.

Ted S 11-21-2014 06:24 AM

Quote:

Originally Posted by Morrus (Post 2522957)
I tried both {vb:raw createddate} and {vb:var createddate} but neither of them work.

(vb:date createddate} just gives me Thu, 01 Jan 1970 00:00:00.


When you look at your database, are there values on those fields in the pf_ tables?

Ted S 11-21-2014 06:25 AM

Quote:

Originally Posted by Shinkaze (Post 2523029)
Very cool (and needed) mod. I just installed it and am setting everything up. However the image uploader does not appear to work well with my version of vB (4.2.2). I have set the CHMOD for the upload directory a directed to 777, but am still getting a failed to open stream error on upload of images?

According to the error, your file path is incorrect. Be sure it's set from the root of your server, not just the root location you FTP into which is likely a far higher level.

Also some functions I need to update, hence the depreciated warnings. These aren't nice but won't impact the function.

Ted S 11-21-2014 06:28 AM

Quote:

Originally Posted by Morrus (Post 2522959)
prodforums_matches_bit isn't the right one - I meant where the actual review is. I guess it's a postbit template?

I've attached an image which hopefully explains it!

Ahh.

Viewing a review is actually just viewing a post/ thread. While there's index data, the module simply creates new posts when a review is posted to allow for the discussion to continue.

As such, you'd have to append the link to the post before it's created.

There's no hook location that's ideal for this in the module but if you add your code around line 407, you should be good. I'll add one to the next release for portability.

Ted S 11-21-2014 06:32 AM

Quote:

Originally Posted by Morrus (Post 2522971)
Now, can I copy that over to the product listing part of the file? And, if so, is there then a way I can use that $history thing (variable?) in the template to determine whether or not to display a link to review a product or a note that the user already has reviewed it?

Not sure where you want to use this? Can you rephrase or provide a url (remove your domain if you wish, I just need the forum part)?

Morrus 11-21-2014 10:40 AM

Quote:

Originally Posted by Ted S (Post 2523578)
When you look at your database, are there values on those fields in the pf_ tables?

Oh, that was a while ago now! I figured it out. The variable wasn't registered (a concept I was not even aware of 5 days ago).

I had to learn how to register variables for use with templates. But before that, I had to work out where the code was, and it took me a couple of days to work out it was in a plugin, and what a plugin was.

Still, I got there eventually. Took a while!

Morrus 11-21-2014 10:41 AM

Quote:

Originally Posted by Ted S (Post 2523581)
Not sure where you want to use this? Can you rephrase or provide a url (remove your domain if you wish, I just need the forum part)?

I have buttons around the place saying "Review this!". I would like them not to appear if the user has already reviewed it.

Example:

http://www.enworld.org/forum/productforums.php

As you can see every item has a button at present.

Ted S 11-21-2014 02:50 PM

Quote:

Originally Posted by Morrus (Post 2523605)
Oh, that was a while ago now! I figured it out. The variable wasn't registered (a concept I was not even aware of 5 days ago).

I had to learn how to register variables for use with templates. But before that, I had to work out where the code was, and it took me a couple of days to work out it was in a plugin, and what a plugin was.

Still, I got there eventually. Took a while!

What ones did you add in (so I can be sure to port it to the next update)?

Ted S 11-21-2014 02:52 PM

Quote:

Originally Posted by Morrus (Post 2523606)
I have buttons around the place saying "Review this!". I would like them not to appear if the user has already reviewed it.

Example:

http://www.enworld.org/forum/productforums.php

As you can see every item has a button at present.

Gotcha.

You could use that query though it will add more load as it's coming up on every view to those pages.

To minimize, run it on logged in users only (simple check that there is a userid set). Then use $history with your templates to decide if the button shows or not. I can help if you get stuck in any of that.

Morrus 11-21-2014 03:14 PM

Quote:

Originally Posted by Ted S (Post 2523636)
What ones did you add in (so I can be sure to port it to the next update)?

I wouldn't worry. My version of the product is so different to yours now that I'm never going to be able to use any updated versions! :)

My current bugbear is showing product info (rating, number of reviews, etc.) in the umatches_bit template. The PHP code in that area of productforums.php is too complex for me to play with, with all its arrays and loops and stuff.

gfran5 12-07-2014 09:05 AM

Am i able to have this without it being displayed on forumhome? Want it just to be accessed through the nav bar...

Ted S 12-08-2014 04:19 PM

Quote:

Originally Posted by gfran5 (Post 2526097)
Am i able to have this without it being displayed on forumhome? Want it just to be accessed through the nav bar...

There's nothing that it shows in forumhome other than forums.

Athena1984 01-26-2015 07:12 AM

Hello,

I've made a new tab for the product reviews and would like to know if it's possible to keep the "Reviews" tab selected when viewing the product thread. Any help would be greatly appreciated.

tomshawk 02-08-2015 07:43 PM

If I wanted to change the name from Products to something else, for the name of the file as well as everywhere in the pages, say I want to change it to book or books.

So for example productforums.php just becomes books.php
On that page where it says Products and Reviews, it becomes books and reviews. ETC
What would be the easiest way to do that?

Thanks in advance for any help

Ted S 02-08-2015 10:39 PM

Quote:

Originally Posted by tomshawk (Post 2536690)
If I wanted to change the name from Products to something else, for the name of the file as well as everywhere in the pages, say I want to change it to book or books.

So for example productforums.php just becomes books.php
On that page where it says Products and Reviews, it becomes books and reviews. ETC
What would be the easiest way to do that?

Thanks in advance for any help

Rename the file.

Search template manager and phrase manager for all current names and do the same in actual script just in case!

tagline 03-09-2015 03:11 PM

Hi guys,

I've installed this product but is not what I'm searching for. I've tried to unistall but there is no way to remove Product Review Settings and Product Review Items tab's from ACP. How to do that? Thank's

Ted S 03-09-2015 03:55 PM

Quote:

Originally Posted by tagline (Post 2539940)
Hi guys,

I've installed this product but is not what I'm searching for. I've tried to unistall but there is no way to remove Product Review Settings and Product Review Items tab's from ACP. How to do that? Thank's

Delete all the files you uploaded including those in the includes/ folder.

tagline 03-09-2015 04:55 PM

Quote:

Originally Posted by Ted S (Post 2539941)
Delete all the files you uploaded including those in the includes/ folder.

Thank's :up:

DreadsUK 03-25-2015 03:40 PM

Hi, i've moved our forum to a different domain and the images for all the products have been lost. Can anyone tell me where i can change the domain name for the plugin to direct back all the images.

Thanks

Ted S 03-27-2015 06:49 PM

Quote:

Originally Posted by DreadsUK (Post 2541509)
Hi, i've moved our forum to a different domain and the images for all the products have been lost. Can anyone tell me where i can change the domain name for the plugin to direct back all the images.

Thanks

The addon uses relative paths and assumes everything is hosted on the same domain as most forums are. You'll need to resync images / update the databsse if you moved the structure around.

tomshawk 04-04-2015 04:30 AM

I'm curious, in the 3rd pic on the OP. The list of products?

How easy would it be to modify this.

I'd like to see
my books image
the name
the rating
the price,
and a link to the description page
but in 3 or 4 columns across

I think it would take up less space and make room for more products on a page.

Ted S 04-13-2015 01:06 AM

Quote:

Originally Posted by tomshawk (Post 2542319)
I'm curious, in the 3rd pic on the OP. The list of products?

How easy would it be to modify this.

I'd like to see
my books image
the name
the rating
the price,
and a link to the description page
but in 3 or 4 columns across

I think it would take up less space and make room for more products on a page.

It's all displayed via a template so, assuming you don't want to add any fields, editing is as quick as you can change the html and corresponding css.

tomshawk 04-13-2015 01:57 AM

Thank you but as a novice changing html and CSS is not my fortay

Could you assist with this?

Also,

I have a few more questions as well if you do not mind

What if I want to add fields for the reviews in pic 1 and 2, for example, a field in my books for reading level, or amount of pages in a book.

Also, is there a way to add more images to the product profile like you see on ebay for example?

Thank you in advance for the outstanding addon BTW

tomshawk 04-15-2015 05:11 AM

Quote:

Originally Posted by Ted S (Post 2493848)
Are you comfortable editing php? If so, try removing the ,1 from line 416 of the script.

If not, tell me about your server... is it using Apache? Shared or dedicated host? Does the review still post?

I installed this onto a friends site and I get this same error.
I removed the ,1 and the error remains.
The star rating does not register, and the review counter does not show up as there being one.

The review truncates into a large wall of text.
I see the review there in the review forum as well as in the AdminCP, if I go to delete it in the admincp I get this error

Warning: mysqli_query() [function.mysqli-query]: (22003/1690): BIGINT UNSIGNED value is out of range in '(`tomwayne_vb422`.`vb422pf_product`.`reviews` - 1)' in ..../includes/class_core.php on line 1393

This is a vbulletin 4.2.2 PL4 fresh install

Any help would be great, thank you

tomshawk 04-16-2015 06:22 PM

Anybody have an idea?

This mod works perfectly on vb 4.0.0 but gives the error above in 4.2.2 PL4

Sorry if I seem impatient but I told my friend about how good it is and well.

Thanks in advance

Ted S 04-16-2015 11:13 PM

Quote:

Originally Posted by tomshawk (Post 2542953)
Thank you but as a novice changing html and CSS is not my fortay

There's a forum here for coding support discussions that may be a good place to try.

Quote:

What if I want to add fields for the reviews in pic 1 and 2, for example, a field in my books for reading level, or amount of pages in a book.
The addon supports custom fields but it's pretty basic. You can't change them by category for example but they will allow this sort if info. They're in the admin settings.

Quote:

Also, is there a way to add more images to the product profile like you see on ebay for example?
You can use bbcode or basic html to embed them if they're already posted somewhere (which works depends on your forum settings).

Ted S 04-16-2015 11:16 PM

Quote:

Originally Posted by tomshawk (Post 2543081)
I installed this onto a friends site and I get this same error.
I removed the ,1 and the error remains.
The star rating does not register, and the review counter does not show up as there being one.

The review truncates into a large wall of text.
I see the review there in the review forum as well as in the AdminCP, if I go to delete it in the admincp I get this error

Warning: mysqli_query() [function.mysqli-query]: (22003/1690): BIGINT UNSIGNED value is out of range in '(`tomwayne_vb422`.`vb422pf_product`.`reviews` - 1)' in ..../includes/class_core.php on line 1393

This is a vbulletin 4.2.2 PL4 fresh install

Any help would be great, thank you

The problem is that the value being posted is negative. Sounds like the counter didn't go up properly and needs to be reset to 1 if the content is still there to delete or 0 if it's been cleared.

You'll have to excuse me but I don't recall the exact details anymore and didn't see what you quoted from in the last few pages of the thread?

tomshawk 04-16-2015 11:29 PM

Thank you Ted, I was able to figure out the custom fields option while playing on my site. I have not customized my friends yet but I know where to start.

I will ask about the HTML changes on the other forum.

The error I am reffereing to is

Writing a review causes
Warning: Only variables should be assigned by reference in ..../productforums.php (line 416)

You suggested this

Are you comfortable editing php? If so, try removing the ,1 from line 416 of the script.

The server is running apache

The star rating does not register, and the review counter does not show up as there being one.

The review truncates into a large wall of text.
I see the review there in the review forum as well as in the AdminCP, if I go to delete it I get this error

Removing the ,1 from that line did not fix the problem.

I am also getting this

Warning: mysqli_query() [function.mysqli-query]: (22003/1690): BIGINT UNSIGNED value is out of range in '(`tomwayne_vb422`.`vb422pf_product`.`reviews` - 1)' in ..../includes/class_core.php on line 1393

when trying to delete the review.

This is vbulletin 4.2.2 PL4 where mine is 4.0.0thank you again for your support on this awesome addon, it is greatly appreciated

tomshawk 04-22-2015 07:17 PM

OK, this problem seems to be related to the socialpages problem with vbulletin 4.2.2
I found it as I noticed I got another error when just trying to use advanced search function in VB on this new site, as soon as I patched that error, this one went away.

So, now the only problem I have now is the truncating of the review into a long wall of text instead of paragraphs and lines as it should be.

Not to drive you up the wall but, as part of my customization, I want to remove the start rating system

I have removed it for all the pages via templates except the review creation screen.
If I remove it from there, I cant not create a review as I did not add a rating.

How do I remove it as a requirement?

Thank you

Ted S 04-23-2015 10:59 PM

Quote:

Originally Posted by tomshawk (Post 2543897)
So, now the only problem I have now is the truncating of the review into a long wall of text instead of paragraphs and lines as it should be.

Do you allow HTML or BBCode on the forum reviews post to? Can you try toggling both on / off to see if it helps?

Quote:

How do I remove it as a requirement?
Remove it from the template and add a hidden form field with a value of 1 in its place. This way it gets past along for the script to check and the database to insert though you won't show it back anywhere.

tomshawk 04-24-2015 01:35 AM

Quote:

Originally Posted by Ted S (Post 2544020)
Do you allow HTML or BBCode on the forum reviews post to? Can you try toggling both on / off to see if it helps?

Remove it from the template and add a hidden form field with a value of 1 in its place. This way it gets past along for the script to check and the database to insert though you won't show it back anywhere.

Forgive my ignorance, again

This hidden form field

Is this done in the Custom form field?
If it is, I do not see a hidden option
and I assume the title does not matter.

What will this do to the Thread creating title.
right now, it says 5 out of 5 rating for (Product title)

I'd rather it just say Rev: (Product Title)


All times are GMT. The time now is 05:46 AM.

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.02734 seconds
  • Memory Usage 1,872KB
  • 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
  • (2)bbcode_php_printable
  • (29)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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