No subject
Fri Mar 23 00:26:50 EDT 2007
somewhere else than our own server
$ourHost = $_SERVER["HTTP_HOST"]; Just delete everything and
paste this..
function Referers()
{
$this->Model();
$config =&
Config::getConfig();
$this->_enabled = $config->getValue( "referer_tracker_enabled"
);
$this->table =
$this->getPrefix()."referers";
}
/**
* Adds a referer to the database.
*
* @param refererHeader The referer header as was received by PHP.
* @param articleId The article being hit by this referer.
* @return Returns true if successful or false otherwise.
*/
function addReferer( $refererHeader, $articleId, $blogId )
{
require_once( PLOG_CLASS_PATH."class/net/url.class.php" );
// quit inmediately if this is not enabled...
if( !$this->_enabled )
return;
------=_NextPart_000_00E3_01C7AA82.FF5501E0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-mailStijl17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DNL link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><span lang=3DEN-US>This code it needs to be: =
<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>can somebody put it live for =
rollout? In
dao/refers.class<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US>From line 21 till =
&=
nbsp; // we only
add a new referer if we come from somewhere else than our own =
server<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
$ourHost =3D
$_SERVER["HTTP_HOST"]; Just delete everything and paste =
this..<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US> =
=
function Referers()<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
{<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
=
$this->Model();<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
&=
nbsp; &n=
bsp; =
<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
&=
nbsp; &n=
bsp; =
$config
=3D& Config::getConfig();<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
$this->_enabled =3D
$config->getValue( "referer_tracker_enabled" =
);<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
&=
nbsp; &n=
bsp; =
$this->table
=3D $this->getPrefix()."referers";<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
}<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
/**<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> * Adds a =
referer to the database.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
*<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> * @param =
refererHeader The referer
header as was received by PHP.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> * @param =
articleId The article
being hit by this referer.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> * @return =
Returns true if
successful or false otherwise.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
*/<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> function =
addReferer(
$refererHeader, $articleId, $blogId )<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
{<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
require_once(
PLOG_CLASS_PATH."class/net/url.class.php" =
);<o:p></o:p></span></p>
<p class=3DMsoNormal><span lang=3DEN-US><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
// quit inmediately if this
is not enabled...<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
if( !$this->_enabled =
)<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
lang=3DEN-US> =
return;<o:p></o:p></span></p>
</div>
</body>
</html>
------=_NextPart_000_00E3_01C7AA82.FF5501E0--
More information about the pLog-svn
mailing list