Перейти к контенту
  • 0

Как создать DB_Hack.php


@sms

Вопрос

Run the following queries in your phpMyAdmin:

Warning: If you have changed your table prefix from ibf_ to something else in your forums,

Please edit the below quires and change all instance of "ibf_" to you current IBF Prefix.

Or you can use the supplied script (db_hack.php) for the Database (Credit goes to Skicrave for this one, Thanx!),

Just upload to your main forums folder and point your browser to that file (Don't forget to delete after you finish).

Warning: This will delete any previous Tables & Data that already exist.

 

#

# Table structure for table `ibf_links`

#

 

DROP TABLE IF EXISTS ibf_links;

CREATE TABLE ibf_links (

  lid int(9) unsigned NOT NULL auto_increment,

  cid smallint(5) unsigned NOT NULL default '0',

  title varchar(128) NOT NULL default '',

  url varchar(255) NOT NULL default '',

  description varchar(255) NOT NULL default '',

  logo varchar(128) NOT NULL default '',

  hits mediumint(7) unsigned NOT NULL default '0',

  vote tinyint(3) unsigned NOT NULL default '0',

  rate int(9) unsigned NOT NULL default '0',

  owner_id tinyint(4) NOT NULL default '0',

  owner varchar(32) NOT NULL default '',

  status enum('pending','visible','broken') NOT NULL default 'pending',

  date datetime default '0000-00-00 00:00:00',

  edited timestamp(14) NOT NULL,

  popular enum('0','1') NOT NULL default '0',

  top_rated enum('0','1') NOT NULL default '0',

  n_comments tinyint(4) NOT NULL default '0',

  PRIMARY KEY  (lid)

) TYPE=MyISAM;

 

 

 

# --------------------------------------------------------

 

DROP TABLE IF EXISTS ibf_category;

CREATE TABLE ibf_category (

  cid smallint(4) NOT NULL auto_increment,

  title char(32) NOT NULL default '',

  parent smallint(4) default '0',

  content smallint(4) NOT NULL default '0',

  PRIMARY KEY  (cid),

  KEY name (title)

) TYPE=MyISAM;

 

 

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_comments`

#

 

DROP TABLE IF EXISTS ibf_weblinks_comments;

CREATE TABLE ibf_weblinks_comments (

  id int(3) NOT NULL auto_increment,

  lid int(4) NOT NULL default '0',

  poster varchar(25) NOT NULL default '',

  date timestamp(14) NOT NULL,

  comment text NOT NULL,

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_config`

#

 

DROP TABLE IF EXISTS ibf_weblinks_config;

CREATE TABLE ibf_weblinks_config (

  id smallint(6) NOT NULL auto_increment,

  lpp smallint(3) NOT NULL default '0',

  preview tinyint(1) NOT NULL default '1',

  sub smallint(1) NOT NULL default '0',

  guests smallint(1) NOT NULL default '0',

  days smallint(3) NOT NULL default '0',

  email smallint(1) NOT NULL default '0',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

#

# Dumping data for table `ibf_weblinks_config`

#

 

INSERT INTO ibf_weblinks_config (id, lpp, preview, sub, guests, days, email) VALUES (1, 5, 1, 1, 1, 14, 1);

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_stats`

#

 

DROP TABLE IF EXISTS ibf_weblinks_stats;

CREATE TABLE ibf_weblinks_stats (

  id int(4) NOT NULL auto_increment,

  hits int(4) NOT NULL default '0',

  cat int(4) NOT NULL default '0',

  links int(4) NOT NULL default '0',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

#

# Dumping data for table `ibf_weblinks_stats`

#

 

INSERT INTO ibf_weblinks_stats (id, hits, cat, links) VALUES (1, 0, 0, 0);

# --------------------------------------------------------

 

А то через PHPmyadmin не получается

Ссылка на комментарий
Поделиться на других сайтах

Рекомендуемые сообщения

  • 0
вот! пользуйся.. Там уже твои данные стоят, но советую попробовать на локалке вначале!

db_hack.php

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Выдает ошибку

mySQL query error:

DROP TABLE IF EXISTS ibf_links;

CREATE TABLE ibf_links (

lid int(9) unsigned NOT NULL auto_increment,

cid smallint(5) unsigned NOT NULL default '0',

title varchar(128) NOT NULL default '',

url varchar(255) NOT NULL default '',

description varchar(255) NOT NULL default '',

logo varchar(128) NOT NULL default '',

hits mediumint(7) unsigned NOT NULL default '0',

vote tinyint(3) unsigned NOT NULL default '0',

rate int(9) unsigned NOT NULL default '0',

owner_id tinyint(4) NOT NULL default '0',

owner varchar(32) NOT NULL default '',

status enum('pending','visible','broken') NOT NULL default 'pending',

date datetime default '0000-00-00 00:00:00',

edited timestamp(14) NOT NULL,

popular enum('0','1') NOT NULL default '0',

top_rated enum('0','1') NOT NULL default '0',

n_comments tinyint(4) NOT NULL default '0',

PRIMARY KEY (lid)

) TYPE=MyISAM;

DROP TABLE IF EXISTS ibf_category;

CREATE TABLE ibf_category (

cid smallint(4) NOT NULL auto_increment,

title char(32) NOT NULL default '',

parent smallint(4) default '0',

content smallint(4) NOT NULL default '0',

PRIMARY KEY (cid),

KEY name (title)

) TYPE=MyISAM;

DROP TABLE IF EXISTS ibf_weblinks_comments;

CREATE TABLE ibf_weblinks_comments (

id int(3) NOT NULL auto_increment,

lid int(4) NOT NULL default '0',

poster varchar(25) NOT NULL default '',

date timestamp(14) NOT NULL,

comment text NOT NULL,

PRIMARY KEY (id)

) TYPE=MyISAM;

DROP TABLE IF EXISTS ibf_weblinks_config;

CREATE TABLE ibf_weblinks_config (

id smallint(6) NOT NULL auto_increment,

lpp smallint(3) NOT NULL default '0',

preview tinyint(1) NOT NULL default '1',

sub smallint(1) NOT NULL default '0',

guests smallint(1) NOT NULL default '0',

days smallint(3) NOT NULL default '0',

email smallint(1) NOT NULL default '0',

PRIMARY KEY (id)

) TYPE=MyISAM;

INSERT INTO ibf_weblinks_config (id, lpp, preview, sub, guests, days, email) VALUES (1, 5, 1, 1, 1, 14, 1);

DROP TABLE IF EXISTS ibf_weblinks_stats;

CREATE TABLE ibf_weblinks_stats (

id int(4) NOT NULL auto_increment,

hits int(4) NOT NULL default '0',

cat int(4) NOT NULL default '0',

links int(4) NOT NULL default '0',

PRIMARY KEY (id)

) TYPE=MyISAM;

INSERT INTO ibf_weblinks_stats (id, hits, cat, links) VALUES (1, 0, 0, 0);

 

 

mySQL error: You have an error in your SQL syntax near ';

CREATE TABLE ibf_links (

lid int(9) unsigned NOT NULL auto_increment,

cid s' at line 2

mySQL error code: 1064

Date: Monday 24th of March 2003 11:06:57 AM

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Ты не мог бы на пальцах обьясник как это делать

Я не сильно с phpmyadmin дружу

 

база соответственно боард

открыли

далее....что

Ссылка на комментарий
Поделиться на других сайтах

  • 0

открываешь phpmyadmin

далее нажимаешь на имя базя

ruforum (49) (это у меня так), потом в правом фрейме вверху жми на "SQL" ну и потом вставляй все что ты в первом посте мне дал в форму и жми ОК

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Убери вот эти строки из кода с "DROP":

 

DROP TABLE IF EXISTS ....

 

у меня помню убрал, сразу в phpmyadmin вставилось нормально!

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Выдает ошибку:

mySQL query error: SELECT * FROM ibf_links WHERE cid= AND status = 'visible' ORDER BY title ASC LIMIT 0,10

 

mySQL error: You have an error in your SQL syntax near 'AND status = 'visible' ORDER BY title ASC LIMIT 0,10' at line 1

mySQL error code: 1064

Date: Saturday 29th of March 2003 10:53:48 AM

 

 

 

Вот инструкция по установке:

 

 

============================================================================

Weblinks V 2.0 Module for IBF

 

Copyright © 2002 Madrose. All rights reserved

E-Mail: webmaster@jaddo.net

 

Web-Site: http://www.jaddo.net/forums/index.php

 

Work started  20th of Oct, 2002.

Last Updated: 20th of Jan, 2003.

 

This file may only be redistributed with direct permission of the Author

Madrose: webmaster@jaddo.net

============================================================================

I am including here the instruction for a fresh new installation.

If you have already installed this Module and you wish only to upgrade, please note that there is no full upgrade.

I have included a script to transfer your links, categories & sections to the new Mod.

You will need to uninstall the previous one and reinstall from scratches.

I have taken prevention measurement;

and used different names for any conflict that might rise from installing both at the same, as they have some table in common.

 

 

First upload the following:

1) ad_web.php & ad_web_cat.php to your ./sources/Admin/ folder.

2) skin_links.php to your ./Skin/sx/ folder.

3) lang_links.php to your ./lang/en/ folder.

4) upload all images to your ./html/sys-img/ folder.

5) upload links.php to your ./sources/ folder.

 

 

You will need to edit the following files:

./sources/Admin/admin_pages.php

./index.php

./admin.php

./lang/en/email_content.php

./sources/Admin/admin_skin.php

 

 

Optional:

./lang/en/lang_online.php.

./Skin/s*/skin_global.php

 

>>>Step 1:

 

======================================

Open ./admin.php and Find

======================================

      'field' => 'profilefields',

 

 

================

Add after that:

================

 

  //--------------

  // Weblinks Mod

  //--------------

 

      'web_cat'  => 'web_cat',

      'web'      => 'web',

  //------------------

  // Weblinks Mod End

  //------------------

================================================

save and upload ./admin.php

================================================

 

 

>>>Step 2:

 

 

======================================

Open ./sources/Admin/admin_pages.php

and Find

======================================

 

 

    8 => array (

    1 => array( 'mySQL Toolbox' , 'act=mysql'        ),

    2 => array( 'mySQL Back Up' , 'act=mysql&code=backup'    ),

    3 => array( 'SQL Runtime Info', 'act=mysql&code=runtime' ),

    4 => array( 'SQL System Vars' , 'act=mysql&code=system'    ),

    5 => array( 'SQL Processes' , 'act=mysql&code=processes' ),

      ),

 

===================================================

Add after that (change '9' if it is already there):

===================================================

 

  //--------------

  // Weblinks Mod

  //--------------

 

    9 => array (

    1 => array( 'Web Links Managment' , 'act=web'    ),

    2 => array( 'Web Links Categories' , 'act=web_cat' ),

      ),

  //------------------

  // Weblinks Mod End

  //------------------

 

================

Add then find:

================

 

      8 => 'SQL Management',

 

===================================================

Add after that (change '9' if it is already there):

===================================================

 

  //--------------

  // Weblinks Mod

  //--------------

 

      9 => 'Weblinks Management',

  //------------------

  // Weblinks Mod End

  //------------------

 

 

================

Add then find:

================

 

      8 => "Manage your SQL database; repair, optimize and export data",

 

===================================================

Add after that (change '9' if it is already there):

===================================================

 

  //--------------

  // Weblinks Mod

  //--------------

 

      9 => "Manage your Weblinks",

  //------------------

  // Weblinks Mod End

  //------------------

 

 

================================================

save and upload ./sources/Admin/admin_pages.php

================================================

 

 

 

>>>Step 3:

 

======================================

Open ./index.php and Find

======================================

 

  $this->vars['EMOTICONS_URL'] = $INFO['html_url'] . '/emoticons';

 

================

Add after that:

================

 

  //--------------

  // Weblinks Mod

  //--------------

 

  $this->vars['images']        = $INFO['html_url'] . '/sys-img';

  //------------------

  // Weblinks Mod End

  //------------------

 

 

================

Add then find:

================

 

              'buddy'    => "browsebuddy",

 

================

Add after that:

================

 

  //--------------

  // Weblinks Mod

  //--------------

              'Links'  => "links",

  //------------------

  // Weblinks Mod End

  //------------------

 

=============================

save and upload ./index.php

=============================

 

 

 

 

>>>Step 4:

 

======================================

Open ./lang/en/email_content.php

and Find (at the end of the file)

======================================

 

?>

 

========================

Add exactly before that:

========================

 

  //--------------

  // Weblinks Mod

  //--------------

 

$EMAIL['link_submition'] = <<<EOF

 

<#MOD_NAME#>,

 

You have been sent this email because someone has submitted a Weblink.

 

------------------------------------------------

Title: <#LINK#>

------------------------------------------------

This Weblink is pending approval.

Please login to your AdminCP to either approve/Delete this link.

 

------------------------------------------------

 

EOF;

 

 

$EMAIL['broken_weblink'] = <<<EOF

 

<#MOD_NAME#>,

 

You have been sent this email Because Someone has reported a broken Weblink.

 

------------------------------------------------

Link ID: <#LINK#>

------------------------------------------------

This Weblink is pending verification.

Please login to your AdminCP to either Check/Delete this link.

 

------------------------------------------------

 

EOF;

 

  //------------------

  // Weblinks Mod End

  //------------------

 

=============================

save and upload

./lang/en/email_content.php

=============================

 

 

>>>Step 5:

 

Run the following queries in your phpMyAdmin:

Warning: If you have changed your table prefix from ibf_ to something else in your forums,

Please edit the below quires and change all instance of "ibf_" to you current IBF Prefix.

Or you can use the supplied script (db_hack.php) for the Database (Credit goes to Skicrave for this one, Thanx!),

Just upload to your main forums folder and point your browser to that file (Don't forget to delete after you finish).

Warning: This will delete any previous Tables & Data that already exist.

 

#

# Table structure for table `ibf_links`

#

 

DROP TABLE IF EXISTS ibf_links;

CREATE TABLE ibf_links (

  lid int(9) unsigned NOT NULL auto_increment,

  cid smallint(5) unsigned NOT NULL default '0',

  title varchar(128) NOT NULL default '',

  url varchar(255) NOT NULL default '',

  description varchar(255) NOT NULL default '',

  logo varchar(128) NOT NULL default '',

  hits mediumint(7) unsigned NOT NULL default '0',

  vote tinyint(3) unsigned NOT NULL default '0',

  rate int(9) unsigned NOT NULL default '0',

  owner_id tinyint(4) NOT NULL default '0',

  owner varchar(32) NOT NULL default '',

  status enum('pending','visible','broken') NOT NULL default 'pending',

  date datetime default '0000-00-00 00:00:00',

  edited timestamp(14) NOT NULL,

  popular enum('0','1') NOT NULL default '0',

  top_rated enum('0','1') NOT NULL default '0',

  n_comments tinyint(4) NOT NULL default '0',

  PRIMARY KEY  (lid)

) TYPE=MyISAM;

 

 

 

# --------------------------------------------------------

 

DROP TABLE IF EXISTS ibf_category;

CREATE TABLE ibf_category (

  cid smallint(4) NOT NULL auto_increment,

  title char(32) NOT NULL default '',

  parent smallint(4) default '0',

  content smallint(4) NOT NULL default '0',

  PRIMARY KEY  (cid),

  KEY name (title)

) TYPE=MyISAM;

 

 

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_comments`

#

 

DROP TABLE IF EXISTS ibf_weblinks_comments;

CREATE TABLE ibf_weblinks_comments (

  id int(3) NOT NULL auto_increment,

  lid int(4) NOT NULL default '0',

  poster varchar(25) NOT NULL default '',

  date timestamp(14) NOT NULL,

  comment text NOT NULL,

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_config`

#

 

DROP TABLE IF EXISTS ibf_weblinks_config;

CREATE TABLE ibf_weblinks_config (

  id smallint(6) NOT NULL auto_increment,

  lpp smallint(3) NOT NULL default '0',

  preview tinyint(1) NOT NULL default '1',

  sub smallint(1) NOT NULL default '0',

  guests smallint(1) NOT NULL default '0',

  days smallint(3) NOT NULL default '0',

  email smallint(1) NOT NULL default '0',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

#

# Dumping data for table `ibf_weblinks_config`

#

 

INSERT INTO ibf_weblinks_config (id, lpp, preview, sub, guests, days, email) VALUES (1, 5, 1, 1, 1, 14, 1);

 

# --------------------------------------------------------

 

#

# Table structure for table `ibf_weblinks_stats`

#

 

DROP TABLE IF EXISTS ibf_weblinks_stats;

CREATE TABLE ibf_weblinks_stats (

  id int(4) NOT NULL auto_increment,

  hits int(4) NOT NULL default '0',

  cat int(4) NOT NULL default '0',

  links int(4) NOT NULL default '0',

  PRIMARY KEY  (id)

) TYPE=MyISAM;

 

#

# Dumping data for table `ibf_weblinks_stats`

#

 

INSERT INTO ibf_weblinks_stats (id, hits, cat, links) VALUES (1, 0, 0, 0);

# --------------------------------------------------------

 

 

 

>>>Step 6:

 

To add the style Go to:

 

AdminCP-> Skins & Templates -> Manage Style Sheets -> Edit [invision Style Sheet (NEW)]

 

P.S: You can change below to suite your needs.

 

==================

Add at the bottom:

==================

 

.weblink {

{

font-family: Verdana;

font-size: 12pt }

.weblink  a:link, .weblink a:active{

      text-decoration: none;

      color: #000080;

      border-left-width: 1;

      border-right-width: 1;

      border-top-width: 1;

      border-bottom: 1px dashed #800000;

}

.weblink  a:visited {

      text-decoration: none;

      color: #808000;

      border-left-width: 1;

      border-right-width: 1;

      border-top-width: 1;

      border-bottom: 1px dashed #800000;

}

.weblink  a:hover

{

      text-decoration: none;

      color: #CC0000;

      border-left-width: 1;

      border-right-width: 1;

      border-top-width: 1;

      border-bottom: 1px dashed #800000;

}

 

 

>>>>> Optional Add-on:

Now if you want to show in the Online Users list if someone is in the Weblinks Module do the following:

 

=======================================

Open ./lang/en/lang_online.php and find

=======================================

 

WHERE_ModCP    => "Using Moderators CP:",

 

 

================

Add after that:

================

  //--------------

  // Weblinks Mod

  //--------------

 

WHERE_Links =>  "Использование Модуля ссылок.",

 

  //------------------

  // Weblinks Mod End

  //------------------

 

 

==========================================

save and upload ./lang/en/lang_online.php

==========================================

 

//Thanks to: Laibeus Lord

=======================================

Open /Skin/s*/skin_global.php and find

=======================================

 

<span style='color:<{tbl_border}>'>|</span> <a href='{$ibforums->base_url}&act=calendar'>{$ibforums->lang['tb_calendar']}</a>

 

================

Add BELOW that:

================

 

    <!----------------->

    <! START: Weblinks>

    <!----------------->

    <span style='color:<{tbl_border}>'>|</span> <a href='{$ibforums->base_url}&act=Links'>Ссылки</a>

    <!----------------->

    <! END>

    <!----------------->

 

 

================================================================================

====

That's it your done with installation!

You can access the Weblinks Module by pointing your browser to:

http://www.anywebsite.com/forums/index.php...hp?s=&act=Links

Change anywebsite.com to your website name

You should go to your AdminCP and add your Categories and Sub Categories as a start.

All I am asking for is to keep the copyright line in the code.

================================================================================

====

 

A db_hack поставился нормально

Ссылка на комментарий
Поделиться на других сайтах

  • 0

@sms

Я ж тебе сказал как делать надо. Делай через phpmyadmin - что ты велосипед-то изобретаешь??

Ссылка на комментарий
Поделиться на других сайтах

  • 0

Вот здесь какой то глюк.

status enum('pending','visible','broken') NOT NULL default 'pending',

Кто что подскажет? Кто в базах силен?

И кого нормально работает этот хак?

Ссылка на комментарий
Поделиться на других сайтах

Присоединиться к обсуждению

Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.

Гость
Ответить на вопрос...

×   Вы вставили отформатированный текст.   Удалить форматирование

  Допустимо не более 75 смайлов.

×   Ваша ссылка была автоматически заменена на медиа-контент.   Отображать как ссылку

×   Ваши публикации восстановлены.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

Зарузка...
×
×
  • Создать...

Важная информация

Находясь на нашем сайте, вы соглашаетесь на использование файлов cookie, а также с нашим положением о конфиденциальности Политика конфиденциальности и пользовательским соглашением Условия использования.