The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Mark Threads As "Solved" Details »» | |||||||||||||||||||||||||||||||||||||||||||
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):
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?
Upgrade
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 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 Now
Screenshots
Show Your Support
|
4 благодарности(ей) от: | ||
babyv0x, findingpeace, FReeSTER, Ov3rrun |
Comments |
#172
|
||||
|
||||
Had to alter the uninstall code to get it to uninstall without the fatal error.
|
#173
|
|||
|
|||
Hi Eric,
As user of your mod since the beginning, i'm wondering if you are working on a vb5 version? I would really need to have this working in vb5... Without this mod, we will never upgrade i guess, we can't live without... |
#174
|
||||
|
||||
I believe another developer would have to pick up work on the mod to port it to vB5 as Eric said, he is very limited with time as of now.
|
#175
|
|||
|
|||
let me know if I can do several way to use a new place to settle and accepted our
|
#176
|
|||
|
|||
Does this work on 4.2.2?
NM, just tested and it works fine. |
#177
|
|||
|
|||
I install it on 4.2.2 but I don't see it in the list.
|
#178
|
|||
|
|||
Hi
thank you Eric. very nice hack would you please tell me is that possible to use this hack as a button? I need to add a button in first post of thread to let starter set solved or not. best regards |
#179
|
|||
|
|||
Quote:
from there, this code you need to add it to your showthread template to see the button: HTML Code:
<vb:if condition="$show['solvedthread']"> <li><a href="solved.php?{vb:raw session.sessionurl}do=marksolved&t={vb:raw threadid}">{vb:rawphrase solvedthread_marksolved}…</a></li> <vb:else /> <vb:if condition="$show['solvedthread_unsolve']"> <li><a href="solved.php?{vb:raw session.sessionurl}do=markunsolved&t={vb:raw threadid}">{vb:rawphrase solvedthread_markunsolved}…</a></li> </vb:if> </vb:if> |
#180
|
|||
|
|||
I can confirm this is working on 4.2.2 Patch Level 1
|
#181
|
|||
|
|||
Is there anyway to remove the following prefix option when starting a new thread in a Q & A forum?
I guess, I'm wondering if there is some form of identifier I can test against to hide this option when a forum is detected that is running the solved feature. I found this: But am currently unsure how it is evaluated when the newthread template is evaluated. The following code block shows the section in the section I am referring to: Code:
<vb:if condition="$prefix_options"> <label for="prefixfield" class="full">{vb:rawphrase prefix}:</label> <select name="prefixid" id="prefixfield" class="full" tabindex="1"> <option value="">{vb:rawphrase no_prefix_meta}</option> {vb:raw prefix_options} </select> <p class="description"></p> </vb:if> Cheers M update I have had some success with this: Starting @ line 45 in the newthread template, find the code noted above and replace with the one below: Code:
<!-- Start hiding the prefix option if Q & A thread --> <vb:if condition="$forumid == 16"> <!-- Do Not show prefix options--> <vb:else /> <!-- Start Prefix Options Display --> <vb:if condition="$prefix_options"> <label for="prefixfield" class="full">{vb:rawphrase prefix}:</label> <select name="prefixid" id="prefixfield" class="full" tabindex="1"> <option value="">{vb:rawphrase no_prefix_meta}</option> {vb:raw prefix_options} </select> <p class="description"></p> </vb:if> <!-- End Prefix Options Display --> </vb:if> <!-- End hiding the prefix option if Q & A thread --> Code:
<vb:if condition="$forumid == 16"> To find this out, you can execute the following SQL against your DB: Code:
select * from forumprefixset; Hope this helps someone. Next I'll see if I can get an array of forums based on the table forumprefixset SQL will be something like: Code:
SELECT forumid from forumprefixset WHERE prefixsetid = 'solvedthread'; Any help with this would be really awesome as I am really unfamiliar with the vBulletin codebase and have just started looking into it. I'll report back as I make progress. Cheers M Update Can select from an array now Code:
<!-- Start hiding the prefix option if Q & A thread --> <vb:if condition="in_array($forumid, array(16))"> So I got this working, I created a new plugin by using the Add New Plugin in the Products & Plugins section as shown below. The only reason I went down this route is to avoid changing any of the original plugins code. So I hope this method for extending the plugin is OK. Then I added the following PHP code: Code:
$result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "forumprefixset WHERE prefixsetid = 'solvedthread'"); $returnSolvedForumIDS = array(); while ($output = $vbulletin->db->fetch_array($result)) { $returnSolvedForumIDS[] = $output['forumid']; } if(is_array($returnSolvedForumIDS)){ vB_Template::preRegister('newthread', array('returnSolvedForumIDS' => $returnSolvedForumIDS)); } Find: Code:
<vb:if condition="$prefix_options"> <label for="prefixfield" class="full">{vb:rawphrase prefix}:</label> <select name="prefixid" id="prefixfield" class="full" tabindex="1"> <option value="">{vb:rawphrase no_prefix_meta}</option> {vb:raw prefix_options} </select> <p class="description"></p> </vb:if> Code:
<!-- Start hiding the prefix option if Q & A thread --> <vb:if condition="in_array($forumid, $returnSolvedForumIDS)"> <!-- Do Not show prefix options--> <vb:else /> <!-- Start Prefix Options Display --> <vb:if condition="$prefix_options"> <label for="prefixfield" class="full">{vb:rawphrase prefix}:</label> <select name="prefixid" id="prefixfield" class="full" tabindex="1"> <option value="">{vb:rawphrase no_prefix_meta}</option> {vb:raw prefix_options} </select> <p class="description"></p> </vb:if> <!-- End Prefix Options Display --> </vb:if> <!-- End hiding the prefix option if Q & A thread --> Code:
vB_Template::preRegister('newthread', array('returnSolvedForumIDS' => $returnSolvedForumIDS)); You could easily modify the original Plugins PHP code to return this information. It is probably the best way forward too, as the method outlined in this post does add an additional query, which is not really required, as the same query exists in the original plugin. As stated previously, I did this to:
I hope this helps someone else understand how this system works. I'll continue to extend this plugin via the separate plugin code. Unless anyone has an issue with it, I'll keep posting updates on my progress. Hope you have found this useful. Cheers M |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|