Skip to Content Skip to Menu

who is online gender + picture

  • justberare
  • justberare
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 11
18 years 5 months ago #10878 by justberare
who is online gender + picture was created by justberare
There is a module I bought on joomlancers (it's open source) :

It show the users connections with their pictures.

I made a little modification that is easily removable or translatable :

It display a cb_search form when the user has no friend yet.

I attach the module here.

The modification I wanna make is adding the gende function into it :

[code:1]<?php
// $Id: mod_online.php,v 1.7 2004/01/13 14:50:38 rcastley Exp $
/**
* Users Online Module
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : www.gnu.org/copyleft/gpl.html
* @version $Revision: 1.7 $
**/
/**
* MamboMe CB Colors Online Module
* By Jeffrey Randall
* Copyright (C) 2005 MamboMe.com
* All rights reserved
* Mambo Open Source is Free Software
* Released under GNU/GPL License : www.gnu.org/copyleft/gpl.html
* version 1.0
**/

defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$use_colors = $params->get( 'use_colors' );
$field = $params->get( 'field' );
$field_valuea = $params->get( 'field_valuea' );
$field_valueb = $params->get( 'field_valueb' );
$colora = $params->get( 'colora' );
$colorb = $params->get( 'colorb' );


$query = "SELECT DISTINCT a.username, a.userid"
."\n FROM #__session AS a"
."\n WHERE (a.guest=0)";
$database->setQuery($query);
$rows = $database->loadObjectList();
$content = "";
foreach($rows as $row)
{
if($use_colors == 'Yes'){

$query_field = "SELECT $field FROM #__comprofiler WHERE user_id=$row->userid";
$database ->setQuery ($query_field);
$field_result = $database->loadResult();

if($field_result == $field_valuea)
{
$content.= "<b><a style='color:$colora' href='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=$row->userid"«»)."'>".$row->username."</a></b></font>";

$content.= "<br />";

}
elseif($field_result == $field_valueb)
{
$content.= "<b><a <a style='color:$colorb' href='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";

}

else {
$content.= "<b><a href='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";
}
}
}
foreach($rows as $row)
{
if($use_colors == 'No'){
$content.= "<b><a href='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=$row->userid"«»)."'>".$row->username."</a></b>";
$content.= "<br />";
}
}

$query1 = "SELECT count(session_id) as guest_online FROM #__session WHERE guest=1 AND (usertype is NULL OR usertype='')";
$database->setQuery($query1);
$guest_array = $database->loadResult();

if ($guest_array<>0 && $user_array==0) {
if ($guest_array==1) {
$content.=_WE_HAVE;
$content.=_GUEST_COUNT;
$content.=_ONLINE;
eval ("\$content = \"$content\";"«»);
} else {
$content.=_WE_HAVE;
$content.=_GUESTS_COUNT;
$content.=_ONLINE;
eval ("\$content = \"$content\";"«»);
}
}
?>[/code:1]

If you know how is it possible to do it ....


thx

Please Log in or Create an account to join the conversation.

  • justberare
  • justberare
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 11
18 years 5 months ago #10879 by justberare
Replied by justberare on topic Re:who is online gender + picture
the file :)

Attachment mod_myfriends.zip not found

Attachments:

Please Log in or Create an account to join the conversation.

  • test12w
  • test12w
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 1
18 years 5 months ago #10948 by test12w
Replied by test12w on topic Re:who is online gender + picture
You mean to do it like on our site www.who-is-hot.de
there you can see who is online and who is single and has uploaded a picture

<p>Veranstaltungsmagazin, Nightlife, Branchenbuch, Tourismus, Partypics<br>
Who is Hot <a title="Party FULDA" href=" www.who-is-hot.de/ ">Fulda-
Die schärfsten Tipps für Fulda und die Region&nbsp; </p>
www.who-is-hot.de

Please Log in or Create an account to join the conversation.

  • GUEST
18 years 5 months ago #10951 by
Replied by on topic Re:who is online gender + picture
You mean to do it like on our site www.who-is-hot.de
there you can see who is online and who is single and has uploaded a picture

Please Log in or Create an account to join the conversation.

  • justberare
  • justberare
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 11
18 years 5 months ago #10953 by justberare
Replied by justberare on topic Re:who is online gender + picture
well, that's a great module ! and I would be very happy to have it too but I am looking for something else.

You can test my site here : www.supdecopains.com

login : justberare
password : justberare

It's on the frontpage. where you see all your friends pictures (justberare has only two friends for testing). I'd like Anna (who is a girl) to have a pink name and admin who is a boy to have a blue name. Actually, now that I've seen your module. If it was possible to add this little heart in case the person in looking for someone ...

e.n.

Please Log in or Create an account to join the conversation.

  • justberare
  • justberare
  • OFFLINE
  • Posts: 24
  • Thanks: 0
  • Karma: 11
18 years 5 months ago #11048 by justberare
Replied by justberare on topic Re:who is online gender + picture
!! come on ! you said nothing !!!!!!!

I have the coolest frontpage joomla (and Mambo) has everseen !

Anyway ... :'(

thanks to joomgadgets.com by the way for their script.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum