C07025 - Colored Tripcodes

C07025 - Colored Tripcodes
hmmy Monday 28th August 2017, 01:08:06

Hi All, 

This will allow trips to be colored by the trip combination. Feel free to tweak, edit or create plugin -- I am not familiar with programming or php.  

Open file /lib/HTMLFORM.lib.php
Replace public static function trip($name, $id) starting on line 55 with:

public static function trip($name, $id)
{
global $config;
if ($name === '')
{
return '<span style="color:#'.substr($id, -6).'">'.substr($id, -6).'</span>';
}
else
{
$parts = explode('#', $name, 2);
$salt = md5($config['salt'].$parts[1]);
return  $parts[0].(isset($parts[1])? '<span style="color:#'.substr(md5($parts[1]), -6).';">' .substr(md5($parts[1]), -6)  : '<span>');
return '</span>';
}
}


Picture of it in action on heavily modified goobbs script.
image

Last modified by hmmy on Sunday 24th September 2017, 18:45:00

Replies 4
Fred
Fred  Monday 28th August 2017, 08:05:00

Hi hmmy,
Did you download the latest version of Flatboard?
Because you can now denominate a user 'verified' is therefore modify the complete aspect.
Furthermore we already uses a class for guests, moderators and administrator.
Your idea is not bad, but there may be similarities colors, hardly distinguishable

Last modified by Fred on Monday 28th August 2017, 08:07:00
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

hmmy  Monday 28th August 2017, 08:54:28

i use this in a blog posting projects (goo, not flatboard).   I post as anon and have it set to admin only posting.  

Always thoufht colores trips trips were neat so decided to. Share.  

Fred
Fred  Monday 28th August 2017, 13:39:34

Ok but why do not you use Flatboard, goo is obsolete...
Thanks for sharing, but the modification of the core remains risky if you update your forum.
  • Before ask a question, read the documentation.
  • 🎉  Featured as #1 product of the day on Product Hunt
  • Please like in alternativeto.net 👍🏻
  • ╰☆╮Flatboard╰☆╮ is a open source and community contributions are essential to project success!
  • <TextField>, my new CMS project designed by a passionate developer, for developers!
  • My last project Fast⚡︎CMS, a Flat-File cms.
  • I am currently busy 😫.

hmmy 🐝  Monday 28th August 2017, 16:08:55

Main reason would be ratings. I post photos of projects and have commented out replies so I rely on rating for feedback. I thought about changing the report feature to a meathod of feedback, but still perfer rating.

I'm a huge fan of FB though... Been around before v0.7.1

Last modified by hmmy 🐝 on Monday 28th August 2017, 20:27:00