Bitcoin Forum

Other => Meta => Topic started by: 0x256 on June 03, 2020, 09:28:30 AM



Title: [css][stylus] I need help with this
Post by: 0x256 on June 03, 2020, 09:28:30 AM
During the past days I have been experimenting with changing the theme of the forum(stylus (https://github.com/openstyles/stylus/wiki)) only using CSS for learn
I encountered some problems, for example i can't Access and control Member ranks ( Newbie, Jr. Member, Member... ) Because of that Member ranks, Activity.. in html elements as a text nodes..

Does anyone have a suggestion to make this possible using css only  without using javascript ? :)

poster info html It seems like
Code:
<div class="smalltext">
    Member<br>
    <img src="https://bitcointalk.org/Themes/custom1/images/star.gif"....>
    <a href="https://bitcointalk.org/index.php?action=pm;sa=send;u=2680306"...></a>
    <br><br>
    Activity: 131<br>
    Merit: 79<br>
    Posts: 131<br><br>
</div>

Screenshot to show what I want to do
https://i.ibb.co/vsDhcBF/1.png  https://i.ibb.co/nzvqYXP/2.png


Title: Re: [css][stylus] I need help with this
Post by: Peanutswar on June 03, 2020, 10:39:03 AM
I think you should use the API of the bitcointalk forum because it is hardcoded if you use the CSS and HTML only.
The only API that i found on the platform are [C# / .NET] Unofficial Bitcointalk API - Get info from boards, topics and posts (https://bitcointalk.org/index.php?topic=1783893.0) & Unofficial Bitcoin Talk Forums API (https://bitcointalk.org/index.php?topic=154131.0)


Title: Re: [css][stylus] I need help with this
Post by: DdmrDdmr on June 03, 2020, 10:46:33 AM
<…>
The forum does not have an API, so that’s a dead end. Additionally, the referenced unofficial one dates back from 2013, and the user that created it has been inactive on the forum for over 2 years. Being the (unofficial) API site down, there not way that that is going to be of any use really.


Title: Re: [css][stylus] I need help with this
Post by: Peanutswar on June 03, 2020, 10:48:50 AM
<…>
The forum does not have an API, so that’s a dead end. Additionally, the referenced unofficial one dates back from 2013, and the user that created it has been inactive on the forum for over 2 years. Being the (unofficial) API site down, there not way that that is going to be of any use really.

Thank you for clarification it gives me an idea too.


Title: Re: [css][stylus] I need help with this
Post by: ABCbits on June 03, 2020, 12:02:29 PM
If you can use both JavaScript and Regex, you could use Regex to find exact position of member ranks, so you can get member ranks of the poster or even add CSS style within it (since you know start/end position of the member ranks).

Example with badly written regex.

Code:
<div class="smalltext">([A-Za-z ]+)<br>

I tested it on

Code:
<div class="smalltext">Member<br>
<div class="smalltext">Hero Member<br>


Title: Re: [css][stylus] I need help with this
Post by: 0x256 on June 08, 2020, 06:09:10 PM

There is a pseudo-element to select first line (:first-line) [ td.poster_info > :first-line ]
unfortunately there are limited properties work with The ::first-line pseudo-element I think there is no solution but to use JavaScript..
So I need Lock this topic., thank you all