vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Change: ID of Prefix (https://vborg.vbsupport.ru/showthread.php?t=240439)

Ghostt 04-14-2010 11:53 AM

Change: ID of Prefix
 
How can i the ID of the Prefix/category?

is it enough to change the "Table vbprefix " or is there a sql command i can use to change it in my whole forum?

Marco van Herwaarden 04-14-2010 12:07 PM

There should be no reason to change this.

Ghostt 04-14-2010 12:14 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 2021086)
There should be no reason to change this.

but i see the table in phpadmin why it shouldnt work? do i break my DB with a change ?

Marco van Herwaarden 04-14-2010 12:18 PM

It is refenced in othewr places. As a rule of thumb you should never try to change any of the id fields, it also doesn't server any purpose to change them.

Ghostt 04-14-2010 12:27 PM

the reason why i want to change is complex :
i have to change it because ive installed this mod Mark Threads As 'Solvedbut i had allready befor a solved prefix and want to keep the ropics as solved and not to have another prefix or 2 "solved"prefixes

Marco van Herwaarden 04-14-2010 12:33 PM

In that case you will need to update all tables where it is used. You can find all tables by searching the file ./install/mysql-schema.php for "prefixid".

After you have updated all tables, edit & save any prefix in the AdminCP to rebuild the datastore.

Ghostt 04-14-2010 12:43 PM

sry but i dont have a install folder anymore, because of security reasons ive deleted it after vb install...
is there any alternative method?

Marco van Herwaarden 04-14-2010 12:56 PM

You should still have the zip-file on your PC, otherwise you can download it again from the Members' Area.

PS For security reasons you only need to delete the install.php file, not the directory. Some files in the directory are even needed in case of some maintenance functions.

Ghostt 04-14-2010 01:15 PM

ok ive found the ‎mysql-schema.php file from 3. ‎November ‎2009 and loaded it up to installl derectory. but what i have to do now ?
dont understand the sense to search for "prefixid" and then what?

what i have to change:


CATEGORY: Erledigt <change to> solvedthread
PREFIX: Erledigt1 <change to> solvedthread_solved

Marco van Herwaarden 04-14-2010 02:13 PM

Open it with a text editor and search where this column is used.

Ghostt 04-14-2010 02:32 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 2021151)
Open it with a text editor and search where this column is used.

i know how to search for it i have cuteftp pro...
just dont understand the sense of it and what to change. i told you i need to rename the names of the IDs

CATEGORY: "Erledigt" <rename to> "solvedthread"
PREFIX: "Erledigt1" <rename to> "solvedthread_solved"

cant find "Erledigt" or something else in the file ...

Marco van Herwaarden 04-14-2010 02:38 PM

The mysql-schema file will show you in which tables have a column named prefixid. For all those tables you will need to update the values in that column, changing your old prefix-id to the new.

Ghostt 04-14-2010 02:44 PM

Quote:

Originally Posted by Marco van Herwaarden (Post 2021181)
The mysql-schema file will show you in which tables have a column named prefixid. For all those tables you will need to update the values in that column, changing your old prefix-id to the new.

ah that you mean. sry but im to sql noob for this i cant that...

ive searched vor "Erledigt" the "old"at phpmyadmin prefix and it showed many tables more then 140+ i think because so many theards have that prefix allready.

i need an other solution like replace comand for sql or so..

Marco van Herwaarden 04-14-2010 03:19 PM

Once you have determined which tables to update you can use MySQL queries to change the values:

[sql]UPDATE <TableName> SET prefixid = "<NewPrefixID>" WHERE prefixid = "<OldPrefixId>";[/sql]I strongly recommend to make a bakcup first and to try it on a test database first.


All times are GMT. The time now is 07:34 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01149 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete