11
Bassman
Re: how can i use this php code in a block
  • 2005/3/23 6:07

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Why don't you just copy/paste that code, minus the <?php and ?> tags into a custom PHP block?

12
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/23 6:48

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


i did my friend..i did everything.This code is cursed :)

13
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/24 4:59

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


no answer from offical XOOPS web site for a little php code? :(

14
Bassman
Re: how can i use this php code in a block
  • 2005/3/24 5:14

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Unfortunately I can't test your scroll.php script because it accesses your database. I tried putting it in a custom php block, but when I loaded my page, all I got was "could not connect to database" on a blank page. This means the script is working, at least. Is this what you get too?
If so, I suggest you edit the database connection details in the script, this part: include 'forum/config.php';
maybe should be:include ("<{$xoops_url}>/xo/forum/config.php");

15
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/24 6:32

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


my web site is off now.
i will inform you when it is okay.

16
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/24 12:23

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


can you please chech thishttp://www.kesikkafa.com/scroll.php

it is ok

17
Bassman
Re: how can i use this php code in a block
  • 2005/3/24 12:40

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Yes that works ok.

18
pdaddict
Re: how can i use this php code in a block
  • 2005/3/24 13:16

  • pdaddict

  • Friend of XOOPS

  • Posts: 106

  • Since: 2003/4/6 1


include XOOPS_ROOT_PATH.'/scroll.php';


<{$xoops_url}> doesn't work in php-blocks because it's a smarty-tag. XOOPS_ROOT_PATH, on the other hand, is defined in mainfile.php, which is included in every page you view => accessible in custom blocks.

19
kesikkafa
Re: how can i use this php code in a block
  • 2005/3/25 6:07

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


Quote:

Bassman wrote:
Unfortunately I can't test your scroll.php script because it accesses your database. I tried putting it in a custom php block, but when I loaded my page, all I got was "could not connect to database" on a blank page. This means the script is working, at least. Is this what you get too?
If so, I suggest you edit the database connection details in the script, this part: include 'forum/config.php';
maybe should be:include ("<{$xoops_url}>/xo/forum/config.php");


i try it .. again "could not connect to database" ..

so how can i use www.kesikkafa.com/scroll.php with iframe in a block... i mean it is working.if i get succes to view it in a iframe in a block it will be same thing.. am i wrong?

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

  • kesikkafa

  • Just popping in

  • Posts: 47

  • Since: 2005/2/6 2


in scroll.php there when i try to click on a link it opens in iframe...i want to open it in main page

i think there is a problem at this line..what should i do

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



// Outcome of the HTML
// Be carefull when you edit these!
print "<marquee id=\"recent_topics\" behavior=\"scroll\" direction=\"$scroll\" height=\"100\" scrolldelay=\"50\" scrollamount=\"2\" onMouseOver=\"document.all.recent_topics.stop()\" onMouseOut=\"document.all.recent_topics.start()\">
<table cellpadding='5' cellSpacing='5' width='200' align='center'>";
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "<tr valign='top'><td><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"1\"><font color=\"#cc0000\"><b><a href=\"$urlPath/viewtopic.php?topic=$row[topic_id]&forum=$row[forum_id]\">" .
$row["topic_title"] .

Login

Who's Online

238 user(s) are online (152 user(s) are browsing Support Forums)


Members: 0


Guests: 238


more...

Donat-O-Meter

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

Latest GitHub Commits