4

Customizing Login Widget

Here’s how you can customize the HTML, look & feel of the DAP Sidebar Login Widget.

There is a file in the following folder…

/wp-content/plugins/DAP-WP-LiveLinks/

by name…

DAP-WP-LoginForm-LoginLogout.html

Make a copy of that file on your desktop, rename it to…

customDAP-WP-LoginForm-LoginLogout.html

(just added the text “custom” at the front of the original file’s name).

You can then modify this new file however you want, including altering spacing, and that’s what will be displayed.

Just be careful what you change – do not modify the field names or the submit URL. Feel free to change other visual elements.

Click Here to Leave a Comment Below 4 comments
Joanne - July 29, 2010

In Customizing Login Form tutorial, you say to rename the file.

For this form, you say to make a copy and then rename the copy.

Should both files be available on the site? Or do we want only the CUSTOM file available?

Reply
chris - February 17, 2012

ok i figured it out…if anyone needs it here it is –i copied this but added a few things…edit the else if statement on line 52 of plugins/DAP-WP-LiveLinks/DAP-LoginLogout.php to this:

else if(Dap_Session::isLoggedIn()) { //Logged in
$session = Dap_Session::getSession();
$user = $session->getUser();
$user = Dap_User::loadUserById($user->getId()); //reload User object
if(isset($user)) {
$firstname= $user->getFirst_name();
}
$logoutHTMLFilepath = “/DAP-WP-LiveLinks/DAP-WP-LogoutHTML.html”;
if( file_exists(WP_PLUGIN_DIR . “/DAP-WP-LiveLinks/customDAP-WP-LogoutHTML.html”) ) {
$logoutHTMLFilepath = “/DAP-WP-LiveLinks/customDAP-WP-LogoutHTML.html”;
}
$output = “Welcome ” . $firstname .”!”;
$output .= “”;
$output .= “My ProfileMy Content“;
$output .= “”;
$output .= file_get_contents(WP_PLUGIN_DIR . $logoutHTMLFilepath);

echo $output;
} //End Logged In

/* After widget (defined by themes). */
echo $after_widget;
}

Reply
Bill - February 2, 2013

I’m new to all this. Yous say I can modify the login Widget at /wp-content/plugins/DAP-WP-LiveLinks/.

Can you give me the address that goes in front of /wp-content/plugins/DAP-WP-LiveLinks/ or how to get there?

Reply
Veena Prashanth - February 20, 2013

>> Can you give me the address that goes in front of /wp-content/plugins/DAP-WP-LiveLinks/ or how to get there? << You will have to FTP to your site and access the /wp-content/plugins/DAP-WP-LiveLinks/ folder to find and download the DAP-WP-LoginForm-LoginLogout.html script.

Reply

Leave a Reply: