I saw several index errors displayed during the online config of 3.0 Beta 1. Most were dealing with themes it appeared. After configuring my first gedcom, I did come to a blank page but a simple refresh of the browser was fine.
I added a new news item, but when it displayed it had no title, and when I attempted to edit this news article, I found it was as if I needed to create a new news article, I expected the current one (the one I choose to edit, to be in the edit popup window.
I'll document the errors fully on my next install as I was just playing with this install.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was thinking how I was able to isolate (almost finished anyhow) with a php photo gallery I played with and hacked it up to display in a table view. I thouhgt I'd try and bring that one in for myself. Other than that I was just curious as I finally bought a couple php books so I figured if I wrote some simple pages that used includes or something.
I have a "Most Wanted" section so I can display a name or picture and request input from site visitors for data on the items.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently there is not an expandable way to add your own blocks. Hope to add this in a future release.
The blocks are not very complicated and are all stored in the functions_blocks.php file. At the top of that file is an array that defines the names and descriptions of the blocks and whether they can be used on the user or gedcom portals.
In its basic form a block is just a function. See the print_login_block function or the print_welcome_block for examples of simple blocks that don't do very much.
So to add your own block all you would have to do is write a function that looks like the other block functions and add it to the blocks array in the function_blocks.php file.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think in the long run we would not want to have users editing the core files directly. I would propose that a custom blocks or other custom functions and variables could have a predefined file name or format that follows PGV in similarities. Thus if something fails PGV does not get blamed and is also a place for the tinkerer's to store items. Perhaps in the theme folder?
Just a thought, but I think it would give the extension some might be looking for.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, this is exactly what I was thinking of doing for a future release of PGV. But instead of using the index directory, I would probably add a new "blocks" directory and any blocks in there automatically be available to use in PGV.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think it is a good idea to make the directory where the blocks live writable. I think that blocks should only be installed by an admin through FTP or another protocol external to PGV. Any configration settings that need to be saved for a block can be saved in the index directory.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This would work for me and keep a standard of all functions Internal or added by users to a common set of folders.
3.0 is looking real good. I'm having almost zero errors that I notice. Unfortunatly when I encounter an error, it is not reproduceable so I question what I was doing at the time.
john
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
John,
I saw several index errors displayed during the online config of 3.0 Beta 1. Most were dealing with themes it appeared. After configuring my first gedcom, I did come to a blank page but a simple refresh of the browser was fine.
I added a new news item, but when it displayed it had no title, and when I attempted to edit this news article, I found it was as if I needed to create a new news article, I expected the current one (the one I choose to edit, to be in the edit popup window.
I'll document the errors fully on my next install as I was just playing with this install.
John
Hi John,
I'll post a new beta later today that fixes many of these problems.
--John
John,
The new beta seems to fix all error messages I saw on B1, and the My portal edits seem to function correctly now.
How do I define my own blocks for inclusion in PGV?
Thanks
John
PS 3.0 B2 is looking real good so far, no noticeable error messages have been seen in the last 15 minutes.
Can you share your idea for your own block?
I was thinking how I was able to isolate (almost finished anyhow) with a php photo gallery I played with and hacked it up to display in a table view. I thouhgt I'd try and bring that one in for myself. Other than that I was just curious as I finally bought a couple php books so I figured if I wrote some simple pages that used includes or something.
I have a "Most Wanted" section so I can display a name or picture and request input from site visitors for data on the items.
John
Currently there is not an expandable way to add your own blocks. Hope to add this in a future release.
The blocks are not very complicated and are all stored in the functions_blocks.php file. At the top of that file is an array that defines the names and descriptions of the blocks and whether they can be used on the user or gedcom portals.
In its basic form a block is just a function. See the print_login_block function or the print_welcome_block for examples of simple blocks that don't do very much.
So to add your own block all you would have to do is write a function that looks like the other block functions and add it to the blocks array in the function_blocks.php file.
--John
Thanks this is a start.
I think in the long run we would not want to have users editing the core files directly. I would propose that a custom blocks or other custom functions and variables could have a predefined file name or format that follows PGV in similarities. Thus if something fails PGV does not get blamed and is also a place for the tinkerer's to store items. Perhaps in the theme folder?
Just a thought, but I think it would give the extension some might be looking for.
John
John,
I was tinkering with Gallery and what I recently learned of the html_wrappers for gallery.
Would it be possible as an idea to build user functions blocks etc and store said blocks in the index folder and have PGV wrap them and include them?
Seemed like a neat idea and was thinking about other uses for the idea too.
This would also prevent a user from corrupting the source code and still provide an extention to be written.
John
Hi John,
Yes, this is exactly what I was thinking of doing for a future release of PGV. But instead of using the index directory, I would probably add a new "blocks" directory and any blocks in there automatically be available to use in PGV.
--John
I understand using a blocks dir but suggest keeping that dir in the index dir if it needs to be writable (to keep all writable files in 1 location)
I agree the indexx would probably be the best folder.
I don't think it is a good idea to make the directory where the blocks live writable. I think that blocks should only be installed by an admin through FTP or another protocol external to PGV. Any configration settings that need to be saved for a block can be saved in the index directory.
--John
This would work for me and keep a standard of all functions Internal or added by users to a common set of folders.
3.0 is looking real good. I'm having almost zero errors that I notice. Unfortunatly when I encounter an error, it is not reproduceable so I question what I was doing at the time.
john