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)
-   -   End-User Options - Classifieds: Mark Thread as "Sold" (https://vborg.vbsupport.ru/showthread.php?t=260699)

venom2124 03-19-2011 10:00 PM

Classifieds: Mark Thread as "Sold"
 
1 Attachment(s)
If you use this modification, please >> Mark As Installed, and consider Nominate for MOTM and Support Developer << :)


What is this!?

This modification will allow you & your members (based on usergroup permissions) to mark a thread as "Sold". It will add the prefix "SOLD" to the thread title, and if set in the admincp - it will also close the thread. If you run a classified forum for your members this will give you a way to let users add a Sold prefix when the item is gone. Admins and mods can using to make items sold as well.

This is a modification of code provided by Eric.

Current Version
1.2



Sounds cool. How do I install?


1. Extract the zip, you should have the following directories/files:

Code:

   

      /
      |_ install.html
      |_ product-soldthread.xml

      /upload/
      |_ sold.php

          /upload/images/
              /buttons/
              |_ marksold.gif

          /upload/includes/
              /xml/
              |_ bitfield_soldthread.xml

2. Upload: (in the below instructions 'yourforum' would be where you have vBulletin installed)
* /upload/sold.php to /yourforum/sold.php
* /upload/images/buttons/marksold.gif to /yourforum/images/buttons/marksold.gif (upload to each style folder, if you have more than one style)
* /upload/includes/xml/bitfield_soldthread.xml to /yourforum/includes/xml/bitfield_soldthread.xml

3. Import the product, product-soldthreads.xml by going to: AdminCP -> Plugins & Products -> Manage Products -> [Add/Import Product]

4. Make the following template edits to all of your installed styles:

SHOWTHREAD

Find:
HTML Code:


                          <vb:if condition="$show['addpoll']">
                                                <li><a href="poll.php?{vb:raw session.sessionurl}do=newpoll&amp;t={vb:raw threadid}">{vb:rawphrase add_a_poll_to_this_thread}&hellip;</a></li>
                                        </vb:if>

Add after:
HTML Code:


                          <vb:if condition="$show['soldthread']">
                              <li><a href="sold.php?{vb:raw session.sessionurl}do=marksold&amp;t={vb:raw threadid}">{vb:rawphrase soldthread_marksold}&hellip;</a></li>
                          <vb:else />
                              <vb:if condition="$show['soldthread_unsold']">
                              <li><a href="sold.php?{vb:raw session.sessionurl}do=markunsold&amp;t={vb:raw threadid}">{vb:rawphrase soldthread_markunsold}&hellip;</a></li>
                              </vb:if>
                          </vb:if>

5. Set options in AdminCP > Settings > Options > Sold Threads

6. Edit Sold Threads Permissions > Can Mark Threads as Sold for each usergroup.

7. To setup the forums it can be used in, follow these instructions:
  • After installing, go to: Thread Prefixes >> Thread Prefix Manager
  • You'll see: Sold Thread on the left, [Add Prefix] [Edit] [Delete] on the righ
  • Choose Edit.Then you'll see: Use Prefix Set in These Forums, select the forums you want this used in. (Hold the CTRL button to select more than one)
That's it! Enjoy!:D

Upgrade:
  • Reupload files
  • Import product file and select overwrite

Changelog:

V1.0- Initial Release
V1.1- Updated bitfield_soldthread file
V1.2- Fixed permission issue


If you use this modification, please >> Mark As Installed, and consider Nominate for MOTM and Support Developer << :)




NOTE: This mod is marked "unsupported", but I'll try my best (as time permits) to help those who have marked as installed.

BlackJacket 03-20-2011 06:32 PM

Awesome mod! I do have a request though. Could the member who started the thread have the option to mark it as sold as well?

venom2124 03-20-2011 07:17 PM

The member who started the post does have the ability to mark the item as sold already. As long as the permissions are set correctly only a admin or mod and the user can make an item sold or unsold.

I just tested with a normal registered user profile and it allowed me to make a thread I created as sold or unsold, but didn't let me change the status of another members thread.

Hope this clears up the issue if not let me know.

QuickQuestion 03-20-2011 08:55 PM

This is good stuff.

venom2124 03-21-2011 06:28 PM

Yeah being able to see if an item in our classifieds section is already sold before clicking on it makes it really nice for sure.

BadgerDog 03-21-2011 07:41 PM

Interesting ... :)

We already use WTS and WTB and WTT prefixes (Want to Sell, Want to Buy, Want to Trade) in our on-line sales forums.

Will this mod simply replace those existing prefixes with SOLD if the seller (or buyer) thread starter marks his thread as SOLD, or does it place the word SOLD in front of the existing prefixes?

Regards,
Doug

venom2124 03-21-2011 08:03 PM

Yes once the item is sold and the member or mod marks it as sold it will replace the previous prefix with the sold prefix.

I would say take a look at my sight but right now I have the classifieds section invisible to non members.

BadgerDog 03-21-2011 08:18 PM

Quote:

Originally Posted by venom2124 (Post 2175919)
Yes once the item is sold and the member or mod marks it as sold it will replace the previous prefix with the sold prefix.

I would say take a look at my sight but right now I have the classifieds section invisible to non members.

Thanks... appreciate the quick response ... :up:

Excellent idea ...

We operate two separate forums for our members that could use this, so I think I'll try some testing ....

Regards,
Doug

BadgerDog 03-21-2011 08:29 PM

1 Attachment(s)
Installed on vbulletin 4.04 .. :)

I think you have a problem with the bitfield used for UserGroups? (see pic)

As an example, the way you mod appears to our Registered Group under UserGroup settings is only YES/NO... there's no description or title? :confused:

Regards,
Doug

Edit: also missing from Prefix area .. ;)

BadgerDog 03-21-2011 08:49 PM

1 Attachment(s)
Also, just tested using my own Administrator login and attempted to mark an ad as SOLD belonging to another member ....

The Mark as SOLD option appears in the drop down box, but when I click on it, I received a "No Permissions error ...."

Yes, I have the Usergroup box for Admins checked to YES ... ;)

I thought Admins could do this, or have I missed something in the instructions? :confused:

Regards,
Doug


All times are GMT. The time now is 07:38 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.01302 seconds
  • Memory Usage 1,755KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)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