Jump to content

Archived

This topic is now archived and is closed to further replies.

kellid

Framework Login Customization

Recommended Posts

kellid    2
kellid

Hello,

 

A few months ago, I added a drop down login box to my header and it worked perfectly.  Since then, I accidentally deleted my header file and when uploading a copy to cpanel, it isn't working properly and I can't figure out why.  I don't believe I changed any of the code in the file and not much else has changed, but when I go to enter my "Username" the box disappears.  

 

Do you see the error? 

 

Thanks in advance for your help!!

 

Regards,

 

Kelli 

<?php 
/**
 * HEADER
 *
 * This file controls the HTML <head> and top graphical markup (including
 * Navigation) for each page in your theme. You can control what shows up where
 * using WordPress and PageLines PHP conditionals.
 *
 * @package     PageLines Framework
 * @since       1.0
 *
 * @link        http://www.pagelines.com/
 * @link        http://www.pagelines.com/tour
 *
 * @author      PageLines   http://www.pagelines.com/
 * @copyright   Copyright (c) 2008-2012, PageLines  hello@pagelines.com
 *
 * @internal    last revised January 23, 2012
 * @version     ...
 *
 * @todo Define version
 */

pagelines_register_hook('pagelines_before_html'); // Hook
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<?php 		
		pagelines_register_hook('pagelines_head'); // Hook 
		
		wp_head(); // Hook (WordPress) 
			
		pagelines_register_hook('pagelines_head_last'); // Hook ?>

</head>
<?php 

echo pl_source_comment('Start >> HTML Body', 1); ?>
<body <?php body_class( pagelines_body_classes() ); ?>>
<?php 
pagelines_register_hook('pagelines_before_site'); // Hook
	
if(has_action('override_pagelines_body_output')):
	do_action('override_pagelines_body_output');

else:  ?>
<div id="site" class="<?php echo pagelines_layout_mode();?>">
<?php pagelines_register_hook('pagelines_before_page'); // Hook ?>
	<div id="page" class="thepage">
		<?php pagelines_register_hook('pagelines_page'); // Hook ?>
		<div class="page-canvas">
			<?php pagelines_register_hook('pagelines_before_header');?>
			<header id="header" class="container-group">
			<ul class="headerlinks">
<strong><script language="JavaScript">
var myDate = new Date();
/* hour is before noon */
if ( myDate.getHours() < 12 )
{
    document.write("Good Morning!");
}
else  /* Hour is from noon to 5pm (actually to 5:59 pm) */
if ( myDate.getHours() >= 12 && myDate.getHours() <= 17 )
{
    document.write("Good Afternoon!");
}
else  /* the hour is after 5pm, so it is between 6pm and midnight */
if ( myDate.getHours() > 17 && myDate.getHours() <= 24 )
{
    document.write("Good Evening!");
}
else  /* the hour is not between 0 and 24, so something is wrong */
{
    document.write("I'm not sure what time it is!");
}</script></strong>
          <!-- here comes the important part -->
 <!---------------------------------------  DROPDOWN LOGIN CODE STARTS HERE      ---------------------------------------------->
 <style type="text/css">
 .dropdown.open .dropdown-menu {
    display: block;
    padding: 20px !important;
}
 </style>
           <li class="dropdown" id="menu1">
             <a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
               Login
                <b class="caret"></b>
             </a>
             <div class="dropdown-menu">
<?php
if ( ! is_user_logged_in() ) { // Display WordPress login form:
    $args = array(
        'redirect' => admin_url(), 
        'label_username' => __( 'Username' ),
        'label_password' => __( 'Password' ),
        'label_remember' => __( 'Remember Me!' ),
        'label_log_in' => __( 'Log Me In' ),
        'remember' => true
    );
    wp_login_form( $args );
} else { // If logged in:
    wp_loginout( home_url() ); // Display "Log Out" link.
    echo " | ";
    wp_register('', ''); // Display "Site Admin" link.
}
?>
           </li>
 <!---------------------------------------  DROPDOWN LOGIN CODE ENDS HERE      ---------------------------------------------->

        </ul>
				<div class="outline">
					<?php pagelines_template_area('pagelines_header', 'header'); // Hook ?>
				</div>
			</header>
			<?php pagelines_register_hook('pagelines_before_main'); // Hook ?>
			<div id="page-main" class="container-group">
				<div id="dynamic-content" class="outline">	
<?php 
				pagelines_special_content_wrap_top();

endif;

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

Unfortunately, we do not provide support to users who have edited the core files of our products. If you wanted to add some custom code to your header, you will need to use a hook if you wish for use to provide support.

 

I recommend you remove all your custom code so that the header.php file is reverted back to default, then we may be able to provide assistance, although user created code isn't something we provide support for.

 

In my opinion, if all you're trying to do is get some menu items to display when a user is logged in or not logged in, then just use the standard WordPress menu with a plugin like this:

 

https://wordpress.org/plugins/menu-items-visibility-control/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kellid    2
kellid

Thanks for your response Danny.  I'm not trying to display menu items but add a dropdown login module to my header.  

I'll look into hooks!

 

 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

OK, then yeah Hooks is what you will need to use then.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      Hello,
      I have an older site that was built using PageLines several years ago (prior to the release of DMS). I wanted to leverage some of the power of your new PL5 plugin but the theme prevents be from adding any generated custom sidebars to the theme (through the drag and drop interface) and does not allow me to add any PL5 sections/containers/etc to the header or footer. Is there any way to easily override that or am I stuck only using PL5 in the content areas of the site?
      Thanks so much for the help!
    • dougalperman
      By dougalperman+
      Hi there,
      I'm a big fan of Pagelines, and have been for years.
      I'm trying to control the size of video embeds and having some difficulty. I see that I can just paste the Vimeo video URL into the post and an embed widget will automatically appear, which is great. But the embed box created is much taller that the video (689 x 1000 pixels) so the content sits in the middle of a tall black box, which looks awkward.
      I tried using the full iFrame embed code from Vimeo, which solved the disproportionate embed frame size (or aspect ratio) issue, but despite specifying the dimensions I want (690 x 388), the videos displayed on the post are sized at 300 x 150 pixels.
      I can't work out how to change either.
      I'm using the latest version of Pagelines Framework (Pro) with the Agency them.
      Any help or advice very much appreciated.
      Thanks,
      Dougal
    • JP
      By JP+
      Hello,
      How can you set the translations with platform5, the parts that are not in pages or posts? Texts and images…
    • romanondrasek
      By romanondrasek
      hi all, I have some trouble using PL5 on my site. 
      I used plugins for event calendar (event on) and plugin (timetable responsive scheduler for WP) for schedule (classes) in the gym.
      The problem is, that post from this 2 plugins are shown without menu in header and footer. (I setup header and footer) in the page editor for all type of page. 
      When I create a lesson, it creates posts with slug (I have a slug "lekce" & event for events).
      I try to edit the post with PL editor, but editor is not opening on the post.

      Do you have some idea where should be some problem? Thanx so much.
      here are links for the sites :
      site with schedule :
      http://www.myfit.cz/rozvrh/
      site of one of the class (pilates)
      http://www.myfit.cz/lekce/pilates/
      site with calendar :
      http://www.myfit.cz/kalendar/
      7 side with one event from the calendar :
      http://www.myfit.cz/event/pilates-instruktor-akreditovana-licence/?ri=1
      when I have my site on DMS2 it was working :-(
       
       
    • casseysdesigns
      By casseysdesigns+
      In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.
      I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...
      <a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a> Is it possible to do this with Platform 5?
×