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.


All times are GMT. The time now is 01:33 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.02345 seconds
  • Memory Usage 1,752KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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