Forums | Mahara Community

Open Discussion /
Creating a new tap


anonymous profile picture
Account deleted
Posts: 16

20 October 2009, 23:18

Hi,

I'm fairly new to mahara.  Just installed it and I'm trying to add a Job Posting tab to the core code.

How do I go about it...

 

Thanks,

 

Rene

anonymous profile picture
Account deleted
Posts: 1643

21 October 2009, 0:11

Have a look in lib/web.php. There is a function, mahara_standard_nav, which has menu items in it. You can add another one there.

If you're writing a plugin, they have a contract method called menu_items, which can be called to add menu items also. 

anonymous profile picture
Account deleted
Posts: 16

21 October 2009, 0:21

Thanks...Greatly appreciated...

I'm now editing the lib/web.php file, since the functionality will be similar to groups (create, modify ect)

i've created a dir jobs, copied the files in groups to jobs and editing it....is this the best way to go about it

 

anonymous profile picture
Account deleted
Posts: 228

21 October 2009, 1:27

Hi!

If it is somehow related to groups, I would consider maybe writing an "interaction" plugins.  Interactions are things inside groups where people interact with eachother. This forum we're posing in, for example, is an interaction plugin.

The way to do that would be to copy interaction/forum and start there.  Note that you can have a group, like on mahara.org, that everyone is in, and jobs could be posted there, and then you can also have separate groups with their own job posting boards as well.

anonymous profile picture
Account deleted
Posts: 16

21 October 2009, 1:43

Hi

 Actually it wont be related to groups, but i was trying to use the design approach for group...

currently having some issues....

 

on my jobs

A nonrecoverable error occured. This probably means you have encountered a bug in the system

and

A required parameter is missing or malformed
You must supply option "count" to build_pagination 

 

I believe the second one is due to initialization...just can't find it

anonymous profile picture
Account deleted
Posts: 1643

22 October 2009, 1:40

Whenever you see the "nonrecoverable error", that means that you should check the apache error log for your Mahara to see exactly what the error is. It's probably an uncaught exception, which is often what happens if you write a malformed SQL statement. But the error log is the chief source of information.

For the second one, you should have a look at what other scripts that use build_pagination do, and try and do what they're doing.

anonymous profile picture
Account deleted
Posts: 16

29 October 2009, 22:02

Thanks....

After making several edits, I totally messed up my settings...I've remove all of the files and restarted again.

This time, I want to add a "support" page instead of a job.  I've added the the following to the mahara_standard_nav in lib/web.php

 

        array(
            'path' => '',
            'url' => '',
            'title' => get_string('support'),
            'weight' => 10,
        ),

 

it seems to work ok, but when I reload the page I get [[support/mahara]]

 

I also will like to add the support page to the "edited pages like home, loggedout etc"

what's the next step...sorry for all the trouble

anonymous profile picture
Account deleted
Posts: 16

30 October 2009, 12:08

This is what I done sofar....

I've added support.php and and to the array that defined earlier....

        array(
            'path' => 'support',
            'url' => 'support.php',
            'title' => get_string('support'),
            'weight' => 60,
        ),

 

and

function site_content_pages() {
    return array('about', 'home', 'loggedouthome', 'privacy', 'termsandconditions', 'uploadcopyright','support');
}

 

Now I'm stuck....i still have the same problem as a mentioned [[support/mahara]] and can't find how to add 'support' to the pages that i can edit like about, home etc

 

anonymous profile picture
Account deleted
Posts: 1643

01 November 2009, 16:34

You need to put a record into the site_content database table. e.g.: 

INSERT INTO site_content (name, content, ctime, mtime) VALUES ('support', '', now(), now());

To fix the string, you need to put a line in lang/en.utf8/mahara.php:

$string['support'] = 'Support'; 

9 results