• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community Rules & Requests Site & Forum Feedback
« Previous 1 … 5 6 7 8 9 … 49 Next »
bbcode for reputation

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

Poll: implement this
You do not have permission to vote in this poll.
y
100.00%
13 100.00%
n
0%
0 0%
Total 13 vote(s) 100%
* You voted for this item. [Show Results]

bbcode for reputation
Offline Corile
05-11-2016, 09:17 AM, (This post was last modified: 05-11-2016, 05:31 PM by Corile.)
#1
C::iemka pl
Posts: 3,248
Threads: 267
Joined: Apr 2014

Wrote this in an hour at school. Currently only works on chrome because I couldn't be bothered to do vendor prefixes yet. Added vendor prefixes.

http://discotest.netai.net/showthread.php?tid=1

If anyone can write safe mybb regexes I'm done with regexes so this can be implemented here without much effort.

EDIT:
Okay, it's done. It's not the most elegant solution possible, because of how bbcode in MyBB works (and I can't use javascript in any reasonable way) so the user experience of this bbcode is, shall we say, slightly lacking. It works, however, and that's what counts.

Usage:
Code:
[rep=$1,$2]$3,$4,$5,$6[/rep]

$1 [0-100] - the width percentage of the first gradient break.
$2 [0-100] - the width percentage of the second gradient break.

$3 [#COL, #COLOUR, transparent] - the colour of the first anchor of the first gradient.
$4 [#COL, #COLOUR, transparent] - the colour of the second anchor of the first gradient.
$5 [#COL, #COLOUR, transparent] - the colour of the first anchor of the second gradient.
$6 [#COL, #COLOUR, transparent] - the colour of the second anchor of the second gradient.

Mind the gaps, spaces aren't allowed anywhere. This sounds complicated but believe me, it's the easiest it could have been.

Usage examples/templates:
Code:
[rep=50,100]transparent,transparent,#fff,#0c0[/rep]
+1 - allied.

Code:
[rep=50,75]transparent,transparent,#fff,#0c0[/rep]
+0.5 - friendly

Code:
[rep=50,50]#fff,#fff,#fff,#fff[/rep]
0 - neutral, empty bar.

Code:
[rep=0,50]#ff69b4,#fff,transparent,transparent[/rep]
-1 - full hostile in hot pink, for some reason.

[+]FOR ADMINS - IMPLEMENTATION
Title: Reputation Bar
Description: Adds a reputation bar.
Regular expression:
Code:
\[rep=([0-9]{1,3}),([0-9]{1,3})\]([\w\#]{4,11}),([\w\#]{4,11}),([\w\#]{4,11}),([\w\#]{4,11})\[\/rep\]

Replacement:
Code:
<table style="border-collapse: collapse; width: 242px; height: 16px; background-color: $1; background: -webkit-linear-gradient(left, transparent 0%, transparent $1%, $3 $1%, $4 50%, $5 50%, $6 $2%, transparent $2%, transparent 100%); background: -moz-linear-gradient(left, transparent 0%, transparent $1%, $3 $1%, $4 50%, $5 50%, $6 $2%, transparent $2%, transparent 100%); background: -o-linear-gradient(left, transparent 0%, transparent $1%, $3 $1%, $4 50%, $5 50%, $6 $2%, transparent $2%, transparent 100%);" cellspacing=1 cellpadding=0>
  <tr style="margin: 0; padding: 0">
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <td style="width: 5%; box-sizing: border-box; border: 1px solid #222; background: none"></td>
    <!--Protégé is a pretty cool guy, eh makes bbcode and doesnt afraid of anything-->
  </tr>
</table>

Enabled: Yes
Parse order: 0




Reflections on the Revolution in Gallia
Custodi // High City of Heraklion // The Cult of Archangels
Log Filter // Post Creator // Manhattan
  Reply  
Offline Corile
05-11-2016, 07:47 PM, (This post was last modified: 05-11-2016, 07:48 PM by Corile.)
#2
C::iemka pl
Posts: 3,248
Threads: 267
Joined: Apr 2014

Bump since finished. I added a poll, feel free to vote.




Reflections on the Revolution in Gallia
Custodi // High City of Heraklion // The Cult of Archangels
Log Filter // Post Creator // Manhattan
  Reply  
Offline Thyrzul
05-11-2016, 08:30 PM,
#3
The Council
Posts: 4,684
Threads: 115
Joined: Sep 2011

Looks really nice, though I'm unfamiliar with this implementation template, could you explain me what those in the ([]{}) brackets exactly mean and what in the regular expression refers to what part of the replacement? Thanks.

[Image: OFPpYpb.png][Image: N1Zf8K4.png][Image: LnLbhul.png]
Reply  
Offline Corile
05-11-2016, 08:32 PM,
#4
C::iemka pl
Posts: 3,248
Threads: 267
Joined: Apr 2014

(05-11-2016, 08:30 PM)Thyrzul Wrote: Looks really nice, though I'm unfamiliar with this implementation template, could you explain me what those in the ([]{}) brackets exactly mean and what in the regular expression refers to what part of the replacement? Thanks.
http://regexr.com/3ddcu




Reflections on the Revolution in Gallia
Custodi // High City of Heraklion // The Cult of Archangels
Log Filter // Post Creator // Manhattan
  Reply  
Offline Thyrzul
05-11-2016, 08:43 PM, (This post was last modified: 05-11-2016, 08:44 PM by Thyrzul.)
#5
The Council
Posts: 4,684
Threads: 115
Joined: Sep 2011

Wow, thank you. Now one more question, do the expressions from $1 to $6 indeed mean the parameters from 1 to 6 in the order they were typed in, like how I suspect them to be?

[Image: OFPpYpb.png][Image: N1Zf8K4.png][Image: LnLbhul.png]
Reply  
Offline Corile
05-11-2016, 08:44 PM,
#6
C::iemka pl
Posts: 3,248
Threads: 267
Joined: Apr 2014

Yes.

123




Reflections on the Revolution in Gallia
Custodi // High City of Heraklion // The Cult of Archangels
Log Filter // Post Creator // Manhattan
  Reply  
Offline Thyrzul
05-11-2016, 08:46 PM,
#7
The Council
Posts: 4,684
Threads: 115
Joined: Sep 2011

Thank you.

[Image: OFPpYpb.png][Image: N1Zf8K4.png][Image: LnLbhul.png]
Reply  
Offline Corile
05-12-2016, 07:41 PM,
#8
C::iemka pl
Posts: 3,248
Threads: 267
Joined: Apr 2014

No other opinions, seriously?




Reflections on the Revolution in Gallia
Custodi // High City of Heraklion // The Cult of Archangels
Log Filter // Post Creator // Manhattan
  Reply  
Offline Mr.Badger
05-12-2016, 07:51 PM,
#9
Member
Posts: 263
Threads: 16
Joined: Nov 2015

GIB IT, Implement this... looks really nice Smile

+1

[Image: redon.gif]
[Image: f0D5b.png][Image: O2Zu5.png][Image: IlS2I.png][Image: yNeaK.png][Image: 9zbjr.png][Image: D7RGg.png]
Any questions or concerns about Bowex), just send me a private message.
Reply  
Offline HassLHoFF™
05-12-2016, 08:16 PM,
#10
Member
Posts: 1,064
Threads: 80
Joined: Jun 2012

easy vote...as only positives for this.

[Image: xwkBvsU.png]
Information and Feedback - Recruitment


[Image: q5x9eiN.png]
Information - Feedback
Reply  


  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2026 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode