Bitcoin Forum
November 13, 2024, 01:44:14 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [css][stylus] I need help with this  (Read 572 times)
0x256 (OP)
Sr. Member
****
Offline Offline

Activity: 338
Merit: 337


View Profile
June 03, 2020, 09:28:30 AM
Merited by OmegaStarScream (1)
 #1

During the past days I have been experimenting with changing the theme of the forum(stylus) 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 ? Smiley

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
 
Peanutswar
Legendary
*
Offline Offline

Activity: 1722
Merit: 1303


Top Crypto Casino


View Profile WWW
June 03, 2020, 10:39:03 AM
 #2

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 & Unofficial Bitcoin Talk Forums API

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
DdmrDdmr
Legendary
*
Offline Offline

Activity: 2492
Merit: 11050


There are lies, damned lies and statistics. MTwain


View Profile WWW
June 03, 2020, 10:46:33 AM
Merited by OmegaStarScream (1), Peanutswar (1)
 #3

<…>
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.
Peanutswar
Legendary
*
Offline Offline

Activity: 1722
Merit: 1303


Top Crypto Casino


View Profile WWW
June 03, 2020, 10:48:50 AM
 #4

<…>
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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 3052
Merit: 8079


Crypto Swap Exchange


View Profile
June 03, 2020, 12:02:29 PM
Merited by 0x256 (1)
 #5

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>

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
0x256 (OP)
Sr. Member
****
Offline Offline

Activity: 338
Merit: 337


View Profile
June 08, 2020, 06:09:10 PM
 #6


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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!