Coding-Spot

You are not connected. Please login or register

Go to page : 1, 2  Next

 
 
 

how to make online logo beside username?

Message (Page 1 of 2)

#1

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 2:43 pm

 
hello how can i make the offline and online logo beside the username?





#2

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 2:47 pm

 
Find this on your viewtopic_body template and delete it:
Code:
{postrow.displayed.ONLINE_IMG}

Now find this one:
Code:
{postrow.displayed.POSTER_NAME}

And replace it with this one:
Code:
{postrow.displayed.POSTER_NAME}   {postrow.displayed.ONLINE_IMG}

Tounge



https://coding-spot.darkbb.com


#3

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 3:06 pm

 
hello mark it works but how can i put the icon in left?

because it look like this:
http://prntscr.com/16poqs





#4

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 3:11 pm

 
Swap the 2 variables, so it should be like this:
Code:
 {postrow.displayed.ONLINE_IMG}   {postrow.displayed.POSTER_NAME}

Happy



https://coding-spot.darkbb.com


#5

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 3:16 pm

 
ok e mark.. but how can i add the offline image on that?
i want all the user have offline image beside their username and when they online the image will be change

something like this image

how to make online logo beside username? Online
how to make online logo beside username? Offline

i want all offline have a "Offline image" when they online "the image will turns to online image"





#6

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 3:30 pm

 
Find this part:
Code:
{postrow.displayed.ONLINE_IMG}

And replace it with this one:
Code:
<div class="offline">{postrow.displayed.ONLINE_IMG}</div>

Now add this to your CSS:
Code:
.offline {
  width:11px;
  height:11px;
  background:url("http://2img.net/i/fa/offline.png");
  display: inline-block;
}

Happy



Last edited by Mark on May 26th 2013, 4:10 pm; edited 1 time in total



https://coding-spot.darkbb.com


#7

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 3:52 pm

 
nothings happen..
the online button place above the username..
http://prntscr.com/16pszy

but the offline image cannot see

all i want is all offline user have a fix image of offline
when they are online the image turns green, when they are offline the image turns back in red





#8

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 3:58 pm

 
Try this one instead:
Code:
<span class="offline">{postrow.displayed.ONLINE_IMG}</span>

Also provide your forum url.



https://coding-spot.darkbb.com


#9

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 4:04 pm

 
here

i want the offline image will be fix on offline user and when they online the offline image will be change in online image

the code you give above here is the result
http://prntscr.com/16pu7d

the image is place above not in the left side





#10

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 4:10 pm

 
I put the wrong class on the CSS, replace the CSS.



https://coding-spot.darkbb.com


#11

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 4:15 pm

 
ok i will wait the codes :D





#12

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 4:18 pm

 
Check the post #6. I've updated the codes already.



https://coding-spot.darkbb.com


#13

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 4:29 pm

 
it works but the image become high and not align in the username

http://prntscr.com/16pwnp

but when i modify the codes in CSS to reduce height the image cannot be view
like this:

i set the height for 5px;
result is this:

http://prntscr.com/16pwte





#14

Mark

Mark
 
Administrator
Administrator

Posted May 26th 2013, 4:32 pm

 
Make sure you're using this one:
Code:
<div class="offline">{postrow.displayed.ONLINE_IMG}</div>



https://coding-spot.darkbb.com


#15

BetterHax

BetterHax
 
Advance Member

Posted May 26th 2013, 4:59 pm

 
yes im using that code..
look on this

for online
http://prntscr.com/16q05g

for offline
http://prntscr.com/16q074

the offline image did not align in username.. or the username did not align in offline image





#16

Sponsored content


 

Posted

 





Message (Page 1 of 2)

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

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests

Users browsing this forum: None