vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - iTrader v2.0.1 (https://vborg.vbsupport.ru/showthread.php?t=102965)

sadecosefo 01-09-2006 07:05 PM

Quote:

Originally Posted by Damian
All the template edits I have posted in this thread are in the attached zip file.



In memberlist

Find:

PHP Code:

<td class="thead" align="$stylevar[left]nowrap="nowrap"><a href="$sorturl&amp;order=ASC&amp;sort=username&amp;pp=$perpage$usergrouplink">$vbphrase[username]</a$sortarrow[username]</td

After add:

PHP Code:

<td class="thead" nowrap="nowrap">iTrader</td


In memberlist_resultsbit

Find:

PHP Code:

<tr align="center">
    <
td class="alt1Active" align="$stylevar[left]id="u$userinfo[userid]">
        <
a href="member.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[musername]</a>
        <if 
condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
    </
td

After add:

PHP Code:

<td class="$bgclass">(<strong><a href="itrader.php?$session[sessionurl]u=$userinfo[userid]">$userinfo[itrader_total]</a></strong>)  / $userinfo[itrader_pcnt]%</td

If you want an button instead of a text link showing current score, add this instead of the above:

PHP Code:

<td class="$bgclass"><a href="itrader.php?$session[sessionurl]u=$userinfo[userid]"><img src="$stylevar[imgdir_button]/itrader.gif" alt="itrader.gif" title="Submit feedback for $userinfo[username]border="0" /></a></td

Make a button "itrader.gif" and upload it to your button directory. I made a button for those of you using the default template.

Fantastic. Worked like a charm. Thank you.

OttawaGolf 01-09-2006 07:33 PM

Quote:

Originally Posted by Damian
For single forum:

Try this for mutiple forums:

<if condition="in_array($thread[forumid],array(xx,xx))">ITRADER CODE HERE</if>

Replace x's with your forum id's

Works perfect. Thanks again! REALLY great of you.

bada_bing 01-10-2006 12:44 PM

I am trying to add the itrader post count () on top of a few forums like I had with my older trader rating and read a reply by another poster but having some issues.

He says to add this code to the postbit

Quote:
Originally Posted by OttawaGolf
Is there a way to have the iTrader ratings in postbit & postbit_legacy only show up in specific forums?
ie all classified forums, but not in the discussion forums?

There must be some kind of conditions that can be used. Help would be really appreciated.

For single forum:

<if condition="$thread[forumid] == xx">ITRADER CODE HERE</if>

Try this for mutiple forums:

<if condition="in_array($thread[forumid],array(xx,xx))">ITRADER CODE HERE</if>

Replace x's with your forum id's

My question is what code so I enter for ">ITRADER CODE HERE</

Please Help

ludachris 01-10-2006 02:08 PM

To upgrade from 2.0.0 to 2.0.1, I'm guessing we have to uninstall the original plugin and install the new one as well as uploading all the new files. Anything else we need to do? I tried searching this thread to find out, but couldn't find any info.

Damian 01-10-2006 03:50 PM

Quote:

Originally Posted by ludachris
To upgrade from 2.0.0 to 2.0.1, I'm guessing we have to uninstall the original plugin and install the new one as well as uploading all the new files. Anything else we need to do? I tried searching this thread to find out, but couldn't find any info.

Upload the new files.
Do not uninstall the existing product.
To upgrade click on the Add/Import Product link. Make sure "Allow Overwrite" is set to yes.

There will be 2 settings that need to be manually changed in youre Admin CP.

eoc_Jason 01-11-2006 05:56 PM

sellbuydomain - I'm sorry but I can't help you there. PM Receipts are controlled by the stock VB class, I would check your PM tables to make sure they were inserted properly and the autonumbers are at the correct #'s.

SimCityForum - I'm not 100% sure you will need to check the code (either the PHP file or the template), but if you set it to the proper variable it should auto-fill it for you.

Scorian & belicoso fino - *sigh* yes it works... vB 3.5.x uses a "plug-in" system that for the most part makes these add-on's independent of the core vB changes.

graham_w - It links directly to a (thread) URL for normal users, it only links to the detail page for the two people involved in the deal & admins. You can still access the (thread) URL on the detail page if you click the linked comment text at the top.

Guys, I'm not going to post replies related to basic "How Do I Do Template Conditionals". Read the vB documentation on that and experiment some.

Anyhow, glad to see people have not run into any big problems or bugs using the system. I'm hoping to have 2.0.2 released either Friday or Saturday. Work has really picked up lately and I'm just swamped, so there hasn't been much time to work on this and my many other projects.

SimCityForum 01-12-2006 12:24 AM

Quote:

Originally Posted by eoc_Jason
SimCityForum - I'm not 100% sure you will need to check the code (either the PHP file or the template), but if you set it to the proper variable it should auto-fill it for you.

I figured out a solution. In the postbit or postbit_legacy templates replace the rep button with:
Code:

<a href="itrader_feedback.html?u=$post[userid]&amp;p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a>
Then in the iTrader_feedback template I replaced the dealurl code with:

Code:

        <if condition="$_GET[p]>0">
<input class="bginput" type="hidden" name="dealurl" value="$vboptions[bburl]/showthread.html?p=$_GET[p]#post$_GET[p]" />
        <else />
                </td>
        </tr>
        <tr>
                <td class="alt2" nowrap="nowrap">
                        $vbphrase[itrader_thread_url]:
                                <br /><span class="smallfont">
                                <if condition="$vbulletin->options['itrader_requrl'] == 1">
                                        $vbphrase[itrader_required]
                                <else />
                                        $vbphrase[itrader_optional]
                                </if>
                        </span>
                </td>
                <td class="alt2" width="100%">
                <input class="bginput" type="text" name="dealurl" size="45" maxlength="255" value="$itrader[dealurl]" /><br />
                        <span class="smallfont">$vbphrase[itrader_url_example]</span>
                </if>

You'll notice that I changed the dealurl input to hidden from text as the user doesn't need to see it if the value has been prepadded. I used the postid instead of the threadid so that the link could be related back to the exact post not just the thread.

A similar tweak can be done to the normal iTrader link, but it requires passing the postid value along at the itrader_user template using the following code:
Code:

<a href="itrader_feedback.html?$session[sessionurl]u=$userinfo[userid]<if condition="$_GET[p]>0">&amp;p=$_GET[p]</if>"><strong>$vbphrase[itrader_submit_feedback] $userinfo[username]</strong></a>
This was a fairly clean tweak as it impacted only a few templates.

Freezerator 01-12-2006 03:17 PM

Quote:

Originally Posted by Belicoso_Fino
Is anyone willing to help a virtually helpless fool modify the templates, etc, to make this work?

I've installed the base product and can see and configure it in the admin cp. I have no idea hwo to modify the templates, moore specifically, where to put the various code snippets.

Also, when I tried to manually navigate to http://wwwmyforum.net/itrader.php, I get a permissions error.



I'd be more than happy to add dollars to someone's PayPal account for help. I run a cigar forum, and the trader rating system would be a boon to our site.

TIA...


First give your usergroup permissions to use the iTrader system. Then simply add it in your templates as discribed.

Shoemoney 01-15-2006 03:58 AM

awesome job Jason! You came through like a champ

butty 01-16-2006 03:09 AM

installed it and it works like a charm. thanks a lot mate this is gonna come in very useful for my members :)


All times are GMT. The time now is 01:34 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.06941 seconds
  • Memory Usage 1,788KB
  • 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
  • (5)bbcode_php_printable
  • (5)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