Login
Nome utente:

Password:

Ricorda



Recupero password

Registrati!
Navigazione
Utenti Online
11 utente(i) online
(1 utente(i) in Tutorial)

Iscritti: 0
Ospiti: 11

altro...
Tutorial :: Articoli XoopsItalia

Buddyfriends Hack >> Gestire sistema di liste amici


Buddyfriends Hack >> Gestire sistema di liste amici
Questo hack parte dal modulo buddyfriends 2.3 ed elimina la funzionalità di Instant Messenger per approfondire la gestione delle liste amici.
Permette di:
Visualizzare la lista amici di ogni utente nel suo profilo.
Ogni utente può visualizzare la propria lista amici, con avviso utente online/offline, invio mp.
L'utente può verificare chi lo ha aggiunto alla propria lista ed eventualmente ricambiare.
Attraverso un blocco avere sempre a disposizione una lista degli amici online.
1) Installa buddyfriends 2.3 come ogni altro modulo di xoops.

2) Sostituisci il file index.php con questo

?>



3) Modifica il file userinfo.php


Cerca

$myts =& MyTextSanitizer::getInstance();
if ( 
is_object($xoopsUser) && $isAdmin ) {
    
$xoopsTpl->assign('lang_editprofile'_US_EDITPROFILE);
    
$xoopsTpl->assign('lang_deleteaccount'_US_DELACCOUNT);
    
$xoopsTpl->assign('user_uid'$thisUser->getVar('uid'));
}


e incolla subito sotto:

////////////////////Hack lista amici/////////////////////////////////////////

$uname $thisUser->getVar('uname');
$myid $thisUser->getVar('uid');
$idd =$xoopsUser->getVar("uid""E");
$sql $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("priv_msgs")." WHERE to_userid = '$idd' AND read_msg='0'");
    
$isadmin 0;
//##
$sqlstr="SELECT fuid FROM ".$xoopsDB->prefix("buddyfriends")." WHERE uid=$myid";
//count my friends
$sqlstr2="SELECT Count(*) FROM ".$xoopsDB->prefix("buddyfriends")." WHERE uid=$myid";
$result2 $xoopsDB->query($sqlstr2) or die($xoopsDB->error() );
while (list(
$rep) = $xoopsDB->fetchRow($result2)) {
        
$numfriends $rep;
        }
$resultzz $xoopsDB->query($sqlstr) or die($xoopsDB->error() );
    
$onoff=0;
while (
$userinfo $xoopsDB->fetchArray($resultzz) ) {
      
$userinfo = new XoopsUser($userinfo['fuid']);
        
$zuid=$userinfo->uid();
        
$zuname=$userinfo->uname();
        
$zavatar=$userinfo->user_avatar();
        
$friends .= "<tr valign=""middle""><td align="center" class=""odd"" width="30"><a href=""".XOOPS_URL."/userinfo.php?uid=$zuid""><img src=""".XOOPS_URL."/uploads/$zavatar"" width=""30"" /></a></td><td class=""head"" align="center" valign=""middle""><a href=""".XOOPS_URL."/userinfo.php?uid=$zuid"">".ucfirst($zuname)."</a></td><td class=""even"" align="center" valign=""middle""><a><img src=""".XOOPS_URL."/images/icons/pm_small.gif"" border=""0"" width=""27"" height=""17"" alt="""" /></a></td></tr>"
}
$friends_table "$friends";

  
//////////////// HAck lista amici  /////////////////



4) Modifica il file di template system_userinfo.html


Cerca:

<tr valign="top">
          <
td class="head"><{$lang_extrainfo}></td>
          <
td class="even"><{$user_extrainfo}></td>
        </
tr>


E incolla sotto

<br />
 <
table valign=""middle"" class="outer" cellpadding="4" cellspacing="1" width="100%">
        <
tr valign="top">
          <
th colspan="3" align="center"><{$lang_amici}></th>
        </
tr>
          <{
$user_friends}>
      </
table>


5) Copia le icone necessarie nella cartella buddyfriends

A questo punto è fatta. Volendo puoi inserire anche un blocco per visualizzare gli amici online. Purtroppo al momento non sono riuscita ad integrare il blocco nel modulo (non ho mai fatto un modulo prima e nel creare il blocco mi sono persa! Ogni suggerimento è super gradito!), quindi ecco il codice per creare un blocco personalizzato in php

global $xoopsConfig$xoopsDB$xoopsUser$xoopsTheme$xoopsLogger$xoopsMF;
$ModName="Messenger";
$idd =$xoopsUser->getVar("uid""E");
$sql $xoopsDB->query("SELECT * FROM ".$xoopsDB->prefix("priv_msgs")." WHERE to_userid = '$idd

AND read_msg='0'"
);
    
$isadmin 0;
$myid=$xoopsUser->uid();

//##
$sqlstr="SELECT fuid FROM ".$xoopsDB->prefix("buddyfriends")." WHERE uid=$myid";
//count my friends
$sqlstr2="SELECT Count(*) FROM ".$xoopsDB->prefix("buddyfriends")." WHERE uid=$myid";
$result2 $xoopsDB->query($sqlstr2) or die($xoopsDB->error() );
while (list(
$rep) = $xoopsDB->fetchRow($result2)) {
        
$numfriends $rep;
        }
$resultzz $xoopsDB->query($sqlstr) or die($xoopsDB->error() );
// jordi onoff switch
    
$onoff=0;
//
while ($userinfo $xoopsDB->fetchArray($resultzz) ) {
        
$userinfo = new XoopsUser($userinfo['fuid']);
    
$zuid=$userinfo->uid();
        
$zuname=$userinfo->uname();

    if ( 
$userinfo->isOnline() ) {
            echo 
" <a href=""".XOOPS_URL."/userinfo.php?uid=$zuid""><font size="2">".ucfirst

($zuname)."</font></a><br />";
            }
        else { 
 }

        }
echo 
"<br />";
echo 
"<center><a href="modules/buddyfriends" title="Tutta" la="la" lista="lista">[ Tutta la lista ]</a></center>";
echo 
"";



E' tutto...
Le icone sono le meravigliose Silk Icon di FamFam (http://www.famfamfam.com/lab/icons/silk/) rilasciate con licenza Creative Commons. E' richiesto un linkback.

Nello .zip sono compresi, il file index.php, la traduzione italiana con le aggiunte necessarie e le icone. Scarica il file zip

Per una demo puoi visitare il mio sito sul quale il modulo è attivo (http://www.hpquiz.it) per visualizzarlo però è necessario registrarsi
<< Nuovo staff XoopsItalia Creare un pulsante con il vostro sito per la Google Toolbar >>
Links relativi
API: RSS | RDF | ATOM
Copyright© hpquiz & Xoops Italia
I commenti sono di proprietà degli autori. Si declina ogni responsibilità sul loro contenuto.

Autore Contenuto
Anonymous
Data di invio: 17/7/2012 3:09  Aggiornato: 17/7/2012 3:09
 Re: Buddyfriends Hack >> Gestire sistema di liste a...
of the ship's placement fake rolex watches for sale fake rolex watches for sale bulgari watches bulgari watches . These days, the chronometer label is bestowed on timepieces which have undergone precision assessments and obtained a certificate through the official COSC regulatory corporation that rigorously exams and certifies view actions for chronometer standing. fake rolex sale fake rolex sale high quality swiss imitation watches high quality swiss imitation watches An computerized observe is selfwinding, and its movements features a reserve that should be no less than partially stuffed previous to staying worn. This really is performed by shaking and winding the timepiece manually. To ensure that an computerized timepiece to help keep a reserve rolex replica rolex replica , it need to be worn each day for eight hrs of productive have on. This look at like a strength reserve of forty four hrs. best swiss rolex clone best swiss rolex clone But Omega is much more than simply a trendy enjoy Visualizza immagine originale . In 1965, audemars piguet millenary 15065 audemars piguet millenary 15065 the Omega Speedmaster chronograph was "flightqualified by NASA for all manned house missions" as being the only wristwatch

Autore Contenuto
huff01
Data di invio: 5/9/2012 11:55  Aggiornato: 5/9/2012 11:55
Senior
Iscritto: 5/9/2012
Da:
Inviati: 164
 fake rolex watches
bodyweight to the circumference with the rotor generates an exceptional moment of inertia" audemars piguet replica audemars piguet replica , facilitating a fantastic reassembly with the observe. The established kinds on clock market can admire this treasure of precision with with the bottom outside of glass sapphire in the instance. breitling fake watches breitling fake watches Offered on pink scenario gold fake audemars piguet deva ladies replica watch fake audemars piguet deva ladies replica watch , this chronometer gives a different dimension towards the line in the sporting watches of luxurious Porsche Layout Armani Swiss Watches Armani Swiss Watches . Aided by the picture of the dashboard, the dial (offered in black or grey) contains 4 postings specified by a superbly symmetrical way. The auxiliary needles, indices sticks and dials are discreetly framed of gold replica armani swiss replica armani swiss , forming a delicate distinction together with the principal dial. fake watches fake watches The supreme theory is always to let a velocity studying and specific time replica watches for sale replica watches for sale fake audemars piguet fake audemars piguet . Visualizza immagine originale audemars piguet watches fake audemars piguet watches fake Sporting edition on bracelet normal rubber or

Autore Contenuto
huff01
Data di invio: 12/9/2012 3:15  Aggiornato: 12/9/2012 3:15
Senior
Iscritto: 5/9/2012
Da:
Inviati: 164
 replica welder
nor someone else. You just need to be very certain about a couple of things. Your personal safety is of utmost importance Visualizza immagine originale . Even if you are mainly applying something on your skin replica philip stein replica philip stein , you need to check for any allergic reactions. So replica welder replica welder , you should make sure that when you undergo other treatments, you have to be safe. replica omega replica omega replica graham replica graham Here are things to look for. Replica Rolex Swiss Watch Replica Rolex Swiss Watch Qualifications need to be presented and verified. You should always take their claims with a grain of salt. Do what you need to do to make sure that they are licensed professionals. You could check with their organization regarding their membership. replica vacheron constantin watches replica vacheron constantin watches Know what kind of experience they have had replica chopard watches replica chopard watches , and how much. Continued practice makes one be close to or even attain perfection with much consistency. Know how long they have been doing what they do, and how many cases

Autore Contenuto
huff01
Data di invio: 12/9/2012 4:05  Aggiornato: 12/9/2012 4:05
Senior
Iscritto: 5/9/2012
Da:
Inviati: 164
 omega replica watches
track of all of her appointments and deadlines rolex fake watches rolex fake watches Visualizza immagine originale , and ensure her event was the wedding of her dreams! While we do not have a fairy godmother handy, Three Graces Design can magically take care of one item on the "to do" list creating stunning, oneofakind invitations and coordinating wedding stationery! Ashley of WhiteFlash says replica watch replica watch : Everyone sweats over purchasing holiday gifts for loved ones, but how many holiday gifts do you really remember? If you're like most people, replica philip stein watches replica philip stein watches the answer is "not many. " The great thing about diamond earrings is that unlike many gifts, she can use them every day. girard perregaux replica girard perregaux replica Diamond earrings can be dressed up for work or special occasions and dressed down with jeans on the weekend. Every time she puts them on, she'll think about the thrill she got when she opened them corum replica corum replica fake rolex yachtmaster ii stopwatch fake rolex yachtmaster ii stopwatch . dolce gabbana replica watches dolce gabbana replica watches Try getting that

Autore Contenuto
huff01
Data di invio: 12/9/2012 6:04  Aggiornato: 12/9/2012 6:04
Senior
Iscritto: 5/9/2012
Da:
Inviati: 164
 replica enicar watches
next door and fix ourselves a burger or something and then go back over and play. " Asked why he chose to record rock 'n' roll covers for the album, titled Beyond the Sun, Isaak replies, "It's just the music I grew up listening to. When I was a kid my parents had a really small but fantastic record collection graham replica watches graham replica watches . Jerry Lee Lewis, Visualizza immagine originale Carl Perkins replica ebel replica ebel graham replica graham replica , Roy Orbison concord replica watches concord replica watches , Johnny Cash, Elvis and that's the songs that I'm doing Everybody remembers those tunes. "?Today, let Rothwell Photography inspire you and your fiance to create a rockin', unique, totally YOU engagement photo session!.. fake rolex watchs fake rolex watchs girard perregaux replica girard perregaux replica . fake watches for sale fake watches for sale Rothwell Photography Sasha and I put together two engagement/fashion photo sessions to further inspire our clients; choosing bold, unique, and fashionable outfits allow couples to express themselves, and ensure they'll walk away

Autore Contenuto
huff01
Data di invio: 12/9/2012 8:19  Aggiornato: 12/9/2012 8:19
Senior
Iscritto: 5/9/2012
Da:
Inviati: 164
 richard mille replica watches
when she stops naming them Prada acquaintance, do you meditation? Source window MANILA audemars piguet replica watches audemars piguet replica watches , Philippines Former welterweight champ Joshua Clottey is betting on past foe Manny Pacquiao over Mexico's Antonio Margarito. Pacquiao will battle Margarito for the World Boxing Council light middleweight title at the Cowboys Stadium in Arlington replica movado watches replica movado watches rado replica rado replica , Texas on November 13 (Nov iwc replica iwc replica . replica jacob co watches replica jacob co watches 14 in Manila) breitling superocean heritage breitling superocean heritage . "Margarito doesn't have the best defense and can be hit, Visualizza immagine originale " Clottey told BoxingScene. He added that he chose the Filipino boxer after experiencing his speed in their match also at the Cowboys Stadium last March 13. "When I fought Pacquiao, he was so fast. Like a blur replica watches replica watches . It's very hard to catch him, " the Ghanaian boxer said. Clottey lost to Pacquiao by a unanimous decision and failed to steal the World Boxing Organization (WBO) world
Sostieni XoopsItalia!
Ultimi Tutorial
Ultime Traduzioni
XOOPS ITALIA © 2002-2012 - Powered by XOOPS