Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 03:32 pm EST

Geeklog Forums

Random Photo Block successfully installed with Error


Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
phpblock_GalleryRandomPhoto, does not exist.


Hello I have followed the steps as best as I could in installing the Gallery Random Photo Block.

I have also cheated by looking at other PHP Block like who's online.

However, when I finished, it says the block was succefully installed but going to the home page, I get the error message.

These are the steps that I took.
After unzipping the file, I copied the one file block-random.php into my public_html folder

Then I copied the function in phpblock_GalleryRandomPhoto.php into libcustom.php in my geeklog/system directory

The only things I did in this file was to change path to Gallery, and I created a directory under gallery for the block-random.cache

Then I went in the Admin block and put in the name as it appears in my other files, and I still got the error message.


Can someone please help?

Thanks
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ola_one: I get the error message.

WHICH error message?

bye, Dirk
 Quote

Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
Hello Dirk,

The error message only shows up in the block itself. It is the topmost block on the right side.

http://www.feyiola.com

I thought I did everything right but all I get in the block is the error message. You can see it on the site.

Thanks

Ola
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Your site only gives me a blank page ...

Why don't you quote the error message here?

bye, Dirk
 Quote

Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
Sorry again Dirk, I was actually just upgrading to 1.3.9sr1 It must have been then that you tried to get on.

Please try now, it is back up and running. The error message is in the block and it says

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

That is what is displayed in the block.

Thanks
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by ola_one: Error in PHP Block. Function, phpblock_GalleryRandomPhoto, does not exist.

Well, that pretty much says it all - there is no function of that name. Check the block settings again for spelling errors, make sure the function is really included in the lib-custom.php and that you've actually uploaded that file.

bye, Dirk
 Quote

Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
Well Dirk,

All I did was open up lib-custom.php and then opened up phpblock_galleryRandomPhoto.php and then I copied the function into the bottom section of lib-custom.php

I also copied block-random.php file into /public_html folder.

I have not uploaded any
make sure the function is really included in the lib-custom.php and that you've actually uploaded that file.


From what I did, I am assuming that adding the following was all I needed. I will not put everything here but this is the starting point of what I copied into lib-custom.php

* This block will also display the photo caption. This is nice when you add comments as a photo caption
* But if you have not, the block may display the default photo caption which gallery defaulted to which is your digicam IMAGE ID
* I have added a check and exclude these captions. Modify this as required - about halfway down in this function.
*
*/
function phpblock_galleryRandomPhoto() {


Is there any other type of upload that you are talking about, or is my saving the lib-custom where it is all I needed to do?

Thaks
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
phpblock_galleryRandomPhoto
phpblock_GalleryRandomPhoto

Watch your capitalization. The function in the file must be spelled exactly the same as the function your block points at.
 Quote

Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
Hello,

I have changed the capitalization and I still got the same error.

When Dirk said to upload the file, is that the same as me copying the function data in the phpblock_galleryRandomPhoto.php or was I supposed to do something else with that very file?

Thanks
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
As long as your lib-custom.php file contains that function, and the block correctly points to that function, then it should work. If it doesn't, then you have a spelling mistake or the function does not exist in the lib-custom file.

You don't really need to upload anything as long as you can remotely edit that file.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
this is basic but you never know...
did you remember to NOT include the parantheses after the function name when you created your php block?
 Quote

Status: offline

ola_one

Forum User
Full Member
Registered: 06/28/03
Posts: 186
Did not include the parenthesis...

Steps taken:

Untar GeeklogGalleryRandomPhoto_v1.2

3 Files Extracted.

Copied block-random.php into Public_html folder/directory

Opened up lib-custom.php in C:/.../geeklog/.../system
and opened up one of the 3 files named phpblock_GalleryRandomPhoto.php

Copied the function in the phpblock_..php file and pasted it into the lib-custom file. saved lib-custom file.

Created a directory under Gallery and named it CACHE


$GALLERY_BASEDIR = "C:/Apache/apache2/htdocs/geeklog/public_html/gallery/";
define(CACHE_FILE, C:/Apache/apache2/htdocs/geeklog/public_html/gallery/Cache/block-random.cache");

I believe the system will generate the block-random.cache since I do not have the said file.

Then I created the PHP block as Admin and I actually copied the function name now inserted in lib-custom and pated it in the block.
I named the block Randomphoto

I gave it a title Picture of the Moment
and changed the access to all users.

Saved the block and I get the message your block has been saved, then exited and went to home page.

I still get the same thing...http://www.feyiola.com

Any idea?

Thanks

Ola

 Quote

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