1
jensclas
I-Stats not counting

I am hoping i just missed something somewhere - but after turning my site on and getting 2 new members and seeing other people online while i was there I see the counter is still at 0....What might I need to to to make it count? (In simple step by step terms please...I get lost easily when tinkering with PHP and tables!)

Thanks

2
brash
Re: I-Stats not counting
  • 2004/11/29 20:51

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Shouln't be too much to it. Major steps will be to edit you theme.html file to include the js, and then ensure you update your theme in XOOPS so that the changes take effect. I haven't looked at I-Stats in a while, but there should be a readme or install file giving pretty detailed installtion instructions.

3
sylvainb
Re: I-Stats not counting
  • 2004/11/29 23:22

  • sylvainb

  • Not too shy to talk

  • Posts: 168

  • Since: 2003/2/11


Hello Jensclas

Always the same question, always the same answer.

I just visited your website and edited his source and I cannot see the portion of javascript code that you MUST put in it to see istats working fine.

I have nothing against you but seeing this kind of question time after time after time after....
I think, sometimes, that people should think about doing a search before just asking.

And, like Brash said, the xoops2_install.txt file contain all the necessary things to run this script, all you have to do is to read it.

I hope you will not take any offences as it's really not against you.

So, after saying that, here is what you have to do:

- Edit your theme.html and add near the </body> tag and before it the javascript code
<script type="text/Javascript">
          <!--
          
istat = new Image(1,1);
          
istat.src "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
          
//-->
          
</script>


- Now you have two choices, you can delete all files into your templates_c folder or you can go into the admin section of XOOPS --> system admin -> Preferences -> General settings -> then set Update module template .html files from themes/your theme/templates directory? to yes.

Go to your Home page and if you edit your website source you should be able to view the code.
Don't forget to set the above option back to no after you are sure that your templates are updated.


Kind Regards

4
jensclas
Re: I-Stats not counting

Well guys -Thanks for your help but I am still not there yet. I first must say I get really disappointed when i read Quote:
Always the same question, always the same answer


I am a newbie - but one smart enough to have done the search and then make the call for help -- the answers I found in searching didn't make sense to me. I was lost. I am also a teacher so I do sympathise with your frustration...but I think I can help some with how to make sure you don't get the same questions and answers all the time. I'll tackle this below.

I do not have expertise in html or php and need some hand holding - which is why i specifically asked for Quote:
(In simple step by step terms please...I get lost easily when tinkering with PHP and tables!)


The answer you have given me have either been misunderstood by me or not clear enough. It is really impoortant that you don't make the assumption that it is easy for the learner. Have you ever tried to make sense of Chinese or Arabic, or the egyptian hieroglyphics? Well for some of us that's what looking at codes is like...and while we are prepared to learn going to a file and modifying a code is scary, it is risj taking, it makes people like me a bit anxious that we won't stuff it right up and send our sites into cyberspace! So...when you are asked to help with a question like this please keep in mind what experience your audience might have - I make it clear I am on L plates - so I need to be guided carefully so I don't crash or bail out.

Off my soap box now

The install file kinda threw me...so I followed sylvainb's instructions. But I obviously did not get it right becuase the counter is still not working.
Quote:
Edit your theme.html and add near the </body> tag and before it the javascript code
<script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src = "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>


I did this...it looks like this:

Quote:
</table>
<div id="footer"><{$xoops_footer}></div>
<script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src = "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>

</body>
</html>




This was the only refence to </body> I could find in the file - near the bottom - I pasted the code Quote:
near and before it
but it hasn't worked.

So...can you please help me with what might still not be right?

Thanks for trying with me...but I still need your help!

PS...an easy way to help newbies with this stuff is to do this:
Go to your publichtml/themes/your site theme/theme.html file and oprn it to edit the code. Scroll to near the bottom. Find the section of code illustrated below.
Paste this code (code code code) in the place where the smileys are below.

</table>
<div id="footer"><{$xoops_footer}></div>

</body>
</html>

IUmm....if that is what you meant!

Cheers

5
sylvainb
Re: I-Stats not counting
  • 2004/12/1 21:49

  • sylvainb

  • Not too shy to talk

  • Posts: 168

  • Since: 2003/2/11


Hello Jensclas

You've given me a simple but efficient lesson on how to make a good support.

I'm sorry not to have written that but rather to realize that the xoops2_install.txt is not clear enough for newbies.

I want to also add that if you had mentioned that research that you had made had not been effective to answer your questions, I would probably not have begun my response in this way.

But what is fact is made then pass to your problem.


First option

You were right when you had put the javascript code like this:
</table>
<
div id="footer"><{$xoops_footer}></div>
<
script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>

</
body>
</
html>


Now I can see that you have the same code between the </head> and <body> tags:
<!--
//--></script><script type="text/javascript" src="http://www.jensclassroom.com/include/xoops.js"></script><script type="text/javascript"><!--
//-->
</script>
</
head>
 <
script type="text/Javascript">
          <!--
          
istat = new Image(1,1);
          
istat.src "http://http://www.jensclassroom.com/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
          
//-->
          
</script>

<
body>
<
table cellspacing="0" id="top">


Don't forget that all changes into your theme.html file will not take effect until you have done the last point I mentioned:
Quote:

- Now you have two choices, you can delete all files into your templates_c folder or you can go into the admin section of XOOPS --> system admin -> Preferences -> General settings -> then set Update module template .html files from themes/your theme/templates directory? to yes.

Go to your Home page and if you edit your website source you should be able to view the code.
Don't forget to set the above option back to no after you are sure that your templates are updated.



Second option

By the way, I realize that your theme is using a usefull smarty variable ->> <{$xoops_footer}>.

So you can try another thing:
Go to System Admin -> Preferences -> Meta Tags and Footer and click [Edit].
There, copy the javascript code:
<script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>

and paste it into the Footer section below what already exist so you should have this:
Powered by XOOPS 2.0 © 2001-2003 <a href="https://xoops.org/" target="_blank">The XOOPS Project</a>
<
script type="text/Javascript">
<!--
istat = new Image(1,1);
istat.src "http://<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
//-->
</script>


It'll be simpler but if you change your theme and if it doesn't have the smarty variable <{xoops_footer}> you will have to do the first option.

I hope it is clear enough...at least not to confusing!

Still sorry if I wounded you, it was not my intention.
My English is rather old, I learned it 17 years ago, and I rely sometimes on Google which is not always effective.

Friendly

6
jensclas
Re: I-Stats not counting

Sylvainb Thank you for posting again
From what you write it appears I did it right but the counter hasn't counted anything in the last two days. I have just done your second option and hope that works.

I have in fact updated the module template and then turned it off again as it is advised not to have this turned on while the site is live. So here are some more questions for you -

1. why do we need to turn it off again when the site is live? (I think I will post this one to Q and A too)
2. Should the site have been closed while I was making these changes? (since it isn't counting I am wondering if the site should have been turned off while I was making the changes)
3. You gave me this option
Quote:
you can delete all files into your templates_c folder

Deleting any files is scary for me...so what is the Templates_c folder? Is it a temporary file folder???
I see lots of files there which are like this
db%3Axcgal_thumb.html - all related to the modules
and files related to the two active themes on my site -they start with the theme name.
What will deleting all of these do?

I am not really that wounded...I figure it's a bit of a two way street here - you teach me the bits of XOOPS that confuse me and I teach you how to write better responses for the XOOPS learners.
Since our conversation is public hopefully others will learn too!

Looking forward to learning some more with your response...your favourite kid in the class
Jenny

7
sylvainb
Re: I-Stats not counting
  • 2004/12/2 22:50

  • sylvainb

  • Not too shy to talk

  • Posts: 168

  • Since: 2003/2/11


Hello Jenny

I'm really confused because I introduced an error into the javascript code you have to add into your theme.html file.

If you use the first option and so decide to add the code into the theme.html, you have to add this before the closing tag </body>:
<script type="text/Javascript">
    <!--
    
istat = new Image(1,1);
    
istat.src "<{$xoops_url}>/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
    
//-->
    
</script>

Did you see the difference? There isn't the 'http://' before the smarty variable (istat.src = "<{$xoops_url}>....) because it already has it!

Now my second error is with the option two.
I haven't tested before the possibilty of adding the same javascript code into the meta/footer section of xoops!
So I just realize that <{$xoops_url}> is not interpreted.
The code you have to add with the option two is:
<script type="text/Javascript">
          <!--
          
istat = new Image(1,1);
          
istat.src "http://www.jensclassroom.com/modules/istats/include/counter.php?sw="+screen.width+"&sc="+screen.colorDepth+"&referer="+escape(document.referrer)+"&page="+location.href;
          
//-->
          
</script>


I don't know what to say more...maybe nothing and rather than saying other silly things, it would be better for everybody that I go to sleep.

Now to answer to your several questions:

1 - Because rather than using files into the templates_c folder (a cache) XOOPS will always going to read your theme files into your theme folder and each files will need to be parsed by smarty (more time consuming). (Others can tell me if I'm wrong, I will take no offences. )

2 - You can do such things with your site opened.

3 - You can do this without risks, each file will be rebuilt at the time of its next call.
But if you are really afraid, you can seek only the file(s) *theme.html and erase them/it.
Please note that you don't need to do this if you turn to Yes the option 'Update module template...'.

I hope that this time will be the maid for you and istats and that you will see finally this module functioning.


Sylvain (too tired )

8
Mantooth
Re: I-Stats not counting
  • 2004/12/4 21:36

  • Mantooth

  • Friend of XOOPS

  • Posts: 189

  • Since: 2004/11/2


I was having the same problem because the installation text confused me a little bit.

Quote:
Included into this text (point number 3), modification to prevent admin to be counted by the module (Lucastds).


I did not care if admins were counted by the module so I skipped step 3. But then I found this thread and realized my mistake.



I have a question though. I hope it hasn't been answered already but i searched the forum and did not find a solution. Is it possible for me to set the hit counter at a certain number? I was using a different counter before and do not want to start at "0" again.

thanks for the great module and i hope to hear from you

9
jdseymour
Re: I-Stats not counting

See this thread.

https://xoops.org/modules/newbb/viewtopic.php?topic_id=27604&forum=28

10
Mantooth
Re: I-Stats not counting
  • 2004/12/4 22:30

  • Mantooth

  • Friend of XOOPS

  • Posts: 189

  • Since: 2004/11/2


Yikes! I wish i'd seen that thread before. i used the search on this site and typed in "i-stats" and also tried "istats" but that thread did not come up in the results. After your reply, I tried again and noticed the "show all results" link underneath. I was wondering why i haven't gotten a reply to any of my previous questions and now I realized there was probably a thread already.

I humbly apoligize for this terrible display of newbishness. And thanks for helping me out anyways

Login

Who's Online

151 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 151


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