Welcome to Geeklog Tuesday, January 21 2020 @ 07:23 pm EST

Geeklog Forums

Stumbeling with PHP and Blocks [help]


Big Celebration
Ok first of all a little about me.

No experience with php
No experience with html

Lots of network, servers experience
Wanted to build a website for community news, my internet radio station, and personal blog.

because of lack of the above, made it difficult to do such,
Welcome to the world of CMS

Tested Mambo
Tested phpNuke
Tested Etomite
Tested Wordpress
Tested Geeklog

Now, for me all i wanted was something simple, that i can read up and learn, not interested in php/html codes [to much headach]

My first experince with the first three CMS apps, was that u still need to know some coding, to get by..
then, 3 weeks ago i found Wordpress started playing around with it..
seems nice, but the themes ware not really to my liking, and when i did fine a few i liked, while testing, to get plug-ins worked, it never went good, seems like it's missing the blok funcition, which i feel in love with during my Mambo testing.

Ok, somewhere in the test period of Wordpress, i find a nice little tool, bad-behaviour, so i poped over to bad beheviours site, and saw the word GEEKLOG, hmm...just another CMS..i figured, so looked at the DEMO, and the themes alone blow me off my feet..

i feelt in love with it...
ok, started testing 4 days ago....i read almost every post i found, on most of the geeklog related sites [Sqatty, Geeklog, Summitpages, Blaine] u name it, i read as much as i can to see if i can find problems that would relate to what i want to build on my easly made sites.

ok, first stumbling block.....Plug-Ins, after testing the plug-ins over @ wordpress, it was so easy..

Welcome to the world of GeekLog--we'll i read, and i read, but just could't understand squat about installing a plug-in, but during the installation of my first plug-in i read the README of that plug-in, and it came to light...it was easy (according to the manual, it's difficult at first to understand, but once u got it, u'll never forget it)

Ok, passed that stage, tested various plug-ins and themes, see what they do, and which will fit my needs -
Welcome to the world of Static pages and php.
Yep, this is the bomb, this is the power of Geeklog, this is what separated the boys from the men.
And this is the feature that will make my websites to be the BOMB..
but yea, now the probem.

Now if someone, can give me a step by step instruction on how to get this work - i'll feel pretty good.

I found all kinds of php scripts/codings that u can dump in the static pages, that can do wonders for your site.

well, as i found the codes, i dumped them into the static pages, but guess what nothing happened, will, actually i didn't really expected somethin to happen...because i was missing piece of the puzzle when it comes to static pages and php..

what i know so far, is i have to activite it, of which i found the document informing me of securty issues, but it got activited.

then i read up on execute php(return) and execute php, still don't understand the difference between the two..

Now, somewhere i'm not sure, but it's not just dumping the php code in the static page, i'm not sure but do i have to do something in the lib-common.php or lib-custom.php, as i read through the forums, i keept seeing pieces of codes adding to one or both of these files, but i don't quit catch the picture as yet...

Next there is the Blocks-where u can do some more php coding there..
it clearly says that u have to put some phpblock_????.

Now again, is this link to the lib-custom.php file.

Ok, that's about it,.

to recap..
Basically what i need to know, is how to get simple php code to run a query on a in a static page, or a block..

a little step by step, cause i'm new to this...and if it's written somewhere else in cyber space, please guide me to it.

And good work done by the developers, and the many others that devoted their time to this project


Giving it a try

Status: Banned


Forum User
Full Member
Registered: 22/03/04
Posts: 1512
let's get the blocks outa the way first off: any "phpblock_"'s that you create have their functions stored in lib-custom.php--that is one of that files main functions. So you've been reading correctly.. There is plenty of code in that file and or in lib-common.php for you to use as examples of how to implement your code into those files.

difference between return and execute PHP: watch the difference in the next two blocks of code as the first one will execute PHP and the second one will return PHP, i.e, it will wait until the end of the script to output anything:
PHP Formatted Code

//execute php as the script progresses
echo "<p>hello world";
echo "<br>good to see you</p>";
PHP Formatted Code

//return php after it has run
$display = "<p>hello world";
$display .= "<br>good to see you</p>";
return $display;
again, have a look around at some of the sample static page code blocks hangin around the forum that you can use as examples.
hope some of that helps you.

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