*

wp180

  • **
  • 74
    • Punk-Noz.fr
Icons at the onlineuserlist
« on: February 16, 2013, 12:34:05 PM »
Hello.

I want to modify my onlineuserlist.

If somebody is single, i want that the name get an icon in front of it, so that you can see its a single.
Also if the online person have a profile picture, i want to insert a icon there.

I know i have to chage getonlineuserlist.php, but don't know how to do it.

The userstatus  here is osdate_userpreferences: If questionid=1 and answer=1, a user is single, so he should get a single icon....

Any ideas for me?

Thanks, wp180

Osdate 2.6
PHP 5.4.21
MsSQL 5.1.72

*

wp180

  • **
  • 74
    • Punk-Noz.fr
Re: Icons at the onlineuserlist
« Reply #1 on: February 17, 2013, 08:57:58 PM »
For example like this:

Osdate 2.6
PHP 5.4.21
MsSQL 5.1.72

Re: Icons at the onlineuserlist
« Reply #2 on: April 30, 2013, 02:21:59 AM »
hi,

this works for me:

In libs\smarty\plugins you will find:

function.checkuser.php

find

Code: [Select]
$returnme='<b><font color="'.$lang['useronlinecolor']['online_now'].'">
and change it to:

Code: [Select]
$returnme='<b><font color="'.$lang['useronlinecolor']['online_now'].'"><img src="../icons/user_online.gif" class="online" alt="" />&nbsp;'.$lang['useronlinetext']['online_now'].'</font></b>'
The path for image can be different and the class too. I added the class for better positioning. Same for offline and all others. I am using the code different than standard Osdate so there could be some difference in code. But adding the image should work the same.
 
Kind regards,

Jan Oppeneer
working on template for 2.6 and OsdatePDO

My sites under construction:

www.oudere-homo-mannen.com
www.homosenioren.com
www.hotdatingplanet.eu

Will be testing for Osdater.

*

wp180

  • **
  • 74
    • Punk-Noz.fr
Re: Icons at the onlineuserlist
« Reply #3 on: May 04, 2013, 02:55:58 PM »
Hi.

I tried to make my changes again. It works now really good. It looks this way:


But one thing is missing. I want to look at osdate_userpreference, if questionid=1 and answer =1, so a user is single.
But i can't do working changes :D

Any hints???

Regards, wp180
Osdate 2.6
PHP 5.4.21
MsSQL 5.1.72

*

wp180

  • **
  • 74
    • Punk-Noz.fr
Re: Icons at the onlineuserlist
« Reply #4 on: May 04, 2013, 06:37:18 PM »
Ok, i solved it. I changed my getonlineuser.php:
Code: [Select]
<?php
if ( !defined'SMARTY_DIR' ) ) {
include_once( 'minimum_init.php' );
}

$sql 'SELECT distinct u.username, u.id, u.gender, u.zip, u.pictures_cnt, u.country, floor((to_days(curdate())-to_days(birth_date))/365.25) as age FROM ! u, ! ou WHERE u.allow_viewonline=? AND u.status in (?,?) AND u.id = ou.userid and u.id <> ? and ou.lastactivitytime > ? order by u.username';

$data $osDB->getAll$sql, array( USER_TABLEONLINE_USERS_TABLE'1'get_lang('status_enum','active'), 'active'$_SESSION['UserId'], time()-300) );

$rcount count($data);


$ret='';

if ( 
$rcount ) {
foreach ($data as $usr) {
$ret.='<a href="javascript:popUpScrollWindow2(\''.DOC_ROOT;
if ($config['enable_mod_rewrite'] == 'Y') {
if ($config['seo_username'] == 'Y') {
$ret.= $usr['username'];
} else {
$ret.= $usr['id'].'.htm';
}
}else{
$ret.='showprofile.php?';
if ($config['seo_username'] == 'Y') {
$ret.='username='.$usr['username'];
}else{
$ret.='id='.$usr['id'];
}
}
$ret.='\',\'top\',650,600)">';

if ( $usr['pictures_cnt'] !="0" ) {
$pic='<img src="/images/foto.gif">';
}else{
$pic='<img src="/images/nofoto.gif">';
}

if ( $usr['country'] =="DE" ) {
$flag='<img src="/images/brd.gif">';
}else{
$flag='<img src="/images/france.gif">';
}

$result1 $osDB->getOne('select answer from ! where userid = ? and questionid=?',array(USER_PREFERENCE_TABLE$usr['id'],'1' ) );


if (( $result1 =="1")) {
$picsingle='<img src="/images/single.png">';
}else{
$picsingle='<img src="/images/nosingle.gif">';
}

if ( $usr['gender'] == "M" ) {
$ret.=$picsingle.' '.$pic.'&nbsp;'.$usr['username'].'<img src="/images/gender_male.png">'.','.$usr['age'].','.substr($usr['zip'],0,2).'***'.$flag.'</a><br/>';
}else{
$ret.=$picsingle.' '.$pic.'&nbsp;'.$usr['username'].'<img src="/images/gender_female.png">'.','.$usr['age'].','.substr($usr['zip'],0,2).'***'.$flag.'</a><br/>';
}
}
} else {
$ret.=get_lang('noone_online');
}
echo 
'|||onlineUserList|:|'.$ret;

?>

Now a User who is single get a heart, A user with pictures in the profile get a small picture icon, behind the name there is the age, the postzip, gender and country flag.

Regards, wp180
Osdate 2.6
PHP 5.4.21
MsSQL 5.1.72

Re: Icons at the onlineuserlist
« Reply #5 on: March 15, 2015, 01:29:45 PM »
Hi.

I put this function into it it getonlineuserlist.php his content with a smaller transformation. The profile modification I mark any of the countries only two show a flag. The Hungarian flag and the usa flag. I tried to modify php content but did not succeed.

Original:

if ( $usr['country'] =="HU") {
      $flag='<img src="/images/hu.gif">';
      }else{
      $flag='<img src="/images/us.gif">';   
      
      }

8 countries appear on the web page currently and I would like it if at these countries can be displayed the flag would be.
Thank you help ahead.