21
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/26 11:19

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


any idea?

i try this " .
but gives eror

22
davidthomas1
Re: how can i use this php code in a block

I had some trouble with including PHP code in a block.

I solved it by using an iframe.

Maybe it will help you too.

Here's my code :



Just change the SRC to your file URL (i.e "SRC={X_SITEURL}scroll.php") and adjust the height and width to suit.

BTW: I think you don't need a leading "/" after the {X_SITEURL}.

I saved it as an HTML block.

does that work for you?

23
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/27 18:38

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


i put the scroll.php in a iframe and in a block...it is okay.
my problem is when you click a link in the iframe ,it opens the link in the iframe.i want to open link in a new window or in the main page.

24
highlander
Re: how can i use this php code in a block
  • 2005/3/27 20:29

  • highlander

  • Not too shy to talk

  • Posts: 151

  • Since: 2004/12/5


Quote:

kesikkafa wrote:
any idea?

i try this
<a href="$urlPath/viewtopic.php?topic=$row[topic_id]&forum=$row[forum_id]target="_blank">"
.
but gives eror


you haven't escaped the quotes here :

try :
<a href="$urlPath/viewtopic.php?topic=$row[topic_id]&forum=$row[forum_id]target="_blank">"


greetings Highlander

25
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/28 9:48

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


highlander thank you..perfect!

at least i get success.

You can see the result http://www.kesikkafa.com block name is Son Mesajlar. It shows the last messages from my phpbb forum.

26
davidthomas1
Re: how can i use this php code in a block

dang, I noticed those unescaped quotes too... I thought it was just a typo in the forum!

glad you solved the problem, nice work!

27
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/28 10:04

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


thank you. after 25 messages we did it :)

Login

Who's Online

158 user(s) are online (93 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits