iGaming CMS Forums  

Go Back   iGaming CMS Forums > iGaming CMS 2 > General Questions - 2.x
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2007, 01:18 PM
Boon™ Boon™ is offline
Junior Member
 
Join Date: Dec 2007
Posts: 3
Send a message via Yahoo to Boon™
Default This game has been viewed VIEWS; ?> times

I've done a fresh install of 2.0.0 A1 (test server - localhost).

On the game detail page, where it should show views I get this

This game has been viewed VIEWS; ?> times.

Also when I check the database, games table, the views counter is not incrementing.

Server
PHP Version: 5.2.4
MySQL Version: 5.0.45-community-nt
iGaming CMS: 2.0.0 A1

Windows XP

Looking at the gamedetails.php file, I don't see where this information is output to template so not sure where to look to fix it.

Last edited by Boon™ : 12-12-2007 at 01:24 PM.
Reply With Quote
  #2  
Old 12-14-2007, 01:24 PM
Shujjah Shujjah is offline
Junior Member
 
Join Date: Nov 2007
Posts: 9
Default

it is Alpha not everything is done
Reply With Quote
  #3  
Old 06-21-2008, 12:32 PM
UnderDog UnderDog is offline
Administrator
 
Join Date: Sep 2007
Posts: 95
Thumbs up

Quote:
Originally Posted by Shujjah View Post
it is Alpha not everything is done
You're absolutely right, but it's quite easy to fix, so here we go:
Go to /admin/templates.php (unfortunately there isn't a menu choice so you need to type it in manually)
You see all possible templates you can edit
Click on game_profile
You see a bunch of html, just ignore it.
Scroll all the way down
Find
Code:
  <p>
    This game has been viewed <?php echo $row->VIEWS; ?> times.
  </p>
Replace with
Code:
  <p>
    This game has been viewed {views} times.
  </p>
Click on Save Template

Now you need to change 1 more thing
Open gamedetails.php
Find
$game->addvar( '{description}', clean($row->DESCRIPTION) );
Below that, add
$game->addvar( '{views}', stripslashes($row->VIEWS) );

It keeps showing that it has been viewed 0 times, but we can fix that later on

Last edited by UnderDog : 06-21-2008 at 12:34 PM.
Reply With Quote
  #4  
Old 03-07-2009, 10:42 PM
Tyler2499 Tyler2499 is offline
Human Junior Member
 
Join Date: Jul 2008
Posts: 5
Default

You should tell them how to get it so it can be on the menu... I guess i will.
go to yoursite.com/root/admin/modules.php?do=install
type in Modules Then click bottom box and type modules.php Click Install then enable it by going to modules.php finding it and clicking enable module

do the same for templates.php

Now you can access the template section a lot easier

EDIT: Fix View Count!
Edit the gamedetails.php file

Find
PHP Code:
      $views $row->VIEWS 1;
      
$db->Execute("UPDATE `sp_games` SET `views` = '$views' WHERE `id` = '$row->ID'"); 
Replace with
PHP Code:
      $views2=($row->VIEWS+1);
      
$db->Execute("UPDATE `sp_games` SET `views` = '$views2' WHERE `id` = '$id'"); 

Last edited by Tyler2499 : 03-08-2009 at 03:11 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:50 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.