Welcome to Geeklog, Anonymous Wednesday, April 24 2024 @ 10:19 pm EDT

Geeklog Forums

staticpages block hack not working


Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
I created a lib-custom.php file and added the code from:

http://heatherengineering.com/staticpages/index.php/staticpages

I get this in my block:

Error in PHP Block. Function, phpblock_staticpages, does not exist.

Is there something else I need to do to get the lib-custom.php file working, if I haven't used it before?
www.antisource.com
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Also, can I easily rename the "staticpages" folder? I would prefer if it were called "resources".

Back to my original post - I was trying to use that hack that allows staticpages to be listed as a block. Am I correct that is the only way to list them in a block, or am I misunderstanding what this hack is for?
www.antisource.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by RickW: Also, can I easily rename the "staticpages" folder? I would prefer if it were called "resources".

Doable, but not easily. You would have to find all occurences of "staticpages" (at least those that refer to the directory in public_html) and change them ...

bye, Dirk (not familiar with that hack, btw, so no help there)
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Quote by Dirk: bye, Dirk (not familiar with that hack, btw, so no help there)


Any suggestions on a new hack?
www.antisource.com
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by RickW: I created a lib-custom.php file and added the code...
I get this in my block:
Error in PHP Block. Function, phpblock_staticpages, does not exist.
I think that you didn't have to create that file because it already exists and even has a bit of code already in it. I would suggest that the file you created is not being accessed by GL and the original file is being accessed, but it doesn't have your added code. the file should already exist in path/to/geeklog/system/lib-custom.php. just add your function to the end of that file and your error should go away.

hope that helps in that regard.
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
Quote by machinari:I think that you didn't have to create that file because it already exists and even has a bit of code already in it. I would suggest that the file you created is not being accessed by GL and the original file is being accessed, but it doesn't have your added code. the file should already exist in path/to/geeklog/system/lib-custom.php. just add your function to the end of that file and your error should go away.

hope that helps in that regard.


Ha! That was it. I must have misunderstand the sample path in the instructions and I just placed it in the geeklog root. Put the code in it's proper location (system/lib-custom.php), enabled the block, and now it works.

Thank you!
www.antisource.com
 Quote

Status: offline

Euan

Forum User
Full Member
Registered: 04/22/02
Posts: 292
Glad to see someone using this. Any examples?

Cheers,

Euan.
-- Heather Engineering
-- No job too small
 Quote

All times are EDT. The time is now 10:19 pm.

  • 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