Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
  #1  
Old 07-13-2014, 07:09 AM
xXZarghamXx xXZarghamXx is offline
 
Join Date: Mar 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Deleting an if condition

I am having trouble into finding the correct
Quote:
</vb:if>
to delete for the
Quote:
<vb:if condition="$show['member']">
condition.

Here is the full header

Code:
<vb:if condition="$show['guest']">
  
       <div class="guestwarn">
           <a href="javascript://" class="close" onclick="YAHOO.util.Dom.setStyle('guest_message', 'display', 'none');" title=""></a>
           Hello Guest, if you reading this it means you have not yet registered. Please take a second to Click <a href="register.php">here</a> to register and in a few simple steps, you will be able to enjoy all the features of our fine community. <a href="register.php">Register Now</a>
       </div>
</vb:if>
<vb:if condition="$show['member']">
<div id="pageWrapper"><div class="pageWrap">
		<div id="topBar">
			<div class="loginBox">
	<div id="toplinks" class="toplinks">
			<ul class="isuser">
				<li><a href="login.php?{vb:raw session.sessionurl}do=logout&amp;logouthash={vb:raw bbuserinfo.logouthash}" onclick="return log_out('{vb:rawphrase sure_you_want_to_log_out}')">{vb:rawphrase log_out}</a></li>
				<li><a href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase user_control_panel}</a></li>
				<li><a href="{vb:link member, {vb:raw bbuserinfo}}">{vb:rawphrase your_profile}</a></li>
				<vb:if condition="$notifications_total">
				<li class="popupmenu notifications" id="notifications">
					<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}: <span class="notifications-number"><strong>{vb:raw notifications_total}</strong></span></a>
					<ul class="popupbody popuphover">
						{vb:raw notifications_menubits}
					</ul>
				</li>


				<vb:else />
				<li class="popupmenu nonotifications" id="nonotifications">
					<a class="popupctrl" href="usercp.php{vb:raw session.sessionurl_q}">{vb:rawphrase your_notifications}</a>
					<ul class="popupbody popuphover">
						<li>{vb:rawphrase no_new_messages}</li>
						<vb:if condition="$show['pmmainlink']"><li><a href="private.php{vb:raw session.sessionurl_q}">{vb:rawphrase inbox}</a></li></vb:if>
					</ul>
				</li>
				</vb:if>
				<li class="welcomelink">{vb:rawphrase welcome_x_link_y, {vb:raw bbuserinfo.username}, {vb:link member, {vb:raw bbuserinfo}}}</li>
				<vb:if condition="$vboptions['enablefacebookconnect']">
					{vb:raw facebook_header}
				</vb:if>
			</ul>
            {vb:raw template_hook.header_userinfo}
			<vb:comment><p>{vb:rawphrase last_visited_x_at_y, {vb:raw pmbox.lastvisitdate}, {vb:raw pmbox.lastvisittime}}</p></vb:comment>		
	</div>
	<vb:else />
		<div class="loginLeft">
				<!-- login form -->
				<script type="text/javascript" src="clientscript/vbulletin_md5.js?v={vb:raw vboptions.simpleversion}"></script>
				<form id="navbar_loginform" action="login.php?{vb:raw session.sessionurl}do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, {vb:raw show.nopasswordempty})">
									
				<ul>
					<li><div class="userBoxInput"><input type="text" class="loginInput<vb:if condition="!$username"> default-value</vb:if>" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>" /></div></li>
					<li><div class="passBoxInput"><input type="password" class="loginInput" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
					<input type="text" class="loginInput default-value" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" /></div></li>
					<li class="rememberMe"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103" /> {vb:rawphrase remember_me}</label></li>
					<li class="loginButton"><input type="image" src="{vb:stylevar imgdir_themedir}/loginButton.png" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" /></li>
				</ul>
					
				<input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
				<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
				<input type="hidden" name="do" value="login" />
				<input type="hidden" name="vb_login_md5password" />
				<input type="hidden" name="vb_login_md5password_utf" />
			</form>
			<script type="text/javascript">
			YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
			YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
			vB_XHTML_Ready.subscribe(function()
			{
			//
				YAHOO.util.Event.on('navbar_username', "focus", navbar_username_focus);
				YAHOO.util.Event.on('navbar_username', "blur", navbar_username_blur);
				YAHOO.util.Event.on('navbar_password_hint', "focus", navbar_password_hint);
				YAHOO.util.Event.on('navbar_password', "blur", navbar_password);
			});
			
			function navbar_username_focus(e)
			{
			//
				var textbox = YAHOO.util.Event.getTarget(e);
				if (textbox.value == '<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>')
				{
				//
					textbox.value='';
					textbox.style.color='{vb:stylevar input_color}';
				}
			}

			function navbar_username_blur(e)
			{
			//
				var textbox = YAHOO.util.Event.getTarget(e);
				if (textbox.value == '')
				{
				//
					textbox.value='<vb:if condition="$username">{vb:raw username}<vb:else />{vb:rawphrase username}</vb:if>';
					textbox.style.color='{vb:stylevar shade_color}';
				}
			}
			
			function navbar_password_hint(e)
			{
			//
				var textbox = YAHOO.util.Event.getTarget(e);
				
				YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "none");
				YAHOO.util.Dom.setStyle('navbar_password', "display", "inline");
				YAHOO.util.Dom.get('navbar_password').focus();
			}

			function navbar_password(e)
			{
			//
				var textbox = YAHOO.util.Event.getTarget(e);
				
				if (textbox.value == '')
				{
					YAHOO.util.Dom.setStyle('navbar_password_hint', "display", "inline");
					YAHOO.util.Dom.setStyle('navbar_password', "display", "none");
				}
			}
			</script>
				<!-- / login form -->
		</div>
				<vb:if condition="$vboptions['enablefacebookconnect']">
				<div class="loginLeft">
				<ul>
					{vb:raw facebook_header}
				</ul>
				</div>
				</vb:if>
	</vb:if>

			</div>

<vb:if condition="$vbulletin->options['display_social_icons']==1">
			<div class="socialBox">
				<vb:if condition="$vbulletin->options['facebook_account']"><a href="http://www.facebook.com/OMFGStreams" target="_blank"><img src="{vb:stylevar imgdir_themedir}/iconFacebook.png" alt="Follow us on Facebook" /></a></vb:if>
				<vb:if condition="$vbulletin->options['twitter_account']"><a href="http://www.twitter.com/Plus1HD" target="_blank"><img src="{vb:stylevar imgdir_themedir}/iconTwitter.png" alt="Follow us on Twitter" /></a></vb:if>
				<vb:if condition="$vbulletin->options['linkedin_account']"><a href=" {vb:raw linkedin_account}"><img src="{vb:stylevar imgdir_themedir}/iconLinkedin.png" alt="Linked In" /></a></vb:if>
				<vb:if condition="$vbulletin->options['flickr_account']"><a href="http://www.flickr.com/photos/{vb:raw flickr_account}"><img src="{vb:stylevar imgdir_themedir}/iconFlickr.png" alt="Flickr" /></a></vb:if>
				<vb:if condition="$vbulletin->options['youtube_account']"><a href="http://www.youtube.com/{vb:raw youtube_account}" target="_blank"><img src="{vb:stylevar imgdir_themedir}/iconYoutube.png" alt="Watch us on YouTube" /></a></vb:if>
				<vb:if condition="$vbulletin->options['myspace_account']"><a href="http://www.myspace.com/{vb:raw myspace_account}"><img src="{vb:stylevar imgdir_themedir}/iconMyspace.png" alt="My Space" /></a></vb:if>
				<vb:if condition="$vbulletin->options['blogger_account']"><a href="{vb:raw blogger_account}"><img src="{vb:stylevar imgdir_themedir}/iconBlogger.png" alt="Blogger" /></a></vb:if>
			</div>	
</vb:if>
			
			
		</div>
<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
	<div id="headerBox">
	<vb:if condition="$stylevar['titleimage']"><a name="top" href="{vb:link forumhome}" id="logo"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></vb:if>
	</div>
I want to delete the
Quote:
<vb:if condition="$show['member']">
condition but finding the correct
Quote:
</vb:if>
is PITA
Reply With Quote
  #2  
Old 07-13-2014, 09:11 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One thing you could do is to change it to condition="1" so it will always be true, or to condition="1 || $show['member']" so it will always be true and you can see what it used to be (but it could be confusing to someone else in the future).
Reply With Quote
  #3  
Old 07-13-2014, 09:22 AM
xXZarghamXx xXZarghamXx is offline
 
Join Date: Mar 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know what i used to be ......i added the
Code:
<vb:if condition="$show['member']">
but now my friend want to revert back

And guess what , my friend don't even have backup
Reply With Quote
  #4  
Old 07-13-2014, 05:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem is that your <if> has an <else> and then the </if>. So, are you wanting to remove ALL of that or only get rid of the <if> part (and then your are left with the <else> part with no condition around it)?
if:
Code:
<vb:if condition="$show['member']">
<div id="pageWrapper"><div class="pageWrap">
else:
Code:
	<vb:else />
		<div class="loginLeft">
				<!-- login form -->
/if:
Code:
				</ul>
				</div>
				</vb:if>
	</vb:if>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:06 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03667 seconds
  • Memory Usage 2,219KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete