From: Burke <bu...@di...> - 2003-05-21 19:12:52
|
The block is setup as a Center block. It is displayed above the regular output of Stats. Ahhh.... Permissions ! Something strange is going on.. Only logged in users can see it :( .. I've created a permission for Unregistered to access it but it's not working... I'll keep looking into this, but if anyone wants to see it before I figure out the problem, you only have to log in. The ID I tested with just now was NOT an admin ID. -----Original Message----- From: env...@li... [mailto:env...@li...] On Behalf Of TiMax Sent: Wednesday, May 21, 2003 2:41 PM To: env...@li... Subject: RE: [Envolution-devel] Referrer Block 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'] = array( > 'func_display' => 'open_referrer_block', > 'text_type' => 'openReferrer', > 'text_type_long' => 'openReferrer [openReferrer 1.0]', > 'allow_multiple' => false, > 'allow_create' => false, > 'allow_delete' => false, > 'form_content' => false, > 'form_refresh' => false, > 'show_preview' => true, > ); > > // Security > pnSecAddSchema('openReferrer::', 'Block title::'); > function open_referrer_block($row) { > > list($dbconn) = pnDBGetConn(); > $pntable = pnDBGetTables(); > > if (!pnSecAuthAction(0, 'openReferrer::', "$row[title]::", > ACCESS_READ)) { > return; > } > > if (pnUserLoggedIn()) { > > echo "<center><b>"._WHOLINKS."</b></center><br /><br />" > ."<table border=0 width=100%> > <tr><td>"._FREQUENCY."</td><td>"._URL."</td><td>"._PERCENT."</td></tr>"; > /** > * fifers: grab the total count of referers for percentage > calculations > */ > $column = &$pntable['referer_column']; > $hresult = $dbconn->Execute("SELECT SUM($column[frequency]) FROM > $pntable[referer]"); > list($totalfreq) = $hresult->fields; > $hresult = $dbconn->Execute("SELECT $column[url], $column[frequency] > FROM $pntable[referer] ORDER BY $column[frequency] DESC"); > //while(list($url, $freq) = $hresult->fields) { > > while (!$hresult->EOF) { > list($url, $freq) = $hresult->fields; > //$hresult->MoveNext(); > //while (!$hresult->EOF) { > > //$hresult->MoveNext(); > $content= "<tr>\n" > ."<td>" . pnVarPrepForDisplay($freq) . "</td>\n" > ."<td>".(($url == "bookmark")?(""):("<a target=_blank > href=$url>")).pnVarPrepForDisplay($url).(($url == > "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'] = _CHAT; > } > > $row[content] = $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 ------------------------------------------------------- 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 |