Single topic doesn't have a class
Quote from george33 on June 17, 2020, 4:45 pmHi @asgaros
Thank you for this useful forum plugin! I tested it and it works very well.
My problem is that I can’t use it for the purpose I want because I can’t find a class to customize single topics.
Details: I use a sidebar (#secondary) and I want to remove it only for single topics and make #primary wider to give my users more space. Now the forum is good for small talks, that is for chat-like discussions. If you want to write a big story (users will change travel experiences and other) it is not comfortable. Even youtube videos look ugly because the primary section is narrow.
My site has many other activities and I don’t want to change the whole site width because this causes a lot of other problems.
Can we insert a class somewhere to resolve the problem, perhaps in /wp-content/plugins/asgaros-forum/includes/views/topic.php ?
With something like .asgaros-topic I would resolve the problem in this way:
.asgaros-topic #secondary {display:none;} .asgaros-topic #primary {width:100%}Thanks in advance!
Hi @asgaros
Thank you for this useful forum plugin! I tested it and it works very well.
My problem is that I can’t use it for the purpose I want because I can’t find a class to customize single topics.
Details: I use a sidebar (#secondary) and I want to remove it only for single topics and make #primary wider to give my users more space. Now the forum is good for small talks, that is for chat-like discussions. If you want to write a big story (users will change travel experiences and other) it is not comfortable. Even youtube videos look ugly because the primary section is narrow.
My site has many other activities and I don’t want to change the whole site width because this causes a lot of other problems.
Can we insert a class somewhere to resolve the problem, perhaps in /wp-content/plugins/asgaros-forum/includes/views/topic.php ?
With something like .asgaros-topic I would resolve the problem in this way:
.asgaros-topic #secondary {display:none;}
.asgaros-topic #primary {width:100%}
Thanks in advance!
Quote from qualmy91 on June 18, 2020, 4:32 amHey @george33,
can you please send a screenshot to show exactly where you want to add this class. Did you add your sidebar inside of the forum wrapper? Because your given CSS style would not work if it is outside.
It would be also helpful to send a link to the forum.
Hey @george33,
can you please send a screenshot to show exactly where you want to add this class. Did you add your sidebar inside of the forum wrapper? Because your given CSS style would not work if it is outside.
It would be also helpful to send a link to the forum.
Quote from george33 on June 18, 2020, 4:05 pmHi @qualmy91 and thanks for your reply.
I use the twentyseventeen theme and I didn’t modify the #content.site-content .wrap whose max-width is 1000px. So with the sidebar the #primary gets really narrow, but it is convenient for the rest of the site.
I added the sidebar at the end of page.php screenshot
I didn’t add a class for topics, because I don’t know where to add it. I tried with /wp-content/plugins/asgaros-forum/includes/views/topic.php but I don’t know how to do it the right way.
Putting a link to my forum doesn’t help because the site is private. So here are two screenshots:
Thanks again for your time!
Hi @qualmy91 and thanks for your reply.
I use the twentyseventeen theme and I didn’t modify the #content.site-content .wrap whose max-width is 1000px. So with the sidebar the #primary gets really narrow, but it is convenient for the rest of the site.
I added the sidebar at the end of page.php screenshot
I didn’t add a class for topics, because I don’t know where to add it. I tried with /wp-content/plugins/asgaros-forum/includes/views/topic.php but I don’t know how to do it the right way.
Putting a link to my forum doesn’t help because the site is private. So here are two screenshots:
Thanks again for your time!
Quote from qualmy91 on June 19, 2020, 4:13 amHey @george33,
the problem is that your sidebar is outside of the Asgaros Forum which is always inside of a div container:
<div id="af-wrapper"> // Asgaros Forum </div>So even if there is a class for the topic it’s not possible to address the
#primaryor#secondaryselector.
Hey @george33,
the problem is that your sidebar is outside of the Asgaros Forum which is always inside of a div container:
<div id="af-wrapper"> // Asgaros Forum </div>
So even if there is a class for the topic it’s not possible to address the #primary or #secondary selector.
Quote from george33 on June 19, 2020, 8:15 pmQuote from qualmy91 on June 19, 2020, 4:13 amHey @george33,
the problem is that your sidebar is outside of the Asgaros Forum which is always inside of a div container:
<div id="af-wrapper"> // Asgaros Forum </div>So even if there is a class for the topic it’s not possible to address the
#primary#primary or#secondary#secondary selector.
OK, I see now how it works. I was using bbpress which has selectors at “body” level for practically anything and I was expecting something similar. Never mind, I will find a workaround by reducing the padding of #content.site-content .wrap of the theme. Thanks again!
Quote from qualmy91 on June 19, 2020, 4:13 amHey @george33,
the problem is that your sidebar is outside of the Asgaros Forum which is always inside of a div container:
<div id="af-wrapper"> // Asgaros Forum </div>So even if there is a class for the topic it’s not possible to address the
#primary#primary or#secondary#secondary selector.
OK, I see now how it works. I was using bbpress which has selectors at “body” level for practically anything and I was expecting something similar. Never mind, I will find a workaround by reducing the padding of #content.site-content .wrap of the theme. Thanks again!
Quote from qualmy91 on June 20, 2020, 6:12 amHey @george33,
sorry for my short reply yesterday – I was really busy.
To implement the functionality you wanted, a small change in the code of Asgaros Forum was necessary. I have changed that now and am waiting for a review and approval from Thomas (@asgaros). If all goes well the change should be included in the next update of Asgaros Forum.
With this change all pages of the forum would have the classes asgaros-forum and asgaros-forum-{name_of_view} in the body tag. So you have the possibility to realize every change you want for every different view. In your case it would be the class
.asgaros-forum-topic.Pull Request at GitHub:
https://github.com/Asgaros/asgaros-forum/pull/270/
Hey @george33,
sorry for my short reply yesterday – I was really busy.
To implement the functionality you wanted, a small change in the code of Asgaros Forum was necessary. I have changed that now and am waiting for a review and approval from Thomas (@asgaros). If all goes well the change should be included in the next update of Asgaros Forum.
With this change all pages of the forum would have the classes asgaros-forum and asgaros-forum-{name_of_view} in the body tag. So you have the possibility to realize every change you want for every different view. In your case it would be the class .asgaros-forum-topic .
Pull Request at GitHub:
https://github.com/Asgaros/asgaros-forum/pull/270/
Quote from george33 on June 20, 2020, 9:12 amOh, it would be wonderful, if these classes are included. Thank you very much @qualmy91 and @asgaros
Oh, it would be wonderful, if these classes are included. Thank you very much @qualmy91 and @asgaros
Quote from Asgaros on June 29, 2020, 3:58 amHello @qualmy91 @george33
I just merged the pull-request into the dev-version. It will be included in the upcoming update soon! 🙂
I just merged the pull-request into the dev-version. It will be included in the upcoming update soon! 🙂
