Jump to content

Recommended Posts

Posted

for what I'm trying to do, my code should say: if user is a guest, they see the "log in" code, else if they're not a guest they see the advertisement banner at the top? I've attempted this myself, and it fails:

<div id="top_login">
				<div id="login_form">
<?php
if (!empty($context['user']['is_guest']))
{
					<script type="text/javascript" src="', $settings['forum/Themes/mytheme'], '/scripts/sha1.js"></script>
							<form action="forum/?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
								<div id="login_username">
									<p class="form_label">Username</p>
									<input type="text" name="user" class="login_input" />
								</div>
								<div id="login_password">
									<p class="form_label">Password</p>
									<input type="password" name="passwrd" class="login_input" />
								</div>
								<div class="clr"></div>
									<input id="login_button" type="submit" value="" name="submit" />
								<div id="reminder">
									<a href="forum/?action=reminder">Forgot Password?</a>
									<a href="forum/?action=register">Register Now!</a>
								</div>
								<input type="hidden" name="hash_passwrd" value="" />
							</form>
							} else {
    ( wpthemes_options('ad468_location') != '') { 

					<a href="<?php echo wpthemes_options('ad468_url'); ?>"><img src="<?php echo wpthemes_options('ad468_location'); ?>" /></a>
}
?>
				        </div>
			        </div>
		      </div>
	    </div>

I'm not really good with php/html (at all), but I'm trying my best... :-\

--

--

If this helps this is what i want the guest to see: "login code"

<script type="text/javascript" src="', $settings['forum/Themes/greenzone99'], '/scripts/sha1.js"></script>
							<form action="forum/?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
								<div id="login_username">
									<p class="form_label">Username</p>
									<input type="text" name="user" class="login_input" />
								</div>
								<div id="login_password">
									<p class="form_label">Password</p>
									<input type="password" name="passwrd" class="login_input" />
								</div>
								<div class="clr"></div>
									<input id="login_button" type="submit" value="" name="submit" />
								<div id="reminder">
									<a href="forum/?action=reminder">Forgot Password?</a>
									<a href="forum/?action=register">Register Now!</a>
								</div>
								<input type="hidden" name="hash_passwrd" value="" />
							</form>

This is what i want them to see after they're logged in:

<div class="ad-wrap">

				<?php if(wpthemes_options('ad468_googleads') != '') {

                 		echo wpthemes_options('ad468_googleads');

				} elseif ( wpthemes_options('ad468_location') != '') { ?>

					<a href="<?php echo wpthemes_options('ad468_url'); ?>"><img src="<?php echo wpthemes_options('ad468_location'); ?>" /></a>

             		<?php } ?>

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...