Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 08:18:17 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149682 Posts in 21102 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Developing a new admin section, running into error  (Read 360 times)
psmith

Offline Offline

Posts: 13


« on: March 02, 2010, 04:01:59 PM »

Hi, my goal here is to develop a new section in the admin that would be be for managing sermons for a church.

In this section, there needs to be management of the sermons themselves, the different speakers, and then categories. Because of these different sections, I have setup 3 new tables in the database to handle the data, and this is why I see the need to make it as its own admin section, and not simply a module.

So, I started by copying the index.php out of the admintools area and making modifications to it. Unfortunately, when I try to load up admin/sermons/index.php, I get the message "Insufficient privelliges to be here".

Can someone please help me understand how I would go about correcting this problem?

Thanks
Phil
Logged
doc
Guest
« Reply #1 on: March 02, 2010, 04:21:04 PM »

Hi,

Quote
Can someone please help me understand how I would go about correcting this problem?
Guess before you have to help us to understand what you are trying to achieve wink

Do you have figures, test installation etc. helping to understand why you need to touch the backend interface and why it is not possible e.g. to solve your issue with a page type or admin module??

Doc
Logged
psmith

Offline Offline

Posts: 13


« Reply #2 on: March 02, 2010, 04:26:17 PM »

Well, the biggest issue that I see here is how modules can be re-used throughout a WB site. For example, you can place an image gallery on any given page and that gallery becomes totally independent from all of the other galleries.

In this case, I would develop a sermons module of course, but I want that module to draw its data out of a central area, and not create its own data every time the module is used.

So, if I created an admin area to manage sermons, the sermons module would always look to this data rather than create its own.

Hopefully that explains things.
Logged
doc
Guest
« Reply #3 on: March 02, 2010, 05:00:12 PM »

Hi,

from my point of view, both of your examples could be realized as a module. It is up to you how data is retrieved (e.g. one common database, XML file etc.). I do not see the need for touching the backend interface.

Maybe I missed some point. In that case, an image, sketch or URL to an existing or similar example would really help to get a better understanding of what you are trying to do.

Doc
« Last Edit: March 02, 2010, 05:01:49 PM by doc » Logged
psmith

Offline Offline

Posts: 13


« Reply #4 on: March 02, 2010, 05:11:07 PM »

Ok, I did not realize that I could dictate that a module would only used a single data source, regardless of how many times it was used.

I don't have a live example of how the sermon system would work, however I do have a diagram of another type of system that I want to built into the WB backend - a camp registration system. See attached PDF.

As you can see, there are quite a few areas that I want to adminstrate. My feeling is that to try and fit ALL of this into a single module, and administer that module in the same way as all the others, would be very difficult to do without it being very cramped and confusing for the end user.

If I can implement my idea, and have a complete section in the admin for sermons, or in this other case, camp administration, then each of the different sub-sections can be very clearly laid out.

Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2094



WWW
« Reply #5 on: March 02, 2010, 05:20:52 PM »

Have a (technical) look at the captionslider module.

It is an admintool that will allow you to manage a database with several fields, but does not do anything by itself.
This could be a place for managing your data.

In this case a snippet is used to output whatever was stored, but you could also create one or more "page" type modules to use the data in your website.

Logged

Professional WebsiteBaker Developer
doc
Guest
« Reply #6 on: March 02, 2010, 05:42:35 PM »

Hi,

@psmith: Well you could easily organize your sections e.g. via different tabs accessable from e.g. the top of your module (like the settings button or edit CSS buttons). This way you could only show the stuff required.

One example is the module dbGlossary (German, but check out the screenshots). A rather complex module (still in development) is the printshop. Both modules are coded by the forum member Ralf (Berlin).

You can style and layout any module to fit your purpose. It is just a matter of coding and experience. So again I do not see how a "hacked" WB core could be more efficienct than a good designed module.

Doc
Logged
psmith

Offline Offline

Posts: 13


« Reply #7 on: March 02, 2010, 06:02:50 PM »

@Ruud: The captionslider method seems to be more in line with what I want to accomplish than simply using a page type module.

@Doc: Even though it sounds possible to do everything within the single page type module, I don't think it will work in my case. I want my client to feel that website administration and sermon administration, or camp administration, are distinctive activities, even though they would be fully integrated through WB. 

If the entire camp administration was done under the umbrella of going to Pages -> Select the camp page -> Manage the camp registration section, it seems like a backwards way of doing things.

Thanks to both of you for helping me clarify my questions and your advice. I'll move forward with Ruud's example and update you with my progress.

Logged
doc
Guest
« Reply #8 on: March 02, 2010, 06:20:40 PM »

Hi,

just to clarify. You can also manage page type modules via the frontend without the need to even see the backend part. Ruuds approach just uses another module type (possible types: page module, admin module, code snippets, droplet). Still think it can be achieved with a module.

However, if you need to have your "own tab" within the WebsiteBaker backend, you can add a single line to /framework/class.admin.php and add permissions to DB field "system_permissions" of DB table "wb_groups". The last part can easily be done during installation of the module, the first part is best done manually (permissions, security).

I attached two screenshots (you must be loged in for viewing them). First figure shows the admin group (with access to new tab). Second figure shows a special group (only access to new tab).

This solution however comes to one price. You need to alter the core file after each WB update. I would not recommend this option (also it is possible).

Regards Doc
« Last Edit: March 02, 2010, 08:54:37 PM by doc » Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!