collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Imploding text file inside blob  (Read 1640 times)

0 Members and 1 Guest are viewing this topic.

Offline Nanoflux

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Imploding text file inside blob
« on: March 31, 2007, 12:11:39 pm »
I'm trying to make a blob with other blobs inside that get their content from a .txt file

Ive tried
Code: [Select]
$this -> bot -> make_blob("Subway", implode("", file("./guides/subway.txt")));and
Code: [Select]
"<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
But they just seem to load the text file as the blob name. The complete end section looks like this though:
Code: [Select]
   /*
     Makes guides list
   */
   function links_list($name)
   {
       $result="";
       $result .= "<font color=CCInfoHeadline><center>Guides</center>";
       $result .= "\n";
       $result .= "\n";
       $result .= "<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
       $result .= "\n";
       
       return "I know this " . $this -> bot -> make_blob("knowledge", $result);
    }
}
?>

Thanks

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Imploding text file inside blob
« Reply #1 on: March 31, 2007, 01:30:12 pm »
You can't make blobs inside of blobs, item refs being the exception.

Only way is to make links executing commands that return the inside blobs as results.

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Imploding text file inside blob
« Reply #2 on: March 31, 2007, 01:32:55 pm »
http://php.net/file_get_contents for teh win

Edit: And I think the word you're looking for is "import" not "implode"
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Nanoflux

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Imploding text file inside blob
« Reply #3 on: March 31, 2007, 01:41:30 pm »
You can't make blobs inside of blobs, item refs being the exception.

Only way is to make links executing commands that return the inside blobs as results.

Ill have to attempt at that then

thanks for quick replies

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 671
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal