MyBB Hacks

Full Version: Product Review
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Open up cache/xthreads.php and find XTHREADS_ATTACH_USE_QUERY
Change the number next to it to a 1.

Out of interest, did you install XThreads 1.53 directly or did you upgrade to it?  If the former, it's interesting that the auto-detection failed...
It worked Zinga. In my limited knowledge, I would have never identified that on my own.  For you Zinga...... the world...  To answer you question, I installed 1.53 directly.  Thank you so much for the help.
Update:
Use Settings Overrides for the Force Postbit Layout settings in create/edit forum settings:
  • Settings Overrides:
    • Setting: Showthread Options -> Post Layout
      Value: horizontal

      Code:
      postlayout=horizontal

Hi, thank you for this very good plugin! I would like to know if there is a way to allow to each user write own review.

For example:
- Product Reviews Forum
-- Image and title of product to review
--- Each user can write own review for this product, not only first post + comments, but each user has own first-post where write review

Thank you!
If the products to be reviewed specified by Admin, you can create a custom fields (listbox or options button), and list the product inside the Values List. So if your user create a new thread in the forum, they can select which product they want to review from the dropdown list or the options.
little question
how can i add a search box?
it would be very useful
Updated:

Based on the watermarking example, we will watermark the main product image.

Edit pfpic custom fields:
  • Image Thumbnail Generation:

    Code:
    88x66|160x120|320x240=scale_max(320,240)->copy(newXTImg()->loadimage('images/mylogo.png')->scale(120,90),-2,-2)

    Only the 320x240 thumbnails will be watermarked. Modify the images/mylogo.png to the image to be copied as watermark, and the 120,90 in the scale 'function' as needed (it is the max size of the watermark).
    Run the Rebuild XThreads Attachment Thumbnails tools after changing the setting.

Only for creating a new product review:

Use multi files input for additional product pictures and some improvements.
  • Using multi files for additional product pictures:
    Create a custom fields:
    • Title: Additional Pictures
    • Key: pfapic
    • Applicable Forums: 'select our Product Preview forum'
    • Hide on Show thread: check
    • Input Field Type: File
    • Display Order: 9
    • Editable by / Required Field?: Everyone
      This is not a required field. Users are allowed to not upload additional pictures.
    • Valid File Extensions: gif|png|jpg|jpeg
      Modify it as our needs.
    • Maximum File Size: 1048576
      Modify it as our needs. It is a maximum file size for each additional pictures.
    • Only Accept Image Files: Yes
    • Image Thumbnail Generation: 160x120
    • Allow multiple values for this field: Yes
    • Maximum Number of Values: 6
    • Display Format:

      HTML Code
      <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
      	<tr><td class="thead"><div><strong>{$GLOBALS['threadfields']['pfname']} Pictures</strong></div></td></tr>
      	<tr><td class="trow1" align="center">{VALUE}</td></tr>
      </table>

    • Multiple Value Delimiter: Put a space here
    • Display Item Format:

      HTML Code
      <a href="{URL}"><img src="{THUMBS['160x120']['url']}" alt="" /></a>


    Edit pf_showthread template:

    HTML Code
    <html>
    <head>
    <title>{$thread['subject']}</title>
    {$headerinclude}
    <script type="text/javascript">
    <!--
    	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
    // -->
    </script>
    <script type="text/javascript" src="jscripts/thread.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$pollbox}
    <div class="float_right">
    	{$newreply}
    </div>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" style="clear: both; border-bottom-width: 0;">
    	<tr>
    		<td width="60%" valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
    				<tr>
    					<td class="thead" colspan="2">
    						<div style="float: right;">
    							<span class="smalltext"><strong><a href="showthread.php?mode=threaded&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->threaded}</a> | <a href="showthread.php?mode=linear&amp;tid={$tid}&amp;pid={$pid}#pid{$pid}">{$lang->linear}</a></strong></span>
    						</div>
    						<div>
    							<strong>{$GLOBALS['threadfields']['pfname']} Review</strong>
    						</div>
    					</td>
    				</tr>
    				{$classic_header}
    			</table>
    			<div>
    				{$first_post}
    			</div>
    			<div align="center">
    				<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
    			</div>
    			<div><strong>Comments</strong></div>
    			<div id="posts">
    				{$posts}
    			</div>
    			<div>
    				{$multipage}
    			</div>
    		</td>
    		<td valign="top">
    			{$ratethread}
    			{$GLOBALS['threadfields']['pfapic']['value']}
    			{$search_thread}
    		</td>
    	</tr>
    </table>
    <br style="clear: both;" />
    {$threadexbox}
    {$similarthreads}
    {$quickreply}
    <br />
    <div class="float_left">
    	<ul class="thread_tools">
    		<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
    		<li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li>
    		<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
    	</ul>
    </div>
    <div class="float_right" style="text-align: right;">
    	{$moderationoptions}
    	{$forumjump}
    </div>
    <br style="clear: both;" />
    {$footer}
    </body>
    </html>

    Basically, we need to put {$GLOBALS['threadfields']['pfapic']['value']} variable in this template for displaying the Additional Pictures box.

  • Improvements:
    • Edit pfrelease custom field, change the Underlying Data Type to Integer (unsigned, usually 32-bit)
    • Edit pfcat custom field:
      • Values List:

        Code:
        1{|}Software
        2{|}Hardware
        3{|}Other

      • Formatting Map List:
        • Value: 1
          Displayed Output:

          HTML Code
          <a href="{$forumurl_q}filtertf_pfcat=1"><span style="color: green;">Software</span></a>

        • Value: 2
          Displayed Output:

          HTML Code
          <a href="{$forumurl_q}filtertf_pfcat=2"><span style="color: green;">Hardware</span></a>

        • Value: 3
          Displayed Output:

          HTML Code
          <a href="{$forumurl_q}filtertf_pfcat=3"><span style="color: green;">Other</span></a>

        Code:
        1{|}<a href="{$forumurl_q}filtertf_pfcat=1"><span style="color: green;">Software</span></a>
        2{|}<a href="{$forumurl_q}filtertf_pfcat=2"><span style="color: blue;">Hardware</span></a>
        3{|}<a href="{$forumurl_q}filtertf_pfcat=3"><span style="color: red;">Other</span></a>

      • Filtering Mode: Exact match
      • Underlying Data Type: Integer (unsigned, usually 32-bit)
Rateu,

Is it possible to replace your standard 'ratings' area with one like this?

[attachment=929]

and then have an option when creating the review that if a user selects X, it'll show Y rating options, like below:

[attachment=930]

or this, when I choose a different category?:

[attachment=931]
Depends how you do it.
Different forums -> just use different fields for each.
If it's all in the same forum, you have a number of problems.  Firstly, you can only do some fancy dynamic switching if the user has Javascript enabled.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Reference URL's