Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [fusion news] dodanie klasy do kazdego linka, dodanie klasy do kazdego linka
filuniu
post 23.10.2005, 02:56:29
Post #1





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 25.04.2005

Ostrzeżenie: (0%)
-----


Prosze bardzo o pomoc mam problem możliwe że błachy ale głowie i sie głowie i nie moge go rozwiazać jest on nastęujący : chciałbym aby do każdego linka na stronie głównej News-u była dodawana klasa np:
Kod HTML:

  1. <?php
  2. <class="link" href="/news/comments.php?id=1" >komentarzyki</a>:
  3. ?>


za wstawianie tych linków odpowiedzialny jest fragment :
Kod php:
  1. <?php
  2. if($compop == "checked") {
  3. $temp_short = str_replace("{comments}", "<a href='#' onClick=window.open("$furl/comments.php?id=".$news_item."","","height=$comheight,width=$comwidth,toolbar=no,menubar=no,scrollbars=".checkvalue($comscrolls).",resizable=".checkvalue($comresize)."")>$pclink</a>", $temp_short);
  4. }else{
  5. $temp_short = str_replace("{comments}", "<a href="$furl/comments.php?id=".$news_item."" >$pclink</a>", $temp_short);
  6. }
  7. ?>


problem jest w tym ze jak wstawie class="link"
Kod php:to jest linia 400
  1. <?php
  2. $temp_short = str_replace("{comments}", "<a class="link" href="$furl/comments.php?id=".$news_item."" >$pclink</a>", $temp_short);
  3. ?>


to wyrzuca mi błąd : Parse error: parse error in c:\usr\apache\httpd\html\news\functions.php on line 400

bardzo prosze o pomoc
btw jest to plik functions.php
Go to the top of the page
+Quote Post
Lars
post 23.10.2005, 06:47:10
Post #2





Grupa: Zarejestrowani
Postów: 279
Pomógł: 15
Dołączył: 29.04.2005
Skąd: Gdynia

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $temp_short = str_replace('{comments}', '<a class="link" href="'.$furl.'/comments.php?id='.$news_item.'">'.$pclink.'</a>", $temp_short);
  3. ?>


a w twoim kodzie był błąd tam:

<?php
$temp_short = str_replace("{comments}", "<a class="link" href=\"$furl/comments.php?id=".$news_item."\" >$pclink</a>", $temp_short);
?> (wyłączenie bbCodu celowe)

Ten post edytował Lars 23.10.2005, 06:47:48


--------------------
(\.../) This is Bunny. Copy and paste bunny into
(O.o) your signature to help him gain world domination.
(> <) Zanim zapytasz | Też się przyda | Pomogłem ci? Kliknij "Pomógł"
Go to the top of the page
+Quote Post
filuniu
post 23.10.2005, 08:12:30
Post #3





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 25.04.2005

Ostrzeżenie: (0%)
-----


Super Działa dziekuje bardzo smile.gif

a taka moja malutka prośba (jestem początkujący) moglbys mi napisać co i jka z tym bbCodem bo nie kminie tego sad.gif

z góry dziękuje i pozdrawiam
Go to the top of the page
+Quote Post
Lars
post 23.10.2005, 08:30:42
Post #4





Grupa: Zarejestrowani
Postów: 279
Pomógł: 15
Dołączył: 29.04.2005
Skąd: Gdynia

Ostrzeżenie: (0%)
-----


Cytat(filuniu @ 2005-10-23 07:12:30)
Super Działa dziekuje bardzo smile.gif

a taka moja malutka prośba (jestem początkujący) moglbys mi napisać co i jka z tym bbCodem bo nie kminie tego sad.gif

z góry dziękuje i pozdrawiam

bbcode służy do wyrózniania/formatowania tekstu:
http://forum.php.pl/index.php?act=legends&CODE=bbcode&s=


--------------------
(\.../) This is Bunny. Copy and paste bunny into
(O.o) your signature to help him gain world domination.
(> <) Zanim zapytasz | Też się przyda | Pomogłem ci? Kliknij "Pomógł"
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 08:31