PDA

View Full Version : Forum Home Enhancements - add banner under longin


bing11
03-10-2013, 11:00 PM
This is my first small mod post here.

hope anybody can teach me more

I find 3 ways finish this Job

My way is very easy no any css add or change.

In the header template find


</div>
<div class="ad_global_header">

before this add
<ul>
<li>{vb:raw ad_location.global_header2}</li>
</ul>
and then just remove {vb:raw ad_location.global_header2}

and place the HTML code for the banner in the ad_global_header2 template here
Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> Ad Location Templates -> ad_global_header2

It is working good in Ie7 Safari fireofax and Chrome . but not look good in Opera (Widescreen)

Hope someone can help me.

other 2 ways

is
https://vborg.vbsupport.ru/showthread.php?t=232325

and

http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/vbulletin-4-quick-tips-and-customizations/351448-how-to-add-right-side-banner-to-header-under-the-login-username-info? ( I think it is the best one)


They are both great idea. but look like not fit to IE7

Finally I add a function to this mod learn from 3.8

Show this banner only forumhome

When you edit ad_global_header2 just do this

<if condition="THIS_SCRIPT == 'index'">your html code </if>

It is very Simple. hope can help you

144114

richardevans123
03-11-2013, 04:16 PM
Do you have any screenshots?

bing11
03-11-2013, 05:35 PM
Do you have any screenshots?
upload

tanzeelniazi
03-12-2013, 01:21 AM
Nice Mod Install Working Fine in VB4.2.0
1 Question
I use this method 2 Method
First
Header method and 2nd is this: http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/vbulletin-4-quick-tips-and-customizations/351448-how-to-add-right-side-banner-to-header-under-the-login-username-info?

But my Banner is not Full in Right Side Showing Little gape

tanzeelniazi
03-12-2013, 01:49 AM
Now i am using this method:
http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/vbulletin-4-quick-tips-and-customizations/351448-how-to-add-right-side-banner-to-header-under-the-login-username-info?
But My banner showing in only Main Page why he is not showing in all forum i mean when i click another section banner is not showing

bing11
03-12-2013, 03:47 AM
Now i am using this method:
http://www.vbulletin.com/forum/forum/vbulletin-4/vbulletin-4-questions-problems-and-troubleshooting/vbulletin-4-quick-tips-and-customizations/351448-how-to-add-right-side-banner-to-header-under-the-login-username-info?
But My banner showing in only Main Page why he is not showing in all forum i mean when i click another section banner is not showing
don't use this code
<if condition="THIS_SCRIPT == 'index'">your html code </if>

tanzeelniazi
03-12-2013, 01:33 PM
don't use this code
<if condition="THIS_SCRIPT == 'index'">your html code </if>

Thanks
Why my banned is not Full Right side
i want my banner Full left side Below Logout

bing11
03-14-2013, 04:37 AM
use the first one should work

Naijasite
06-15-2013, 10:24 PM
how to make the advert to show on forumdisplay and index only?

bosanci28
07-20-2013, 11:46 PM
how to center it in the middle of the page?
thanks

sebaldus
09-11-2013, 02:18 PM
how to center it in the middle of the page?
thanks

I used the code with success on my first Gfx-artist.com - 4.1.x forums.

Secound after upgrade to 4.2.x I have had problems with this code.

<if condition="THIS_SCRIPT == 'index'"><center>your html code </center></if>

Used this and the site was fantastic with https://vborg.vbsupport.ru/external/2013/09/1.jpg~original

Also had the flying twitter bird and it was great. But now, the bird are gone and not possible to get back flying. Either will the banner be installed as it shall..

Anyone?

The first time I use it, it was fantastic. But secound time I tryed to use it, it only give error msg in tags and thats it..

Can anyone help me out?
Are using same banner in my old myBB forums at: http://www.gfx-artist.com/forum/ but it was more fantastic in the first vBulletin forums as I tested it.

Its there again, but with error msg: Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3822

vBulletin Message
The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

And it shows up on :articles - whats new - forums and blogs.

My entire headder code now:
<div class="above_body"> <!-- closing tag is in template navbar -->
<div id="header" class="floatcontainer doc_header">
<vb:if condition="$stylevar['titleimage']"><div><a name="top" href="{vb:link forumhome}" class="logo-image"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div></vb:if>
<div id="toplinks" class="toplinks">
<vb:if condition="$show['member']">
<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>
<vb:if condition="$show['registerbutton']">
<li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
</vb:if>
<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>
<vb:else />
<ul class="nouser">
<vb:if condition="$show['registerbutton']">
<li><a href="register.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase register}</a></li>
</vb:if>
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}">{vb:rawphrase help}</a></li>
<li>
<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})">
<fieldset id="logindetails" class="logindetails">
<div>
<div>
<input type="text" class="textbox<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>" />
<input type="password" class="textbox" tabindex="102" name="vb_login_password" id="navbar_password" size="10" />
<input type="text" class="textbox default-value" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="{vb:rawphrase password}" style="display:none;" />
<input type="submit" class="loginbutton" tabindex="104" value="{vb:rawphrase log_in}" title="{vb:rawphrase enter_username_to_login_or_register}" accesskey="s" />
</div>
</div>
</fieldset>
<div id="remember" class="remember">
<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>
</div>

<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>
</li>
<vb:if condition="$vboptions['enablefacebookconnect']">
{vb:raw facebook_header}
</vb:if>
</ul>
</vb:if>
<ul>
<li>{vb:raw ad_location.global_header2}</li>
</ul></div>
<div class="ad_global_header">
{vb:raw ad_location.global_header1}
<if condition="THIS_SCRIPT == 'index'"><center><a href="http://s242.photobucket.com/user/sebaldus_2007/media/GFX-DEPO/bannergfx6.png.html" target="_blank"><img src="http://i242.photobucket.com/albums/ff216/sebaldus_2007/GFX-DEPO/bannergfx6.png~original" border="0" alt=" photo bannergfx6.png"/></a></center> </if>
</div>
<hr />
</div>
Thanks.
Regards from sebaldus