Next and Previous buttons

Re: Next and Previous buttons

eftir Gustav W Delius -
Number of replies: 0

Here are the detailed instructions:

In the file lib/weblib.php search for the lines

    if ($backmod) {
        $backmod = "<form action=\"$CFG->wwwroot/mod/$backmod->mod/view.php\" target=\"$CFG->framename\">".
                   "<input type=\"hidden\" name=\"id\" value=\"$backmod->cm\" />".
                   "<input type=\"submit\" value=\"&lt;\" /></form>";
    }
    if ($nextmod) {
        $nextmod = "<form action=\"$CFG->wwwroot/mod/$nextmod->mod/view.php\" target=\"$CFG->framename\">".
                   "<input type=\"hidden\" name=\"id\" value=\"$nextmod->cm\" />".
                   "<input type=\"submit\" value=\"&gt;\" /></form>";
    }

and replace them with

    if ($backmod) {
        $backmod = "<a href=\"$CFG->wwwroot/mod/$backmod->mod/view.php?id=$backmod->cm\" target=\"$CFG->framename\">".
                   "<img src=\"$CFG->pixpath/t/left.gif\" alt=\"<\" /></a>";
    }
    if ($nextmod) {
        $nextmod = "<a href=\"$CFG->wwwroot/mod/$nextmod->mod/view.php?id=$nextmod->cm\" target=\"$CFG->framename\">".
                   "<img src=\"$CFG->pixpath/t/right.gif\" alt=\"<\" /></a>";
    }

You will probably want to use other images than right.gif and left.gif. Those are the icons usually used only for moving things right or left.