- Timestamp:
- 08/24/09 08:31:49 (3 years ago)
- Location:
- branches/user_agent
- Files:
-
- 3 modified
-
functions.php (modified) (1 diff)
-
manifest.xml (modified) (3 diffs)
-
stats.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/user_agent/functions.php
r71 r72 127 127 128 128 // addslashes is needed for javascript 129 $description = addslashes($useragent) . '\n\nSystem:\t\t' . addslashes($agent['system']) .'\nPrzeglądarka:\t' . addslashes($agent['browser_name']) . '\n\t';129 $description = addslashes($useragent) . '\n\nSystem:\t\t' . addslashes($agent['system']) .'\nPrzeglądarka:\t' . addslashes($agent['browser_name']); 130 130 131 131 $result = '<span style="cursor: pointer" onclick="alert(\'' . forum_htmlencode($description) . '\')">' . $result . '</span>'; -
branches/user_agent/manifest.xml
r65 r72 4 4 <id>user_agent</id> 5 5 <title>User agent icons</title> 6 <version>1. 0</version>6 <version>1.1</version> 7 7 <description>This extension adds Browser and system icon to each post.</description> 8 8 <author>Daris</author> 9 9 <minversion>1.3</minversion> 10 <maxtestedon>1.3. 2</maxtestedon>10 <maxtestedon>1.3.4</maxtestedon> 11 11 <install><![CDATA[ 12 12 $forum_db->add_field('posts', 'user_agent', 'VARCHAR( 255 )', true); … … 25 25 $query['SELECT'] .= ', p.user_agent'; 26 26 ]]></hook> 27 <hook id='fn_add_topic_qr_add_topic_post '><![CDATA[27 <hook id='fn_add_topic_qr_add_topic_post, fn_add_post_qr_add_post'><![CDATA[ 28 28 if (isset($_SERVER['HTTP_USER_AGENT'])) 29 29 { … … 32 32 } 33 33 ]]></hook> 34 <hook id='fn_add_post_qr_add_post'><![CDATA[35 if (isset($_SERVER['HTTP_USER_AGENT']))36 {37 $query['INSERT'] .= ', user_agent';38 $query['VALUES'] .= ', \''.$forum_db->escape($_SERVER["HTTP_USER_AGENT"]).'\'';39 }40 ]]></hook>41 34 </hooks> 42 35 </extension> -
branches/user_agent/stats.php
r63 r72 125 125 foreach ($useragent_stats['system'] as $system => $count) 126 126 { 127 if ($i > 10)127 if ($i > 20) 128 128 break; 129 129 … … 137 137 foreach ($useragent_stats['browser'] as $browser => $count) 138 138 { 139 if ($i > 10)139 if ($i > 30) 140 140 break; 141 141