The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Glowcode/shadowcode for a username group, not working

3 posters

Go down

In progress Glowcode/shadowcode for a username group, not working

Post by medusa June 11th 2015, 4:18 pm

Halloooo everyone ^^
I have tried to follow this turtorial
https://help.forumotion.com/t96136-group-s-style-on-legend-glitter-icon-glow

But I cannot get it to work.

My code is
Code:
a[href="/g16-first-class"] {
    text-shadow:3px -1px 10px #ebe2eb;
}

Where I want to have a white glow behind this Group's usernames.

So I do not know what I have done wrongly since it is not working
medusa
medusa
Forumember

Female Posts : 52
Reputation : 1
Language : Danish, English
Location : Denmark

http://newworld.danskforum.net

Back to top Go down

In progress Re: Glowcode/shadowcode for a username group, not working

Post by SLGray June 11th 2015, 9:05 pm

Do you mean the group name or the usernames of the members in the group?  The tutorial is for the group's name only.

Group Member Usernames:  https://help.forumotion.com/t131443-customize-usernames-according-to-group#881088


Glowcode/shadowcode for a username group, not working Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51464
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Glowcode/shadowcode for a username group, not working

Post by medusa June 11th 2015, 9:38 pm

Oohh I see. Silly me Smile

Well I got it to work Smile The main problem is, and I do not know what the solution is for my plan.

My forum is a RPG forum where people are divided in different colored groups which represents their race like werewolf, human and such. Then I have groups for people who have a special rank, where the rank group do not color the users because the group is places lowest on the grouplist.

Is there a way where I can give a gloweffect to all users in a group which isn't their maincolor?

Here is my "mixed" lowest listed group
http://newworld.danskforum.net/g16-first-class
As you can see one of the users has a shadoweffect but that is only because that person isn't in any other groups. I want to be able to give all of these users the gloweffect.


And if that cannot be done, is there anyone who knows a code, just like the floating rainbowcode for username, where you have to manually write which users are going to have this effect or not?
because I do not know java that well to be able to write a targeted username effect.



Is there a way of my targeting a group which users are in but , so even though the maincolor of the leaders are different because of their races(their other groups)
medusa
medusa
Forumember

Female Posts : 52
Reputation : 1
Language : Danish, English
Location : Denmark

http://newworld.danskforum.net

Back to top Go down

In progress Re: Glowcode/shadowcode for a username group, not working

Post by Ange Tuteur June 11th 2015, 11:41 pm

You could create an array with the user Ids of the members who are in the group. Here's a quick example I wrote up with the usergroup you linked :
( Apply this in JavaScript codes management; in all the pages )
Code:
$(function() {
  var groupClass = 'usergroup_first-class',
      user = ['u1', 'u3', 'u4', 'u5', 'u11', 'u12', 'u22', 'u25', 'u43', 'u55', 'u63', 'u67', 'u75', 'u86', 'u88', 'u94', 'u101', 'u167', 'u289', 'u298'],
      a = document.getElementsByTagName('A'),
      i = 0,
      j = a.length,
      k,
      l = user.length;
 
  for (; i < j; i++) for (k = 0; k < l; k++) if (a[i].href.replace(/.*?\/(u\d+)/, '$1') == user[k]) a[i].className += ' ' + groupClass;
});

There's two things you should modify :

1. groupClass this is a string of text which represents the CSS classname added to the users of the group. You can use this class in CSS to style the users. Here's an example for the script above :
( This will go in the CSS stylesheet )
Code:
.usergroup_first-class {
  text-shadow:0 0 2px #FF0;
}

2. user is an array that contains the user ids of the members. As you can see, multiple ids are separated by a comma.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Glowcode/shadowcode for a username group, not working

Post by medusa June 12th 2015, 9:04 pm

Many thanks, the code works perfectly ^^

but... yes there is always a but XD sorry for that!.... (I know it is now a little bit different from my early request)
me and my admin team have found out that we need a username effect system which is more complicated than this and no longer only affecting groups.

what is the java code for targeting specific users just like your code, just without the grouppart?
I'm totally noob at java but I can see that the floating rainbowcode uses this to target users
Code:
        var selectMe= ["u1","u25","u10","u167"];
instead of
Code:
  var groupClass = 'usergroup_first-class',
      user = ['u1',
 'u3', 'u4', 'u5', 'u11', 'u12', 'u22', 'u25', 'u43', 'u55', 'u63',
'u67', 'u75', 'u86', 'u88', 'u94', 'u101', 'u167', 'u289', 'u298'],

So is there a way to rewrite that to only target specific users or? Smile
medusa
medusa
Forumember

Female Posts : 52
Reputation : 1
Language : Danish, English
Location : Denmark

http://newworld.danskforum.net

Back to top Go down

In progress Re: Glowcode/shadowcode for a username group, not working

Post by Ange Tuteur June 13th 2015, 3:01 am

This should be what you're looking for, if you're wanting to modify individual members.
https://help.forumotion.com/t140463-script-to-change-several-usernames-color#955045
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top


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