HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Styling ones Username

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#34218 (In Topic #7710)
Avatar

Well-settled

Is this pssible without editing PHP?

I would like to know if I can somehow stylize ones username with their usergroup. eg.

Code

[b]Admin[/b]
and the end result Kevinul without editing a .php file. Also, how do you recieve ones user avatar image in a side block? I've copied the ocf_member_bar.tpl(?) and pasted on my side_block, but it doesn't show. It says in Queries pages that the AVATAR didn't pass.

HEllo



Back to the top
 
Posted
Rating:
#34222
Avatar

Community saint

You should be able to use if tags in the template.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#34224
Avatar

Well-settled

Nope, tried. It either totally destroyed my layout, or didn't appear. The information isn't attaching to the database is what it seems to do.

HEllo



Back to the top
 
Posted
Rating:
#34225
Avatar

Community saint

It should work so what was the code you used?

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#34231

Non-joined user

I used the '[' and '<' brackets, it didn't work. Gave me an error message not to use them.

Back to the top
 
Posted
Rating:
#34232
Avatar

Community saint

I know it works cuz I did it on my test site.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#34256
Avatar

Well-settled

What did you do to make a username have style globaly? :|

HEllo



Back to the top
 
Posted
Rating:
#34293
Avatar

There's no single template or CSS style that shows usernames, so it's not possible to change it in all places easily. However, it can be changed in one go for a few places on the forum (includes users online). The template for this is 'OCF_USER_MEMBER'. There's some logic in that already for making 'highlighted names' that are in italics (this is a purchasable option in the point store).
To make everyone in group #3 bold you'd add this at the start of the template:

Code

{+START,IF,{$IS_IN_GROUP,!{$USER,{USERNAME}}\,3}}<strong>{+END}
and this at the end:

Code

{+START,IF,{$IS_IN_GROUP,!{$USER,{USERNAME}}\,3}}</strong>{+END}

I realise this is quite complex, but it works :).

For the avatar thing, I think I've mentioned it somewhere before. But basically, you can use {$AVATAR} in the BLOCK_SIDE_PERSONAL_STATS template like this…

Code

{+START,IF_NON_EMPTY,{$AVATAR}}
<img alt="" src="{$AVATAR*} />
{+END}


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#34308
Avatar

Community saint

Thats what I was thinking and did on my test site for this but was not sure how to post it. Thats why I said it can be done using the if command which was used in the same way I used it.

I run http://otakuplayground.com and am hopping to make themes and other things for ocportal even though I no longer use it for otakuplayground.com I still love it and feel it could go far with the right help. It needs themes and needs people to advertise for it.
Back to the top
 
Posted
Rating:
#34331
Avatar

Well-settled

The Personal Block was my idea at the start, but nothing is showing up. I guess I give up on that. :(

HEllo



Back to the top
 
Posted
Rating:
#34343
Avatar

I accidentally skipped a quote mark:

Code

{+START,IF_NON_EMPTY,{$AVATAR}}
<img alt="" src="{$AVATAR*}" />
{+END}


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: