Back to vBulletin 4.x Add-ons

Mark Threads As "Solved"
Mod Version: 2.0.1, by Eric

vB Version: 4.0.x Rating: (32 votes - 4.56 average) Installs: 304
Released: 04 Feb 2010 Last Update: 30 Jul 2010 Downloads: 1385
Not Supported DB Changes Uses Plugins Template Edits Additional Files Re-usable Code  

My time is very limited these days, with my full time job. I have marked this mod as re-usable code, if any other coder wishes to continue work on it. I may still try to support this mod as time permits.

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 "Solved". It will add the prefix "[SOLVED]" to the thread title, and if set in the admincp - it will also close the thread.

Current Version
2.0.1.

Features flagged for future version(s):
  • Thread starter can choose to solve a thread, and input the username of who solved it - that user would receive rep. points. (admin-configurable amount of rep. points)
  • Given the above - include count of threads a user has solved in postbit & profile
  • Option to move the thread to a specific forum when a thread is "Solved"
  • Possibly figure out a way to automate everything on install - so there are no template edits.
And anything else that is suggested

Will this work on x.x.x ??
Unless otherwise stated, this will work on all 4.0.x versions. This will not work on 3.x.

Sounds cool. How do I install?
  1. Extract the zip, you should have the following directories/files:

    Code:
    /
    |_ install.html
    |_ product-solvedthread.xml
    /upload/
    |_ solved.php
    	/upload/images/
    		/buttons/
    		|_ marksolved.gif
    	/upload/includes/
    		/xml/
    		|_ bitfield_solvedthread.xml
  2. Upload: (in the below instructions 'yourforum' would be where you have vBulletin installed)
    • /upload/solved.php to /yourforum/solved.php
    • /upload/images/buttons/marksolved.gif to /yourforum/images/buttons/marksolved.gif (upload to each style folder, if you have more than one style)
    • /upload/includes/xml/bitfield_solvedthread.xml to /yourforum/includes/xml/bitfield_solvedthread.xml
  3. Import the product, product-solvedthreads.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['solvedthread']">
    						<li><a href="solved.php?{vb:raw session.sessionurl}do=marksolved&amp;t={vb:raw threadid}">{vb:rawphrase solvedthread_marksolved}&hellip;</a></li>
    					<vb:else />
    						<vb:if condition="$show['solvedthread_unsolve']">
    						<li><a href="solved.php?{vb:raw session.sessionurl}do=markunsolved&amp;t={vb:raw threadid}">{vb:rawphrase solvedthread_markunsolved}&hellip;</a></li>
    						</vb:if>
    					</vb:if>
  5. Set options in AdminCP > Settings > Options > Solved Threads
  6. Edit Solved Threads Permissions > Can Mark Threads as Solved for each usergroup.
  7. To setup the forums it can be used in, follow the instructions in this

    Spoiler (click to open)


    Quote by TimberFloorAu
    Can this be triggered on a Per forum basis ?
    Quote by KevinGupta
    Can we choose which specific forums we want it to work on?
    Quote by SecondV
    Instead of 'excluding' forums, since using the Thread Prefix system, you can choose which forums this will be shown in.
    After installing, go to: Thread Prefixes >> Thread Prefix Manager

    You'll see: Solved Thread on the left, [Add Prefix] [Edit] [Delete] on the right. 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)

    Close
    post.

Upgrade
  1. Re-import the product, product-solvedthreads.xml, with "Allow Overwrite" set to yes
  2. Upload the files/folders in the "upload" folder, allowing it to overwrite the old files.

That's it! Enjoy!

Changelog
2.0.1 - July 30, 2010
- Changes to solved.php, to check for errors while saving thread, changed how threadinfo is pulled.
- Changes to bitfield_solvedthread.xml, removed the "install" attribute, doesn't seem to work anyway.
- Changes to product-solvedthread.xml, install process. Gave the install a small delay between rebuilding prefix datastore (after adding prefixset), and creating prefix.
- Changes to product-solvedthread.xml, plugin. Removed check for can_use_prefix function, as vB 3.8 + includes it, and this mod is for 4.0

2.0.0 - February 3, 2010
- Updated to vBulletin 4

1.1.2 - January 15, 2010
- Updated the product file, permissions, and phrases. This should, hopefully, resolve the blank page problems, along with the permission not showing up for usergroups.

1.1.1 - July 21, 2009
- Updated the product plugins and phrases, this should solve the blank page problem, and the problem of the option not showing in Admincp for ug permissions.

1.1.0 - April 14, 2009
- Small updates to xml file, no version # change. If it works for you, no need to do anything.
- If you have problems uninstalling, please see this

Spoiler (click to open)


Made some changes to the product XML - version number not changing.

Those having problems, please uninstall the mod completely - and try reinstalling. If the product won't uninstall:

Go to Manage Products -> Mark Threads As 'Solved' -> Edit -> Go

Edit the uninstall code, find and remove:

PHP Code:
// #######################################################################
$solvedthread_prefixsetdm =& datamanager_init('PrefixSet'$vbulletinERRTYPE_CP);

$solvedthread_prefixset $db->query_first("
    SELECT *
    FROM " 
TABLE_PREFIX "prefixset
    WHERE prefixsetid = 'solvedthread'
"
);

$solvedthread_prefixsetdm->set_existing($solvedthread_prefixset);
$solvedthread_prefixsetdm->delete();
unset(
$solvedthread_prefixsetdm);

if (!
function_exists('build_prefix_datastore'))
{
    require_once(
DIR '/includes/adminfunctions_prefix.php');
}

build_prefix_datastore();

// #######################################################################
$solvedthread_prefixdm =& datamanager_init('Prefix'$vbulletinERRTYPE_CP);

$solvedthread_prefix $db->query_first("
    SELECT *
    FROM " 
TABLE_PREFIX "prefix
    WHERE prefixid = 'solvedthread_solved'
"
);

$solvedthread_prefixdm->set_existing($solvedthread_prefix);
$solvedthread_prefixdm->delete();
unset(
$solvedthread_prefixdm);

build_prefix_datastore(); 
Save.

Then try to uninstall again.

Close
post.

1.1.0 - April 12, 2009
- Updated for 3.7 & 3.8
- Now uses the built-in Thread Prefix system
- Instead of 'excluding' forums, since using the Thread Prefix system, you can choose which forums this will be shown in.

1.0.1 - July 12, 2007
- Added the ability to unsolve a thread.
- Added the ability to exclude this in certain forums
- Added the ability to change the prefix in that acp

1.0.0 - June 8, 2007
- Initial release.


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.

Download

File Type: %1$s solved_threads_2.0.0.zip (7.8 KB, 372 downloads)
File Type: %1$s solved_threads_2.0.1.zip (8.0 KB, 1262 downloads)

Screenshots

Click image for larger version
Name:	admincp_edit_prefix_forums.jpg
Views:	1724
Size:	45.7 KB
ID:	111606   Click image for larger version
Name:	admincp_options.jpg
Views:	1288
Size:	66.9 KB
ID:	111607   Click image for larger version
Name:	admincp_thread_prefixes.jpg
Views:	1100
Size:	41.2 KB
ID:	111608   Click image for larger version
Name:	admincp_ug_perms.jpg
Views:	1391
Size:	136.2 KB
ID:	111609  

Click image for larger version
Name:	showforum_solvedthread.jpg
Views:	3237
Size:	87.5 KB
ID:	111610   Click image for larger version
Name:	showthread_marksolved.jpg
Views:	2958
Size:	74.5 KB
ID:	111611   Click image for larger version
Name:	showthread_markunsolved.jpg
Views:	2591
Size:	74.6 KB
ID:	111612  


vblts.ru supports vBulletin®, 2022-2024