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)
-   -   Miscellaneous Hacks - Mark Threads As "Solved" (https://vborg.vbsupport.ru/showthread.php?t=234935)

Eric 02-03-2010 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, 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 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 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.

Eric 02-03-2010 10:38 PM

~ reserved ~

crazyace 02-03-2010 11:03 PM

This could come in handy :-)

Bouncer222 02-03-2010 11:41 PM

is it possible for you to kinda reverse this... here is what I mean..

Make it so that a new thread in a specified forum is not replie-able by anyone except certain usergroups.. once those usergroup(s) change prefix to [APPROVED] then anyone can reply

is that possible please?

fourat 02-04-2010 04:15 AM

Thanks
Is there mod like this for 3.8.4 ?

argothiusz 02-04-2010 05:11 AM

Tagged until there is a version with auto edit for all templates xD

Forum Lover 02-04-2010 06:01 AM

In my forum sometime member open any thread for support, and other member help them out. Will it be possible for a thread opener to use this also? I mean asking this function along with based on usergroup permissions which is already done.

Tagged but looking forward at its most. :)

TimberFloorAu 02-04-2010 06:05 AM

Quote:

Originally Posted by argothiusz (Post 1974439)
Tagged until there is a version with auto edit for all templates xD

Dont be lazy lol. Theres only one template edit to do, per theme.

Hornstar 02-04-2010 06:33 AM

I'd like this if it also moved the thread to a specific forum too (as an option)

Thanks.

Welshy2008 02-04-2010 06:44 AM

Ah Bliss.


Thank You. Tagged. :D

Welshy2008 02-04-2010 06:49 AM

Quote:

Originally Posted by fourat (Post 1974417)
Thanks
Is there mod like this for 3.8.4 ?


Yes, Mate - Mark Threads as 'Solved' for vB 3.8.x

kisanjong 02-04-2010 07:47 AM

working great thanks - installed - 5*

Gnoll 02-04-2010 08:45 AM

Tagged for future use :)

KevinGupta 02-04-2010 09:09 AM

tagged until someone or you release it in just uploading/importing files :D
Don't like doing much template edits :(

but a VERY nice mod & a great idea :D
CHEERS :D thanks!

Eric 02-04-2010 04:58 PM

Regarding the comments about template edits... it's just one edit? Not that hard IMHO. If there was a template_hook I could use, I would - but there aren't any int he location this is added.

I could probably have it edit the template cache and use PHP to add it in, but I'd rather not.

Eric 02-04-2010 05:02 PM

Quote:

Originally Posted by hornstar1337 (Post 1974470)
I'd like this if it also moved the thread to a specific forum too (as an option)

Thanks.

Will add that to Features Flagged For Future Versions - I like that idea :)

Quote:

Originally Posted by Forum Lover (Post 1974456)
In my forum sometime member open any thread for support, and other member help them out. Will it be possible for a thread opener to use this also? I mean asking this function along with based on usergroup permissions which is already done.

Tagged but looking forward at its most. :)

Admins/Super Mods/Mods can use this (mods only if they can moderate that particular forum. The thread starter can solve/unsolve a thread as well.

Quote:

Originally Posted by Bouncer222 (Post 1974284)
is it possible for you to kinda reverse this... here is what I mean..

Make it so that a new thread in a specified forum is not replie-able by anyone except certain usergroups.. once those usergroup(s) change prefix to [APPROVED] then anyone can reply

is that possible please?

No, that is not possible with this mod.

argothiusz 02-04-2010 05:50 PM

Quote:

Originally Posted by TimberFloorAu (Post 1974457)
Dont be lazy lol. Theres only one template edit to do, per theme.

LoL, I will admit that. Thing is I have too many templates and constantly adding new one. So whenever I add new theme, I will have to remember to add this new line of code which is kind of a hassle.

Nevertheless, great modification. Thumbs up!!

shzad1 02-06-2010 02:18 PM

:up: working
thanks SecondV

Forum Lover 02-08-2010 09:24 AM

Quote:

Originally Posted by SecondV (Post 1974818)
Admins/Super Mods/Mods can use this (mods only if they can moderate that particular forum. The thread starter can solve/unsolve a thread as well.

Thanks, :)

demonfatal 02-08-2010 11:06 AM

1 Attachment(s)
I get a strange problem:
In "Usergroups" I get a empty column without tittle, in "Thread Prefix Manager" same problem, empty tittle...
And it's not working! :(

Please look attachment, I need help.

AskewDread 02-09-2010 10:18 PM

1 Attachment(s)
heya

ive installed this, copied the files, applied teh theme changes to SHOWTHREAD and given the administrators group accesss to slove thread but in the thread im still getting whats showen in the attachment and not seeing the mark as solved

AskewDread 02-09-2010 10:24 PM

ignore my problem :) i had forgotten to allow it on the forum

demonfatal 02-10-2010 02:30 PM

Quote:

Originally Posted by demonfatal (Post 1977360)
I get a strange problem:
In "Usergroups" I get a empty column without tittle, in "Thread Prefix Manager" same problem, empty tittle...
And it's not working! :(

Please look attachment, I need help.

Nobody know Why I get this error please?

wolfyman 02-11-2010 03:28 PM

Quote:

Originally Posted by demonfatal (Post 1979150)
Nobody know Why I get this error please?

same here.

gteh 02-11-2010 05:32 PM

Please explain where I need to make the template edits? I am using the default vbulletin style.

I grepped for the string 'rawphrase' and the ONLY place that word exists in the entire VB folder structure is install/vbulletin-style.xml

I made the template edits to that file but the solved is still not working. I assume thats the wrong place anyway since the xml files in /install/ were likely used during the actual installation of VB??

Eric 02-11-2010 05:39 PM

Quote:

Originally Posted by gteh (Post 1980137)
Please explain where I need to make the template edits? I am using the default vbulletin style.

I grepped for the string 'rawphrase' and the ONLY place that word exists in the entire VB folder structure is install/vbulletin-style.xml

I made the template edits to that file but the solved is still not working. I assume thats the wrong place anyway since the xml files in /install/ were likely used during the actual installation of VB??

https://vborg.vbsupport.ru/showthread.php?t=201864

Eric 02-11-2010 05:41 PM

Quote:

Originally Posted by demonfatal (Post 1977360)
I get a strange problem:
In "Usergroups" I get a empty column without tittle, in "Thread Prefix Manager" same problem, empty tittle...
And it's not working! :(

Please look attachment, I need help.

Quote:

Originally Posted by wolfyman (Post 1980057)
same here.

Rebuild bitfields: yourforum.com/admincp/index.php?do=buildbitfields

And click on "Edit" in the prefix manager of the blank prefix, don't change anything, just hit Save.

I've never had this problem, but the above should fix it.

gteh 02-11-2010 06:01 PM

Quote:

Originally Posted by SecondV (Post 1980140)

Thanks. Got it working.

Have a question though. Is it not possible to be able to give permission to the solved thread plugin to all user groups at once rather than having to edit each user group separately?

demonfatal 02-21-2010 12:20 PM

Quote:

Originally Posted by SecondV (Post 1980142)
Rebuild bitfields: yourforum.com/admincp/index.php?do=buildbitfields

And click on "Edit" in the prefix manager of the blank prefix, don't change anything, just hit Save.

I've never had this problem, but the above should fix it.

Thank you for your help but nothing is [solved] :(
I think the problem is in the 'product-solvedthread.xml' file because as you can see on my attached image the text is missing so something split the name...

Please could check once again this problem?

Thanks in advance...

MandachuvA 02-23-2010 04:34 AM

How do I uninstall it
it installed and would like to uninstall
only that when I put the product and to uninstall from a horrible mistake
please explain how to uninstall it

see the error.:


https://vborg.vbsupport.ru/

iyama 02-23-2010 05:09 AM

On my forum i closed the treath and puth :up: before.
Is it possible to change [solved] in :up: ?

Eric 02-23-2010 08:12 AM

The error should never happen, and it's never happened to me.

Anyway,

Go to Manage Products Mark Threads As "Solved" Edit

Find in the Uninstall Code:

PHP Code:

// #######################################################################
require_once(DIR '/includes/adminfunctions_prefix.php');
require_once(
DIR '/includes/functions_prefix.php');

$prefixsetdm =& datamanager_init('PrefixSet'$vbulletinERRTYPE_CP);
$prefixset $db->query_first("
    SELECT *
    FROM " 
TABLE_PREFIX "prefixset
    WHERE prefixsetid = 'solvedthread'
"
);
$prefixsetdm->set_existing($prefixset);
$prefixsetdm->delete();

build_prefix_datastore(); 

Delete, save, and try to uninstall again.

Quote:

Originally Posted by MandachuvA (Post 1989391)
How do I uninstall it
it installed and would like to uninstall
only that when I put the product and to uninstall from a horrible mistake
please explain how to uninstall it

see the error.:


http://img651.imageshack.us/img651/5625/error1c.png


MandachuvA 02-23-2010 04:23 PM

Thank you uninstall the problem was solved

OPsNaStYM0FO 02-24-2010 03:13 PM

I have done the following steps above . But when I go to do the template edit i get this .

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

And then nothing works .

Frondy 02-24-2010 03:18 PM

Quote:

Originally Posted by OPsNaStYM0FO (Post 1990461)
I have done the following steps above . But when I go to do the template edit i get this .

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

Warning: Invalid argument supplied for foreach() in [path]/includes/adminfunctions_template.php on line 913

And then nothing works .

This is new VB4 4.0.2 upgrade issue, not mod problem
Fixed in VB 4.0.3.

OPsNaStYM0FO 02-24-2010 03:26 PM

Ok ,

Also its not working when I go through with it . In usergroups it shows the spot but no title there just yes or no .

Not showing in the forums when trying to mark one solved .

OPsNaStYM0FO 02-24-2010 03:32 PM

Never mind I got it working .

iguano 02-24-2010 08:48 PM

I'd like use this mod for vbookie, not Solved but Payed.
It's possible?, I think that would be a good idea, or not? :D

Verionia 02-25-2010 11:43 PM

Quote:

Originally Posted by iyama (Post 1989404)
On my forum i closed the treath and puth :up: before.
Is it possible to change [solved] in :up: ?

Id like this too

iguano 02-26-2010 04:26 PM

installed for vbookie, thanks


All times are GMT. The time now is 10:53 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.01433 seconds
  • Memory Usage 1,862KB
  • 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_php_printable
  • (17)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