vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Mark Threads As 'Solved' (https://vborg.vbsupport.ru/showthread.php?t=211020)

Eric 04-11-2009 10:00 PM

Mark Threads As 'Solved'
 
1 Attachment(s)
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, Nominate for MOTM, and consider donating via PayPal <<, TY!


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
1.1.2 - You can find the 3.6.x version, here.

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 recieve rep. points. (admin-configurable amount of rep. points)
  • Given the above - include count of threads a user has solved in postbit & profile
  • 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 3.7 - 3.8 versions. This will not work on 4.0. If you are looking for a vB4 version, you can find it here.

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:

                    <if condition="$show['addpoll']">
                            <div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
                    </if>
            </div>
            <!-- / thread tools -->

    Replace with:
    HTML Code:

                    <if condition="$show['addpoll']">
                            <div><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" vspace="1" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></div>
                    </if>
                    <if condition="$show['solvedthread']">
                            <div><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" vspace="1" /> <a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]">$vbphrase[solvedthread_marksolved]</a></div>
                    <else />
                            <if condition="$show['solvedthread_unsolve']">
                            <div><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_markunsolved]" vspace="1" /> <a href="solved.php?$session[sessionurl]do=markunsolved&amp;t=$threadinfo[threadid]">$vbphrase[solvedthread_markunsolved]</a></div>
                            </if>
                    </if>
            </div>
            <!-- / thread tools -->

    Find:
    HTML Code:

            <if condition="$show['addpoll']">
            <tr>
                    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
            </tr>
            </if>
            <if condition="$show['adminoptions']">

    Replace with:
    HTML Code:

            <if condition="$show['addpoll']">
            <tr>
                    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&amp;t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
            </tr>
            </if>
            <if condition="$show['solvedthread']">
            <tr>
                    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_marksolved]" /> <a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]">$vbphrase[solvedthread_marksolved]</a></td>
            </tr>
            <else />
                    <if condition="$show['solvedthread_unsolve']">
            <tr>
                    <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/marksolved.gif" alt="$vbphrase[solvedthread_markunsolved]" /> <a href="solved.php?$session[sessionurl]do=markunsolved&amp;t=$threadinfo[threadid]">$vbphrase[solvedthread_markunsolved]</a></td>
            </tr>
                    </if>
            </if>
            <if condition="$show['adminoptions']">

  5. Set options in AdminCP > vBulletin 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 post.

Upgrade
To 1.1.2 from 1.1.0/1.1.1
  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.

To 1.1.x from 1.0.0
  1. ATM, it is not advised to do an upgrade from previous versions to this one if you already have 1.0.0 installed. Fresh installs should be fine.


That's it! Enjoy! :)

Changelog
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, Nominate for MOTM, and consider donating via PayPal <<, TY!



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

Eric 04-12-2009 06:51 PM

~ reserved ~

Screenshots will come as soon as possible, until then, view the (albeit, old) screenshots in the 3.6 thread, here

Jasem 04-12-2009 07:20 PM

Nice work, thank you!

Installed

KevinGupta 04-12-2009 09:02 PM

Can we choose which specific forums we want it to work on?

Leica.Robbiani 04-12-2009 09:22 PM

Hi there,

Quote:

Edit Post / Thread Permissions > Can Mark Threads as Solved for each usergroup.
I'm missing this one ...

Leica.Robbiani

Edit:
Problem solved. My browser performed some magic things ...

TimberFloorAu 04-12-2009 09:36 PM

Can this be triggered on a Per forum basis ?

Eric 04-12-2009 11:27 PM

Quote:

Originally Posted by TimberFloorAu (Post 1789829)
Can this be triggered on a Per forum basis ?

Quote:

Originally Posted by KevinGupta (Post 1789808)
Can we choose which specific forums we want it to work on?

Quote:

Originally Posted 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)

HabboLan 04-13-2009 01:32 AM

Could it be used as a sold option instead of solved in forums ? Just change the solved word to sold ?
I have a section for members to sell items , what you think ?

SpeedyHire 04-13-2009 05:09 AM

HabboLan,

Yes it can m8.
been using the old version for some time now.
nice to see the updated version.

Eric 04-13-2009 10:50 AM

Quote:

Originally Posted by SpeedyHire (Post 1790010)
HabboLan,

Yes it can m8.
been using the old version for some time now.
nice to see the updated version.

Quote:

Originally Posted by HabboLan (Post 1789932)
Could it be used as a sold option instead of solved in forums ? Just change the solved word to sold ?
I have a section for members to sell items , what you think ?

Yes, really, all you'd need to do is change the thread prefix, and a phrase or two.

Markos 04-13-2009 11:30 AM

i was just away to ask that if it can be changed to Sold too :) i will install this and give it ago :)

Markos 04-13-2009 12:40 PM

nice this worked a treat one prob i see is it doesn't change all the words that say Solved to Sold or Unsold

DjEddie 04-13-2009 05:45 PM

Thanks for this.. installed....

One slight problem, altho all permissions and forums have been selected as per instructions .. when I go to solve a thread... i get following message.

you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

which as root admin obviously isnt true.

Do u know what is causing this?

Eric 04-13-2009 06:23 PM

The only way this can happen is if your permissions aren't set up right. It has four permission checks:

1.) Are you even allowed to view the forum?
2.) Are you allowed to see threads?
3.) Are you allowed to mark threads (un)solved?
4.) Is this your thread, or, are you a moderator who can moderate this forum?

I'm guessing for you, it's #3.

Please double check the usergroup permissions:

Usergroups >> Usergroup Manager >> Administrators (Edit) >> Go >> Can Mark Threads as Solved and Unsolved

Quote:

Originally Posted by DjEddie (Post 1790399)
Thanks for this.. installed....

One slight problem, altho all permissions and forums have been selected as per instructions .. when I go to solve a thread... i get following message.

you do not have permission to access this page. This could be due to one of several reasons:

1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

which as root admin obviously isnt true.

Do u know what is causing this?


DjEddie 04-13-2009 06:34 PM

They were all set correctly, I have double checked and re-imported it too and double checked again, and still get same message.

Ive tried in different topics as well as different forums, where this mod is enabled for (which is all of them)

Eric 04-13-2009 06:37 PM

Ok, hmmn..

Take two screenshots for me. One of the permissions page where you're editing permissions of the usergroup, and another on the prefix where you're choosing the forums.

Quote:

Originally Posted by DjEddie (Post 1790431)
They were all set correctly, I have double checked and re-imported it too and double checked again, and still get same message.

Ive tried in different topics as well as different forums, where this mod is enabled for (which is all of them)


Markos 04-13-2009 06:40 PM

so secondV correct me if I'm wrong not just anyone with permission can mark it Ase solved in my case Sold it has to be the thread starter or a moderator or admin

Eric 04-13-2009 06:43 PM

Quote:

Originally Posted by Markos (Post 1790438)
so secondV correct me if I'm wrong not just anyone with permission can mark it Ase solved in my case Sold it has to be the thread starter or a moderator or admin

Correct. An admin, or moderator of the forum can. Or, the thread starter can if their usergroup has the permission to do so.

Markos 04-13-2009 06:53 PM

ooo nice one that's cool didn't want anyone just to do it

and one other thing u think u can make one for *sold* i dont want to realy mess with the code to change every thing to sold incase i mess it up

Etab 04-13-2009 09:01 PM

Hey SV, great mod! Thanks! :)

jgruberman 04-14-2009 01:52 AM

Hey ummmmm..... whats causing THIS?

https://vborg.vbsupport.ru/external/2009/04/97.jpg

edit: This was caused by the image in the wrong directory. The first sentence on the left side is actually the "Alt" tag of the image.

Eric 04-14-2009 01:53 AM

Did you upload the images/ folder?

If using a custom style, copy the images/buttons/marksolved.gif to your other style as well.


Quote:

Originally Posted by jgruberman (Post 1790707)
Hey ummmmm..... whats causing THIS?

https://vborg.vbsupport.ru/external/2009/04/97.jpg


AshMagic 04-14-2009 08:55 AM

For some reason, the Mark Thread as solved option is not showing for me?

Im running VB 3.8.2.

I had the old version of this mod installed and followed the upgrade instructions. I even double checked that the SHOWTHREAD changes were correct. All forum permissions are set and the plugin is enabled.

The old version used to work fine before this upgrade.

Why is this option no longer showing?

There is no thread prefix set in the Thread Prefix manager. Should there be?

Thanks

AshMagic 04-14-2009 11:17 AM

1 Attachment(s)
This plugin will not allow me to unistall it!!

Please look at the attached screen shot.

Its now causing me all sorts of database errors. When I set the permissions for admin, it falls over with a database error upon saving. This is not good at all!!!

DjEddie 04-14-2009 04:05 PM

1 Attachment(s)
Quote:

Originally Posted by SecondV (Post 1790435)
Ok, hmmn..

Take two screenshots for me. One of the permissions page where you're editing permissions of the usergroup, and another on the prefix where you're choosing the forums.

Okay attached the screenshots, the rights ones I hope.. :)

Eric 04-14-2009 04:19 PM

Sorry it hasn't worked for you. I was only able to reproduce this error by removing the Thread Prefix manually then trying the uninstall of the plugin.

So it seems to indicate on upgrade that the prefix isn't being created.

I do apologize for that, but please, for the moment - just choose "Disable" and the mod won't run at all and should get rid of your database problems until I can post information on a fix.

Quote:

Originally Posted by AshMagic (Post 1790955)
This plugin will not allow me to unistall it!!

Please look at the attached screen shot.

Its now causing me all sorts of database errors. When I set the permissions for admin, it falls over with a database error upon saving. This is not good at all!!!

Quote:

Originally Posted by AshMagic (Post 1790889)
For some reason, the Mark Thread as solved option is not showing for me?

Im running VB 3.8.2.

I had the old version of this mod installed and followed the upgrade instructions. I even double checked that the SHOWTHREAD changes were correct. All forum permissions are set and the plugin is enabled.

The old version used to work fine before this upgrade.

Why is this option no longer showing?

There is no thread prefix set in the Thread Prefix manager. Should there be?

Thanks


Eric 04-14-2009 04:23 PM

1 Attachment(s)
Quote:

Originally Posted by DjEddie (Post 1791111)
Okay attached the screenshots, the rights ones I hope.. :)

Check the attachment for where you should be looking as far as permissions.

DjEddie 04-14-2009 04:34 PM

Yeh, I have that box checked to yes .. and still doesn't work ..

Eric 04-14-2009 04:56 PM

DjEddie, sending you a PM.

DjEddie 04-14-2009 05:50 PM

replied :)

bigcurt 04-14-2009 09:20 PM

Does this not work at all, or did it just not work for him? Explain please :). Thanks.

g0dfather1984 04-14-2009 09:23 PM

I can not get it to work either.

Eric 04-15-2009 03:06 AM

It works. I have installed it on 3 different forums, and it works fine.

Doesn't seem to work for DjEddie though. I'm thinking possibly it's due to another mod he has installed.

Eric 04-15-2009 03:31 AM

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.

mystikmedia 04-15-2009 06:08 AM

This may be outside of the scope of your mod, but would it be possible to add an image before or after the title of a thread instead of the "Solved" prefix?

Markos 04-15-2009 09:13 AM

it works fine for me is it necessary to update it secondv cos im having no probs with the other one

Nathan Brown 04-15-2009 11:37 AM

How exactly is this meant to work? I uploaded the files and the XML, made the template edits. I have the [SOLVED] prefixes, how am I meant to mark as solved? I see no tick box or otherwise. Am I meant to edit the thread and add the prefix manually?

AshMagic 04-15-2009 11:50 AM

Thanks that helped me to uninstall the product. Hopefully when I re upload the XML it will work.

AshMagic 04-15-2009 11:51 AM

Quote:

Originally Posted by Nathan Brown (Post 1791655)
How exactly is this meant to work? I uploaded the files and the XML, made the template edits. I have the [SOLVED] prefixes, how am I meant to mark as solved? I see no tick box or otherwise. Am I meant to edit the thread and add the prefix manually?

You need to click 'Thread Tools' to be able to mark the thread as solved. If the template edits were done correctly then there will be a icon saying 'Mark as solved'

Eric 04-15-2009 11:52 AM

Quote:

Originally Posted by Markos (Post 1791594)
it works fine for me is it necessary to update it secondv cos im having no probs with the other one

If it works for you, that's fine, no need to :)

Quote:

Originally Posted by Nathan Brown (Post 1791655)
How exactly is this meant to work? I uploaded the files and the XML, made the template edits. I have the [SOLVED] prefixes, how am I meant to mark as solved? I see no tick box or otherwise. Am I meant to edit the thread and add the prefix manually?

It uses the "Thread Tools" menu. You should see an option to solve/unsolve a thread. Be sure to edit usergroup permissions, thread prefix permissions, etc.

Quote:

Originally Posted by AshMagic (Post 1791660)
Thanks that helped me to uninstall the product. Hopefully when I re upload the XML it will work.

:up: here's to hoping it does :)


All times are GMT. The time now is 04:59 PM.

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.01646 seconds
  • Memory Usage 1,891KB
  • 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
  • (4)bbcode_html_printable
  • (1)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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