Plugin loginform modified

Creating and modifying plugins.
Post Reply
rauch

Plugin loginform modified

Post by rauch »

I have slightly modified the serendipity_plugin_loginform from cvs to suit my needs better.

I have added/changed the following in the file serendipity_plugin_loginform.php:

added a missing <br/> in line 63 to break after the logout-button
added the following code after line 66 to show a link to admin menu:

if($serendipity['serendipityUserlevel'] == 255)
echo '<a href="' . $serendipity['baseURL'] . 'index.php?/admin">' . SUPERUSER_OPEN_ADMIN . '</a>';

This lets you remove the plugin for only showing the link to the admin menu.
The link above is only shown for the admin created at install time and others created after with userlevel Administrator(255).

The whole procedure is described in german on http://rauch.xepher.net/index.php?/arch ... nform.html

keep up the good work all!

rauch
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post by JWalker »

A little correction:
original:
if($serendipity['serendipityUserlevel'] == 255)
echo '<a href="' . $serendipity['baseURL'] . 'index.php?/admin">' . SUPERUSER_OPEN_ADMIN . '</a>';

with the correction:
if($serendipity['serendipityUserlevel'] == 255)
echo '<br><a href="' . $serendipity['baseURL'] . 'index.php?/admin">' . SUPERUSER_OPEN_ADMIN . '</a>';
rauch

Post by rauch »

Argh!
I am correcting a missing <br> and miss one myself on posting here! ;-)

Thanks Jwalker for pointing this out!

rauch
Post Reply