Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Third Party Products and Support:
how to add php or html to index.php
flawclothing



Joined: 21 Dec 2006
Posts: 127

Posted: 12/27/06 14:31 
Im not sure if this is in the right place... but im trying to add my statcounter code to index.php, and it doesnt seem to be working no matter where i place it. I could put it in header or foot templates , but then my stats say all hits came from my index page, instead of google or whatever. where would i add this code? thanks!

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 12/27/06 14:34 
you will want to add it to a template file in the skins directory (most likely skins/Cobalt if that is your current skin). all you need to do is place it inside of {php}{/php} tags inside the template.

Back to top
flawclothing



Joined: 21 Dec 2006
Posts: 127

Posted: 12/27/06 14:38 
yes , i can do that ok... the only problem is since the index page calls those templates... my stats say all hits came from www.bandoftheweek.com instead of google or other sites... i would like to see where visitors are coming from if possible

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 12/27/06 14:46 
good question...ill have to think about that one. the only problem with modifying the index.php file (or any of the core jamroom php files) is that it makes upgrading a complete headache, so that's why i would recommend not modifying it. jamroom has a built in count function you might look into using:

http://www.jamroom.net/Jamroom3_jr_counts

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 12/27/06 15:01 

flawclothing:
yes , i can do that ok... the only problem is since the index page calls those templates... my stats say all hits came from www.bandoftheweek.com instead of google or other sites... i would like to see where visitors are coming from if possible


the jr_overall_footer.tpl is pulled into the jr_index.tpl file via a smarty {include} function - that doesn't hit your web server so it can't be counted as a "hit" - the footer is definitely where you want to place the code.

Can you show me what the code is you are placing in your footer?

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
flawclothing



Joined: 21 Dec 2006
Posts: 127

Posted: 12/27/06 15:08 
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2019295;
var sc_invisible=1;
var sc_partition=18;
var sc_security="a3b64208";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c19.statcounter.com/counter.php?sc_project=2019295&amp;java=0&amp;security=a3b64208&amp;invisible=1" alt="free hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->

Back to top
flawclothing



Joined: 21 Dec 2006
Posts: 127

Posted: 12/27/06 15:10 

smith.kyle:
jamroom has a built in count function you might look into using:

http://www.jamroom.net/Jamroom3_jr_counts

yes, sort of like the dashboard feature... whats so cool about statcounter is i can find out what kind of marketing is working and what is not, where users are finding my page from , what country, city, state, etc. its awesome

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 12/27/06 15:15 

flawclothing:
<!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=2019295;
var sc_invisible=1;
var sc_partition=18;
var sc_security="a3b64208";
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><a href="http://www.statcounter.com/" target="_blank"><img src="http://c19.statcounter.com/counter.php?sc_project=2019295&amp;java=0&amp;security=a3b64208&amp;invisible=1" alt="free hit counter" border="0"></a> </noscript>
<!-- End of StatCounter Code -->


That should work just fine - when you add that the jr_overall_footer.tpl, then view your site, and choose "View Source" you should see it - if so, since it just javascript, it will record the "view" you just did with your browser.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
remconeggers



Joined: 04 Jan 2007
Posts: 5

Posted: 02/06/07 13:41 
I would like also to add a php script, but when i do so ,
the indexpage wil not show it can you see what i do wrong:

<!-- Nieuws -->
<div class="head-2">Nieuws</div>
<div class="body-2">
{php}<?php include "ticker.php"; ?>{/php}
</div>

I hope anyone can help me...

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 02/06/07 13:44 
You'll want to do it like this:


Code
<!-- Nieuws -->
<div class="head-2">Nieuws</div>
<div class="body-2">
{include_php file="{$JAMROOM_URL}/ticker.php"}
</div>


But make sure that the path to the ticker.php script is correct. (make sure you put the FULL path to it, and that should work).


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
remconeggers



Joined: 04 Jan 2007
Posts: 5

Posted: 02/06/07 15:02 
then i get this see www.bandtastic.eu on the right below

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 02/06/07 15:06 
Duh, my bad, this one will work, sorry!


Code
<!-- Nieuws -->
<div class="head-2">Nieuws</div>
<div class="body-2">
{include_php file="`$JAMROOM_URL`/ticker.php"}
</div>



_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
remconeggers



Joined: 04 Jan 2007
Posts: 5

Posted: 02/06/07 15:19 
No it don't work, dont i need to say:

something with this i do no;

<a href="{$JAMROOM_URL}/ticker.php

Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 02/06/07 15:20 
try this:

<!-- Nieuws -->
<div class="head-2">Nieuws</div>
<div class="body-2">
{jr_fetch file="`$JAMROOM_URL`/ticker.php"}
</div>

or replace `$JAMROOM_URL` with http://www.bandtastic.eu


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
remconeggers



Joined: 04 Jan 2007
Posts: 5

Posted: 02/06/07 15:23 
JEAHHHH BABY oh thanx dude...

it works Very Happy

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Third Party Products and Support

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.