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.


Default Avatar

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#35061 (In Topic #7930)
Joe
Avatar

Honoured member

I installed a default avatar mod for IPB which gives users who didn't select their own avatar a default one. I figured ocPortal would show the default avatar, as I edited the SIDE_PERSONAL_STATS.tpl template to show the users avatar, but unfortunately it doesn't. Is there any possible way I could make ocPortal display the users default avatar?

Back to the top
 
Posted
Rating:
#35071
Avatar

I'm sure you could do something (very roughly) like…

Code

{+START,IF_EMPTY,{AVATAR}}
<img src="(put url to default avatar)">
{+END}
{+START,IF_NON_EMPTY,{AVATAR}}
(whatever code you had before)
{+END}

That's not correct code because I can't remember what your SIDE_PERSONAL_STATS template looks like. Replace '{AVATAR}' with whatever bit of Tempcode refers to the avatar URL.


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:
#35089
Joe
Avatar

Honoured member

It worked. Thanks. :)

Back to the top
 
Posted
Rating:
#35376
Joe
Avatar

Honoured member

I had this all implemented into the block, but I just noticed it was no longer there. I could've accidentally removed the code, but I'm having quite a bit of trouble getting it to work again. Can you tell me if there's any possible error in my code?

Code

{+START,BOX,{USERNAME*},13.3em,panel}
   {+START,IF_EMPTY,{$AVATAR}}
      <div class="ocf_member_column ocf_member_column_a">
      <center><img class="blend" alt="{!AVATAR}" src="http://www.sims2source.net/default_avatar.png" /></center>
      </div><br />
   {+END}
   {+START,IF_NON_EMPTY,{$AVATAR}}
      <div class="ocf_member_column ocf_member_column_a">
      <center><img class="blend" alt="{!AVATAR}" src="{$AVATAR*}" /></center>
      </div><br />
   {+END}

   <center>{CONTENT}</center><br />
   <div class="community_block_tagline">
      {LINKS}
   </div>
{+END}

Back to the top
 
Posted
Rating:
#35377
Avatar

Community saint

Looks ok to me.

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:
#35378
Joe
Avatar

Honoured member

LOL. Sorry! :)

The URL was wrong (the default avatar is in the images directory), and because I'm using Firefox, it didn't appear to be broken. :P

Back to the top
 
Posted
Rating:
#35379
Avatar

Community saint

ah explains why it looked fine to me.
I just figured you had the avvy in the root folder.

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
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: