Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Nowa linia
Forum PHP.pl > Forum > Przedszkole
michal13031986
Witam. Jak zrobić żeby po wyszukaniu lini Tlen, pierwsze dodał nową linie czyli odstęp, a dopiero po dodaniu odstępu dodał ten kawałek z fotką:

Kod
<code style="overflow: scroll;"> <!-- Tutaj doda nowe wpis Fotka -->
               <operation>
                      <!--Wyszukuje pliki z tlenu -->
                       <search position="before"><![CDATA[ 'Tlen'  => $profile['Tlen'] != '' &&  (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest'])  ? array(
                      'name' => &$profile['Tlen'],
                      'href' => 'http://ludzie.tlen.pl/' . $profile['Tlen'],
                       'link' => '<a href="http://ludzie.tlen.pl/' .  $profile['Tlen'] . '"><img src="http://status.tlen.pl/?u=' .  $profile['Tlen'] . '&t=1" alt="' . $profile['Tlen'] . '" border="0"  height="18" width="18" /></a>',
                       'link_text' => '<a href="http://ludzie.tlen.pl/' .  $profile['Tlen'] . '">' . $profile['Tlen'] . '</a>'
               ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),]]></search>
                      <!-- Dodaje nową linię FOTKA-->
                             <add><![CDATA['fotka' =>  $profile['FOTKA'] !='' &&  (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest'])  ? array(
                      'name' => &$profile['FOTKA'],
                      'href' => 'http://www.' . $profile['FOTKA'],
                       'link' => '<a href="http://www./' .  $profile['FOTKA'] . '" target="_blank"><img src="' .  $settings['images_url'] . '/aparat.gif" alt="' . $profile['FOTKA'] . '"  border="0" /></a>',
                      'link_text' =>  '<a href="http://www.' . $profile['FOTKA'] . '" target="_blank">'  . $profile['FOTKA'] . '</a>'
               ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),]]></add>
               </operation></code>
erix
Ekhm, a w jaki sposób odczytujesz?
michal13031986
tzn. chcę stworzyć moda do forum opartym na smf I napotkałem na problem, bo nie wiem jak stworzyć żeby po znalezieniu lini z tlenem, dodało po pustą linię i potem ma znaleź tą pustą linie i dodać wpis z fotka.
erix
Fakt, teraz widzę.
Mam nadzieję, że oczywiście czytałeś tutoriala: http://www.simplemachines.org/community/in...p?topic=20319.0

Nie możesz po prostu wstawić nowej linii:
Kod
<add><![CDATA[


'fotka' =>  $profile['FOTKA'] !='' &&  (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest'])  ? array(
                      'name' => &$profile['FOTKA'],
                      'href' => 'http://www.' . $profile['FOTKA'],
                       'link' => '<a href="http://www./' .  $profile['FOTKA'] . '" target="_blank"><img src="' .  $settings['images_url'] . '/aparat.gif" alt="' . $profile['FOTKA'] . '"  border="0" /></a>',
                      'link_text' =>  '<a href="http://www.' . $profile['FOTKA'] . '" target="_blank">'  . $profile['FOTKA'] . '</a>'
               ) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),]]></add>
michal13031986
Próbowałem też tak jak podałeś i to nic nie daje
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.