vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Information Bar for Guests (https://vborg.vbsupport.ru/showthread.php?t=123117)

nnjj.net 09-24-2007 03:45 PM

is this mod. work on 3.6.8?

Khashayar581 09-24-2007 07:01 PM

yes, it works fine on 3.6.8

Khashayar581 09-24-2007 09:34 PM

Quote:

Originally Posted by Khashayar581 (Post 1345343)
great idea. i installed and it works fine...
... but i want to make the whole things right aligned, would u please help me how???

so, where's the support??

yoyoyoyo 09-25-2007 12:08 AM

Quote:

Originally Posted by Khashayar581 (Post 1346329)
so, where's the support??

you can't expect coders to be on 24 hour call - that is wrong.

Try this in your header template (instead of the code indicated in the install info) to align it to the right:
Quote:

<if condition="($show['guest']) AND (THIS_SCRIPT != 'register') AND (THIS_SCRIPT != 'login')">
<div id="infobar" align="right"><a href="$vboptions[bburl]/forum/register.php?referrerid=1"><p>It appears you have not yet registered with our community. To register please click here...</p></a><embed src="infobar.wav" autostart="true" loop="0" hidden="true"></embed></div>
</if>
the above assumes that your forum is in the "forum" directory - if it is not then change the URL accordingly.

Khashayar581 09-25-2007 08:49 AM

Code:

<if condition="($show['guest']) AND (THIS_SCRIPT != 'register') AND (THIS_SCRIPT != 'login')">
<div id="infobar" align="right"><a href="http://www.forum.persianfinance.net/register.php?referrerid=1"><p>
content goes here</p></a></div>
</if>

as u see, i add the align="right" to the div, but just my texts goes to right, what should i do to make the info icon to right too???!!!

yoyoyoyo 09-28-2007 08:41 PM

Quote:

Originally Posted by Khashayar581 (Post 1346659)
Code:

<if condition="($show['guest']) AND (THIS_SCRIPT != 'register') AND (THIS_SCRIPT != 'login')">
<div id="infobar" align="right"><a href="http://www.forum.persianfinance.net/register.php?referrerid=1"><p>
content goes here</p></a></div>
</if>

as u see, i add the align="right" to the div, but just my texts goes to right, what should i do to make the info icon to right too???!!!

that is defined in the CSS - off the top of my head, without testing it try this:

Quote:

body {
margin: 0 !important;
padding: 0 !important;
}

/* A fake IE information bar */
#infobar {
font: message-box;
}

/* Please adjust the values if the infobar is not looking good */
#infobar a, #infobar a:link, #infobar a:visited, #infobar a:active {
display: block;
color: #000;
width:100%;
background: #FFFFE1 url(warning.gif) no-repeat right top .3em .3em;
border-bottom: .16em outset;
text-decoration: none;
cursor: default;
}

#infobar a:hover {
color: #FFF;
background: #3169B6 url(warning2.gif) no-repeat right top .3em .3em;
}

#infobar p{
margin:0px;
padding: .45em 0em .45em 22px;
font-size:11px;
}

HeRmAn'S 09-29-2007 02:37 PM

Installed, :up: very nice.:erm:

Pete C 10-07-2007 01:17 PM

*Installed* This is an excellent little hack. I've changed the wording a bit, and added a custom .wav file. This will either improve the registration rate, or annoy the heck out of those who can't be bothered LOL

Thank you, just what my site needed!

Incidentally, the sound plays in both Firefox & IE, which is more than I'd hoped for. A great job, keep up the good work. :up:

Pete C 10-07-2007 02:33 PM

<i>For anyone who may have concerns that the "warning" image gives the false impression of a security risk, you might like to use these instead (see attached). They're just a simple letter "i" in a circle, which I'm sure most folks would interpret as an information logo.</i>

noppid 10-30-2007 01:47 PM

One of the pitfalls of this hack that has been pointed out is that the first thing a search engine sees is this...
HTML Code:

<!-- ADDINFO BAR PLUGIN -->
<div id="infobar"><a href="http://www.example.com/forums/register.php"><img style="vertical-align:middle;margin:3px 5px;border:none;float:left;" src="http://www.example.com/forums/images/misc/warning.gif" alt="" /><span>Welcome to <strong>Greatest Forum</strong> - please click here to register. If you are already a member, please log in.</span></a></div>
<!-- END ADDINFO BAR PLUGIN -->

And as a result, many times when you see a site with a welcome message indexed in the search engines with a listing like...

The Greatest Forum
Welcome to Greatest Forum - please click here to register. If you are already a member, please log in.

Not very informative.

So anyway, here's a suggestion.

in the CSS file find:
HTML Code:

/* A fake IE information bar */
#infobar {
        font: message-box;
}

Change to:
HTML Code:

/* A fake IE information bar */
#infobar {
        font: message-box;
        position:fixed;
        left:0px;
        top:0px;
}

If you have this mod installed, remove the header edit and install this in the footer instead. This goes at the end of the footer template.
HTML Code:

<if condition="($show['guest']) AND (THIS_SCRIPT != 'register') AND (THIS_SCRIPT != 'login')">
<div id="infobar"><a href="http://www.example.com/forums/register.php?referrerid=1"><p>It appears you have not yet registered with our community. To register please click here...</p></a><embed src="infobar.wav" autostart="true" loop="0" hidden="true"></embed></div>
</if>

Now the first thing a guest sees is still your welcome message. But the SEs parse the code and the message is the last thing they see before the closing body tag. You'll also notice that the infobar stays at the top even when the member scrolls.

Of course your mileage may vary with the CSS positioning settings thus requiring you to make some adjustments. This can cover stuff up depending on your style. But this is tested on IE and FF and appears to work on a validated XHTML page.


All times are GMT. The time now is 04:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01168 seconds
  • Memory Usage 1,752KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete