From: TiMax <ma...@em...> - 2003-05-21 18:39:35
|
Sorry i don't see it in action On Wed, 21 May 2003 13:34:57 -0400, Burke wrote: > I've finished up this block -- If anyone's interested, contact= eLGie > > To see it in action, visit http://www.dimensionquest.net and= click on > the Stats link. > > -----Original Message----- > From: env...@li... > [mailto:env...@li...] On= Behalf Of Arden > Wiebe > Sent: Tuesday, May 20, 2003 12:50 PM > To: env...@li... > Subject: [Envolution-devel] Referrer Block > > Today some other hack. I can't seem to find block that does= this so I > try at least. Yesterday was display image in download on= select like > user avatar, no success. Day before was upload pic on sign= up. If > anyone can help to get this block working it would be= appreciated. I > hope it comes out okay in the mail :) > > <?php > /********************************************************/ > /* openChat [openChat v1.0] */ > /* Written by: eLGie */ > /* http://www.linuxguru.ca */ > /* */ > /********************************************************/ > > $blocks_modules['openReferrer'] =3D array( > 'func_display' =3D> 'open_referrer_block', > 'text_type' =3D> 'openReferrer', > 'text_type_long' =3D> 'openReferrer [openReferrer 1.0]', > 'allow_multiple' =3D> false, > 'allow_create' =3D> false, > 'allow_delete' =3D> false, > 'form_content' =3D> false, > 'form_refresh' =3D> false, > 'show_preview' =3D> true, > ); > > // Security > pnSecAddSchema('openReferrer::', 'Block title::'); > function open_referrer_block($row) { > > list($dbconn) =3D pnDBGetConn(); > $pntable =3D pnDBGetTables(); > > if (!pnSecAuthAction(0, 'openReferrer::',= "$row[title]::", > ACCESS_READ)) { > return; > } > > if (pnUserLoggedIn()) { > > echo "<center><b>"._WHOLINKS."</b></center><br /><br= />" > ."<table border=3D0 width=3D100%> > = <tr><td>"._FREQUENCY."</td><td>"._URL."</td><td>"._PERCENT."</td= ></tr>"; > /** > * fifers: grab the total count of referers for= percentage > calculations > */ > $column =3D &$pntable['referer_column']; > $hresult =3D $dbconn->Execute("SELECT= SUM($column[frequency]) FROM > $pntable[referer]"); > list($totalfreq) =3D $hresult->fields; > $hresult =3D $dbconn->Execute("SELECT $column[url],= $column[frequency] > FROM $pntable[referer] ORDER BY $column[frequency] DESC"); > //while(list($url, $freq) =3D $hresult->fields) { > > while (!$hresult->EOF) { > list($url, $freq) =3D $hresult->fields; > //$hresult->MoveNext(); > //while (!$hresult->EOF) { > > //$hresult->MoveNext(); > $content=3D "<tr>\n" > ."<td>" . pnVarPrepForDisplay($freq) . "</td>\n" > ."<td>".(($url =3D=3D "bookmark")?(""):("<a= target=3D_blank > href=3D$url>")).pnVarPrepForDisplay($url).(($url =3D=3D > "bookmark")?(""):("</a>"))."</td>\n" > ."<td>".round(($freq / $totalfreq * 100), 2)."= %</td>\n" > ."</tr>\n"; > $hresult->MoveNext(); > //while (!$hresult->EOF) { > //$hresult->MoveNext(); > > echo "</table>"._TOTAL." " .= pnVarPrepForDisplay($totalfreq) . " <br > />"; > > $hresult->MoveNext(); > CloseTable(); > } > echo "</table>"._TOTAL." " .= pnVarPrepForDisplay($totalfreq) . " <br > />"; > if (empty($row['title'])) { > $row['title'] =3D _CHAT; > } > > $row[content] =3D $content; > return themesideblock($row); > } > } > > ?> > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application= fit in a > relational database is painful, don't do it! Check out= ObjectStore. > Now part of Progress Software.= http://www.objectstore.net/sourceforge > _______________________________________________ > Envolution-devel mailing list > Env...@li... > https://lists.sourceforge.net/lists/listinfo/envolution-devel > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application= fit in a > relational database is painful, don't do it! Check out= ObjectStore. > Now part of Progress Software.= http://www.objectstore.net/sourceforge > _______________________________________________ > Envolution-devel mailing list > Env...@li... > https://lists.sourceforge.net/lists/listinfo/envolution-devel |