Pagina 1 din 2

Problema mod phpbb.

Scris: 25-Iun-2012, 15:19:41
de synkron
Salutare, am si eu o problema cu urmatorul mod:
  • Translated by Terra. from phpBB[dot]com

    phpBB database

    Cod: Selectaţi tot

    ALTER TABLE `phpbb_users` ADD `user_steamid` VARCHAR(255) NOT NULL AFTER `user_interests`
    In viewtopic_body adaugam un nou camp numit POSTER_STEAMID!

    Deschidem styles/prosilver/templates/viewtopic_body.html.
    Cautam linia.

    Cod: Selectaţi tot

      <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->
    Si dupa ea adaugam.

    Cod: Selectaţi tot

     <!-- IF postrow.POSTER_STEAMID --><dd><strong>{L_STEAMID}:</strong> <a href="http://steamcommunity.com/id/{postrow.POSTER_STEAMID}">{postrow.POSTER_STEAMID}</a></dd><!-- ENDIF -->

    Acum deschidem viewtopic.php.

    Cautam linia.

    Cod: Selectaţi tot

        'from'         => '', 
    Si dupa ea adaugam.

    Cod: Selectaţi tot

    [b] 'steamid'      => '',[/b]
    Cautam linia.

    Cod: Selectaţi tot

     'from'         => (!empty($row['user_from'])) ? $row['user_from'] : '',
    Si dupa ea adaugam.

    Cod: Selectaţi tot

     'steamid'      => (!empty($row['user_steamid'])) ? $row['user_steamid'] : '',
    Cautam linia.

    Cod: Selectaţi tot

    'POSTER_FROM'      => $user_cache[$poster_id]['from'],
    Si dupa ea adaugam.

    Cod: Selectaţi tot

    'POSTER_STEAMID'   => $user_cache[$poster_id]['steamid'],
    Deschidem styles/prosilver/templates/ucp_profile_profile_info.html

    Cautam linia.

    Cod: Selectaţi tot

    <dl>
          <dt><label for="location">{L_LOCATION}:</label></dt>
          <dd><input type="text" name="location" id="location" maxlength="255" value="{LOCATION}" class="inputbox" /></dd>
       </dl>
    Si dupa ea adaugam.

    Cod: Selectaţi tot

    <dl>
          <dt><label for="steamid">{L_STEAMID}:</label></dt>
          <dd><input type="text" name="steamid" id="steamid" maxlength="255" value="{STEAMID}" class="inputbox" /></dd>
       </dl>
    Deschidem includes/ucp/ucp_profile.php
    Cautam linia.

    Cod: Selectaţi tot

     'interests'      => utf8_normalize_nfc(request_var('interests', $user->data['user_interests'], true)),
    Si adaugam dupa ea.

    Cod: Selectaţi tot

    'steamid'      => utf8_normalize_nfc(request_var('steamid', $user->data['user_steamid'], true)),
    Cautam linia.

    Cod: Selectaţi tot

    'interests'      => array('string', true, 2, 500),
    Si adaugam dupa ea.

    Cod: Selectaţi tot

    'steamid'      => array('string', true, 2, 255),
    Cautam linia.

    Cod: Selectaţi tot

    'INTERESTS'   => $data['interests'],
    Si adaugam dupa ea.

    Cod: Selectaţi tot

    'STEAMID'   => $data['steamid'],
    Deschidem language/en/common.php

    Cautam linia.

    Cod: Selectaţi tot

    'START_WATCHING_TOPIC'      => 'Subscribe topic',
    Si adaugam dupa.

    Cod: Selectaţi tot

    'STEAMID'               => 'Steam ID',
    Deschidem memberlist.php

    Cautam linia.

    Cod: Selectaţi tot

    'U_JABBER'      => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
    Adaugam dupa.

    Cod: Selectaţi tot

    'U_STEAMID'      => ($data['user_steamid']) ? 'http://steamcommunity.com/id/' . $data['user_steamid'] : '',
    Cautam linia.

    Cod: Selectaţi tot

              'USER_JABBER_IMG'   => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
    Adaugam dupa.

    Cod: Selectaţi tot

              'USER_STEAMID'      => $data['user_steamid'],

    Deschidem styles/prosilver/templates/memberlist_view.html

    Cautam linia.

    Cod: Selectaţi tot

              <!-- IF S_PROFILE_FIELD_1 -->
    Adaugam dupa.

    Cod: Selectaţi tot

              <!-- IF U_STEAMID and USER_STEAMID --><dt>{L_STEAMID}:</dt> <dd><a href="{U_STEAMID}">{USER_STEAMID}</a><!-- ENDIF -->
    PURGE CACHE din Administration control panel(Panou administrare) si asta este tot ;).
    Have fun with editing.

    Cod: Selectaţi tot

    Autor Terra
Precizez ca lam mai avut instalat pe versiunea 3.0.8 phpbb, si a functionat corect.
acum am versiunea 3.0.10, dupa instalarea modului exact ca in tutorial, la inregistrarea userilor primeam urmatoarea eroare:

Cod: Selectaţi tot

SQL ERROR [ mysqli ]
Field 'user_steamid' doesn't have a default value [1364]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
la urmatoarea eroare eu mam dus in phpmyadmin la tabelu user_steamid si la coloana setare de baza sub tabelu Conform Definitie am adaugat Steam:0000 dupa cum se vede in poza
poza 1
http://imageshack.us/photo/my-images/824/poza2y.png/
poza 2 unde am scris eu.
http://imageshack.us/photo/my-images/534/poza1z.png/

Acuma merge sa te inregistrezi fara sa mai dea eroare, dar nu mai functioneaza corect modul, uitati o poza cum arata in profil
http://imageshack.us/photo/my-images/825/poza3h.png/
Cum asi putea remedia aceasta problema, va rog frumos sa am ajutati si pe mine, doresc sa pun acest mod pe forum

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 15:34:11
de AlexandruM
La ce te referi ca nu mai functioneaza corect mod-ul ? Ca apare {STEAMID} sau ca ramane valoarea data de tine neschimbata ? ( adica Steam:0000)

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 16:33:26
de synkron
Nu trebuie sa apara "{STEAMID} " el trebuie sa para ca aici, http://code.google.com/p/steamprofile/ in profil , cum este poza 3, ceva d egen http://gotskillslounge.com/downloads/steamprofile.png
Da normal valoarea aia scrisa de mine nu trebuia pusa acolo, daca ne luam dupa tutorial, dar nu mai mergea register..

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 16:47:22
de bogdan
Cauta in forum inainte sa intrebi: knowledge/kb_show.php?id=94

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 16:52:28
de synkron
eu am asa,
Apache version 2.2.21
PHP version 5.3.9
MySQL version 5.0.92-community
Architecture x86_64
Operating system linux

ce trebuie sa iau de acolo? si esti sigur ca va merge?
si mie numi da eroarea asta

Cod: Selectaţi tot

Field 'forum_last_post_subject' doesn't have a default value [1364]

mie mi da asta

Cod: Selectaţi tot

SQL ERROR [ mysqli ]
Field 'user_steamid' doesn't have a default value [1364]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 17:30:29
de AlexandruM
Banuiesc ca ai facut un backup inainte de instalarea MOD-ului ... asa ca eu ti-asi recomanda sa iti restaurezi forumul si sa o iei de la capat . Nu stiu de unde ai acest MOD , insa cu siguranta nu este (in aceasta varianta) pe phpbb.com , asa ca iti recomand sa instalezi acest MOD http://www.phpbb.com/community/viewtopi ... &t=2104501 .

Cat despre acea problema cu {STEAMID} , este generata din fisierele de limba , daca ai romana instalata si nu ai facut modificarile in fisierele de romana ... sau nu ai trecut corect in template variabila ... ea ar trebui sa fie asa : {L_STEAMID} .

Eu zic sa o iei de la capat cu MOD-ul pe care ti l-am dat ;)

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 18:07:41
de bogdan
E vorba de aceeasi problema. Ruleaza scriptul de actualizare a bazei de date asa cum se explica in articol.

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 18:31:18
de synkron
@AlexandruM nu este acelasi mod :) eu pe asta vroiam sal fac.
@bogdan ce versiune sa iau de acolo ca vad ca cea mai recenta este 3.0.8 si eu am 3.0.10

Asta cum o scot din baza de date?

Cod: Selectaţi tot

ALTER TABLE `phpbb_users` ADD `user_steamid` VARCHAR(255) NOT NULL AFTER `user_interests`

Re: Problema mod phpbb.

Scris: 25-Iun-2012, 22:43:04
de synkron
ceva raspunsuri :)

Re: Problema mod phpbb.

Scris: 26-Iun-2012, 04:08:33
de bogdan
Asteapta sa ti se raspunda.

Am actualizat articolul.
synkron scrie:Asta cum o scot din baza de date?

Cod: Selectaţi tot

ALTER TABLE `phpbb_users` ADD `user_steamid` VARCHAR(255) NOT NULL AFTER `user_interests`
ALTER TABLE `phpbb_users` DROP `user_steamid`

Vezi: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

Se poate si direct folosind phpMyAdmin