This topic is locked

Main Menu Page

10/16/2006 11:06:14 AM
PHPRunner General questions
T
thesofa author

I have an application with loads of menu options on the first page.

It would help the users if these options could be split into 2 or more groups at my behest, so all the reports are in one place, all the forms in another. Is this possible with v3.0 build 119?

I cannot change to v3.1 as I have too much custom stuff and changes in the code.

J
Jane 10/17/2006

Hi,
to change MENU page appearance edit menu.php file manually.

Here is a sample (see my changes in Bold):

<?php

$tables=GetTables();

?>

<h1>reports</h1>

<?php


if(!(array_search("report1",$tables)===false)) { ?>

<a href="report1_list.php">report1</a>
<?php }
if(!(array_search("report2",$tables)===false)) { ?>

<a href="report2_list.php">report2</a>
<?php }

?>

<h1>forms</h1>

<?php


if(!(array_search("form1",$tables)===false)) { ?>

<a href="form1_list.php">form1</a>
<?php }
if(!(array_search("form2",$tables)===false)) { ?>

<a href="form2_list.php">form2</a>
<?php }

T
thesofa author 10/17/2006

Excellent, many thanks.

How come the answers are so simple, why do I never think of them?

How can I change the template to reflect the placing of the menu items in 3 columns, using a table?

I have done it by hand, thus

<?php

$tables=GetTables();

?>

<table width="95%" border="0">

<tr>

<td><div align="left"><h1>Forms</h1></div></td>

<td><div align="left"><h1>Reports</h1></div></td>

<td><div align="left"><h1>Admin</h1></div></td>

</tr><tr>

<td>

<?php
if(!(array_search("future",$tables)===false)) { ?>

<a href="future_list.php">1 See future detentions</a>
<?php }
if(!(array_search("foradd",$tables)===false)) { ?>

<a href="foradd_list.php">2 Give a New Detention</a>
<?php }
if(!(array_search("formarkoff",$tables)===false)) { ?>

<a href="formarkoff_list.php">3 Edit or Mark Off Detentions</a>
<?php }
if(!(array_search("detentions",$tables)===false)) { ?>

<a href="detentions_list.php">4 Escalate to Department or Tutorial level</a>
<?php }
if(!(array_search("departmental",$tables)===false)) { ?>

<a href="departmental_list.php">5 New Date for Departmental/Tutorial detentions</a>
<?php }
if(!(array_search("markoffdepartmental",$tables)===false)) { ?>

<a href="markoffdepartmental_list.php">6 Edit / Mark Off Departmental/Tutorial Detentions</a>
<?php }
if(!(array_search("esc2after",$tables)===false)) { ?>

<a href="esc2after_list.php">7 Escalate to After School </a>
<?php }
if(!(array_search("date4after",$tables)===false)) { ?>

<a href="date4after_list.php">8 New Date for After School detentions</a>
<?php }
if(!(array_search("markafter",$tables)===false)) { ?>

<a href="markafter_list.php">9 Mark off / Edit After School Detentions</a>
<?php }
if(!(array_search("V4hoy",$tables)===false)) { ?>

<a href="V4hoy_list.php">Year Leader Block Bookings</a>
<?php }
if(!(array_search("control",$tables)===false)) { ?>

<a href="control_list.php">SMT1 Issue batches of detentions</a>
<?php }
?>

</td><td>

<?php
if(!(array_search("fortutors",$tables)===false)) { ?>

<a href="fortutors_list.php">R1 Report of Future Detentions by Tutor Group</a>
<?php }
if(!(array_search("detsbytutgp",$tables)===false)) { ?>

<a href="detsbytutgp_list.php">R2 Totals of Detentions Given, by Tutor Group</a>
<?php }
if(!(array_search("tutor_report",$tables)===false)) { ?>

<a href="tutor_report_list.php">R3 Weekly Tutor Reporting, All detentions</a>
<?php }
if(!(array_search("scores",$tables)===false)) { ?>

<a href="scores_list.php">R4 Tutor Group Scores</a>
<?php }
if(!(array_search("pupils",$tables)===false)) { ?>

<a href="pupils_list.php">Pupil Records</a>
<?php }
if(!(array_search("PupDets",$tables)===false)) { ?>

<a href="PupDets_list.php">Details</a>
<?php }
if(!(array_search("V4CountDets",$tables)===false)) { ?>

<a href="V4CountDets_list.php">Breakdown</a>
<?php }
if(!(array_search("staff",$tables)===false)) { ?>

<a href="staff_list.php">Staff Records</a>
<?php }
?>

</td><td>

<?php
if(!(array_search("forgiver",$tables)===false)) { ?>

<a href="forgiver_list.php">Print Detention Slips</a>
</td>

</tr>

</table>


The problem is, each time i rebuild, I have to remake.the tables.

J
Jane 10/18/2006

Hi,
you can create custom templates on the Miscellaneous tab and edit menu.php file in the Template Editor.

Here is a sample (no guarantee it works):

##LOGIN##

<?php

$tables=GetTables();

?>

<table width="95%" border="0">

<tr>

<td><div align="left"><h1>Forms</h1></div></td>

<td><div align="left"><h1>Reports</h1></div></td>

<td><div align="left"><h1>Admin</h1></div></td>

</tr><tr>

<td>

<?php

TABLES##

if(!(array_search("##TABLENAME##",$tables)===false)) { ?>

<a href="##SHORTTABLENAME##_list.php">##CAPTION##</a>
<?php

if (("##TABLENAME##"=="control")||("##TABLENAME##"="staff")) { ?></td><td><?php }

if ("##TABLENAME##"=="forgiver") { ?></td><?php }

}

/TABLES##**

?>

</td>

</tr>

</table>

<?php**

T
thesofa author 10/18/2006

Hi,

you can create custom templates on the Miscellaneous tab and edit menu.php file in the Template Editor.

Here is a sample (no guarantee it works):



That looks good, I suppose I will have to split the various menu entries by hand over the table cells, as I am doing now?

Can we find a way of marking them up so they go into the right cells?

Alexey admin 10/18/2006

Hi,
I recommend you using Visual Editor in PHPRunner 3.1
We don't have a ready to go solutions on customizing Menu page in version 3.0

T
thesofa author 10/18/2006

I am glad to here that it will work with 3.1, sadly I have gone so far down the line with 3.0 that I cannot spare the time to convert the whole system to 3.1

I take a while to get used to an application, being old and daft.

So I am loathe to give up using 3.0 when I know haow to do some things with it and I am starting to get an understanding of how the system works.

3.1 seems a big leap in terms of how the system works and I cannot take it onboard till christmas at the earliest!

Thanks for all the help.