External login/welcome text module

stuporglue

Joined: 2006-06-16
Posts: 10
Posted: Fri, 2006-06-23 06:11

In response to my problem here: http://gallery.menalto.com/node/50498

I'm writing a module that will make either "log in" or "Welcome $USER_NAME" appear on any external PHP page. I have it mostly working, but need some help cleaning it up.

You can see that it working by visiting: <url removed since that site is no longer active, and it's still giving dead links...>
Click log in, and log in as test (pw. test)
then return to <url removed since that site is no longer active, and it's still giving dead links...> again.

The problem is, I just want "<a href="URL">login</a>" or "Welcome $USER_NAME" to appear, but my module loads the entire theme template.

My loginView looks like this:

Quote:
class loginView extends GalleryView{
/**
* @see GalleryView::loadTemplate
*/
function loadTemplate(&$template, &$form) {
global $gallery;
return array(null, array('body' => 'modules/extwelcome/templates/login.tpl'));
}
}

How can I make it not load the rest of the template?

Thanks,

Michael Moore

edit:
I gave up on writing the module, and came back to edit the URLs out of this post since we're not using Gallery on that site anymore (still love it though, just not for that site) and since the URL has changed to http://elements-by-caroline-photography.com