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)

Gav-n-Tn 10-03-2010 03:52 PM

One request. Code another so that threads -in specific forums- can be marked as Sold. I don't want to alter this one because I have a forum for asking questions which I'm using this one in. Or, can I have permission to do it myself? Actually, I already did but would like your blessing on installing it :)

Black Tiger 10-14-2010 05:27 PM

I use the term [opgelost] but discovered that it's not showing up on forumhome's "last post" column. I'm not any good in coding, how and where can I fix it so this does show up? Please tell me in e a "search this and replace with this" kind of way.;)

Furthermore it would be nice to have a mandatory "open" status prefix. Can I use the normal prefix manager for that, will this not conflict when a thread is solved and marked solved?

Black Tiger 10-16-2010 05:14 PM

Fixed the above myself by putting the forums on a mandatory prefix [OPEN] and added that prefix to the "solved" prefix set.

But there is another problem/bug with this mod.
When setting a thread to solved, the prefix will be set to solved, but the forum information is not rebuild immediately. This way the "Solved" prefix is only visible in showthread and forumdisplay but not on forumhome!

I explained here:
https://vborg.vbsupport.ru/showthread.php?p=2110759

How can I fix this?

sheppardzwc 10-19-2010 01:24 AM

Quote:

Originally Posted by Black Tiger (Post 2110761)
Fixed the above myself by putting the forums on a mandatory prefix [OPEN] and added that prefix to the "solved" prefix set.

But there is another problem/bug with this mod.
When setting a thread to solved, the prefix will be set to solved, but the forum information is not rebuild immediately. This way the "Solved" prefix is only visible in showthread and forumdisplay but not on forumhome!

I explained here:
https://vborg.vbsupport.ru/showthread.php?p=2110759

How can I fix this?

I believe I've found a bugfix for that...

If you look in your solved.php, on line 117, it has: $threadman->save();

Under that, on a new line, if you put: build_forum_counters($threadinfo['forumid']); it should work fine. The same goes for on line 150. So your end code should be:

line 117
Code:

$threadman->save();
build_forum_counters($threadinfo['forumid']);

and line 150
Code:

$threadman->save();
build_forum_counters($threadinfo['forumid']);


While this isn't guaranteed, and on large boards this could cause a performance problem, this should update your fourmhome to reflect any changes. :)

Black Tiger 10-19-2010 12:02 PM

The normal prefixes also update immediately so that would be a performance problem also then or am I mistaken?

Anyway, many thanks for your solution, I'm going to try this! Thank you!

sheppardzwc 10-19-2010 09:38 PM

Quote:

Originally Posted by Black Tiger (Post 2111627)
The normal prefixes also update immediately so that would be a performance problem also then or am I mistaken?

Anyway, many thanks for your solution, I'm going to try this! Thank you!

While the save() does take resources, duh, it only affects one thread. The build_form_counters function, unfortunately, scans each thread in a forum which can be a bit intensive. But anyway, no problem. :)

Black Tiger 10-19-2010 10:09 PM

Great, thank you for explaining. I'm still happy with the solution you gave me.:)

emath 11-21-2010 10:56 AM

thanks..

SVTCobraLTD 01-04-2011 04:50 PM

Not sure what I am missing but on 3.8.6PL1 i have uploaded everything and did the template edits yet it is not working. I checked under usergroups and Admin's have permission. Yet when I click Thread Tools, there is nothing there about Solved. What am I missing here?

Black Tiger 01-04-2011 06:18 PM

SVTCobraLTD: Did you have a look at my post #199 here?
It's explained there what you have to do.

SVTCobraLTD 01-04-2011 10:27 PM

Yes in Admincp > Thread Prefixes > Thread Prefix Manager

Clicked the box next to the blank item > Edit Selected Prefix Permissions

All usergroups are selected > Save

Still nothing. What am I missing here?

Black Tiger 01-04-2011 11:21 PM

Maybe a conflicting mod? I'm having this mod also on a 3.8.6 pl1 without problems.

SVTCobraLTD 01-04-2011 11:51 PM

Quote:

Originally Posted by Black Tiger (Post 2144160)
Maybe a conflicting mod? I'm having this mod also on a 3.8.6 pl1 without problems.

Went to Products and disabled all mods except this one. Still nothing. I am looking under Forums Tools below Add a Poll

Black Tiger 01-05-2011 12:26 AM

Quote:

I am looking under Forums Tools below Add a Poll
You mean Thread Tools below Add a Poll.

Yes it should be there indeed. Not even an empty space present?

If not, try reinstalling the product, re-upload all php files and be sure to upload them in ascii mode.
Did you do all the template edits too?
And you also did what's in post #7?

SVTCobraLTD 01-05-2011 01:13 PM

Black Tiger, I did what you said and now it is working. It might have been that I uploaded everything in Auto. But went through each step again and now it is on. Thank you for all your help.

Black Tiger 01-05-2011 01:49 PM

You're welcome. Glad to hear everthing is working fine now.

SVTCobraLTD 03-01-2011 11:00 PM

I am trying to get an image to show next to the reply button but for some reason, only the sold image will show. Once clicked, it marks the thread like it should but then no image shows and I am unable to mark unsold. Any thoughts?

Code:

<if condition="$show['solvedthread']"><a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]"><img src="$stylevar[imgdir_button]/sold.gif" border="0" /></a></if>
                <else /><if condition="$show['solvedthread_unsolve']"><a href="solved.php?$session[sessionurl]do=markunsolved&amp;t=$threadinfo[threadid]"><img src="$stylevar[imgdir_button]/unsold.gif" border="0" /></a></if>


Eric 03-20-2011 09:53 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.

SVTCobraLTD 05-08-2011 09:56 PM

Quote:

Originally Posted by SVTCobraLTD (Post 2168458)
I am trying to get an image to show next to the reply button but for some reason, only the sold image will show. Once clicked, it marks the thread like it should but then no image shows and I am unable to mark unsold. Any thoughts?

Code:

<if condition="$show['solvedthread']"><a href="solved.php?$session[sessionurl]do=marksolved&amp;t=$threadinfo[threadid]"><img src="$stylevar[imgdir_button]/sold.gif" border="0" /></a></if>
                <else /><if condition="$show['solvedthread_unsolve']"><a href="solved.php?$session[sessionurl]do=markunsolved&amp;t=$threadinfo[threadid]"><img src="$stylevar[imgdir_button]/unsold.gif" border="0" /></a></if>


Anyone? Still not showing unsolved. I have to go to Thread Tools to unsolve this however once that is done, the solve button shows again. I confirmed the image location is corrected for unsolved.

Simon Lloyd 05-09-2011 05:13 AM

So what are you saying?, if you mark a thread solved and then go to thread tools the image is still that of "mark as solved", is that correct?, what is the text that shows?

looking at the snippet you supplied i'd say it's correct but did you change that for EVERY occurrence in the steps shown above?

SVTCobraLTD 05-09-2011 09:51 AM

1 Attachment(s)
See attached screen shot.

This is what the thread looks like before you click "Mark Sold" Once clicked, that thread refreshes and is marked as sold (or solved), however, there will be no image where the current button is. There is supposed to show a button saying "Mark Unsold".

If you go to thread tools, it works fine both ways via that menu.

radiofranky 07-06-2011 06:13 PM

will this work on vb4.14?

thanks

Black Tiger 08-07-2011 04:31 PM

Please help me I'm having a problem uninstalling. I got this mod on one forum and tried it on a second, but then wanted to uninstall it again.
Now this is happening:
Quote:

Fatal error: Existing data passed is not an array
Called set_existing in [path]/admincp/plugin.php(1522) : eval()'d code on line 20
Called eval in [path]/admincp/plugin.php on line 1522
in [path]/includes/class_dm.php on line 235
#0 vb_error_handler(256, Existing data passed is not an array
And a lot more error codes.

I had a look at the solution given in post #34 but this is not good because the uninstall code for 1.1.2 is only:
Quote:

$db->hide_errors();

$db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup DROP solvedthread_permissions");
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "thread DROP is_solved");

require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Bitfield_Builder::save($db);
build_forum_permissions();

// ################################################## #####################
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();

$db->show_errors();
So the text from the solution in post #34 is not present.

How can I fix things so I can uninstall this mod?

Black Tiger 08-07-2011 04:40 PM

Problem can be ignored because it is fixed.

The prefix was removed before the uninstall.
So I deleted the lines below the //#### which uninstalled the prefixset and now the mod uninstalled.

dendrob 10-05-2011 11:52 AM

Great mod. I installed it and modified things a bit so I can have "Solved" or "Unsolved" showing. It works great and in the thread listing in that forum all threads are correctly marked as "Solved" or "Unsolved", but on FORUMHOME, even though the thread has been changed it shows with it's old prefix when it was created. I then Have to go to Maintenance->Update Counters->Rebuild Forum Information for it to show correctly.

Black Tiger 10-05-2011 01:03 PM

@Dendrob: Correct. Have a look at post #204 from sheppardzwc, you can use that as a fix. Worked for me too.

RTMdotORG 10-06-2011 06:43 PM

How come I can't add html to the "SOLVED"?

Simon Lloyd 10-08-2011 09:01 PM

what do you mean add html?

Akangage 10-30-2011 06:49 AM

Not worked for vB 4.1.7 :(

Simon Lloyd 10-30-2011 08:49 AM

Quote:

Originally Posted by Akangage (Post 2262843)
Not worked for vB 4.1.7 :(

did you read the mod description???? it showed you this link for vb4 https://vborg.vbsupport.ru/showthread.php?t=234935

CoffeeLovesYou 08-20-2012 06:28 PM

Possible after marking as solved and closing the thread that it moves the thread into a forum of your choice?


All times are GMT. The time now is 01:36 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.01359 seconds
  • Memory Usage 1,810KB
  • 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
  • (4)bbcode_code_printable
  • (8)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
  • (31)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