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

Rekomendowane odpowiedzi

Opublikowano

Witam, zainstalowałem modyfikacje, zmieniającą kolory nicków w tematach, według tej instrukcji - ale trzeba tutaj jeszcze wykonać jakieś zapytanie do bazy danych.

Wiem, że robi się to w PHP my admin'ie - ale nie bardzo wiem w którym miejscu i w jaki sposób.

___

\\ // //\\ ||__) //\\

\\ //\\ // //_\\ || \ //_ \\

\\// \\// // \\ ||__ / // \\

Made by Waba ([email protected]).

Note: i am not responsable for anything, it works fine though.

Description:

with this mod enabled and you are viewing a topic all member name's of poster's will have the same color as their User group.

You can disable & enable through the Admin CP

Change Log:

V1.1: Now able to change the style of the member easily

V1.2: Updated it to work with IPB 2.1

V1.2: Made a Typo wich i corrected now :)

How to install:

------------[ Open: sources/action_public/topics.php ]----

Find:

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

if ( $poster['id'] )

{

$poster['members_display_name'] = "<a href='{$this->base_url}showuser={$poster['id']}'>{$poster['members_display_name']}</a>";

}

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

Replace By:

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

if ($poster['id'])

{

if ($this->ipsclass->vars['member_colors'])

{

if($this->ipsclass->vars['member_colors_style'] == 0){

$Mstyle = "text-decoration: none;";

$Mprefix = "";

$Msuffix = "";

} elseif($this->ipsclass->vars['member_colors_style'] == 1){

$Mstyle = "text-decoration: none;";

$Mprefix = "<b>";

$Msuffix = "</b>";

} elseif($this->ipsclass->vars['member_colors_style'] == 2){

$Mstyle = "text-decoration: none;";

$Mprefix = "<i>";

$Msuffix = "</i>";

} elseif($this->ipsclass->vars['member_colors_style'] == 3){

$Mstyle = "text-decoration: underline;";

$Mprefix = "";

$Msuffix = "";

} elseif($this->ipsclass->vars['member_colors_style'] == 4){

$Mstyle = "text-decoration: overline;";

$Mprefix = "";

$Msuffix = "";

} elseif($this->ipsclass->vars['member_colors_style'] == 5){

$Mstyle = "text-decoration: line-through;";

$Mprefix = "";

$Msuffix = "";

} elseif($this->ipsclass->vars['member_colors_style'] == 6){

$Mstyle = "";

$Mprefix = "";

$Msuffix = "";

}

$poster['members_display_name'] = "<a href='{$this->base_url}showuser={$poster['id']}' style=\"".$Mstyle."\">".$Mprefix.$this->ipsclass->cache['group_cache'][$poster['mgroup']]['prefix'].$poster['members_display_name'].$this->ipsclass->cache['group_cache'][$poster['mgroup']]['suffix'].$Msuffix."</a>";

} else {

$poster['members_display_name'] = "<a href='{$this->base_url}showuser={$poster['id']}'>".$Mprefix."{$poster['members_display_name']}".$Msuffix."</a>";

}

}

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

Then run this query:

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

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member Color in topic', 'If this setting is set to yes the name''s of poster''s will have the same color as the member group he is in.\r\nit will show colored in topic''s', '25', 'yes_no', 'member_colors', '1', '', '', '', 0, 34, 'Member name's in topic's', 0, '', 1);

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member name style', 'With this setting you can make member name''s in topic view bold/italic/underlined/normal', '25', 'dropdown', 'member_colors_style', '', '6', '0=Normal\r\n1=Bold\r\n2=Italic\r\n3=Underlined\r\n4=Overlined\r\n5=Line through member name\r\n6=Style Default', '', 0, 35, '', 1, '', 1);

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

if you're table prefix is different then change the ibf into you're table prefix.

To enable/disable it or change some other settings go to Admin CP -> Tools & Settings -> View all general settings -> Topics, Posts and Polls

Its enabled by default though :)

Enjoy!

Opublikowano
Then run this query:

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

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member Color in topic', 'If this setting is set to yes the name''s of poster''s will have the same color as the member group he is in.\r\nit will show colored in topic''s', '25', 'yes_no', 'member_colors', '1', '', '', '', 0, 34, 'Member name's in topic's', 0, '', 1);

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member name style', 'With this setting you can make member name''s in topic view bold/italic/underlined/normal', '25', 'dropdown', 'member_colors_style', '', '6', '0=Normal\r\n1=Bold\r\n2=Italic\r\n3=Underlined\r\n4=Overlined\r\n5=Line through member name\r\n6=Style Default', '', 0, 35, '', 1, '', 1);

W phpmyadminie wybierasz "SQL"

20100719151213.png

Opublikowano (edytowane)

Tylko teraz pytanie czy mam to wkleić w do tego pola w SQL - http://img834.imageshack.us/img834/7456/47571547.jpg

Czy mam wejść w ibf_conf_settings - i w tam wklejić w pole SQL

Próbowałem w obydwu miejscach i wyświetla mi sie taki błąd:

Błąd

zapytanie SQL:

INSERT INTO `ibf_conf_settings`

VALUES (

'', 'Member Color in topic', 'If this setting is set to yes the name''s of poster''s will have the same color as the member group he is in.\r\nit will show colored in topic''s', '25', 'yes_no', 'member_colors', '1', '', '', '', 0, 34, 'Member name's

IN topic 's', 0, '', 1

);

MySQL zwrócił komunikat: Dokumentacja

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's in topic's', 0, '', 1)' at line 1

Edytowane przez IPBtester
Opublikowano

Ok, może tak, jestem w:

Panelu admina / Admin / Zarządzanie SQL / Narzędzia SQL - tutaj mogę wysłać zapytanie do bazy danych, wklejam cały ten tekst:

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member Color in topic', 'If this setting is set to yes the name''s of poster''s will have the same color as the member group he is in.\r\nit will show colored in topic''s', '25', 'yes_no', 'member_colors', '1', '', '', '', 0, 34, 'Member name's in topic's', 0, '', 1);
INSERT INTO `ibf_conf_settings` VALUES ('', 'Member name style', 'With this setting you can make member name''s in topic view bold/italic/underlined/normal', '25', 'dropdown', 'member_colors_style', '', '6', '0=Normal\r\n1=Bold\r\n2=Italic\r\n3=Underlined\r\n4=Overlined\r\n5=Line through member name\r\n6=Style Default', '', 0, 35, '', 1, '', 1);

I pojawia się taki komunikat:

Błąd SQL

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's in topic's', 0, '', 1); INSERT INTO `ibf_conf_settings` VALUES ('', 'Member n' at line 1

  • Manager
Opublikowano

Kto to pisał? :)

INSERT INTO `ibf_conf_settings` VALUES ('', 'Member Color in topic', 'If this setting is set to yes the names of poster''s will have the same color as the member group he is in.\r\nit will show colored in topics', '25', 'yes_no', 'member_colors', '1', '', '', '', 0, 34, 'Member names in topics', 0, '', 1);
INSERT INTO `ibf_conf_settings` VALUES ('', 'Member name style', 'With this setting you can make member names in topic view bold/italic/underlined/normal', '25', 'dropdown', 'member_colors_style', '', '6', '0=Normal\r\n1=Bold\r\n2=Italic\r\n3=Underlined\r\n4=Overlined\r\n5=Line through member name\r\n6=Style Default', '', 0, 35, '', 1, '', 1);

P.s. i to nie jest temat na takie coś - ten jest o wyglądzie. Na nowe sprawy i pytania zakładaj nowe tematy. Dziękuję.

intermedia - profesjonalne rozwiązania Invision Power Board

---

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

  • Manager
Opublikowano

Problem ROZWIĄZANY. Jeśli są jakiekolwiek wątpliwości, pytania proszę o założenie nowego tematu.

Wszelkie uzasadnione reklamacje/pretensje/sugestie/rady przyjmuje ekipa forum.

intermedia - profesjonalne rozwiązania Invision Power Board

---

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

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • 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ę.