From: Arden W. <ar...@li...> - 2003-05-20 17:07:54
|
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); } } ?> |
From: Burke <bu...@di...> - 2003-05-21 17:35:16
|
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 |
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 |
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 |
From: Arden W. <ar...@li...> - 2003-05-21 21:34:48
|
Burke: That is well done. I've coded the permissions like that so users have to sign in for the candy. Just my thoughts on things. It's in the security schema I would imagine. I use that block for a template and just try and fill in the blanks. So you have been busy then. Probably took an ace coder like yourself about what how long? I've been busy here... Replaced power supply in one box. Purchased P166, installed ram, installed os, bought hub, installed 5 nics. I make router cable modem | UPLINK | RH7.3 ROUTER | HUB | Internal servers. I must finish this work. I'm tired of having slow server and to host 300 sites on one machine is not nice. About the Block... Lets rename it Burke? What do you think? How about eNvoLinker? eNvoReferrer? eNvoRefer? eNvoStats? Your thoughts? Then we post it to eNvolution. Can you send me the block or did you already and I not see it. I want to see if I was close or not in the solution. Arden On Wed, 2003-05-21 at 11:34, 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 |