Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 01:21 pm EST

Geeklog Forums

trying to put php in GL 1.6.1 block


Mike gl nubie

Anonymous
How can I make this work in a block. what script would I use? All I want to do is pull a random image from the g2 albums with each reload of the page.

<?php @readfile('http://smithtownares.org/photos/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'Wink; ?>

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can't enter the PHP code in the block editor. You need to create a function (e.g. in your lib-custom.php) and call it from the block. The function name must start with phpblock_.

See the description right there in the block editor ...

bye, Dirk
 Quote

All times are EST. The time is now 01:21 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