Welcome to Geeklog Wednesday, December 01 2021 @ 07:43 am EST

Geeklog Forums

Passing parameters to phpblock


philomena

Anonymous
Hi, I need to pass a parameter to a phpblock function. Was thinking of writing a new type of block (similar to the geeklog default block) which would accept parameters. Just wanted to know if there would be any major issues. cheers, philomena
 Quote

Status: offline

dreamscape

Forum User
Junior
Registered: 22/01/02
Posts: 30
I'm just curious about what parameters you'd want to pass to a phpblock() ? You'd have to define the parameters to get called in the block admin section. Unless you're going to save the parameters per user in the database and create some custom handler to pull them from the database and pass them during rendering. I'm not shooting your idea down, i've thought about it before. Things like default weather or something you could pass from the block admin and not need people to edit a config on the server. Sometimes I like to think out loud when I write, and that can often cause me to come full circle.... Especially if this last thought, about wanting to ease an admins job, is your intent it sounds like a good idea to me. We should have some sort of a dialogue through comments or in #geeklog to talk about specifics. They're might be an elegant way to display a list of parameters to the admin in the block config.... I'll think about it for a bit.
 Quote

philomena

Anonymous
Hi, Well you've got the intention right .. it is to ease an admins job. Lets say I have an existing system (ASP based ) which functions as a do*censored*ent repository. I can run a search off this repository and save the results to a html file. I then use the phpblock function to read stuff from the html file. This is my alternative to the rdf feed,since a lot of the stuff that already exist would be a plain html file. Now instead of creating a phpblock for every file , if the user can pass the parameter to the function phpblock_readfile then it would be much easier for the admin of my system. Is there any other way of grepping data dynamically from an html file ?? We could converse via comments ... Smile cheers, philomena
 Quote

All times are EST. The time is now 07:43 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content