Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
153 views
in Plugins by

I have to style the user history (plugin here).

Example: http://www.gute-mathe-fragen.de/user/Sanusha?tab=history

However, there is only the following for CSS:

body.qa-template-user table.qa-form-wide-table

I can assign a style to that → but it will be globally and will also be valid for the /user/ profile!

I just need to style this specific table. Looking through the plugin source, I see that it uses the built-in functions to output the plugin html code. So there is no html identifier.

In qa-history-layer.php I tried to assign an ID like that:

        return array(                
            'id' => 'qa-user-history-main', // added
            'style' => 'wide',
            'title' => qa_opt('user_act_list_title'),
            'fields'=> $fields,
        );

but it is not working.

Any help appreciated.

 

PS: @NoahY q2a-history is still a fork of user-activity-plus. As it is a fork nobody can assign "issues" in github.

1 Answer

0 votes
by
edited by

Here we go, we have to use the tags parameter:

return array(                
    'style' => 'wide',
    'title' => qa_opt('user_act_list_title'),
    'fields'=> $fields,
    'tags' => 'id="qa-user-history-main"',
);
 

Sideeffect: This transforms the outer table which holds the "real" table into a FORM.

...