Pop-up message only for guest
+5
Sanket
darylldelfin
tid
zinex
Gunhack X
9 posters
Page 1 of 2
Page 1 of 2 • 1, 2
Pop-up message only for guest
Hello,
Well, I just want to know If someone here knows a good script code or HTML Code that can I add in my forum to welcome all new people that visit my forum for the first time.
Well, I just want to know If someone here knows a good script code or HTML Code that can I add in my forum to welcome all new people that visit my forum for the first time.
Re: Pop-up message only for guest
there wont be one edward, as it would need to have permissions also, to make sure it only shows for guests. I used to have one, but it would pop up for anyone and everyone, members alike, everytime they came to the forum. What i did instead was make a forum widget and set it just to show for guests so i could entice them to join. Sorry i cant be of more help.
Re: Pop-up message only for guest
You may not be able to add a pp up for new members only however i have recently went thru a code that acts as a small pop up and display's once a browser session
Look into the following ink for more details
=> Following Message
Regards
Craig
Look into the following ink for more details
=> Following Message
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
Hi Craig. I actually want to put that script on my board, but that message wan't show up. What's wrong?
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
Placehold wrote:You may not be able to add a pp up for new members only however i have recently went thru a code that acts as a small pop up and display's once a browser session
Look into the following ink for more details
=> Following Message
Regards
Craig
Glad you are still here!
What would be the code for version 2 css
Guest- Guest
Re: Pop-up message only for guest
If you copy and paste that code
Into the Homepage content
Then add the CSS code in to the CSS stylesheet section
remembering to press "Submit" to save then it should work automatically
To personalise the message that appears you will have to find the last part of the code which looks like
Now you must only replace the words "ADD YOUR MESSAGE HERE. " otherwise the code will not work, if you add anuything before or after it wont work
Hey Kilsek, M around a bit longer i guess lmao
The code itself seems to work on all versions of the forum however there is two functions,You can have the message pop up every time they go to the homepage or just once the browser session.
Look for the part near the very very top that looks like
Change var persistclose=0
to var persistclose=1 to have it pop up once per browser session
Hope i explained it well enough lmao
Regards
Craig
- Spoiler:
- Code:
<head>
<body><script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 30 //set x offset of bar in pixels
var startY = 5 //set y offset of bar in pixels
var verticalpos="fromtop" //enter "fromtop" or "frombottom"
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.left=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">
<a href="" onClick="closebar(); return false"><b>X</b></a>
<font face="arial" color="#000000">ADD YOUR MESSAGE HERE. </font></td>
</div>
</body>
</head>
Into the Homepage content
Then add the CSS code in to the CSS stylesheet section
- Spoiler:
- Code:
#topbar{
position:absolute;
border: 1px solid black;
padding: 5px;
background-color: white;
width: 560px;
visibility: hidden;
z-index: 400;
}
remembering to press "Submit" to save then it should work automatically
To personalise the message that appears you will have to find the last part of the code which looks like
- Code:
<div id="topbar">
<a href="" onClick="closebar(); return false"><b>X</b></a>
<font face="arial" color="#000000">ADD YOUR MESSAGE HERE. </font></td>
</div>
</body>
</head>
Now you must only replace the words "ADD YOUR MESSAGE HERE. " otherwise the code will not work, if you add anuything before or after it wont work
Hey Kilsek, M around a bit longer i guess lmao
The code itself seems to work on all versions of the forum however there is two functions,You can have the message pop up every time they go to the homepage or just once the browser session.
Look for the part near the very very top that looks like
- Code:
<body><script type="text/javascript">
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
Change var persistclose=0
to var persistclose=1 to have it pop up once per browser session
Hope i explained it well enough lmao
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
I have added CSS Code in CSS Stylsheet, i've added HTML Code on homepage message, i've changed "ADD Your message [...]" to some another, but it's still not showing. That's very cool thing, but i don't know, how to set it... Thanks Craig, you're really very Helpful
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
Hmmmmmmmm
Do you have a link to your forum and i'll see if something is effecting your code
Regards
Craig
Do you have a link to your forum and i'll see if something is effecting your code
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
Sorry, that i'm late, but i've got VERY critical Windows XP Error...
That's my forum.
I hope, you're using Mozilla FireFox
That's my forum.
I hope, you're using Mozilla FireFox
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
Hmmm to be honest i'm not too sure as to why its not appearing the code appears to show properly
Have you added anything else into the CSS or anything else in the content message section?
regards
Craig
Have you added anything else into the CSS or anything else in the content message section?
regards
Craig
Guest- Guest
Re: Pop-up message only for guest
To Content Message i've added only that HTML code, what you've given to us. In CSS code Have i something for Forum Width, to fixing background image, to chatbox image. I can send all that, i've added to CSS Stylesheet, if you want
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
Hmmm try replacing the CSS i gave you with this one and add it to the very top of the CSS box
I think maybe one of the codes are effecting it
Regards
Craig
- Code:
#topbar{
position:absolute !important;
border: 1px solid black;
padding: 5px !important;
background-color: white;
width: 560px;
visibility: hidden !important;
z-index: 400 !important;
}
I think maybe one of the codes are effecting it
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
Still nothing... is there possibility, that this gadget don't work on phpBB3 Version style?
PS.
Isn't something wrong on bolded part?
PPS.
I've changed this part to "visible", and now it's showing up But it don't want to scrolling down with page And X don't work.
Also, i can change
I think, there is something wrong with HTML part.
PS.
#topbar{
position:absolute !important;
border: 1px solid black;
padding: 5px !important;
background-color: white;
width: 560px;
visibility: hidden !important;
z-index: 400 !important;
}
Isn't something wrong on bolded part?
PPS.
I've changed this part to "visible", and now it's showing up But it don't want to scrolling down with page And X don't work.
Also, i can change
- Code:
position:absolute
- Code:
position:fixed
I think, there is something wrong with HTML part.
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
I have tested the code out on several different forums and ALL the versions available and it works on them all
Also the "visibility: hidden !important;" may be bringing the background up however it covers the X which is why its set to hidden, this is because of the way its coded.
The code again is coded perfectly however other codes can effect they way this performs. The last thread that i posted this onto, They had another code in the homepage content box above this code which obviously effected its display
We took ALL the codes out and tried it and it worked
Try taking out all the codes from the CSS (Temporarily) and from the homepage content to see if it will show properly without the tweaks you suggested, This way we can rule out any interference from other codes
Regards
Craig
Also the "visibility: hidden !important;" may be bringing the background up however it covers the X which is why its set to hidden, this is because of the way its coded.
The code again is coded perfectly however other codes can effect they way this performs. The last thread that i posted this onto, They had another code in the homepage content box above this code which obviously effected its display
We took ALL the codes out and tried it and it worked
Try taking out all the codes from the CSS (Temporarily) and from the homepage content to see if it will show properly without the tweaks you suggested, This way we can rule out any interference from other codes
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
Well, anyway this thread became helpful for some of us.... hehehe.... and I was trying to get this close. :s Thank you every one for your help!
Re: Pop-up message only for guest
Not a problem at all edward90
tid if you are still having issues please create a new thread relating to the issue
Regards
Craig
tid if you are still having issues please create a new thread relating to the issue
Regards
Craig
Guest- Guest
Re: Pop-up message only for guest
OK, but can i ask one more questin in this topic? I've also found a script, that work without kicking all codes from CSS Stylesheet. And here is my question, is there a way, to do, that this pop-up will be displayed only for quest's, without editing forums files? Cause we have not permisson to do that. I've found two scripts, where one of them was with thing like
- Code:
if (!iMEMBER) {
echo'<style type="text/css">
(without spaces, cause without spaces weird thing are becoming in this forum :O) don't want show in CSS, after Submit. That is Aplet for Php-Fusion forums. In second script was option< style type="text / css">
- Code:
<!-- BEGIN switch_user_logged_out -->
- Code:
<!-- END switch_user_logged_out -->
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
I saw a forum that has the code that I want, but I forgot the URL of the Forum I wish someone can tell me the code to show the message only for guest.
Re: Pop-up message only for guest
activate forum widgets then set the visibility to "guests only" . then inject there Placehold's script on the widget ..
preview : http://hidecodesgalore.org/forum.htm
the floating thing will be gone if youre not a guest ..
if you want just a pop up alert, just put
preview : http://hidecodesgalore.org/forum.htm
the floating thing will be gone if youre not a guest ..
if you want just a pop up alert, just put
- Code:
<script>alert('your message');</script>
Last edited by darylldelfin on November 28th 2008, 12:20 am; edited 1 time in total
Re: Pop-up message only for guest
darylldelfin wrote:activate forum widgets then set the visibility to "guests only" . then inject there Placehold's script on the widget ..
preview : http://hidecodesgalore.forumotion.net/forum.htm
Which code of Placehold are you talking about. There is a hell lot of them. That thing on the website looks nice. Please tell me which code should i add to the widget?
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Pop-up message only for guest
okay . this is the code i used at the widget for guests :
then added these scripts on the forum.js
then added these on the css :
you might want to see the original script :
http://www.dynamicdrive.com/dynamicindex17/floatbar.htm
or you also might want to view my forum's source code ..
- Code:
<script src='http://hcg.net76.net/floatregbar.js'></script>
then added these scripts on the forum.js
- Code:
document.write("<div id=\"floatregbar\">");
document.write("<br class=\"clear\" /><div class=\"panel introduction\"><div class=\"inner\"><span class=\"corners-top\"></span><div class=\"h3\">Hide Codes Galore");
document.write("<div align=\"right\">");
document.write("<a href=\"#\" onClick=\"closebar(); return false\">(x)</a>");
document.write("</div>");
document.write("</div>");
document.write("<div align=\"left\">");
document.write("Welcome to Hide Codes Galore! <br><br>You\'ll need to <a href=\"http://hidecodesgalore.forumotion.net/login.forum?connexion\">login</a> in order to fully use all the features and view all the sections of this site.");
document.write("<br>");
document.write("<br>");
document.write("Please <a href=\"http://hidecodesgalore.forumotion.net/profile.forum?mode=register\">register</a> if you\'re not yet a member. <img src=\"http://hidecodesgalore.forumotion.net/users/33/67/54/smiles/192262.gif\"/> ");
document.write("</div>");
document.write("<span class=\"corners-bottom\"></span></div></div>");
document.write("</div>");
then added these on the css :
- Code:
#floatregbar{
position: absolute;
font-family: Verdana;
width: 432px;
visibility: hidden;
z-index: 100;
}
you might want to see the original script :
http://www.dynamicdrive.com/dynamicindex17/floatbar.htm
or you also might want to view my forum's source code ..
Re: Pop-up message only for guest
Sorry for being a noob but what is the forum js?
Drakaneo- Forumember
- Posts : 68
Reputation : 0
Language : English
Re: Pop-up message only for guest
^ i put this on my site description :
that's why it can be loaded on all of the pages of my forum .. you may study what im using : http://hcg.net76.net/forum.js
- Code:
<script src='http://hcg.net76.net/forum.js'></script>
that's why it can be loaded on all of the pages of my forum .. you may study what im using : http://hcg.net76.net/forum.js
Re: Pop-up message only for guest
Wait xD I'm Lost Right now... so...
What do i put to the widget, what to CSS code, if i wan't to have a pop-up for guests? Thanks for response.
What do i put to the widget, what to CSS code, if i wan't to have a pop-up for guests? Thanks for response.
Regards,
tidius1
tidius1
tid- Forumember
- Posts : 115
Reputation : 0
Language : Polish, Lil bit English
Re: Pop-up message only for guest
Yes I am lost to. Would really like to know what will be working.
Drakaneo- Forumember
- Posts : 68
Reputation : 0
Language : English
Re: Pop-up message only for guest
If you are having issues with this please start a new thread rather than hijacking someone elses, This means your issue will be dealt wit properly
regards
Craig
regards
Craig
Guest- Guest
Re: Pop-up message only for guest
darylldelfin:
please explain it clearly...........
where do i paste the code..??
please explain it clearly...........
where do i paste the code..??
mikohshin- Forumember
- Posts : 30
Reputation : 0
Language : English
Location : here infront of computer!
Page 1 of 2 • 1, 2
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum