Poprzedni temat «» Następny temat
Autor Wiadomość
U?yte przegl?darki
Solinarius
Kozio?ek Mato?ek fan



Posty: 97
Piwa: 33/2
Wysłany: Pon 08 Maj, 2006   U?yte przegl?darki
   Adres forum: wm.i365.pl/wm




Kod
#############################################################
#
# mod title: U?yte Przegl?darki
# authors: Qbs
#
# web: http://beatsfactory.pl/qbs/
#
#
#############################################################

#############################################################
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
#############################################################

#
# ------[ OPEN ]------------------------------------------------
#

includes/usercp_viewprofile.php

# ------[ FIND ]------------------------------------------------

$template->pparse('body');

# ------[ BEFORE, ADD ]------------------------------------------------

$sql = "SELECT user_agent, COUNT(*) as how_much
FROM " . POSTS_TABLE . "
WHERE poster_id = $user_id
GROUP BY user_agent";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t obtain user agents list', '', __LINE__, __FILE__, $sql);
}


$marker = $total_usage = 0;
$ua_db = $ico_sys_db = $ico_brow_db = $usages = array();
while ( $row = $db->sql_fetchrow($result) )
{
$user_agent = unserialize(stripslashes($row['user_agent']));
$total_usage += $row['how_much'];
if ( trim($user_agent[2]) == "" ) continue;
$usages[md5($user_agent[2])] = $row['how_much'];
$ico_sys_db[$marker] = $user_agent[0];
$ico_brow_db[$marker] = $user_agent[1];
$ua_db[$marker] = $user_agent[2];
$marker++;
}

if ( count($ua_db) )
{
$template->assign_block_vars('user_agents', array(
'L_USER_AGENTS' => $lang['uas_title_mod'],
'L_BROWSERS' => $lang['uas_browsers_mod'],
'L_USAGE' => $lang['uas_usage_mod']
));

foreach( $ua_db as $marker => $user_agent )
{
$ico_sys = '<img src="' . $images['images'] . '/user_agent/' . $ico_sys_db[$marker] . '" alt="" title="' . $user_agent . '" border="0">';
$ico_brow = '<img src="' . $images['images'] . '/user_agent/' . $ico_brow_db[$marker] . '" alt="" title="' . $user_agent . '" border="0">';
$usage = $usages[md5($user_agent)] . ' (' . round($usages[md5($user_agent)] / $total_usage * 100,1) . '%)';
$template->assign_block_vars('user_agents.rows',array(
'UAS_ICO_SYSTEM' => $ico_sys,
'UAS_ICO_BROWSER' => $ico_brow,
'UAS_USER_AGENT' => $user_agent,
'UAS_USAGE' => $usage
));
}
}

#
# ------[ OPEN ]------------------------------------------------
#

templates/subSilver/profile_view_body.tpl

# ------[ FIND ]------------------------------------------------

<!-- END photo -->
</table>

# ------[ AFTER, ADD ]------------------------------------------------

<!-- BEGIN user_agents -->
<br />
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center">
<tr>
<th class="thHead" height="28" colspan="4">{user_agents.L_USER_AGENTS}</th>
</tr>
<tr>
<td align="center" colspan="3" class="cat"><b>{user_agents.L_BROWSERS}:</b></td>
<td align="center" class="cat"><b>{user_agents.L_USAGE}:</b></td>
</tr>
<!-- BEGIN rows -->
<tr>
<td align="center" class="row1">{rows.UAS_ICO_SYSTEM}</td>
<td align="center" class="row1">{rows.UAS_ICO_BROWSER}</td>
<td align="center" class="row1">{rows.UAS_USER_AGENT}</td>
<td align="center" class="row1">{rows.UAS_USAGE}</td>
</tr>
<!-- END rows -->
<tr>
<td colspan="4" class="cat">&nbsp;</td>
</tr>
</table>
<!-- END user_agents -->

#
# ------[ OPEN ]------------------------------------------------
#

language/lang_polish/lang_main.php

# ------[ FIND ]------------------------------------------------

//
// That's all Folks!
// -------------------------------------------------

# ------[ BEFORE, ADD ]------------------------------------------------

$lang['uas_title_mod'] = 'U?ywane przegl±darki';
$lang['uas_browsers_mod'] = 'Przegl±darka';
$lang['uas_usage_mod'] = 'U?ycia';

#############################################################
####################### EoM #########################
#############################################################
Ostatnio zmieniony przez qbs Wto 31 Paź, 2006, w całości zmieniany 4 razy  
Postaw piwo autorowi tego posta
 
     
DOD 
vtec master


Posty: 35
Piwa: 9/33
Skąd: Dublin IRL
Wysłany: Pon 08 Maj, 2006   
   Adres forum: http://www.civic4g.pl/forum/


Mam rozumiec, ?e to pokazuje info o przegl?darkach uzywanych przez danego uzytkownika i dane te s? prezentowane w jego profilu ??
_________________
| www.civic4g.pl - najobszerniejsza strona w Polsce o Hondzie Civic EF 1988-1991 | Honda EF9 Powaaa | N/A is better |
Postaw piwo autorowi tego posta
 
 
     
#Gracek 



Posty: 166
Piwa: 141/13
Skąd: Ostro??ka
Wysłany: Pon 08 Maj, 2006   
   Adres forum: http://www.pececik.com


tak
_________________
[ forum komputerowe ] [ komunikatory ]
Bezp?atnie pomagam tylko na FORUM! Potrzebujesz wi?cej?
Postaw piwo autorowi tego posta
 
 
     
ciaastek 


Posty: 191
Piwa: 16/7
Skąd: Katowice
Wysłany: Pią 12 Maj, 2006   
   Adres forum: brak, jak b?d? oczekiwa? pomocy to podam


Kod
templates/subSilver/profile_view_body.php


Ma?a pomy?ka ;)

nie .php a .tpl ... :roll:
_________________
http://ciaastek.net/img/button.gif
Postaw piwo autorowi tego posta
 
 
     
kidzior 
Niezale?ny



Posty: 775
Piwa: 300/63
Skąd: Krak?w
Wysłany: Sob 13 Maj, 2006   
   Adres forum: http://forum.niezal.org/


Dzia?a idealnie pod Saphic, SubBlack no i SS. ;)

A nie mo?na by napisac w instrukcji normalnych polskich znak?w? ;)
_________________
WHEN (NIE.DZIALA)
LOOP
UNTIL (DZIALA)
Postaw piwo autorowi tego posta
 
 
     
ciaastek 


Posty: 191
Piwa: 16/7
Skąd: Katowice
Wysłany: Sob 13 Maj, 2006   
   Adres forum: brak, jak b?d? oczekiwa? pomocy to podam


gdyby by?y wpisane polskie znaki na forum mia?by? krzaczki :roll:
_________________
http://ciaastek.net/img/button.gif
Postaw piwo autorowi tego posta
 
 
     
szczawik17

Posty: 17
Postawił 22 piw(a)
Wysłany: Wto 31 Paź, 2006   
   Adres forum: www.szczawik.webd.pl/forum/index.php


Zmodyfikowa?em wszystkie pliki i mi nie dzia?a masz tu link do mojego profilu:
http://www.szczawik.webd....viewprofile&u=2
Postaw piwo autorowi tego posta
 
     
qbs 


Posty: 598
Piwa: 353/29
Skąd: wroc?aw
Wysłany: Wto 31 Paź, 2006   
   Adres forum: n/a


Cytat

Dost?p do tej cz??ci forum wymaga zalogowania si?.

Je?eli nie jeste? jeszcze zarejestrowany, kliknij Tutaj ?eby przej?? do formularza rejestracyjnego.
_________________
ixdude.com
i have been waiting, all of my life, for you to come along and make everything all right. my body shaking, right through the bones, so take my by the hand, please don't leave me here alone. and i wonder if you know just how i feel, i feel... yeah... and i wonder how i know it is... it's real... it's real. coz' i want you to save me, just please save me, save me... coz' i need you to save me, just please save me, save me...
Postaw piwo autorowi tego posta
 
     
Więcej szczegółów
Wystawiono 1 piw(a):
Tommy76
INIM 
C'est moi...


Posty: 369
Piwa: 126/37
Skąd: Ruda ?l?ska
Wysłany: Wto 31 Paź, 2006   
   Adres forum: http://www.e-comp.org/


ixdude.com napisał/a
Cytat

Dost?p do tej cz??ci forum wymaga zalogowania si?.

Je?eli nie jeste? jeszcze zarejestrowany, kliknij Tutaj ?eby przej?? do formularza rejestracyjnego.



Poza tym:


Cytat
W systemie nie istnieje u?ytkownik: test
_________________
[ Forum Komputerowe ] [ Harmoszka.com ]
Za darmo pomagam tylko na forum.
Postaw piwo autorowi tego posta
 
 
     
KaweX

Posty: 282
Piwa: 29/37
Wysłany: Wto 31 Paź, 2006   
   Adres forum: http://mdx-team.net


mam takie pytanie... jak mo?na skasowa? wszystkie wpisy u?ytych przegl?rek ? ?eby zlicza?y si? one od teraz.... bo kurde np. mam 15 przegl?darek z czego 10 to poprawki mozilli....

tak btw. proponuje zamieni? w pliku profile_view_body.tpl

Kod
<td align="center" colspan="3" class="cat"><b>{user_agents.L_BROWSERS}:</b></td>
<td align="center" class="cat"><b>{user_agents.L_USAGE}:</b></td>

na
Kod
<td align="center" colspan="3" class="cat"><b>{user_agents.L_BROWSERS}</b></td>
<td align="center" class="cat"><b>{user_agents.L_USAGE}</b></td>



oraz

w lang_main.php

Kod
$lang['uas_title_mod'] = 'U?ywane przegl±darki';
$lang['uas_browsers_mod'] = 'Przegl±darka';
$lang['uas_usage_mod'] = 'U?ycia';

na
Kod
$lang['uas_title_mod'] = 'U?yte przegl±darki';
$lang['uas_browsers_mod'] = 'Przegl±darka';
$lang['uas_usage_mod'] = 'U?ycie';
Postaw piwo autorowi tego posta
 
     
qbs 


Posty: 598
Piwa: 353/29
Skąd: wroc?aw
Wysłany: Wto 31 Paź, 2006   
   Adres forum: n/a


Kod
$sql = "SELECT user_agent, COUNT(*) as how_much
FROM " . POSTS_TABLE . "
WHERE poster_id = $user_id
AND post_time > -----------
GROUP BY user_agent";


w miejsce ----------- wpisujesz timestamp
_________________
ixdude.com
i have been waiting, all of my life, for you to come along and make everything all right. my body shaking, right through the bones, so take my by the hand, please don't leave me here alone. and i wonder if you know just how i feel, i feel... yeah... and i wonder how i know it is... it's real... it's real. coz' i want you to save me, just please save me, save me... coz' i need you to save me, just please save me, save me...
Postaw piwo autorowi tego posta
 
     
KaweX

Posty: 282
Piwa: 29/37
Wysłany: Sro 01 Lis, 2006   
   Adres forum: http://mdx-team.net


Kod
$sql = "SELECT user_agent, COUNT(*) as how_much
FROM " . POSTS_TABLE . "
WHERE poster_id = $user_id
GROUP BY user_agent";


zamieni?em na:

Kod
$sql = "SELECT user_agent, COUNT(*) as how_much
FROM " . POSTS_TABLE . "
WHERE poster_id = $user_id
AND post_time > timestamp
GROUP BY user_agent";


i jak wchodze do profilu to mam b??d

Kod
Couldn't obtain user agents list

DEBUG MODE

SQL Error : 1054 Unknown column 'timestamp' in 'where clause'

SELECT user_agent, COUNT(*) as how_much FROM phpbb_posts WHERE poster_id = 2 AND post_time > timestamp GROUP BY user_agent

Line : 1056
File : usercp_viewprofile.php
_________________
odwied? MDX-Team - Muza Dla Ka?dego^^
Postaw piwo autorowi tego posta
 
     
qbs 


Posty: 598
Piwa: 353/29
Skąd: wroc?aw
Wysłany: Sro 01 Lis, 2006   
   Adres forum: n/a


jakbys mial zamienic na slowo timestamp to nie uwazasz ze bym to wstawil do zapytania?
http://en.wikipedia.org/wiki/Timestamp
lub
PHP Code:
<?php

 print time(); 


?>
_________________
ixdude.com
i have been waiting, all of my life, for you to come along and make everything all right. my body shaking, right through the bones, so take my by the hand, please don't leave me here alone. and i wonder if you know just how i feel, i feel... yeah... and i wonder how i know it is... it's real... it's real. coz' i want you to save me, just please save me, save me... coz' i need you to save me, just please save me, save me...
Postaw piwo autorowi tego posta
 
     
szczawik17

Posty: 17
Postawił 22 piw(a)
Wysłany: Sro 01 Lis, 2006   
   Adres forum: www.szczawik.webd.pl/forum/index.php


ixdude.com napisał/a
Cytat

Dost?p do tej cz??ci forum wymaga zalogowania si?.

Je?eli nie jeste? jeszcze zarejestrowany, kliknij Tutaj ?eby przej?? do formularza rejestracyjnego.


Pardon.
Login: test
Pass: test1
Postaw piwo autorowi tego posta
 
     
qbs 


Posty: 598
Piwa: 353/29
Skąd: wroc?aw
Wysłany: Sro 01 Lis, 2006   
   Adres forum: n/a


zalacz plik usercp_viewprofile.php
_________________
ixdude.com
i have been waiting, all of my life, for you to come along and make everything all right. my body shaking, right through the bones, so take my by the hand, please don't leave me here alone. and i wonder if you know just how i feel, i feel... yeah... and i wonder how i know it is... it's real... it's real. coz' i want you to save me, just please save me, save me... coz' i need you to save me, just please save me, save me...
Postaw piwo autorowi tego posta
 
     
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  



Za treść postów administracja nie odpowiada. W przypadku naruszenia prawa, wszelkie zgromadzone dane o osobie łamiącej prawo, zostaną przekazane odpowiednim władzom. Kopiowanie elementów graficznych oraz rozwiązań technologicznych zastosowanych na niniejszej witrynie surowo wzbronione.
Strona wygenerowana w 0,83 sekundy. Zapytań do SQL: 57