Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

[resources.invisionpower.com - pliki] Tips and Tricks > Quick queries to set default values on the My Settings pages


Rekomendowane odpowiedzi

  • Manager

On IP.Board's new My Settings pages, there are a ton of options for your members to change. Quite often, questions come up of the nature "How do I change the default value on one of these settings?" and there is usually nothing built-in the the product to allow these default values to be changed; they typically need to be changed via a SQL query. Here are the queries you can run, either through your SQL Toolbox or phpMyAdmin to accomplish the associated change.

There are a couple things to keep in mind. First, remember that you may need to change the table names in these queries if you are using a different table prefix. All of these queries assume you are using the old standard table prefix of 'ibf_'. If you have a different prefix, or no prefix at all, be sure to adjust the queries to be affecting the way your tables are named. In addition, note that there are 2 queries for each of these. The first query's job is to change the value of this option for all currently registered members. The second query changes the structure of the database table to set a new default value, which will then be used for all newly registering members. So if you want all of your members now and in the future to have the default value changed, be sure to run both queries. Now on to the good bit!

Settings tab -> General Settings "Enable visual (RTE) editor?" checked by default:

UPDATE ibf_members SET members_editor_choice='rte';

ALTER TABLE ibf_members CHANGE members_editor_choice members_editor_choice CHAR(3) NOT NULL DEFAULT 'rte';

Settings tab -> General Settings "Enable flash uploader?" checked by default:

UPDATE ibf_members SET member_uploader='flash';

ALTER TABLE ibf_members CHANGE member_uploader member_uploader varchar(32) NOT NULL DEFAULT 'flash';

Profile tab -> Change Profile Information "Enable Profile Comments" checked by default:

UPDATE ibf_profile_portal SET pp_setting_count_comments=1;

ALTER TABLE ibf_profile_portal CHANGE pp_setting_count_comments pp_setting_count_comments INT(2) NOT NULL DEFAULT '1';

Profile tab -> Change Profile Information "Show my friends in my profile" checked by default:

UPDATE ibf_profile_portal SET pp_setting_count_friends=1;

ALTER TABLE ibf_profile_portal CHANGE pp_setting_count_friends pp_setting_count_friends INT(2) NOT NULL DEFAULT '1';

Profile tab -> Change Profile Information "Friend Approval" set to "Enabled - Only add when I approve them" by default:

UPDATE ibf_profile_portal SET pp_setting_moderate_friends=1;

ALTER TABLE ibf_profile_portal CHANGE pp_setting_moderate_friends pp_setting_moderate_friends TINYINT(1) NOT NULL DEFAULT '1';

Profile tab -> Change Profile Information "Show X latest visitors on my profile" set to a different value by default:

UPDATE ibf_profile_portal SET pp_setting_count_visitors=X;

ALTER TABLE ibf_profile_portal CHANGE pp_setting_count_visitors pp_setting_count_visitors INT(2) NOT NULL DEFAULT 'X'; Note: replace X with the number you want here by default. It can only be one of the following to avoid any problems with people changing this value on their My Settings pages: 0, 3, 5 or 10. Wyświetl pełny artykuł

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.