Forums | Mahara Community

Open Discussion /
adding support to page


anonymous profile picture
Account deleted
Posts: 16

31 October 2009, 2:09

Hi,

I posted a question about adding a new page to the top of the menus.  thanks for your responds. 

what i want to do now is create a support page and add it to the site admin editsitepages like home, loggedout, and terms etc....

sofar, i've created a support.php that resides in the same level as about.php.

how do i go about adding to the admin editsitepages as well as displaying it in the footer with the Contact etc

 

Thanks,

 

Rene

Heinz Krettek's profile picture
Posts: 480

31 October 2009, 5:25

Hi Rene,

greetings from Germany Wink

Iy you hover over the menustructure you will notice that the page "xxx/mahara/admin/site/pages.php" is called. There would be a good starting point for your investigations.

Would be cool if you share your code modifications with the community?!

HTH Heinz

anonymous profile picture
Account deleted
Posts: 16

31 October 2009, 14:14

Hi,

 That wont be a problem...i'll share once I figure out what to do...

Rene

anonymous profile picture
Account deleted
Posts: 16

01 November 2009, 2:41

Hi,

This is what I got/did sofar.  This works, but I need to figure out one more thing.......give it a try....

  1. I changed mysql database 'site_content' and added the 'support'
  2. Added the following lines to the mahara/lib/web.lib mahara_standard_nav function

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

        3.  Changed the lines below in mahara/lib/web.lib from:

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

to

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

 

Below is the support.php code...

<?php

define('INTERNAL', 1);
define('PUBLIC', 1);
require('init.php');
/** define('TITLE', 'support'); **/

$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('support'));
$smarty->assign('heading', 'FAQ');
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');

?>

 

WHAT  IS NOT WORKING THE WAY I WANTED TO 

  1. whenever i use get_string('support'), it returns [[support/mahara]].....removed the usage....I'm going to look at later on....
  2. The pull down menu in edit_site_pages had [[support/admin]],  I'm not sure whether its related to the one mention above...
anonymous profile picture
Account deleted
Posts: 16

01 November 2009, 21:25

to fix the string issues, add the following to

lang/en.utf8/{mahara.php,admin.php}

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

 

This should fix the issues i discussed earlier on....

A post by Account deleted was deleted

6 results