| Autor |
Nachricht |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 12:45 |
  |
Also in der Anleitung steht ich soll die topsmilies_install.php hochladen und ausführen...aber wenn ich das tuhe steht da:
| Zitat: |
| Please log into an administrator enabled account before running this script |
Was nun ? |
|
|
      |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
Thomson
Universal Genius

Anmeldungsdatum: 05.08.2002
Beiträge: 4726
Wohnort: a shibby place
|
Verfasst am:
So 01 Sep, 2002 13:06 |
  |
Hallo,
ist zwar eine ungewöhnliche meldung, aber hast einfach mal probiert, dich als Admin einzuloggen (unten muss der Link zum ACP vorhanden sein) und erst dann das Update ausführen...
So würde das, wenn man es wörtlich übersetzt, funktionieren (müssen)..
MfG Tom |
_________________ There are only 10 types of people in the world: Those who understand binary, and those who don't... |
|
      |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 13:14 |
  |
nee das funzt leider auch nicht ! |
|
|
      |
 |
Thomson
Universal Genius

Anmeldungsdatum: 05.08.2002
Beiträge: 4726
Wohnort: a shibby place
|
Verfasst am:
So 01 Sep, 2002 13:24 |
  |
Hallo bl!ind,
Also, hab mal eben bei mir nachgesehen. Diese datei ist noch bei der "alten" Statistik dabei, wenn du die neue Version runterladest, ist dieses File nicht dabei. Sollte also meine topsmilies_install.php auch net funzen, dann such mal im DownloadBereich nach der neueren Version, die ist sowieso zum empfehlen, da sie um einiges schneller ist..
MfG Tom |
_________________ There are only 10 types of people in the world: Those who understand binary, and those who don't... |
|
      |
 |
Fabro
phpBB2.de User


Anmeldungsdatum: 02.08.2002
Beiträge: 1172
Wohnort: Bayern
|
Verfasst am:
So 01 Sep, 2002 13:50 |
  |
das problem sind deine cookies.
mach mal folgendes:
- Log dich als admin ein und schau dir oben in der adressleiste die url an. dort müsstest du was finden in der richtung von ?sid=...
- Das kopierst du nun an deine topsmilies_install.php dran (sollte dann ungefähr so aussehen: topsmilies_install.php?sid=....
Dann sollte das gehen.
Fabro |
_________________ [img]http://cgi.gbgr.de/spruch.png?d=2[/img] |
|
   |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 14:13 |
  |
das kommt da aber nicht ! |
|
|
      |
 |
Fabro
phpBB2.de User


Anmeldungsdatum: 02.08.2002
Beiträge: 1172
Wohnort: Bayern
|
Verfasst am:
So 01 Sep, 2002 14:45 |
  |
Dann sollte es auch so gehen.
Sehr merkwürdig.
Du kannst jetzt höchstens die Datei öffnen und die Admin-Überprüfung rausnehmen.
Fabro |
_________________ [img]http://cgi.gbgr.de/spruch.png?d=2[/img] |
|
   |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 16:06 |
  |
Und wie das ?
Ps:
Wie kann ich den Kalender auf die Index Seite bzw. in den Header linken so das da so ein Bild ist wo Kalender neben steht ? |
|
|
      |
 |
Fabro
phpBB2.de User


Anmeldungsdatum: 02.08.2002
Beiträge: 1172
Wohnort: Bayern
|
Verfasst am:
So 01 Sep, 2002 18:46 |
  |
Poste einfach mal die topsmiles_install.php
Dann sag ich dir das.
Fabro |
_________________ [img]http://cgi.gbgr.de/spruch.png?d=2[/img] |
|
   |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 18:53 |
  |
| Code: |
<?php
/***************************************************************************
topsmilies_install.php
-------------------
begin : Tue February 26 2002
copyright : (C) 2002 Nivisec.com
email : admin@nivisec.com
$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.
*
***************************************************************************/
define('IN_PHPBB', true);
ini_set('ignore_user_abort', "1");
ini_set('max_execution_time', "120120");
$phpbb_root_path = "./";
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']);
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="topsmilies_install.'.$phpEx.'?mode=install">Install the new database field</a><br />';
print '<br /><a href="topsmilies_install.'.$phpEx.'?mode=uninstall">Un-install the new database field</a><br />';
print '<br /><a href="topsmilies_install.'.$phpEx.'?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 == 'install')
{
$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.';
}
}
?>
|
|
|
|
      |
 |
Fabro
phpBB2.de User


Anmeldungsdatum: 02.08.2002
Beiträge: 1172
Wohnort: Bayern
|
Verfasst am:
So 01 Sep, 2002 19:03 |
  |
Einfach folgende Zeilen löschen:
| Code: |
if ($userdata['user_level'] != ADMIN)
{
die('Please log into an administrator enabled account before running this script');
} |
Fabro |
_________________ [img]http://cgi.gbgr.de/spruch.png?d=2[/img] |
|
   |
 |
stefan
Administrator


Anmeldungsdatum: 02.08.2002
Beiträge: 4735
Wohnort: Aachen
|
Verfasst am:
So 01 Sep, 2002 19:05 |
  |
|
      |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 19:14 |
  |
So ich hab das jetzt installiert und die Dateien alle geändert und wie macht sich der mod jetzt bemerkbar ? |
|
|
      |
 |
Thomson
Universal Genius

Anmeldungsdatum: 05.08.2002
Beiträge: 4726
Wohnort: a shibby place
|
Verfasst am:
So 01 Sep, 2002 19:21 |
  |
Hallo,
jetzt kannst du eine Statistikseite aufrufen. Einfach dazu die overall_header.tpl in einem Editor öffnen und bei den Links einen passenden dazufügen. Die Datei heißt statistics.php
MfG Tom |
_________________ There are only 10 types of people in the world: Those who understand binary, and those who don't... |
|
      |
 |
bl!nd
phpBB2.de User


Anmeldungsdatum: 30.08.2002
Beiträge: 40
Wohnort: Wildbergerhütte
|
Verfasst am:
So 01 Sep, 2002 19:23 |
  |
toll das aheb ich beim kalender mod auch gemacht aber da steht jetzt nix im Header...wo bekommt man denn ein passenden Bild dazu her ? |
|
|
      |
 |
|
|
|
|