PDA

View Full Version : Miscellaneous Hacks - Mark Threads As "Solved"


Eric
02-03-2010, 10:00 PM
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?

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


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

/upload/
|_ solved.php

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

/upload/includes/
/xml/
|_ bitfield_solvedthread.xml


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


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

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

SHOWTHREAD

Find:

<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:

<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>


Set options in AdminCP > Settings > Options > Solved Threads

Edit Solved Threads Permissions > Can Mark Threads as Solved for each usergroup.

To setup the forums it can be used in, follow the instructions in this (https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7) post.


Upgrade

Re-import the product, product-solvedthreads.xml, with "Allow Overwrite" set to yes
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 (https://vborg.vbsupport.ru/showpost.php?p=1791497&postcount=34) 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
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
Thanks
Is there mod like this for 3.8.4 ?


Yes, Mate - Mark Threads as 'Solved' for vB 3.8.x (https://vborg.vbsupport.ru/showthread.php?t=211020&highlight=solv%2A)

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
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 :)

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.

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
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 (https://vborg.vbsupport.ru/member.php?u=142777)

Forum Lover
02-08-2010, 09:24 AM
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
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
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
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
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
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
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.

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
https://vborg.vbsupport.ru/showthread.php?t=201864

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
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:


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

$prefixsetdm =& datamanager_init('PrefixSet', $vbulletin, ERRTYPE_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.

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
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 (https://vborg.vbsupport.ru/showthread.php?t=233473), 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
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

Terminator1138
02-26-2010, 06:57 PM
I'm looking for something similar to this but user defined w/ dropdown on forum posts....3.X used to have a mod for this.

User defined phrase set in admin area, so instead of solved, it could be another phrase

for instance

[HELP]
[SOLVED]
[RESOLVED]

etc...user could then select any of those or a moderator....on an edit

iguano
02-28-2010, 09:07 AM
I have a little problem:
i use this mod for vbookie and the prefix for my forum is Payed
but in the rest of forum i see Solved. how i change this?

( sorry for my bad english :-P )

demonfatal
02-28-2010, 09:59 AM
Please rebuild all and create a new update for vb 4.0.2 :)

CCV_Pinto
02-28-2010, 02:58 PM
I think Ive found a little "cache" problem:

if my user creates an thread with a prefix "Problem", for example

then, I go there, and I mark the thread as solved

the prefix change fine, but, if I go back to the forum home, in the "last post" column, the name of the thread is still with the prefix "Problem"

I think thats because you cant only update the thread itself, but, if the thread is also the last thread of the forum, you have to update the forum too (because, if I am not wrong, the table "forum" of vbulletin stores some last thread infos, like title and prefix, probably)

anyway, great mod

thanks!

Terminator1138
03-01-2010, 03:17 PM
so let me get this right as a few have pointed me here...

You can only create one usable prefix like solved and unsolved?

How can one create a multiple list like I mentioned above...I've added another prefix but it does not show up..

also is it possible when you create a thread for users to select thread prefixes? What I'm looking for is similar to what vbulletin.com has....any thoughts?

Update: I got this to work, what does the prefix add do , I see the solved one, but there is a setting to create another category like ?

Eric
03-15-2010, 11:15 PM
I think Ive found a little "cache" problem:

if my user creates an thread with a prefix "Problem", for example

then, I go there, and I mark the thread as solved

the prefix change fine, but, if I go back to the forum home, in the "last post" column, the name of the thread is still with the prefix "Problem"

I think thats because you cant only update the thread itself, but, if the thread is also the last thread of the forum, you have to update the forum too (because, if I am not wrong, the table "forum" of vbulletin stores some last thread infos, like title and prefix, probably)

anyway, great mod

thanks!
This is a vBulletin thing, not necessarily this mod. I may be able to add in a way to rebuild forum info though if it's really needed ...
so let me get this right as a few have pointed me here...

You can only create one usable prefix like solved and unsolved?

How can one create a multiple list like I mentioned above...I've added another prefix but it does not show up..

also is it possible when you create a thread for users to select thread prefixes? What I'm looking for is similar to what vbulletin.com has....any thoughts?


Update: I got this to work, what does the prefix add do , I see the solved one, but there is a setting to create another category like ?
This is simply for marking threads as "Solved", it doesn't support multiple prefixes. For what you're wanting to do, that's already a vBulletin feature.

karel1985
03-16-2010, 06:37 PM
SecondV,

You made my day, we were waiting for your release for vb4 and i was a disapounted to hear if you would drop it, but i hope you will still continuiing this mod, special the future version would be soooooo nice to have.

I'll send you some support ;-)

Best regards,
Karel

Eric
03-16-2010, 07:33 PM
SecondV,

You made my day, we were waiting for your release for vb4 and i was a disapounted to hear if you would drop it, but i hope you will still continuiing this mod, special the future version would be soooooo nice to have.

I'll send you some support ;-)

Best regards,
Karel
I'm working on a new release atm - not sure when it'll be ready, though.


Thank you for your generous donation Karel :) I appreciate it.

wolfyman
03-23-2010, 09:35 PM
I can't change the forums this applies to since I updated to 4.0.2.. it was working in 4.0.1

This is what I get when I try to edit the prefix:

badawidollah
04-05-2010, 02:53 AM
not work for vb402

Verionia
04-05-2010, 09:27 PM
I would like images instead of [solved]

7thSENSE
04-19-2010, 01:12 PM
Nice mod! Which file and which line is to be edited to change the language of the output "mark thread as solved"?

Thanks!

Boosted Panda
04-19-2010, 02:50 PM
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.

Great mod. I suggest you add this though to the install instructions, as I had the same issue.

CFodder
06-11-2010, 09:05 PM
Great mod, used this on 3.8 too.

How can I change the colour of the solved text, or at least make it bold?

CFodder
06-12-2010, 01:59 AM
Never mind, undumbed myself and figured it out :)

LightFatality
06-21-2010, 10:43 PM
I am running 4.0.3 and it is not working. Can anyone confirm if they have it working on theirs?

Bouncer222
06-21-2010, 10:58 PM
Hey SecondV, I love the mod idea, just that I was wondering if you could tweak it a bit or possibly create a new mod that...

When a thread is marked an [APPROVED] prefix, the thread starter gets moved to a different usergroup.

This feature is needed for our community because, we tell people to post applications on our forums, then someone [APPROVED]'s it and after our staff approves it, they have to contact us to tell us to change their usergroup. I don't want to give our staff access to change people's usergroups, because then they could do other stuff as well.

Could you possibly create this nice feature?
I would be very grateful, thanks.

emath
06-22-2010, 09:15 AM
what about the other prefixes that belongs to the vbulletin it self, will it overwrite it ?

LightFatality
06-26-2010, 06:31 PM
OK, randomly after looking through the thread options again it "mark as solved" showed up.

However, it isn't putting the tag/prefix in front after I mark it solved; although it does close it.

4.0.3

EDIT: And now it's gone again after doing nothing...

I give up xD Going to uninstall. Might look into it more later =)

karel1985
07-07-2010, 05:09 PM
Just upgraded from vb3.8 on 4.0.4 and is working as it should !

Thanks SecondV, my donation was worth it...

Jman423
07-12-2010, 01:19 AM
Is this MOD still being improved? I would still love to see the features I suggested in the 3.x version... support for more than one prefix (Sold, Traded, Found) for classifieds forums, but with the same functionality that allows the thread poster to mark it in the same manner this MOD already does.

mimi123
07-30-2010, 04:47 AM
i installed and followed all the instructions, added the code, uploaded fils to each specific folder. enabled product in admin cpanel-options, set YES in usergroup manager option.

the yes or no option for mark thread as solved has APPEARED in the usergroup manager, but when you go to the forum to mark post as solved it's not there in the thread tools.... please help

Eric
07-30-2010, 03:03 PM
Tested on local install + two diff. dev. boards, everything appears to be working.

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

Eric
07-30-2010, 08:49 PM
i installed and followed all the instructions, added the code, uploaded fils to each specific folder. enabled product in admin cpanel-options, set YES in usergroup manager option.

the yes or no option for mark thread as solved has APPEARED in the usergroup manager, but when you go to the forum to mark post as solved it's not there in the thread tools.... please help

https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7

mimi123
08-01-2010, 08:11 AM
https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7

Awesome! thank you very much :)

karel1985
08-04-2010, 04:46 PM
Hi SecondV,

Just upgraded and works perfect.
I've made some customization, because i want the solved button more visible to my users.
( I provided you once ago the instruction for a previous version)

Its like this:
Solved button:
120427

Unsolved button:
120428

So if you see the unsolved button is slighty more to the right, due to the fact that in iE7, the 2 buttons are overlapped when normal added (in IE7 now they are both ok)

Its not yet perfect, but if you would like to have the code let me know.

Best regards,
Karel

Yaung Sein
08-13-2010, 09:44 AM
Not work on vb 4.0.6

I have modify the SHOWTHREAD tamplate but nothing is appear in thread tools.

argothiusz
08-13-2010, 07:03 PM
Is there a way to have this mod without manual template editing? I have so much theme and going over each of them everytime is not fun.

Frondy
08-14-2010, 07:20 AM
Not working after upgrade to VB 4.0.6

I have replaced SHOWTHREAD to 4.0.5 version, and it works again

Yaung Sein
08-17-2010, 11:54 AM
Not working after upgrade to VB 4.0.6

I have replaced SHOWTHREAD to 4.0.5 version, and it works again

I afraid to do that. I will wait for update one. It should be compatible for later vBulletin versions.

Eric
08-17-2010, 12:10 PM
This has been tested several times on the latest vB 4 version, and it's worked every time. The code for SHOWTHREAD for this mod has not changed.

UltraSTYLE
08-20-2010, 06:11 PM
great mod.

and I agree ....it would be nice to see the option to change SOLVED to SOLD or whatever else.
This way this mod would be even more popular.

great work SecondV

foxygti6
08-23-2010, 07:35 PM
Unable to remove throwing errors all over the place

whitedd
08-26-2010, 11:50 PM
...there is no prefix SOLVED in forum display...

Coume
09-02-2010, 06:41 AM
Great mod.

Is there a way to create a page that display the last 25 SOLVED threads for instance?

herkulest
09-02-2010, 11:28 AM
update for 4.0.6?

Eric
09-02-2010, 11:37 AM
...there is no prefix SOLVED in forum display...
Have you marked any threads "Solved"?

Great mod.

Is there a way to create a page that display the last 25 SOLVED threads for instance?
Since all this mod does is set a prefix, no. You'd have no way to determine what time the thread was "Solved"

update for 4.0.6?
My vB4 license is expired, unless $175 magically ends up in my Paypal I can't renew :p So, my vB4 mods won't be developed any further for now.

Coume
09-02-2010, 11:40 AM
Since all this mod does is set a prefix, no. You'd have no way to determine what time the thread was "Solved"

Thanks for the prompt answer.

If time permits, I may try to add a column in the DB to track the date/time when the thread is mark as Solved.

Thxs
Ludo

mikem164
09-05-2010, 04:10 AM
Installed and marked! But........why does it "require" a member to Select a Prefix...or it will not allow the post?? It will give "Error, a prefix must be selected". Thanks and keep up the good work.

PS. I checked permissions and settings and I see nothing to allow post with no prefix. Thanks

mhme
09-06-2010, 06:45 AM
I want to permit a group of users to mark threads as solved. I have installed and follow configuration steps. but they can mark their own threads and not all threads.
How can I permit a group to mark all threads?!

krustyx
09-10-2010, 12:48 AM
So this version is not using the marksolved.gif ?

Is there any way to add link with this icon somewhere instead of using the "Thread Tools" ?

I've setup this thing to use it as SOLD and its working #1!

Thanks!

Eric
09-10-2010, 10:30 PM
So this version is not using the marksolved.gif ?

Is there any way to add link with this icon somewhere instead of using the "Thread Tools" ?

I've setup this thing to use it as SOLD and its working #1!

Thanks!

Correct, with the changes in vB4 the image is no longer necessary. If you'd like to add this to somewhere other than "Thread Tools", the HTML code you'd use is:
<vb:if condition="$show['solvedthread']">
<a href="solved.php?{vb:raw session.sessionurl}do=marksolved&amp;t={vb:raw threadid}">{vb:rawphrase solvedthread_marksolved}</a>
<vb:else />
<vb:if condition="$show['solvedthread_unsolve']">
<a href="solved.php?{vb:raw session.sessionurl}do=markunsolved&amp;t={vb:raw threadid}">{vb:rawphrase solvedthread_markunsolved}</a>
</vb:if>
</vb:if>

I want to permit a group of users to mark threads as solved. I have installed and follow configuration steps. but they can mark their own threads and not all threads.
How can I permit a group to mark all threads?!
The mod is not setup to allow "normal" users to mark any thread as solved, why would you even want that?

Installed and marked! But........why does it "require" a member to Select a Prefix...or it will not allow the post?? It will give "Error, a prefix must be selected". Thanks and keep up the good work.

PS. I checked permissions and settings and I see nothing to allow post with no prefix. Thanks
It doesn't require members to select a prefix, you may want to re-check your prefix permissions and forum settings.

SEW810
09-17-2010, 03:37 AM
Not work on vb 4.0.6

I have modify the SHOWTHREAD tamplate but nothing is appear in thread tools.
Too bad, same here.
Waiting 4 an update!!!
Regards!!!

Eric
09-17-2010, 06:07 AM
Just saying it doesn't work without providing details doesn't help diagnose the problem.

Anyway:

Check you made the template edits correctly, have set proper permissions in the usergroup manager, and have setup the prefix permissions (https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7).

blue7
09-22-2010, 08:29 PM
hi dude, dont work with vb 4.0.7.

will you update this mod?

Eric
09-22-2010, 10:17 PM
hi dude, dont work with vb 4.0.7.

will you update this mod?

Just saying it doesn't work without providing details doesn't help diagnose the problem.

Anyway:

Check you made the template edits correctly, have set proper permissions in the usergroup manager, and have setup the prefix permissions (https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7).

Like I said above ^

And besides, my 3.x license expired, the last vB4 version I have access to is 4.0.6, and do not have the $$ to upgrade the license.

blue7
09-23-2010, 10:45 AM
u r right. work on SHOWTHREAD (vb 4.0.7)

i want this mod work in postbit_legacy

Not working ??
<vb:if condition="$show['solvedthread']">


Working but i changed ??
<a href="solved.php?{vb:raw session.sessionurl}do=marksolved&amp;t={vb:raw thread.threadid}">{vb:rawphrase solvedthread_marksolved}</a>

TilkiBey
09-24-2010, 10:01 AM
tagged for future :thumbup:

Wajdan
10-01-2010, 12:22 PM
This mod should be auto template. Tagged for future use.

porschinho
10-21-2010, 08:14 AM
for me it doesn´t work on 4.0.7

i set the permissions, edited the template, but don´t see the threadoptions to mark as solved.

Qrius
10-23-2010, 10:02 PM
Great Mod ,
I can confirm it is working on 4.0.6 without any problem
Thanks :)

Gav-n-Tn
11-17-2010, 10:03 PM
This mod is cool. I've used it on 3.8. I even modified it to show solved in some forums and sold in others.

emath
11-21-2010, 11:05 AM
anyone can confirm it works with vb408?

freddie3218
11-21-2010, 01:38 PM
I can confirm that it is working on vb4.08 :)

buttersong
11-30-2010, 05:23 AM
nice mod, thanks.

onehost
12-14-2010, 12:01 AM
Never mind, looks like its already part of VB 4

wmguk
12-20-2010, 03:35 AM
Hey,

I've installed this however I dont see a button near reply saying solved....
Any ideas?

Miras
01-01-2011, 05:16 PM
version 4.1.0 pl2
installed by instruction, but there is no permission showing up in usergroup manager

emath
01-18-2011, 10:52 AM
works with 4.1.1 ? anyone have tried?

emath
01-19-2011, 08:00 AM
anyone? please?

PGTycoon
01-19-2011, 12:35 PM
Doesn't seem to be working with 4.1.1 so I am going to mark this as uninstalled.

emath
01-19-2011, 04:11 PM
eric can you please update this mod for vb4.1.1?

horussjr
01-19-2011, 06:52 PM
can't you just make prefixes in admincp? a lot more simplier

Fr4n-FX
01-19-2011, 07:19 PM
please more feedback for 4.1.1

emath
01-20-2011, 12:06 PM
can't you just make prefixes in admincp? a lot more simplier

no. this mod has options to change the prefix by one click, and allow everyone to do so.

if its just a vb prefix its alot more complicated (u need to edit each time the thread etc..)

POL_ED
02-02-2011, 01:07 PM
Mod Version: 2.0.1 working with vB 4.1.1
Thanks :)

Jahaziel
02-03-2011, 04:23 PM
Hi everyone,
Is it possible to change the post icon instead of changing the prefix?
I can not dispense with the prefixes.

Greetings.

POL_ED
02-03-2011, 04:54 PM
Try:
admincp > Languages & Phrases > Search in Phrases
prefix_solvedthread_solved_title_rich
select Search in ... Phrase Text and Phrase Variable Name
Find

Now in
Custom Phrase: prefix_solvedthread_solved_title_rich

Translations
English (US) Translation (Optional)

change
[SOLVED]
ex. to
<img src="yours.gif" />

and Save

:)

Jahaziel
02-03-2011, 06:40 PM
it changes the post icon, or simply replace the text [SOLVED] for an image?
What I want is that the thread keep the prefix that the user chose at first. And to mark thread as solved, change the post icon, not the prefix.

I don't know if it's too complicated,
thank you for your time, POL_ED.

Miras
02-28-2011, 03:19 PM
persmissions still not showing up - no support - marked as uninstalled

venom2124
03-01-2011, 01:21 AM
version 4.1.0 pl2
installed by instruction, but there is no permission showing up in usergroup manager


Had a similar issue had to go to the thread prefixes to adjust the usergroup permissions. When I modified the code to make a similar feature for marking items "sold" the ability so edit permissions via the Usergroup until I went and upgraded to 4.1.2 and then it just showed up.

Hope that helps though.

AshMagic
03-04-2011, 12:10 PM
Confirmed working with 4.1.2 :)

karel1985
03-09-2011, 06:02 PM
Confirmed working with 4.1.2 :)

Second that, still my number 1 of all mods !

The Rocketeer
03-12-2011, 08:06 AM
how do you add more suffixes other than [SOLVED]

Like I want to add a suffixe called [Trailers]

venom2124
03-12-2011, 03:21 PM
how do you add more suffixes other than [SOLVED]

Like I want to add a suffixe called [Trailers]

I don't think there is a way to add suffixes that will work with this. I'm guessing that it would take a recode to get the prefixes you are looking for.

If you are just looking to add the prefix for members to choose from though you could just add it through the AdminCP.

Eric
03-20-2011, 09:52 AM
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.

venom2124
03-20-2011, 03:59 PM
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.

Thank you for making the code reuseable. I have a mode based off this code that I would like to use and hopefully I can figure out enough to help provide support for this mod and my mod.

wally07
04-29-2011, 11:32 PM
Works like a charm in 4.1.3. TY!

edit:
How would I be able to make the lettering [SOLVED] in red?

togotutor
05-16-2011, 06:32 PM
Installed and will be testing it soon...

venom2124
05-17-2011, 07:06 AM
Works like a charm in 4.1.3. TY!

edit:
How would I be able to make the lettering [SOLVED] in red?

Got to thread prefixes in the admincp.

The click edit next to the prefix and change the rich text entry to reflect the style you want using HTML code.

Hope that helps.

FReeSTER
05-29-2011, 03:41 PM
Try:
admincp > Languages & Phrases > Search in Phrases
prefix_solvedthread_solved_title_rich
select Search in ... Phrase Text and Phrase Variable Name
Find

Now in
Custom Phrase: prefix_solvedthread_solved_title_rich

Translations
English (US) Translation (Optional)

change
[SOLVED]
ex. to
<img src="yours.gif" />

and Save

:)
Thank you

wally07
06-18-2011, 03:13 AM
Got to thread prefixes in the admincp.

The click edit next to the prefix and change the rich text entry to reflect the style you want using HTML code.

Hope that helps.

that didn't work.

I ended up trying again just now and found that you have to do the following:
<span style='font-weight: bold; color: red;'>[SOLVED]</span>

the trick though is adding that to the translations section. (look above my post to see how to get there.

Thanks anyway! :up:

ngocol
08-12-2011, 09:32 AM
Thank, nice mod ,working good on VB 4.1.4 , anyway can i change a closed thread to something like thumb Up but only on solved thread not all closed thread ? and maybe add some different color on row

maybe you want to take a look http://ngocol.us/forums/7-Swasta thanks

sory my english bad

preemz10314
08-19-2011, 02:09 PM
does not work. wasted time.

FReeSTER
09-06-2011, 07:09 PM
I think it should be add to this allow usergroup to SOLVE other usergroup threads or just give them permissions to mark SOLVE their own.

That will be a good one to add to this

kfyonur
09-06-2011, 07:22 PM
is it working on 4.1.5 PL1

imported_ahw
09-11-2011, 05:16 AM
I have good small suggestion, maybe someone suggested it before me.
Instead of going to thread tools, you can add small button in the main thread (1st post) so, the moderator will just press it to make it solved.

kfyonur
09-11-2011, 07:24 AM
it is working on 4.1.5 PL1 but you must read this post..
https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7

CypherHackz
09-16-2011, 03:02 AM
Have installed the plugin as shown in the Instructions. Have set the prefix for specific forum like in this post, https://vborg.vbsupport.ru/showpost.php?p=1789883&postcount=7 But still couldn't see the link to mark the thread as solved like this one, https://vborg.vbsupport.ru/attachment.php?attachmentid=111611&d=1265243833

Updated: It is working on 4.1.5 PL1. Nice! :)

-cypher.

Cory Megitt
09-17-2011, 03:06 PM
I guess that one user can't mark another user's thread as resolved?

karel1985
10-19-2011, 04:59 PM
Hi Eric,

Long time ago, are you still supporting this mod?
Any change that you continue the updates on this? I would be interested to see the function to move the topic after solving... (per forum based).

If needed i can send some funds again (like in the past i did...)

Best Regards,
Karel

ofir24
10-19-2011, 06:00 PM
did it work on vb 4.1.7?

karel1985
11-02-2011, 07:26 PM
did it work on vb 4.1.7?

Yes, without any problem.

MaXimus
11-21-2011, 09:15 AM
Installed it and working fine on vBulletin v4.1.8 :)

Just a quick question, is there a way to edit the font color of the Prefix [Solved]?

I want to change it from Black font to Bold Green

karlm
12-01-2011, 01:20 AM
Installed it and working fine on vBulletin v4.1.8 :)

Just a quick question, is there a way to edit the font color of the Prefix [Solved]?

I want to change it from Black font to Bold Green
Go to the thread prefix settings for the 'solved' set, edit the Rich Text Format entry to whatever you want using HTML.

I'm using an image in my case.

Trevor Matthews
12-01-2011, 10:44 PM
On 4.1.7 pl2 and works perfectly. Many thanks.

Ellendway
12-06-2011, 05:17 PM
After I upgraded my forum to v4.1.8 it's not working anymore.

karel1985
12-06-2011, 05:56 PM
After I upgraded my forum to v4.1.8 it's not working anymore.

This is strange, i have also v4.1.8 and its still working without any problem. Can you describe your problem?

Ellendway
12-07-2011, 01:39 PM
This is strange, i have also v4.1.8 and its still working without any problem. Can you describe your problem?

Sure. I tried to disable all plugins on the forums and it's still not works. I did all things from the first post.

Trevor Matthews
01-10-2012, 04:27 PM
I would like to have this installed twice on my forum

1. To say Solved or Unsolved.

2. To say Scrapped or Unscrapped.

Is it possible to run 2 instances of the modification and if so how would I achieve that?

Many thanks for any help.

paulket
02-19-2012, 08:29 PM
Does anyone have this working with 4.1.10? I tried installing it on a test site and can't see anything in the "Thread Tools" drop-down menu to mark threads as "Solved".

EDIT: Should have checked the user group permissions... it's working fine on my test site.

whitedd
02-19-2012, 08:38 PM
...4.1.10 ...working perfect...

paulket
02-19-2012, 08:57 PM
...4.1.10 ...working perfect...

Thank you for replying, Whitedd. I've got it working now.

venom2124
02-20-2012, 05:54 AM
I would like to have this installed twice on my forum

1. To say Solved or Unsolved.

2. To say Scrapped or Unscrapped.


Is it possible to run 2 instances of the modification and if so how would I achieve that?

Many thanks for any help.

I run this on my site with two different variations, but you have to recode it to make it different. So you would have to go back through it and change all the solved and unsolved to what ever you are looking for. I use solved/unsolved and sold/unsold on my site.

Trevor Matthews
02-20-2012, 02:26 PM
Hi
Many thanks for that.
I will have a look and see if I can do that.

w1z8it
03-01-2012, 08:11 AM
Nevermind.

whitedd
03-05-2012, 04:02 PM
4.1.11 working

beansbaxter
03-11-2012, 09:29 AM
Not working in 4.1.11

I installed everything as instructed. I made the template edit to SHOWTHREAD but it's not showing in the drop-down menu. Permissions are good in the Usergroup. What else can I do to troubleshoot this?

venom2124
03-11-2012, 11:38 PM
Not working in 4.1.11

I installed everything as instructed. I made the template edit to SHOWTHREAD but it's not showing in the drop-down menu. Permissions are good in the Usergroup. What else can I do to troubleshoot this?

And the prefix has been selected for the forum in question?

Rabby
03-12-2012, 10:08 PM
Works perfectly with version 4.1.11
Just make sure that you upload all files, install the xml file, set the forum options and usergroup permissions

Trevor Matthews
03-12-2012, 10:18 PM
Works on 4.1.11.

Venom2124, Do I just need to change the references in the XML file or all the files that are in the download. Also what about the edit? Do I just add it again but use the new name?

Any help would be much appreciated.

venom2124
03-13-2012, 03:27 AM
Works on 4.1.11.

Venom2124, Do I just need to change the references in the XML file or all the files that are in the download. Also what about the edit? Do I just add it again but use the new name?

Any help would be much appreciated.

You would have to go through all the products and files and change anything that is solved, unsolved, solve, or unsolve to a new phrase. So depending on what you would like to do would depend on the coding changes.

Trevor Matthews
03-13-2012, 10:38 PM
Thanks for that.

Last night I went through all the files and changed all references to my new phrase, in my case it is Scrapped and Unscrapped.
I edited the SHOWTHREAD file and added a second instance of the edit with my changes in it.
Works perfectly on my test board.

venom2124
03-13-2012, 11:07 PM
Glad you got it.

Trevor Matthews
03-14-2012, 02:45 PM
Me too. Now on the live board. :-)

Dwarden
04-25-2012, 02:48 PM
took me some headbanging to figure that i need also check that checkbox in permission of each forum

now works fine with 4.1.1x forums, gj and thanks

silpher
05-28-2012, 07:43 PM
Works in 4.2?

silpher
05-29-2012, 09:21 PM
Works like a charm!

I'm running VB 4.2

Da^MsT
08-02-2012, 11:07 AM
Will the topic starter be able to mark the thread as solved (but not other persons threads)?

Wolver2
09-18-2012, 11:19 AM
I was wondering we can add a "NEW BUTTON" beside edit Post or Reply

because the mark thread as solved is kinda hidden and adds additional steps.

Any ideas?

karel1985
09-18-2012, 04:39 PM
I was wondering we can add a "NEW BUTTON" beside edit Post or Reply

because the mark thread as solved is kinda hidden and adds additional steps.

Any ideas?

Sure this is possible, i have it posted in this thread somewhere, if i remember well

Wolver2
09-20-2012, 11:05 AM
Sure this is possible, i have it posted in this thread somewhere, if i remember well

Thanks but sadly I couldnt find your post on it on this thread. I just saw that u showed pics and said "Its not yet perfect, but if you would like to have the code let me know."

Im sure alot would love to have your code :)


Btw Is it possible with this mod that the usergroup can make it "solve" and set it back to "unsolved" as often as they want?

Or is it only possible if they made that thread themselves?

PrivateFTA
10-10-2012, 01:44 PM
as I can give some color to Solved

RichieBoy67
03-20-2013, 01:59 PM
Hey guys,

I need this or something similar in one of my forum sites to be used only in a site support sub-forum. I have not read every single post in this thread so excuse me if this has been covered.

I understand it uses usergroup permissions. This is fine and I suppose it would not be hard to add a conditional for forums as well. Has anyone done this? I do not want moderators and admins to have the option to mark solved all over the site.

I would also like to know if anyone has this working successfully on 4.2 with a custom theme. if so did you have to customize? Does this use existing css or it's own?
If you could supply a link so I can test that would be awesome.

Thanks,
Rich

datoneer
05-19-2013, 03:00 PM
Its working with vb 4.2.1

venom2124
06-03-2013, 11:13 PM
Hey guys,

I need this or something similar in one of my forum sites to be used only in a site support sub-forum. I have not read every single post in this thread so excuse me if this has been covered.

I understand it uses usergroup permissions. This is fine and I suppose it would not be hard to add a conditional for forums as well. Has anyone done this? I do not want moderators and admins to have the option to mark solved all over the site.

I would also like to know if anyone has this working successfully on 4.2 with a custom theme. if so did you have to customize? Does this use existing css or it's own?
If you could supply a link so I can test that would be awesome.

Thanks,
Rich

This mod will allow you to specify which forums the mod will work on. It should also not be affected by custom styles.

findingpeace
06-11-2013, 02:54 PM
Great mod, works perfectly on 4.2.1! Be sure to set Usergroup permissions first, otherwise the Prefixes settings won't give you the option for forum permissions

Wolver2
08-08-2013, 01:47 PM
Guys how can I add it as a new button "Solved" beside the +Reply to thread.. because the button where it is now isnt very seen.. no one will notice

I would gladly donate to someone who could do this for me :)

Tim Wheatley
09-13-2013, 04:28 PM
Great mod, works perfectly on 4.2.1! Be sure to set Usergroup permissions first, otherwise the Prefixes settings won't give you the option for forum permissions

I'm a new installer onto 4.2.1. Have set permissions in usergroup, permissions for the prefixes, and selected which forums to show in... and it doesn't show in the dropdown. Yes, template edited as instructed, files uploaded, and product installed.

Tim Wheatley
09-13-2013, 04:45 PM
Super... I tried to remove the product, got a fatal error. so I installed it again, overwriting. Now when I try to set usergroups to yes:
MySQL Error : Unknown column 'solvedthread_permissions' in 'field list'

Tim Wheatley
09-13-2013, 04:51 PM
Had to alter the uninstall code to get it to uninstall without the fatal error.

karel1985
09-15-2013, 01:29 PM
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...

ozzy47
09-15-2013, 01:59 PM
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.

PrivateFTA
02-18-2014, 05:53 PM
let me know if I can do several way to use a new place to settle and accepted our

djvj
05-01-2014, 07:53 AM
Does this work on 4.2.2?

NM, just tested and it works fine.

john7911
05-01-2014, 09:02 AM
I install it on 4.2.2 but I don't see it in the list.
https://vborg.vbsupport.ru/external/2014/05/78.png

aminp30
06-27-2014, 06:10 AM
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

fxdigi-cash
08-02-2014, 06:08 AM
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

maybe you didn't read whole main post...

from there, this code you need to add it to your showthread template to see the button:

<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>

majickal
08-23-2014, 12:01 PM
I can confirm this is working on 4.2.2 Patch Level 1 :D

majickal
08-24-2014, 07:55 AM
Is there anyway to remove the following prefix option when starting a new thread in a Q & A forum?

https://vborg.vbsupport.ru/attachment.php?attachmentid=150179&stc=1&d=1408869921

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:

https://vborg.vbsupport.ru/attachment.php?attachmentid=150180&stc=1&d=1408870162

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:


<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>


I'll keep digging and if I find a solution, I'll post it, else if someone else knows, please let me know.

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:

<!-- 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 -->


you will note in the following line:

<vb:if condition="$forumid == 16">

You will need to change the number 16 for whatever your Q & A forumid is.

To find this out, you can execute the following SQL against your DB:

select * from forumprefixset;

This will provide you a list of all forums where you have selected them as Q & A type forums as shown below: (I'm using mysql workbench in this example)

https://vborg.vbsupport.ru/attachment.php?attachmentid=150180&stc=1&d=1408873908

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:

SELECT forumid from forumprefixset WHERE prefixsetid = 'solvedthread';

Once I can get this into an array and register that array as a variable vBulletin can accept, perhaps I can test against that array in the template and not have to manually code the forum ids in. This would mean a one time change in the newthread template and any forum could have this feature.

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


<!-- Start hiding the prefix option if Q & A thread -->
<vb:if condition="in_array($forumid, array(16))">



Update

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.

https://vborg.vbsupport.ru/attachment.php?attachmentid=150188&stc=1&d=1408916968

Then I added the following PHP 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));

}


Finally in the newthread template, as noted in the above template edits, the following change was made:

Find:

<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>


Replace with:


<!-- 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 -->


The core bit of information I was missing, was the method used to return variables from PHP in a way that they can be used in conditional statements in vBulletin templates. This eluded me for a while but was the key to making the changes I required work. See below for the exact code I used to register the PHP variable for use in the template system:


vB_Template::preRegister('newthread', array('returnSolvedForumIDS' => $returnSolvedForumIDS));


As soon as this variable was registered, everything fell into place. :)

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:


Separate the test/modification code from the actual plugin code
Avoid changin the plugin code as I am not 100% sure if this is an OK thing to do?
Teach myself and provide an example to others how to accomplish such modifications to the original plugin without changing any of the core plugin code.


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

john7911
09-10-2014, 05:38 AM
Hi,
How can I translate to French?
Thank you :)

ozzy47
09-10-2014, 09:32 AM
Edit the phrases that belong to the mod with Phrase Manager.

john7911
11-24-2014, 02:25 PM
Edit the phrases that belong to the mod with Phrase Manager.
Thank you ozzy47 ;)

---------------------
How can I have SOLVED in Bold font?

https://vborg.vbsupport.ru/external/2014/11/8.jpg

Thank you.

gnrx
11-27-2014, 06:39 PM
Hi,
A few minutes ago, I installed this mod in vb 4.2.2 pl2.
Works but not appears any button of Solved.

I search in SHOWTHREAD template the code that indicate:
<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>
This exact code not exist in my template (any previous modification in this template), but I view some similar code:
<vb:if condition="$show['addpoll']">
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}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>

I add the code just after this above code, its correct?
The button not appears and I search for view the problem but I don't view what are the problem.

Regards.

john7911
11-28-2014, 04:34 AM
Hi,
A few minutes ago, I installed this mod in vb 4.2.2 pl2.
Works but not appears any button of Solved.
Hi,
You have to Add New Prefix Set
https://vborg.vbsupport.ru/external/2014/11/1.jpg

gnrx
11-28-2014, 12:18 PM
Hi,
You have to Add New Prefix Set
https://vborg.vbsupport.ru/external/2014/11/1.jpg

Yes, I have New Prefix:
https://vborg.vbsupport.ru/external/2014/11/2.jpg

gnrx
12-20-2014, 10:04 PM
Some user with this mod and vb 4.2 pl3 have visible the button of Solved?

I can't made for appears this button, and if not appears....

Thanks.

aeternitasster
03-25-2018, 01:06 AM
Works with 4.2.5. Had initially the same problem that it was not showing up under "thread tools" although usergroup permissions were correctly set, etc. Found what was causing the issue; if anyone else has this problem, make sure to check that ALL forums AND sub-forums where you want this mod to work are selected under Thread Prefixes > Thread Prefix Manager. Selecting only a parent forum will not lead to the changes being inherited by the child forums, so they have to be selected individually.

chudvs
07-24-2019, 09:01 AM
Yep can confirm working on 4.2.5, just installed and working great

john7911
07-25-2019, 03:24 PM
Hi :-)
is it possible to add a button to go to the solution as this forum bellow:
https://forums.autodesk.com/t5/autocad-plant-3d-forum/lap-joint-flange-shift-on-gasket-change/td-p/8910765

the user who asked for a solution choose the best solution.

https://vborg.vbsupport.ru/external/2019/07/11.jpg

https://vborg.vbsupport.ru/external/2019/07/12.jpg

Thank you ;-)

z3r0
07-25-2019, 03:29 PM
Hi :-)
is it possible to add a button to go to the solution as this forum bellow:
https://forums.autodesk.com/t5/autocad-plant-3d-forum/lap-joint-flange-shift-on-gasket-change/td-p/8910765

the user who asked for a solution choose the best solution.


Thank you ;-)

This mod only marks the entire thread as solved and doesn't mark any post as the answer, the following mods may do what you are looking for.

https://vborg.vbsupport.ru/showthread.php?t=269776
https://vborg.vbsupport.ru/showthread.php?t=322478
https://vborg.vbsupport.ru/showthread.php?t=293596

john7911
07-25-2019, 04:21 PM
Thank you z3r0 ;-)
I'll check it.