Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the background of a topic when it is SOLVED #57

Open
cavive opened this issue Nov 11, 2016 · 1 comment
Open

How to change the background of a topic when it is SOLVED #57

cavive opened this issue Nov 11, 2016 · 1 comment

Comments

@cavive
Copy link

cavive commented Nov 11, 2016

How to make the background of a topic when it is SOLVED

like the attached file
topicsolve

@zavovi
Copy link

zavovi commented Mar 30, 2021

Hi, I solved it:

In file topicsolved/event/main_listener.php add these lines:

        if (!empty($topic_data['topic_solved']) && $topic_data['topic_solved'] == $event['row']['post_id'] &&
			$topic_data['topic_type'] != POST_GLOBAL)
		{
			$post_row['S_POST_SOLVED'] = 1;
        }

into this method "viewtopic_modify_post_row_button". Then, you can put this line:

<!-- IF postrow.S_POST_SOLVED --> solved<!-- ENDIF -->

into class param in file "styles/prosilver/template/viewtopic_body.html" like here:

<div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF --><!-- IF postrow.S_POST_SOLVED --> solved<!-- ENDIF -->">

On the end, you must add style to ".solved". I added to file "styles/prosilver/theme/colours.css" like this:

.solved {
    background-color: #D8FFD8 !important;
}

Example is on my forum: http://forum.zavavov.cz/nove-napady-f14/aktualni-verze-t6.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants