Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:46 pm EDT

Geeklog Forums

PHP in center block


Anonymous

Anonymous
Is it possible to add a php block into the center where news is displayed (for example, after news).
 Quote

Status: offline

squatty

Forum User
Full Member
Registered: 01/21/02
Posts: 269
Depends on how dynamic you need the block to be. If you have static html that you would like to show above the featured article then use the static page plugin. There's an option to create a "frontpage" that can be displayed as a center block. You also have the flexibility to create a frontpage by topic. See this site for an example.

If you need a more dynamic block, one that executes php logic then there is no easy way. You would need to modify GL or create a "hack" to enable this functionality.

---
Danny @ squatty.com


In a world without walls and fences, who needs Windows and Gates?
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 07/11/02
Posts: 181
Location:Austin, TX
Doesn't Static Pages 1.2 do this with its PHP authoring capability? I would think we should be able to call a phpblock function using that. Perhaps Tom could enlighten us on how?---L. Whitworth www.finiserv.com
L. Whitworth
 Quote

Status: offline

squatty

Forum User
Full Member
Registered: 01/21/02
Posts: 269
Yes, this is true however, there's a big misconception out there where people think they can stuff any php (including complete apps...such as phpBCool into the static page and it will work. IMO php static pages is not for the newbie...you need to have solid php skills and a deep understaning of GL in most cases.---Danny @ squatty.com
In a world without walls and fences, who needs Windows and Gates?
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Static pages 1.2 does not allow php with the frontpage hack. You would have to modify the front page hack for this to work. If you want to play with this see the index.php in the root of the staticpages1.2 cvs. With a little luck static pages 1.2 will morph to 1.3 and become part of the geeklog distribution. TomW
 Quote

Anonymous

Anonymous
This looks as good a place to ask as any...

I *think* this discussion is related to what I am wanting to do:

I'd like a Welcome to my site opening statement in the center block of my the site's home page, followed by any Featured Stories and then followed by any other stories. I have seen this done elsewhere (a perfect example is http://www.worldmusiccentral.org/index.php).

It would appear that installation of Staticpages 1.2 is a requirement (which I have done) but, for the life of me, I cannot figure out how to proceed from here.

Suggestions would be greatly appreciated!
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
No, you don't need Static Pages 1.2. You need to create a static page that has the title "frontpage" (without the quotes). The contents of that page will be shown above the featured story. Optionally, you can also wrap static pages in a block by setting $_SP_CONF['in_block'] = 1; in the plugin's(!) config.php file. If you do that, then any label that you give to your "frontpage" page will be displayed as the title of that block. All this is documented somewhere, but not too easy to find, I have to admit. The next release of Geeklog will include better documentation for the Static Pages plugin and its features ... bye, Dirk
 Quote

Anonymous

Anonymous
Thanks! 'Tis exactly what I was looking for!
 Quote

Status: offline

vadertech

Forum User
Full Member
Registered: 05/26/03
Posts: 329
So adding an "include statement" in static pages will not work?
GeekLog Hosting, Installations and Upgrades - WWW.AWEHOST.COM - Hosting starts @ only $4.95/mo.
 Quote

All times are EDT. The time is now 06:46 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