Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: (SOLVED) Mint with sNews is it possible?  (Read 3041 times)

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
(SOLVED) Mint with sNews is it possible?
« on: January 16, 2008, 08:24:32 pm »

Mint: From http://www.haveamint.com/, what is Mint?  Mint is an extensible, self-hosted web site analytics program. Its interface is an exercise in simplicity. Visits, referrers, popular pages and searches can all be taken in at a glance on Mint's flexible dashboard.

With that said, Mint is a nice visitor tracking tool.  I have a license and want to integrate it into sNews.  I have used the instructions to insert the code, but it does not look like it will track sNews hits correctly.  I have found the following post http://snewscms.com/forum/index.php?topic=6309.0 but it does not explain how or where to integrate Mint into sNews to have it actually track visits.

Has anyone successfully gotten Mint to work with an installation of sNews?  If so could you please enlighten me with the process by which you used in order to track visits?
« Last Edit: January 22, 2008, 04:09:25 pm by bakercad »
Logged
Endlessly banging my head against the keyboard.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Mint with sNews is it possible?
« Reply #1 on: January 17, 2008, 01:06:06 am »

Of course -- it's close to a no-brainer.
Install Mint on your domain, according to the Mint instructions. Then in your index.php add the javascript call as normal, it's recommended to add it just before the closing </head> tag.

I've had no problems with Mint at all, in fact I could go as far as to say it's the best stats tool I've come across -- though they are arguably not that many -- and installation was just easy. Just note that you actually need to upload Mint to your domain. Just adding the javascript reference in the index.php isn't enough. But I'm sure you already know that. ;)

The <base href> fix in the post you mentioned isn't specifically for Mint, even if it might help using Mint with IE6 as well -- it's a way to avoid javascript problems with IE6. IE6 doesn't fully understand the <base> tag, and some scripts, like Mint and SWFObject to name but two, rely on the use of <base> for some of their stuff.
« Last Edit: January 17, 2008, 01:10:08 am by Fred K (agentsmith) »
Logged

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
Re: Mint with sNews is it possible?
« Reply #2 on: January 17, 2008, 05:07:49 am »

Of course -- it's close to a no-brainer.

Thanks agentsmith, I had pretty much thought the same.  Installation is of course very very simple.  However I am running into two problems and I am trying isolate whether or not it is Mint or sNews.  I think it is Mint. 

The first was (it is not, i think I have fixed it) that when browsing the site, the site would load but would hang towards the end, then after a minute or two it would finally finish loading.  During the time of "hung" inoperability all functionality of sNews would work except for the Preview when composing an article.  I believe I have fixed that one... for now.

The second one is the real issue that is plaguing me with sNews and Mint now.  It will register the hits, but it will not show the pages visited in Mint or anything... no referrer information, nor pages, etc.  Just a total hits and unique hits symbolized as a number.  Any idea agentsmith?  In the meantime I am looking at Mint's forums to see if I can find an answer there too.
Logged
Endlessly banging my head against the keyboard.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Mint with sNews is it possible?
« Reply #3 on: January 17, 2008, 10:25:12 am »

When you installed Mint -- did you get any errors or did the installation work properly? Does your server meet the Mint requirements? Obvious questions, I know, but I need to ask. I am by no means a Mint expert, mostly because for it has always Just Worked. So I haven't had to do any troubleshooting...

Perhaps (and this is a stab in the dark) there's something in your mint config that's not exactly right? I don't have time right now to run a fresh installation, but I'm doing that later tonight, maybe that'll shed some light on it for me.
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Mint with sNews is it possible?
« Reply #4 on: January 17, 2008, 06:42:26 pm »

I've just redone my mint installation and tested it with my local in-dev sNews site. No problems. Here's a screen (if I can show it, not sure):


Not very clear perhaps, but everything is working nicely.

What I did, after downloading Mint from haveamint.com + all the Peppers I wanted, was this:

1. Find mint/config/db.php, in your downloaded Mint 2.x folder, and open it in a good text editor (default Dreamweaver, as well as Frontpage, Rapidweaver and a bunch of other WYSIWYG editors/generators don't qualify as 'good' in this context. Word, Excel and other word processing/spreadsheet apps don't either.)

2. Enter your database info in db.php and save file. Mine looked like this:
Quote
'server'   => 'localhost',
   'username'   => 'xxxxxxx',
   'password'   => 'xxxXxxX',
   'database'   => 'name_of_snews_db', //Note: this is the db you run sNews with. Mint must run on the same one.
   'tblPrefix'   => 'mint_'

3. Copy the Pepper folders you need to the appropriate place in the mint/pepper folder (see instructions for the respective Pepper)
4. Upload the mint folder to your domain root. Note: the folder you upload is the one named "mint" that lives within the main "Mint 2.x" folder. Just to be clear.

5. In your index.php, add the script line to your <head>, recommended is just before the closing </head> tag:
Quote
<script type="text/javascript" src="mint/?js"></script>

6. Upload your index.php to your domain (unless, of course, you just updated the live version...)

7. Use your shiny browser to go to http://yourdomain.com/mint/
You should then, if the database info in db.php was correct, see a license agreement. Accept that. On the next screen, enter your preferred mint login credentials.

That's the whole shebang. Obviously you've done it already since you have Mint running, but there might be some detail that helps understand what might be going wrong.

You could also try looking in
8. Preferences (when logged in to Mint), and see if there's some setting(s) that isn't correct.

Hope that helps.
« Last Edit: January 17, 2008, 06:57:32 pm by Fred K (agentsmith) »
Logged

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
Re: Mint with sNews is it possible?
« Reply #5 on: January 17, 2008, 07:01:29 pm »

When you installed Mint -- did you get any errors or did the installation work properly?

No errors when installing. 

Does your server meet the Mint requirements?

Yes I ran the mint-scs to check requirements and it meets them, no errors.

Perhaps (and this is a stab in the dark) there's something in your mint config that's not exactly right?

No.  Not that I can see.  I think I am going to drop the db and reinstall everything again, perhaps it might have gotten corrupted somehow, but according to the Mint forums the Mint install is supposed to recognize if it is corrupt and do an auto-repair. 

Here is a screenshot of what I have on my install.  Notice the missing Pages/Referrers...

[img=http://img206.imageshack.us/img206/1918/safariscreenshot041qc7.th.png]


Logged
Endlessly banging my head against the keyboard.

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
Re: Mint with sNews is it possible?
« Reply #6 on: January 17, 2008, 07:13:44 pm »

5. In your index.php, add the script line to your <head>, recommended is just before the closing </head> tag:
Quote
<script type="text/javascript" src="mint/?js"></script>

Thanks again agentsmith for the help.  Let me tell you a few things and thoughts about my install.

1.  My Mint install is tracking visitors.
2. I am using KeyRocks MEMU (1.6) version of sNews, so the primary index page has the Template Switcher hack.  So I have placed the code that you referenced above in the tempate's index.php on the line prior to </head> (./templates/default/index.php).  This is because the original index.php is just including the templates folder.

Think that could be affecting it?

All other settings are fine, db connection, preferences, etc.

I am going to resinstall but probably not until tonight, then I will report back.
Logged
Endlessly banging my head against the keyboard.

crm

  • Newbie
  • *
  • Karma: 1
  • Posts: 26
    • planetmayfield.com
Re: Mint with sNews is it possible?
« Reply #7 on: January 17, 2008, 07:40:42 pm »

FIXED!!!

Okay thanks for the help.  I have fixed it.  Thanks agentsmith, karma for you!

My Steps...
1. Download the newest Mint (I found my Mint was out of date).
2. Drop the DB.
3. Create the DB again, grant different user ALL access on DB.
4. SCP min_v215.zip to my server and unzip there.
5. Edit /mint/config/db.php with new DB settings.
6. Hit mint and configure with license and it all works perfectly.

THANKS!!
Logged
Endlessly banging my head against the keyboard.

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
Re: Mint with sNews is it possible? (SOLVED)
« Reply #8 on: January 17, 2008, 08:12:19 pm »

Cool. Good that you got it working. It could've been any small thing, but it's possible that either this
Quote from: crm
2. I am using KeyRocks MEMU (1.6) version of sNews, so the primary index page has the Template Switcher hack.  So I have placed the code that you referenced above in the tempate's index.php on the line prior to </head> (./templates/default/index.php).  This is because the original index.php is just including the templates folder.
(My emphasis)

or possibly this
Quote from: crm
4. SCP min_v215.zip to my server and unzip there.
5. Edit /mint/config/db.php with new DB settings.

Regarding using Mint in combo with Key's MEMU installation (and esp., I think, the template switcher): the mint javascript line should most likely have to be in each of the templates' <head> for it to work properly across the board assuming that each template has its separate <head> section naturally. This may very well be what was causing the problem.

Anyway, glad if I could help some, and thanks for the karma. Now track those stats! ;D
Logged