Author Topic: MOD: Animated bar for GUESTS to register  (Read 13888 times)

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #30 on: March 24, 2009, 06:57:24 PM »
First off I love the mod !
Just have a feature request.
The bar opens on the top of the page covering part of my logo on the top left and the "register today" and "login" on the top right.
Is there a way to have the bar appear above those items (not over them) so they can still be viewed?
I guess what I'm saying can the page "drop down" to accomidate the bar, then when the user closes the bar pop back up into place?

Thanks in advance,
Dave

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #31 on: March 26, 2009, 12:07:39 PM »
First off I love the mod !
Just have a feature request.
The bar opens on the top of the page covering part of my logo on the top left and the "register today" and "login" on the top right.
Is there a way to have the bar appear above those items (not over them) so they can still be viewed?
I guess what I'm saying can the page "drop down" to accomidate the bar, then when the user closes the bar pop back up into place?

Thanks in advance,
Dave
Never mind I figured it out.
You just put 2 breaks at the top of the page. It's amazing what a little
 can do LOL

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #32 on: March 26, 2009, 12:20:04 PM »
Is there a way to reverse this and make it show to registered members only?
The reason I ask is I am removing the registered users functions bar from below the tabs and want to put it on the top of the page with this bar. I like how this follows down the page, & think it will work very well for what I want to use it for.
I already have the infobar installed, so I think it will look pretty cool when one bar opens & another bar closes. Pretty hight tech lookin stuff.
Thanks, Dave

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #33 on: March 26, 2009, 02:16:40 PM »
Is there a way to reverse this and make it show to registered members only?
The reason I ask is I am removing the registered users functions bar from below the tabs and want to put it on the top of the page with this bar. I like how this follows down the page, & think it will work very well for what I want to use it for.
I already have the infobar installed, so I think it will look pretty cool when one bar opens & another bar closes. Pretty hight tech lookin stuff.
Thanks, Dave
Got it to work !!!!!
Check it out: http://wittyvideos.net
username: demo
password: demo
« Last Edit: March 26, 2009, 04:15:08 PM by drdave69 »

jayjota

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1427
Re: MOD: Animated bar for GUESTS to register
« Reply #34 on: March 26, 2009, 09:26:12 PM »
Is there a way to reverse this and make it show to registered members only?
The reason I ask is I am removing the registered users functions bar from below the tabs and want to put it on the top of the page with this bar. I like how this follows down the page, & think it will work very well for what I want to use it for.
I already have the infobar installed, so I think it will look pretty cool when one bar opens & another bar closes. Pretty hight tech lookin stuff.
Thanks, Dave
Got it to work !!!!!
Check it out: http://wittyvideos.net
username: demo
password: demo

Nice Dave, I have thought of the same thing, I am thinking , something like facebook's bar on the bottom screen when they sign in, I really enjoy what you did here, would you mind sharing this with the community?

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #35 on: March 26, 2009, 11:13:12 PM »
Is there a way to reverse this and make it show to registered members only?
The reason I ask is I am removing the registered users functions bar from below the tabs and want to put it on the top of the page with this bar. I like how this follows down the page, & think it will work very well for what I want to use it for.
I already have the infobar installed, so I think it will look pretty cool when one bar opens & another bar closes. Pretty hight tech lookin stuff.
Thanks, Dave
Got it to work !!!!!
Check it out: http://wittyvideos.net
username: demo
password: demo

Nice Dave, I have thought of the same thing, I am thinking , something like facebook's bar on the bottom screen when they sign in, I really enjoy what you did here, would you mind sharing this with the community?
Sure give me some time to get everything together & I will post in mods

drdave69

  • Guest
Re: MOD: Animated bar for GUESTS to register
« Reply #36 on: March 27, 2009, 07:37:11 AM »
Quote
Nice Dave, I have thought of the same thing, I am thinking , something like facebook's bar on the bottom screen when they sign in, I really enjoy what you did here, would you mind sharing this with the community?
Ok, I have posted the instructions on how to install this mod here: http://phpmotion.com/forum/index.php/topic,11003.msg64990.html
I hope you find it useful!
Thanks, Dave

interrailci

  • Newbie
  • *
  • Posts: 19
Re: MOD: Animated bar for GUESTS to register
« Reply #37 on: May 06, 2009, 11:16:38 AM »
Hi  Sarvnaa   your  site  is  cool  :)

i wanna ask  you  could  you  share  your floatin  info band  script  its  realy  unique 

eSchooling  Goodlife  Siteupdates  Upcoming   this  script  in  ypur  main page  under  the menu :))

thanks

if u wanna   check  thats  my  site just  new

www.arenabalkan.com

madtube

  • Jr. Member
  • **
  • Posts: 129
    • Madtube
Re: MOD: Animated bar for GUESTS to register
« Reply #38 on: July 04, 2009, 01:21:34 PM »
Having a few problems - took a while to get it to show correctly on our site www.zedclips.com it does not seem to be persistent through the site - e.g if you close it on the home page its open on the next page you click. Also is shows up for all users no matter if they are logged in or not - which seems a little silly lol!! Any suggestions on a fix would be much appreciated.

For ref:

We added in sessions.php like this:

//do not show signup link
$show_register = "";

if ($_SESSION["user_id"] != ""){
}
else {
$show_visitor_div = 1;
}

}



?>




And in main file like this:

<body class="MainBody">





<div>
<style type="text/css">

#informationbar{
position: fixed;
left: 0;
width: 100%;
text-indent: 5px;
padding: 5px 0;
background-color: green;
border-bottom: 1px solid black;
font: bold 12px Verdana;color: yellow;
}

* html #informationbar{ /*IE6 hack*/
position: absolute;
width: expression(document.compatMode==&quot;CSS1Compat&quot; css1compat&quot; ?
}</style>
<script type="text/javascript">
function informationbar(){
this.displayfreq="always"
this.content='<a href="javascript:informationbar.close()" _wpro_href="javascript:informationbar.close()" _wpro_href="javascript:informationbar.close()"><img src="images/close.gif" _wpro_src="images/close.gif" _wpro_src="images/close.gif" style="width: 14px; height: 14px; float: right; border: 0; margin-right: 5px" />[/url]'
}

informationbar.prototype.setContent=function(data){
this.content=this.content+data
document.write('<div id="informationbar" style="top: -500px">'+this.content+'</div>')
}

informationbar.prototype.animatetoview=function(){
var barinstance=this
if (parseInt(this.barref.style.top)<0){
this.barref.style.top=parseInt(this.barref.style.top)+5+"px"
setTimeout(function(){barinstance.animatetoview()}, 50)
}
else{
if (document.all && !window.XMLHttpRequest)
this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"')
else
this.barref.style.top=0
}
}

informationbar.close=function(){
document.getElementById("informationbar").style.display="none"
if (this.displayfreq=="session")
document.cookie="infobarshown=1;path=/"
}

informationbar.prototype.setfrequency=function(type){
this.displayfreq=type
}

informationbar.prototype.initialize=function(){
if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
this.barref=document.getElementById("informationbar")
this.barheight=parseInt(this.barref.offsetHeight)
this.barref.style.top=this.barheight*(-1)+"px"
this.animatetoview()
}
}

window.onunload=function(){
this.barref=null
}


</script>
<script type="text/javascript">
<!--Invocation code-->

var infobar=new informationbar()
infobar.setContent('Welcome ! You are not registered yet. Please register to begin using ALL features of the site, It is FREE !!! <a href="login.php" _wpro_href="login.php" _wpro_href="login.php">REGISTER HERE[/url]')
//infobar.setfrequency('session') //
infobar.initialize()

</script></div>


Thanks for any help!

jawbonin

  • Sr. Member
  • ****
  • Posts: 178
    • JAWBONIN.COM
Re: MOD: Animated bar for GUESTS to register
« Reply #39 on: July 15, 2009, 11:50:55 PM »
Kudos to Jayjota & Sarvnaa, this mod worked fine. 

BUT, as soon as I made the changes I am having a "what-the-hell" moment because my videos, logins, members, ads no longer show.

Yep,this kinda thing only happens to me :P

Anyhoo, I have an email in to my host!

But go figure why the hosting devils are trying to stop me from having more views, i'm nowhere near my limit...go figure.

Great job on this mod, hopefully my host will reinstall my mysql file and everything shows back up again...
« Last Edit: July 16, 2009, 12:12:36 AM by jawbonin »

sirpentello

  • V3 Beta Tester
  • Newbie
  • *
  • Posts: 96
Re: MOD: Animated bar for GUESTS to register
« Reply #40 on: December 08, 2009, 09:21:28 AM »
this work in V3 version?

EMPEROR_SO

  • V3 Beta Tester
  • Full Member
  • *
  • Posts: 387
Re: MOD: Animated bar for GUESTS to register
« Reply #41 on: December 08, 2009, 08:16:09 PM »

bigt11

  • Newbie
  • *
  • Posts: 93
Re: MOD: Animated bar for GUESTS to register
« Reply #42 on: May 11, 2010, 04:03:47 PM »
>Modified code to move the bar down!

Paste the code immediately below <body>

Quote

<style type="text/css">
#topbar
{   
   PADDING-TOP: 5px;
   PADDING-BOTTOM: 5px;
   PADDING-RIGHT: 5px;
   PADDING-LEFT: 5px;
   VISIBILITY: hidden;
   BORDER-TOP: black 1px solid;
   BORDER-BOTTOM: black 1px solid;
   BORDER-RIGHT: black 1px solid;
   BORDER-LEFT: black 1px solid;
   WIDTH: 450px;
   FONT-FAMILY: Tahoma;
   POSITION: absolute;
   BACKGROUND-COLOR: white
}
</style>

<script type="text/javascript">
var persistclose = 1
var startX = 3
var startY = 3
var verticalpos = "fromtop"
 
function iecompattest()
{
   return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
 
function get_cookie(Name)
{
   var search = Name + "="
   var returnvalue = "";
   if (document.cookie.length > 0)
   {
      offset = document.cookie.indexOf(search)
      if (offset != -1)
      {
         offset += search.length
         end = document.cookie.indexOf(";", offset);
         if (end == -1) end = document.cookie.length;
         returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
   return returnvalue;
}
 
function closebar()
{
   if (persistclose)
   document.cookie="remainclosed=1"
   document.getElementById("topbar").style.visibility="hidden"
}
 
function staticbar()
{
   barheight=document.getElementById("topbar").offsetHeight
   var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
   var d = document;
   function ml(id)
   {
      var el=d.getElementById(id);
      if (!persistclose || persistclose && get_cookie("remainclosed")=="")
      el.style.visibility="visible"
      if(d.layers)el.style=el;
      el.sP=function(x,y){this.style.right=x+"px";this.style.top=y+"px";};
      el.x = startX;
      if (verticalpos=="fromtop")
         el.y = startY;
      else
      {
         el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
         el.y -= startY;
      }
      return el;
   }
   
   window.stayTopLeft=function()
   {
      if (verticalpos=="fromtop")
      {
         var pY = ns ? pageYOffset : iecompattest().scrollTop;
         ftlObj.y += (pY + startY - ftlObj.y)/8;
      }
      else
      {
         var pY = ns ? pageYOffset + innerHeight - barheight: iecompattest().scrollTop + iecompattest().clientHeight - barheight;
         ftlObj.y += (pY - startY - ftlObj.y)/8;
      }
      ftlObj.sP(ftlObj.x, ftlObj.y);
      setTimeout("stayTopLeft()", 10);
   }
   ftlObj = ml("topbar");
   stayTopLeft();
}
 
if (window.addEventListener)
   window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
   window.attachEvent("onload", staticbar)
else if (document.getElementById)
   window.onload=staticbar
</script>
 
<div id="topbar">
   <table width="100%">
      <tr>
         <td width="99%">
               You are Unregistered, please <a href="/login.php">register[/url] to gain Full access.&nbsp;&nbsp;&nbsp;&nbsp; </td><td width="1%"><a onclick="closebar(); return false" href="Yoursite name"><img style="float: left" src="http://www.saromama.com/images/close1.gif" border="0">[/url]
         </td>
      </tr>
   </table>
</div>




check my site for demo : www.saromama.com






I went 1 step farther with Sarvnaa's code, it made it so it will stay visible only if logged out, but not visible when logged in no matter the persons cookies.  I combined   Jayjota + Sarvnaa to do this

1.)  do Jayjota's sessions.php tweak

1a.)  open www/classes/sessions.php
1b.)  paste before the ?> at the end of the file
Code: [Select]
if ($_SESSION["user_id"] != ""){
}
else {
$show_visitor_div = 1;
}

2.)  do Sarvnaa's code for main_1.htm

3.)  Find
Code: [Select]
if (!persistclose || persistclose && get_cookie("remainclosed")=="")
4.)  Replace With
Code: [Select]
if (!persistclose || persistclose && get_cookie("remainclosed")=="" && [var.show_visitor_div])

5.) Find
Code: [Select]
src="http://www.saromama.com/images/close1.gif"6.)  Replace web address with yours and use "close.gif" instead of close1.gif
« Last Edit: May 15, 2010, 10:47:07 AM by bigt11 »

masmasmous

  • Newbie
  • *
  • Posts: 47
Re: MOD: Animated bar for GUESTS to register
« Reply #43 on: May 11, 2010, 08:12:41 PM »
 :D :D :D

works well for me with these last updates thank you :)

chek it here

http://www.youtunis.com