Calling up user icon.

ℋunni at 22h53
13
Jan
2012
Running: Invisionfree

So! For the Log In widget, I've seen that it recalls a few things such as the account username + assigned group color, the amount of posts logged, a tally on Unread/Stored Private Messages, and most importantly, being able to call up the assigned account icon. I'd like to know how to do this and place it, for example, in the Homepage Announcement as a customized welcome back message (since I don't user a Sidebar).

I'd love to know to call up their icon. <3 I'd also like to know, is there any way to make the Homepage Announcement Box (and its content) appear to members only and not guests?
1 kirk, on 14/01/2012 at 00h18
Only members can see content in the homepage message.
Now if you had the homepage announcement activated then all members and guest would see that.
Homepage Announcement = All guest and member
Homepage Message = Only Members that are logged in

As far as the first part of your inquiry. I do not now what you mean?
Can you please explain to something we can understand better.
Thanx Smile
2 ℋunni, on 14/01/2012 at 01h39
Right! As of right now, I'm using the Homepage Announcement box, and I'd like to know if there's a coding or Script to keep it and its content hidden until someone logs in. That is, if you're a guest on the site, the box and everything inside of it doesn't visually exist.

What I mean is how the Log-In widget allows you to see your account's icon RIGHT THERE in the widget. I'd like to know how to do the same, out of a widget.
3 ℋunni, on 15/01/2012 at 05h05
Bump <3.
4 ℋunni, on 16/01/2012 at 06h46
Bump!
5 ElMuggs, on 17/01/2012 at 03h55
You should be able to display the users icon on any html part of the forum by just using:

Code:
{USERNAME_AVATAR}

Where you want it to appear.

Hope that helps Smile
6 ℋunni, on 17/01/2012 at 18h17
Makes sense but it didn't go through. All it comes out as is {USERNAME_AVATAR}.
It's placed in the Announcement box and the other tags that call up your username and such work fine.

Code:
<div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Rules</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png">
</div></div>




<div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><img src="http://i705.photobucket.com/albums/ww58/Fall0utG3rl/Icons/th3c343dae.png"></div> Welcome back, <b>Using php in posts is called being a smart [Language]... Stop it</b> <i>!</i><br>Would you like to <a href="/profile?mode=editprofile">view your profile?</a><br>Would you like to <a href="/search?search_id=newposts">see posts made</a> while you were away?<br><br>Today is <b>{NOW}.</b><br>You have a total of <b>{USERCOUNTPOST} posts.</b></div>
7 ℋunni, on 19/01/2012 at 14h06
Bump.
8 ℋunni, on 20/01/2012 at 09h23
Bump >_<?
9 ℋunni, on 21/01/2012 at 08h37
Baaampu-desu.
10 slg, on 21/01/2012 at 09h36
Are you replacing the Link Here with your links?
11 Nera., on 21/01/2012 at 09h47
Hi Hunny,

Is it something like this something you've been looking for?
/t101934-profile-details-in-homepage-of-forum#664301
12 ℋunni, on 21/01/2012 at 20h27
It's actually exactly what I've been looking for ^^". I even searched around; I guess I got unlucky :c. Although it's for phpBB2, I'm going to see what I can get from it.

Edit: Seeing as how I'm Invisionfree, I added in the JS shown
Code:
$(document).ready(function(){
$('#avic').load('profile?mode=editprofile&page_profil=avatars .slika');
});


Then inside the Homepage Message content, I added in the following code where I want the called-up avatar to appear (note: this is the entire Homepage Message Content):
Code:
<div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Rules</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png">
</div></div>


<div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><div id="avic"><img alt="" src="http://i.imgur.com/nldCl.jpg"></div></div> Welcome back, <b>Using php in posts is called being a smart [Language]... Stop it</b> <i>!</i><br>Would you like to <a href="/profile?mode=editprofile">view your profile?</a><br>Would you like to <a href="/search?search_id=newposts">see posts made</a> while you were away?<br><br>Today is <b>{NOW}.</b><br>You have a total of <b>{USERCOUNTPOST} posts.</b></div>


Now, I changed
Code:
<span class="slika">{AVATAR}</span>
into
Code:
.slika {
  {AVATAR}
}
and placed it into my CSS page. I'm not sure if that's correct, but nothing is being called up.

Also, I'm sorry if I missed anything or did anything incorrectly! Thank you for helping me through this!
13 Nera., on 21/01/2012 at 21h36
That was a topic done first for punBB and than BB2. For Invision you wont use the same clases. Try something like this:

JS:

Code:
$(document).ready(function(){
$('#avic').load('profile?mode=editprofile&page_profil=avatars fieldset dl dd img');
});


And than add ONLY this to homebox for example:

Code:
<div id="avic"></div>


That should load the avatar in your homebox for Invision (yours avatar to you, users avatar to them), you don't have to put anything beetween.
14 ℋunni, on 22/01/2012 at 06h13
Alright! I did exactly as told (I even deleted all of my Homebox content to try out the ID code), and nothing pops up or shows.

Edit: I added in the ID into the Homebox content I already had written out and its working perfectly. I think this is solved. Thank you so much Nera <3 <3 <3.

Edit: This was also a question I began with, but is there any way I can make a certain part of the content visible to members only and the other part visible to any guest or member?
15 Nera., on 22/01/2012 at 08h12
Code:
$(function() {
  x=document.getElementById('i_icon_mini_login');
  y=document.getElementById('i_icon_mini_logout');
  if(x) {
HERE YOU'LL ADD THE CODE FOR GUESTS/SOMETHING THAT ONLY GUESTS WILL SEE
  }
  else if(y) {
HERE YOU'LL ADD THE CODE FOR THE REGISTERED USERS/SOMETHING THAT ONLY REGISTERED MEMBERS WILL SEE
  }
});
16 ℋunni, on 22/01/2012 at 20h43
I added the code into a JS and then added the content accordingly and
  • The icon is no longer being called up
  • When I log out to view, both contents are visible


The code of what I placed in the script is below.
Code:
        $(function() {
          x=document.getElementById('i_icon_mini_login');
          y=document.getElementById('i_icon_mini_logout');
          if(x) {
        <div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Rules</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png">
</div></div>



<div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="width: 100px; height:100px; float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><a href="/profile?mode=editprofile&page_profil=avatars"><img src="http://i.imgur.com/xaWRS.jpg"></a></div>Welcome to <b>Paperthin Hymn</b> <i>!</i><br>Would you like to <a href="http://paperthin-hymn.nstars.org/register">register?</a><br><br>Today is <b>{NOW}.</b></div><br><br>
          }
          else if(y) {
        <div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Rules</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png">
<a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png">
</div></div>



<div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="width: 100px; height:100px; float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><a href="/profile?mode=editprofile&page_profil=avatars"><div id="avic"></div></a></div>Welcome back, <b>Using php in posts is called being a smart [Language]... Stop it</b> <i>!</i><br>Would you like to <a href="/profile?mode=editprofile">view your profile?</a><br>Would you like to <a href="/search?search_id=newposts">see posts made</a> while you were away?<br><br>Today is <b>{NOW}.</b><br>You have a total of <b>{USERCOUNTPOST} posts.</b></div><br><br>
          }
        });
17 Nera., on 22/01/2012 at 21h04
This should work:

Code:
$(function() {
  x=document.getElementById('i_icon_mini_login');
  y=document.getElementById('i_icon_mini_logout');
  if(x) {
    $('#userlinks').after('<div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Rules</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png"></div></div><div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="width: 100px; height:100px; float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><a href="/profile?mode=editprofile&page_profil=avatars"><img src="http://i.imgur.com/xaWRS.jpg"></a></div>Welcome to <b>Paperthin Hymn</b> <i>!</i><br>Would you like to <a href="http://paperthin-hymn.nstars.org/register">register?</a><br><br>Today is <b>{NOW}.</b></div><br><br>');
  }
  else if(y) {
    $('#userlinks').after('<div class="row1" id="links"><div style="font-family: courier new; letter-spacing: 2px; text-transform: uppercase; font-size: 9px; text-align: center; margin-top:6px; margin-bottom:6px;"><img src="http://i.imgur.com/qpDO2.png"><a href="http://i.imgur.com/qpDO2.png">Rules</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Plot</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Faceclaim</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Canon List</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Calendar</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Application</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Census</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Affiliate</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Staff</a><img src="http://i.imgur.com/qpDO2.png"><a href="/LINK HERE">Bans</a><img src="http://i.imgur.com/qpDO2.png"></div></div><div style="padding:5px; text-align:justify; color:#848484; text-shadow: -1px -1px 0 #fafafa, 1px -1px 0 #fafafa, -1px 1px 0 #fafafa, 1px 1px 0 #fafafa; font-family:Calibri; font-size:10px; line-height:1.5; letter-spacing:0.5px; max-width:250px!important;"><div style="width: 100px; height:100px; float:left; background: url(http://i.imgur.com/60Ng4.png); padding:10px; border:1px dashed #848484; margin-right:6px;"><a href="/profile?mode=editprofile&page_profil=avatars"><div id="avic"></div></a></div>Welcome back, <b>Using php in posts is called being a smart [Language]... Stop it</b> <i>!</i><br>Would you like to <a href="/profile?mode=editprofile">view your profile?</a><br>Would you like to <a href="/search?search_id=newposts">see posts made</a> while you were away?<br><br>Today is <b>{NOW}.</b><br>You have a total of <b>{USERCOUNTPOST} posts.</b></div><br><br>');
  }
});




http://tiki.makingforum.com/forum
18 ℋunni, on 22/01/2012 at 22h16


/hugs Nera - Solved! Thank you so much <3.
19 Nera., on 22/01/2012 at 22h17
bye

Topic Solved & Locked
Similar topics
HI, There is global variable stored in javascript in the application? It is saved in file adminSys.js? How can i call this file inside my selenium java script and access values from it?
Hey! All you PAYEE tax payers. You have the last chance to Import a Duty free vehicle. DIMO, AMW, Toyota, Prestige Motors and like have done well so far due to this concession. If and when this duty concession is withdrawn PAYE tax payers would not
Hi Guys, Good news for you. I have developed some more functions in extenstion for tooltip and image verification which is not possible to do with relgular selenium command. This user extension is developed to provide extra functionality to users
Replies 1 to 19 on 19 for "Calling up user icon."
See also
more_less
Informations

19 Replies For the topic :
"Calling up user icon."

This topic has been viewed 987 times.

Last message :
13/01/2012 at 22h53 by "ℋunni"