FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 20 users online :: 0 Registered, 0 Hidden and 20 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[SOLVED] Custom color posts for staff members

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Thu 21 Jul 2016, 22:29

I noticed that on this forum different staff members have different colored bars on top of their posts
Ex: xxx | xxx | xxx

I know that this is doable using the tutorial/thread that was already posted: Here
This is doable according to Groups (Admin, Mod, Designer, etc) but I was wondering if there's a way to get specific staff members to each have their own colored post.

For example, on my forum (which is version phpBB2), my staff tag is a pink Admin tag and I would like to have a pink bar on my post to match it. But then the other 2 Admins that we have on the forum have a mint Admin tag, and a purple Admin tag and they also want their post colors to match their tags. Would this be doable? Or can it only be done according to groups?

Also posted the thread here


Last edited by Valoish on Tue 26 Jul 2016, 10:51; edited 2 times in total
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Thu 21 Jul 2016, 22:30

@Ange Tuteur, I'd love your help whenever you have the time c:
SLGray
SLGray
Valued Member
Gender : Male
Age : 51
Posts : 2465
Points : 7345
Reputation : 290
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray Thu 21 Jul 2016, 22:42

I see that you read my reply on the support forum.
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Thu 21 Jul 2016, 22:47

Yup! Thank you for telling me about this forum as well. [SOLVED] Custom color posts for staff members 1f600
SLGray
SLGray
Valued Member
Gender : Male
Age : 51
Posts : 2465
Points : 7345
Reputation : 290
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : ModernBB
http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray Thu 21 Jul 2016, 22:48

You're welcome.  Ange Tuteur exactly helped create the support forum's theme.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Thu 21 Jul 2016, 22:57

Hi @Valoish and welcome to FM Design ! Smile

Yes, what you're asking for is absolutely possible. If it's alright with you, I'll write up a script tomorrow to do what you're requesting. I'm going to bed soon, and if I start coding now I probably wont be going to bed at all -- I get carried away like that. xD

Have a good night, and see you tomorrow. Bye
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Thu 21 Jul 2016, 23:00

Thanks @Ange Tuteur!

Awesome, that's great to hear~ And that's perfectly fine, I don't mind waiting at all. c: I know the feeling about coding LOL. I get that way with Graphic/Web Design and sometimes Web Development so I totally get it.

You too! And thanks again for taking a look at my topic so quickly. ^^
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 10:55

@Valoish good morning,

I put together a script which will add a unique class to each post based on the member's id. To install it, go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.

Placement : In the topics
Paste the content below and save the newly created script.
Code:
$(function() {
  for (var a = $('.name'), i = 0, j = a.length, link; i < j; i++) {
    link = $('a[href^="/u"]', a[i])[0];

    if (link) {
      $(a[i]).closest('.post').addClass('u' + link.href.replace(/.*?u(\d+).*/, '$1') + '_post');
    }
  }
});

Once this is installed, all posts should now have a unique class name like this : .u{ID}_post

Where {ID} is the user's id. For example, my user id is "1" so my posts will have the class .u1_post, which allows me to style my post individually with CSS. I'll give you an example rule using your user id on your forum. Add this rule to your stylesheet :
Display > Colors > CSS stylesheet
Code:
.u132_post > td {
  border-top:12px solid pink;
}
It should add a pink border above your post that's 12 pixels solid.

If you don't know where to find a user's id, go to their profile page and look at the address bar. The user's id will be directly after the "u" :
[SOLVED] Custom color posts for staff members Captur18
You can also see it in the URL preview in the bottom left ( or right ) when you hover over the direct user link.


If you have any questions let me know. Doff
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 11:11

@Ange Tuteur Good morning c:

Gonna give this a try now and let you know if I run into any issues. ^^

Thank you~
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 11:20

No changes ; A;
I made a new JS file called "Colored Posts"
[SOLVED] Custom color posts for staff members Fe34ce9fc05644908e1cb8ce4d258d0e

Then I added the CSS you provided and pasted it at the bottom of my forum's CSS file but there was no change. I tried pasting the CSS at the very top but still nothing changed ><
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 11:24

I just checked the console on your forum and I noticed an error which may be blocking the new script I gave you. Try editing... "Toolbar BG Test" and see if it has the following content ( or similar to it ) :
Code:
#fa_share{display:none!important}#fa_toolbar,#fa_toolbar_hidden{background:url('http://i.imgur.com/JIAW2JG.png')}

If it does, delete that script and add the contents to the stylesheet, if you want. It's CSS which is why it's causing an error in JS codes management.
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 12:06

@Ange Tuteur Deleted that JS page since we didn't need it anymore but still nothing.. :I
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 12:56

@Valoish, sorry for the late reply, but we're getting there ! Unfortunately I found another error. Check the "No Share" script to see if it has this content :
Code:
#fa_share{display:none!important}
If it does, delete that as well, and add it to the stylesheet instead if you want. Wink

Hopefully after that all the errors will be cleared up and the script I gave you will work. Yes
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 13:01

@Ange Tuteur No worries~ I tried that as well but still nothing x_x
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 13:07

Getting closer, just a little more it looks like. lol!

Check one of the topic icon scripts for these texts and delete them :
Code:
This will add an extra field below the description field for URLs+it will also parse the icons in the topic list.
I think someone accidentally copied them when pasting a script.
Pantone
Pantone

Gender : Female
Age : 31
Posts : 490
Points : 3654
Reputation : 59
Location : Indianapolis - IN
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://canvasforums.com https://twitter.com/@HaeDoesGraphics https://pinterest.com/HaeDoesGraphics

PostPantone Fri 22 Jul 2016, 13:26

^ Updated that bit, I am working with @Valoish on our forum.
LOL. I left the text in there from earlier this week. #^_^# Sorry!

Still not seeing pink, sadly. ;.;
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 13:31

@HaeDoesGraphics hey welcome ! Smile

I think we're on the final boss, do you have a script like this in JS codes management ?
Code:
$(document).ready(function() {
  $.getScript('https://raw.github.com/lokesh/lightbox2/master/js/lightbox.js')
});
$(function() {
  $('input[name="description"]').change(function() {
    var ValidFileExtension = ['jpg', 'JPG', 'jpeg', 'JPEG', 'png', 'PNG', 'gif', 'GIF', 'bmp', 'BMP'];
    if ($.inArray($(this).val().split('.').pop().toLowerCase(), ValidFileExtension) == -1) {
      alert("Sorry, the allowed file extensions are: '.jpeg','.jpg', '.png', '.gif', '.bmp'")
    }
  })
})

If so, at the very end of the script add a semi-colon : ; because it's missing one and seems to be conflicting with a script after it.

Semi-colons are like periods in a sentence, in programming. If you miss one everything explodes. affraid
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 13:44

Hai @HaeDoesGraphics <3
@Ange Tuteur You are honestly a genius! It works now! [SOLVED] Custom color posts for staff members 1f603
Just one tiny last thing before this thread is 100% resolved;
There's a little white line between the member details box and the member post
[SOLVED] Custom color posts for staff members F063cc4574324ded96f813b45b956ebf
I have a feeling this can be solved using CSS, but I'd rather not mess with the code before I break something ; A;
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 13:51

HUZZAH ! Debugger XP +50 Cool

Those lines are "border-spacing" in the table layout. You can remove them globally with this css rule :
Code:
.forumline { border-spacing:0; }

They can commonly be mistaken for borders when there's a background behind the table cells. So it's a good thing to know when working with tables. Smile
Pantone
Pantone

Gender : Female
Age : 31
Posts : 490
Points : 3654
Reputation : 59
Location : Indianapolis - IN
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://canvasforums.com https://twitter.com/@HaeDoesGraphics https://pinterest.com/HaeDoesGraphics

PostPantone Fri 22 Jul 2016, 13:55

That worked! YEA!

[SOLVED] Custom color posts for staff members Giphy
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Fri 22 Jul 2016, 13:59

@Ange Tuteur More like Debugger XP +100 LOL.
And it's all perfect now~!
[SOLVED] Custom color posts for staff members 179df5e2161f47ceaa7cc3714f2c5611
Thank you so much for all your help! Both @HaeDoesGraphics and I really appreciate it. ^^
I'll play around with the colors, and possibly other attributes as well, to see what can and can't be added in.

Edit; That gif is her in real life right now, I'm sure LOL.
Pantone
Pantone

Gender : Female
Age : 31
Posts : 490
Points : 3654
Reputation : 59
Location : Indianapolis - IN
Language : English
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://canvasforums.com https://twitter.com/@HaeDoesGraphics https://pinterest.com/HaeDoesGraphics

PostPantone Fri 22 Jul 2016, 14:07

This is me in RL for sure, yes. Just in an office chair. LOL.
Thank you for your extended help with out little forum!
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12253
Reputation : 2376
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Fri 22 Jul 2016, 14:14

Haha lol!

You're welcome, if you have anymore problems / questions feel free to let me know. Wink
jessy
jessy

Gender : Female
Posts : 102
Points : 3349
Reputation : 14
Language : italy
Browser : Browser : Google Chrome Forum Version : Forum Version : Invision
http://ilgiornaledibordo.forumattivo.com/

Postjessy Fri 22 Jul 2016, 16:09

you can do to invision ?
Valoish
Valoish
Graphic Designer
Gender : Female
Age : 28
Posts : 3671
Points : 7358
Reputation : 360
Location : NYC
Language : English, Russian, Hebrew
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB2
http://www.canvasforums.com https://twitter.com/Valoishx3

PostValoish Tue 26 Jul 2016, 10:45

@Ange Tuteur Seems like there's more questions for this topic LOL
Sponsored content

PostSponsored content

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum