1
potamkin
Xoops + Power Phlogger
  • 2004/10/1 7:43

  • potamkin

  • Just popping in

  • Posts: 4

  • Since: 2004/9/30


Hi!

I installed Power Phlogger to monitor my web stats. There is in the installation manual a line that i should add to my " documents.
Something like this:

<script language="JavaScript" type="text/javascript" src="pphlogger.js"></script>
<noscript><img alt="" src="http://www.yourserver.com/pphlogger/pphlogger.php?id=username&st=img"></noscript>

Ofcourse I replaced addres line to match my propertis and added this to mainfile.php at the bottom. And after this I only see a blank screen entering my website...

Anybody know whats wrong?

Thanks in advance.

Michael





2
Mithrandir
Re: Xoops + Power Phlogger

Why on earth did you add it to the mainfile.php? mainfile.php is not for outputting data to the screen.

Add it to your theme's theme.html for it to show up on all pages

Also read this

3
carnuke
Re: Xoops + Power Phlogger
  • 2004/10/1 9:45

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5


The recommended place for this js is right at the bottom of the theme.html file.

4
potamkin
Re: Xoops + Power Phlogger
  • 2004/10/4 15:59

  • potamkin

  • Just popping in

  • Posts: 4

  • Since: 2004/9/30


Thanks for reply.

But still no luck....
I added the line to theme.html at the bottom in the body section but it still does'nt count a thing

My theme.html file looks like this

______________________________________________________________
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<head>
<meta http-equiv="content-type" content="text/html; charset=<{$xoops_charset}>" />
<meta http-equiv="content-language" content="<{$xoops_langcode}>" />
<meta name="robots" content="<{$xoops_meta_robots}>" />
<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<meta name="description" content="<{$xoops_meta_description}>" />
<meta name="rating" content="<{$xoops_meta_rating}>" />
<meta name="author" content="<{$xoops_meta_author}>" />
<meta name="copyright" content="<{$xoops_meta_copyright}>" />
<meta name="generator" content="XOOPS" />
<title><{$xoops_sitename}>-<{$xoops_pagetitle}></title>
<link href="<{$xoops_url}>/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_url}>/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<!-- RMV: added module header -->
<{$xoops_module_header}>
<script type="text/javascript">
<!--
<{$xoops_js}>
//-->
</script>
<script language="JavaScript1.2">
var highlightcolor="#89929E"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj
var intended=/INPUT|TEXTAREA|SELECT|OPTION/
function checkel(which){
if (which.style&&intended.test(which.tagName)){
if (ns6&&eventobj.nodeType==3)
eventobj=eventobj.parentNode.parentNode
return true
}
else
return false
}
function highlight(e){
eventobj=ns6? e.target : event.srcElement
if (previous!=''){
if (checkel(previous))
previous.style.backgroundColor=''
previous=eventobj
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
}
else{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor
previous=eventobj
}
}
</script>
</head>
<body>
</table>
<tr>
<td> <table width="100%" cellspacing="0">
<tr id="header">
<td id="headerlogo"><a href="<{$xoops_url}>/"><img src="<{$xoops_imageurl}>images/logo.jpg" alt="Design by 7dana.com" border="0" /></a></td>
<td align="center" id="headerlogo"><{$xoops_banner}>&nbsp;</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab_left.gif" border="0" /></td>
<td align="middle" width="100%" background="<{$xoops_imageurl}>images/top_tab_bg.gif"></td>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab_right.gif" border="0" /></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="220" class="headerprvi"><{if $xoops_isuser}>&nbsp;&nbsp;Hello&nbsp;<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a> !<{else}>
<form onkeyup="highlight(event)" onclick="highlight(event)" style="margin-top: 2px; margin-bottom: 0px" action="<{$xoops_url}>/user.php" method="post">
<input name="uname" onblur="if(this.value=='') this.value='Username';" onfocus="if(this.value=='Username') this.value='';" type="text" value="Username" size="10" />
<input onblur="if(this.value=='') this.value='Password';" onfocus="if(this.value=='Password') this.value='';" value="Password" name="pass" type="password" size="10" />
<input type="hidden" name="op" value="login" />
<input name="submit" type="submit" value="Login" />
</form>
<{/if}></td>



<td align="left" class="headercenter"> <{if $xoops_isuser}> <{else}>
<form style="margin-top: 2px; margin-bottom: 0px" action="<{$xoops_url}>/register.php" method="post">
<input name="submit" type="submit" value=" Join " />
</form>
<{/if}> </td>
<td width="180" align="right" class="headerdrugi"> <form style="margin-top: 1px; margin-bottom: 0px" action="<{$xoops_url}>/search.php" method="post">
&nbsp;&nbsp;
<input class="button" type="text" name="query" size="15" />
<input type="hidden" name="action" value="results" />
<input name="submit" type="submit" value="search" />
</form></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat_left.gif"
border="0" /></td>
<td align="middle" width="100%"
background="<{$xoops_imageurl}>images/bot_cat_bg.gif"></td>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat_right.gif"
border="0" /></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" id="glavna">
<td id="leftcolumn"> <!-- Start left blocks loop -->
<{foreach item=block from=$xoops_lblocks}>
<div class="<{cycle values="blockTitle"}>"><{$block.title}></div>
<div class="blockContent"><{$block.content}></div>
<{/foreach}>
<!-- End left blocks loop -->
<br />
<br />
<img src="<{$xoops_imageurl}>images/160.gif" width="160" height="1" alt="" /> </td>
<td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab2_left.gif" border="0" /></td>
<td align="middle" width="100%" background="<{$xoops_imageurl}>images/top_tab2_bg.gif"></td>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab2_right.gif" border="0" /></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="centercolumn"> <!-- Display center blocks if any -->
<{if $xoops_showcblock == 1}>
<table class="sadrzaj" cellspacing="0">
<tr>
<td id="centerCcolumn" colspan="2"> <!-- Start center-center blocks loop -->
<{foreach item=block from=$xoops_ccblocks}>
<table align="center" cellpadding="0" cellspacing="2">
<tr>
<td> <div class="blockTitle"><{$block.title}></div>
<div class="blockContent"><{$block.content}></div></td>
</tr>
</table>
<{/foreach}>
<!-- End center-center blocks loop --> </td>
</tr>
<tr>
<td id="centerLcolumn"> <!-- Start center-left blocks loop -->
<{foreach item=block from=$xoops_clblocks}>
<table class="blok" align="center" cellpadding="3" cellspacing="2">
<tr>
<td> <div class="blockTitle"><{$block.title}></div>
<div class="blockContent"><{$block.content}></div></td>
</tr>
</table>
<{/foreach}>
<!-- End center-left blocks loop --> </td>
<td id="centerRcolumn"> <!-- Start center-right blocks loop -->
<{foreach item=block from=$xoops_crblocks}>
<table class="blok" align="center" cellpadding="3" cellspacing="2">
<tr>
<td> <div class="blockTitle"><{$block.title}></div>
<div class="blockContent"><{$block.content}></div></td>
</tr>
</table>
<{/foreach}>
<!-- End center-right blocks loop --> </td>
</tr>
</table>
<{/if}>
<!-- End display center blocks -->
<div id="content"> <{$xoops_contents}> </div>
<br />
<br />
<br /> </td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat2_left.gif"
border="0" /></td>
<td align="middle" width="100%"
background="<{$xoops_imageurl}>images/bot_cat2_bg.gif"></td>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat2_right.gif"
border="0" /></td>
</tr>
</table></td>
<{if $xoops_showrblock == 1}>
<td id="rightcolumn"> <!-- Start right blocks loop -->
<{foreach item=block from=$xoops_rblocks}>
<div class="<{cycle values="blockTitle,blockTitle"}>"><{$block.title}></div>
<div class="blockContent"><{$block.content}></div>
<img src="<{$xoops_imageurl}>images/160.gif" width="160" height="1" alt="" /> <{/foreach}>
<!-- End right blocks loop -->
<br />
<br /> </td>
<{/if}> </tr>
<tr>
<td colspan="3"></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab_left.gif" border="0" /></td>
<td align="middle" width="100%" background="<{$xoops_imageurl}>images/top_tab_bg.gif"></td>
<td width="21"><img src="<{$xoops_imageurl}>images/top_tab_right.gif" border="0" /></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr align="center">
<td align="center" bgcolor="#89929E" class="privatnost">Copyright Š 2003
by <a href="<{$xoops_url}>" target="_self"> your company </a>&nbsp; | &nbsp;<{$xoops_footer}> &nbsp;| &nbsp;
<!-- Webmaster, dont remove this text. It denied by license! -->
Design by <a href="http://www.7dana.com" target="_blank">7dana.com</a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat_left.gif"
border="0" /></td>
<td align="middle" width="100%"
background="<{$xoops_imageurl}>images/bot_cat_bg.gif"></td>
<td width="21"><img
src="<{$xoops_imageurl}>images/bot_cat_right.gif"
border="0" />
<table width="100%" cellspacing="0">
<tr id="footerbar">
<td><a href="https://xoops.org/" target="_blank"><img src="<{$xoops_imageurl}>poweredby.gif" alt="" /></a>
<{if $xoops_isadmin != 1}>
<script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src = "http://YOUR_XOOPS_SITE_URL/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&refer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>
<{/if}></td>
</tr>
</table></td>
</tr>
<script>showme='y'; st='js'</script>
<script language="JavaScript" type="text/javascript" src="http://members.lycos.co.uk/p0t4mk1n/pphlogger/showhits.php?id=potamkin&st=js"></script>
<script language="JavaScript" type="text/javascript" src="http://dhost.info/potamkin/pphlogger.js"></script>
<noscript><img alt="" src="http://members.lycos.co.uk/p0t4mk1n/pphlogger/pphlogger.php?id=potamkin&st=js"></noscript>
</table>
<br>

</body>
</html>
____________________________________________________________

Whats wrong?

Thanks in advance for any help.

Michael

5
kerrysl
Re: Xoops + Power Phlogger
  • 2004/10/27 6:29

  • kerrysl

  • Just popping in

  • Posts: 21

  • Since: 2003/9/9 6


Did you get this working or not?

I use PPHLogger on several sites and wanted it on my XOOPS one as well. What I did was create a smarty tage for the Logger code in header.php like so;
// PPHLogger insert code for template
    
$xoopsTpl->assign('xoops_pphlogger','<!-- PowerPhlogger Code START --><script language="JavaScript" type="text/javascript" src="http://www.domainname.com/pphlogger.js"></script><noscript><img alt="" src="http://www.domainname.com/pphlogger/pphlogger.php?id=username&st=img"></noscript><!-- PowerPhlogger Code END -->');


All of that code works best on one line.

Then in theme.html I just added;
</head>
<
body background="<{$xoops_imageurl}>white16.jpg">
<{
$xoops_pphlogger}>


just after the body tag as you can see. This is working for me. I found that using an absolute path for the JS file to be useful because you don't know from what directory your header and theme files are going to be called.

One gotcha to watch out for. Did you upload the pphlogger.js file to the XOOPS root directory? It won't work without the JS file being in place.

Is there a way to get the PHP version (PHP+JS) rathen than just the JS. I don't know how we can insert PHP into the final page output. I run this site on the same server as the PPHLogger script so I would prefer to use PHP+JS so that I can log search engine spiders. On one of my other sites I do this which is easy because all of the public pages are .php files.

Login

Who's Online

229 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits