Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Stats
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 57
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
i just installed the stats mod and when you click it i get this message

Couldn't retrieve smilie data

DEBUG MODE

SQL Error : 1054 Unknown column 'smile_stat' in 'field list'

SELECT SUM(smile_stat) as total FROM nuke_bbsmilies

Line : 464
File : /home/stealths/public_html/html/modules/Forums/statistics.php

now when i ran the install it said errors that i had duplicate on the smilies




_________________
Back to top Reply with quote
#2   re: Stats
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
You have to also install the smilies statistics mod.
[ Register or login to view links on this board. ]




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 57
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
ok did that but it won't install




_________________
Back to top Reply with quote
#4   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 45
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
Follow the thread there they have more experiance with that mod.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   
aUsTiN
CZ Active Member
aUsTiN has been a member for over 20 year's 20 Year Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 


Originally posted by stealthusa @ Tue May 11, 2004 11:23 am:

ok did that but it won't install


So much for the sticky i posted to make everyones life easier. Why wont it install, please post the error & all.



Back to top Reply with quote
#6   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 57
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
ok the smilies list will show on the site now i went to install the topsmilie_install
and the page that comes up says this.

Sorry, such file doesn't exist...

here is the topsmilie_install codes.

<?php
        /***************************************************************************
                                   topsmilies_install.php
                                     -------------------
            begin                : Tue February 26 2002
            copyright            : (C) 2002 Nivisec.com
            email                : [ Register or login to view links on this board. ]
         
            $Id: topsmilies_install.php,v 1.2.2 2002/04/18 02:43:12 nivisec Exp $
         
         ***************************************************************************/
         
        /***************************************************************************
         *                                                                                         
         *   This program is free software; you can redistribute it and/or modify       
         *   it under the terms of the GNU General Public License as published by   
         *   the Free Software Foundation; either version 2 of the License, or             
         *   (at your option) any later version.
         *
         ***************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
if ($popup != "1"){
    $module_name = basename(dirname(__FILE__));
    require("modules/".$module_name."/nukebb.php");
}
else
{
    $phpbb_root_path = 'modules/Forums/';
}

define('IN_PHPBB', true);
ini_set('ignore_user_abort', "1");
ini_set('max_execution_time', "120120");

include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

function top_smilies($message)
{
    global $db, $board_config;

    $sql = "SELECT code, smilies_id, smile_stat
    FROM " . SMILIES_TABLE;

    if( !$result = $db->sql_query($sql) )
    {
        message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql);
    }
    $smile = $db->sql_fetchrowset($result);

    for ($i = 0; $i < count($smile); $i++)
    {
        if ($count_smile = preg_match_all ("/(?<=.\\W|\\W.|^\\W)" . phpbb_preg_quote($smile[$i]['code'], "/") . "(?=.\\W|\\W.|\\W$)/", ' ' . $message . ' ', $tmp_smile))
        {
            $smilie_usage = $smile[$i]['smile_stat'] + $count_smile;
            $sql = 'UPDATE ' . SMILIES_TABLE . '
            SET smile_stat = ' . $smilie_usage . '
            WHERE smilies_id = ' . $smile[$i]['smilies_id'];

            if( !$result = $db->sql_query($sql) )
            {
                message_die(GENERAL_ERROR, "Couldn't update smilies data", "", __LINE__, __FILE__, $sql);
            }
        }
    }
}

if(isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']))
{
    $mode = (isset($HTTP_POST_VARS['mode'])) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}

$userdata = session_pagestart($user_ip, PAGE_INDEX, $board_config['session_length'], $nukeuser);
init_userprefs($userdata);

if ($userdata['user_level'] != ADMIN)
{
    die('Please log into an administrator enabled account before running this script');
}

print '<html><body>Please make sure to delete this file after you install/uninstall the new table addition to prevent security problems!';
print '<br /><a href="modules.php?name=Forums&file=topsmilies_install&mode=change">Install the new database field</a><br />';
print '<br /><a href="topsmilies_install&mode=uninstall">Un-install the new database field</a><br />';
print '<br /><a href="modules.php?name=Forums&file=topsmilies_install&mode=import">Import your old smilies into the new database field.  Do this only after you have created it!<font color="red"> This WILL take some time if you have a lot of posts</font></a><br />';

if ($mode == 'change')
{
    $sql = "ALTER TABLE " . SMILIES_TABLE . "
    ADD smile_stat MEDIUMINT UNSIGNED DEFAULT 0 NOT NULL";

    if (!$db->sql_query($sql))
    {
        print '<br><br><font color="red">Unable to insert smile_stat field<br>Maybe it is already inserted?</font><br>SQL Used: ' . $sql;
    }
    else
    {
        print '<br><br><font color="blue">Inserted smile_stat field...</font><br>SQL Used: ' . $sql;
    }
    print '<hr>Checking Values, make sure they contain data!  You should see the smilie code and a number after each, probably the number 0.<br>If you do not see these values, you will have to add this table field manually to get smilies to work!<br><br>';
    $sql = "SELECT code, smile_stat FROM " . SMILIES_TABLE;
    $result = $db->sql_query($sql);
    print '<br><br>';
    while ($row = $db->sql_fetchrow($result))
    {
        print '<br>Smilie Code: ' . $row['code'] . '</td><td>Smilie Uses: ' . $row['smile_stat'];
    }
}
else if ($mode == 'uninstall')
{
    $sql = "ALTER TABLE " . SMILIES_TABLE . "
    DROP smile_stat";
    if (!$db->sql_query($sql))
    {
        print '<br><br><font color="red">Unable to DROP smile_stat field.  Perhaps it is already dropped?</font><br>SQL Used: ' . $sql;
    }
    else
    {
        print '<br><br><font color="blue">Dropped smile_stat field.</font><br>SQL Used: ' . $sql;
    }
}
else if ($mode == 'import')
{
    $sql = "SELECT MAX(post_id) as max, MIN(post_id) as min
    FROM " . POSTS_TABLE;

    $result = $db->sql_query($sql);

    $postrow = $db->sql_fetchrow($result);

    print '<br />Starting ID = ' .$postrow['min'];
    print '<br />Ending ID = ' .$postrow['max'];
     
    for ($i = $postrow['min']; $i <= $postrow['max']; $i++)
    {
        $sql = "SELECT post_id, post_text
        FROM " . POSTS_TEXT_TABLE . "
        WHERE post_id = " . $i;
        $result = $db->sql_query($sql);

        $row = $db->sql_fetchrow($result);

        top_smilies($row['post_text']);
        print '<br>Post: ' . $i . ' Done.';
    }
}
?>
</body></html>




_________________
Back to top Reply with quote
#7   
aUsTiN
CZ Active Member
aUsTiN has been a member for over 20 year's 20 Year Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 
What file doesn't exist...



Back to top Reply with quote
#8   
stealthusa
CZ Addict
stealthusa has been a member for over 20 year's 20 Year Member
usa.gif ohio.gif
Occupation: Self-Employed
Age: 57
Gender: Male
Fav. Sports Team: Cowboys
Website:
Status: Offline
Joined: Jan 23, 2004
0.05 posts per day
Posts: 353
Points: 14,459
 Yahoo Messenger  ICQ Number
the one i posted the installer when you try to run it that is what you get on the next page.




_________________
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum