Topic Solved

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
WastedJoker
Registered User
Posts: 74
Joined: Mon Nov 17, 2008 10:20 pm

Re: Topic Solved

Post by WastedJoker »

nvm, solved my own idiocy.
mrbaseball34
Registered User
Posts: 143
Joined: Thu Jul 17, 2003 2:46 pm

Re: Topic Solved

Post by mrbaseball34 »

tumba25,
I know that the value in the topics table is which poster's post was actually the one that was selected. But how would I show the post differently depending on the topic_solved column? I want to color the area where the Post subject: and Posted: are shown. I'm not sure what all I need to do to do that. This would be great option to add to the MOD.
User avatar
PowWowPalace
Registered User
Posts: 58
Joined: Thu Jul 09, 2009 3:28 pm
Contact:

Re: Topic Solved

Post by PowWowPalace »

I just installed this mod to my phpBB 3.0.5 board. Everything works except for the search parts in the search.php

Here is the error line that is displaying in the browser:

Code: Select all

$user->add_lang('viewtopic');
Anyone have any ideas?

Thanks
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Topic Solved

Post by tumba25 »

No, that line is from the core code off search.php. This MOD do not modify that line.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
User avatar
PowWowPalace
Registered User
Posts: 58
Joined: Thu Jul 09, 2009 3:28 pm
Contact:

Re: Topic Solved

Post by PowWowPalace »

I didn't change that line. If I put my original search.php before the edit of the mod everything works fine. The only thing that does not work is the search of the solved/unsolved topics. So the search.php has the error, any ideas?

This is the error in the browser:

Parse error: syntax error, unexpected T_STRING in /home/content/s/c/o/rog1975/html/search.php on line 1105

Thanks
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Topic Solved

Post by tumba25 »

You have missed a quotation mark or something like that. Show 10 lines before line 1105 in your file.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
mrbaseball34
Registered User
Posts: 143
Joined: Thu Jul 17, 2003 2:46 pm

Re: Topic Solved

Post by mrbaseball34 »

mrbaseball34 wrote:tumba25,
I know that the value in the topics table is which poster's post was actually the one that was selected. But how would I show the post differently depending on the topic_solved column? I want to color the area where the Post subject: and Posted: are shown. I'm not sure what all I need to do to do that. This would be great option to add to the MOD.
I'm not sure if it follows phpBB MOD coding guidelines but the following takes care of the above mentioned request. I will add option to the forums management of ACP at a later date.

viewtopic.php:

Code: Select all

FIND:
		'POST_SUBJECT'		=> ($topic_data['topic_solved'] == $row['post_id'] && $topic_data['topic_type'] != POST_GLOBAL) ? $row['post_subject'] . '&nbsp;&nbsp;' . (($topic_data['forum_solve_text']) ? (($topic_data['forum_solve_color']) ? '<span style="color: #' . $topic_data['forum_solve_color'] . '">' : '') . $topic_data['forum_solve_text'] . (($topic_data['forum_solve_color']) ? '</span>' : '') : $user->img('icon_topic_solved_post', 'TOPIC_SOLVED')) : $row['post_subject'],

REPLACE WITH:
		'POST_SUBJECT'		=> $row['post_subject'],

ADD-AFTER:
		'POST_STYLE'		=> (($topic_data['topic_solved'] == $row['post_id'] && $topic_data['topic_type'] != POST_GLOBAL) ? ' style="background-color: #'.$topic_data['forum_solve_color'].';"' : ''),
viewtopic_body.html

Code: Select all

FIND:
	<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->

REPLACE WITH:
	<!-- IF postrow.S_ROW_COUNT is even --><tr<!-- IF postrow.POST_STYLE -->{postrow.POST_STYLE}<!-- ELSE --> class="row1"<!-- ENDIF -->><!-- ELSE --><tr<!-- IF postrow.POST_STYLE -->{postrow.POST_STYLE}<!-- ELSE --> class="row2"<!-- ENDIF -->><!-- ENDIF -->
User avatar
PowWowPalace
Registered User
Posts: 58
Joined: Thu Jul 09, 2009 3:28 pm
Contact:

Re: Topic Solved

Post by PowWowPalace »

tumba25 wrote:You have missed a quotation mark or something like that. Show 10 lines before line 1105 in your file.

Code: Select all

// BEGIN Topic solved
			$solved_link = '';
			if($row['topic_solved'])
			{
				if($show_results == 'posts' && $row['post_id'] == $row['topic_solved'])
				{
					$solved_link = '&nbsp;' . (($row['forum_solve_text']) ? (($row['forum_solve_color']) ? '<span style="color: #' . $row['forum_solve_color'] . '">' : '') . $row['forum_solve_text'] . (($row['forum_solve_color']) ? '</span>' : '') : $user->img('icon_topic_solved_post', 'TOPIC_SOLVED'));
				}
				else
				{
					$solved_link = '&nbsp;<a class="topictitle" href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", ",","f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['topic_solved'] . (($u_hilit) ? '&hilit=' . $u_hilit : '') . '&#p' . $row['topic_solved']) . '"' . (($row['forum_solve_color']) ? ' style="color: #' . $row['forum_solve_color'] . '"' : '') . '>' . (($row['forum_solve_text']) ? $row['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED')) . '</a>';
				}
			}
// END Topic solved

The error is in this line it says:

Code: Select all

$solved_link = '&nbsp;<a class="topictitle" href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", ",","f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['topic_solved'] . (($u_hilit) ? '&hilit=' . $u_hilit : '') . '&#p' . $row['topic_solved']) . '"' . (($row['forum_solve_color']) ? ' style="color: #' . $row['forum_solve_color'] . '"' : '') . '>' . (($row['forum_solve_text']) ? $row['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED')) . '</a>';
Thanks
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Topic Solved

Post by tumba25 »

Line 1105 in my search.php is at the end. Nowhere near anything this MOD changes. Those lines are not supposed to be near line 1105 unless you have really lot of MODs.
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
User avatar
PowWowPalace
Registered User
Posts: 58
Joined: Thu Jul 09, 2009 3:28 pm
Contact:

Re: Topic Solved

Post by PowWowPalace »

I do have a lot of mods. I am getting a php error on this line:

Code: Select all

$solved_link = '&nbsp;<a class="topictitle" href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['topic_solved'] . (($u_hilit) ? '&hilit=' . $u_hilit : '') . '&#p' . $row['topic_solved']) . '"' . (($row['forum_solve_color']) ? ' style="color: #' . $row['forum_solve_color'] . '"' : '') . '>' . (($row['forum_solve_text']) ? $row['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED')) . '</a>';
There is something not correct. Do you see anything extra or missing? When I run a php script test it comes up as an error but does not give me specifics.

Thanks
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: Topic Solved

Post by tumba25 »

You should replace the first version you showed of that line with the last.

This is wrong and not included in the MOD. Don't try to fix things you don't understand.

Code: Select all

    $solved_link = '&nbsp;<a class="topictitle" href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", ",","f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['topic_solved'] . (($u_hilit) ? '&hilit=' . $u_hilit : '') . '&#p' . $row['topic_solved']) . '"' . (($row['forum_solve_color']) ? ' style="color: #' . $row['forum_solve_color'] . '"' : '') . '>' . (($row['forum_solve_text']) ? $row['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED')) . '</a>';

This is the correct line.

Code: Select all

$solved_link = '&nbsp;<a class="topictitle" href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['topic_solved'] . (($u_hilit) ? '&hilit=' . $u_hilit : '') . '&#p' . $row['topic_solved']) . '"' . (($row['forum_solve_color']) ? ' style="color: #' . $row['forum_solve_color'] . '"' : '') . '>' . (($row['forum_solve_text']) ? $row['forum_solve_text'] : $user->img('icon_topic_solved_list', 'TOPIC_SOLVED')) . '</a>';
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
User avatar
PowWowPalace
Registered User
Posts: 58
Joined: Thu Jul 09, 2009 3:28 pm
Contact:

Re: Topic Solved

Post by PowWowPalace »

I replaced the code and I'm still getting the unexpected T_STRING error on this line.
User avatar
daroPL
Translator
Posts: 515
Joined: Tue Mar 27, 2007 11:58 am
Location: Poznan, Poland
Name: Darek
Contact:

Re: Topic Solved

Post by daroPL »

I have a small suggestion for the MOD. I think the unresolve icon displayed by each post should be removed and be put next to the topic title.
Sorry if somebody has already reported that before.
Last edited by daroPL on Wed Jul 22, 2009 10:54 am, edited 2 times in total.
User avatar
DoYouSpeakWak
Registered User
Posts: 2310
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Contact:

Re: Topic Solved

Post by DoYouSpeakWak »

Hej Tumba25.

Thx for this great mod. I would love to install it, but i have a few questions first.

If i install the mod, turn it off, no topics have ever been marked as solved. Then i still get all the "View solved topics" etc on index and the search line in search.php. This makes no sense when the mod is turned off and no topics have ever been affected by this mod.

I know its equally strange to install a mod and then not use it, but on my sites opinions amoung the admins on what should be turned off or on can change very fast.

Its easy to make a group/user permission that can hide these. But it would not be connceted to the off swith in this mod.

Is there any easy way around this ?

DYSW
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid services. 10+ years of experience with phpBB3 and as System Administrator.
WastedJoker
Registered User
Posts: 74
Joined: Mon Nov 17, 2008 10:20 pm

Re: Topic Solved

Post by WastedJoker »

You could just edit the templates by excluding them.
Locked

Return to “[3.0.x] MOD Database Releases”