It is currently Mon 26 Sep 2016 - 21:00 - créer un forum

[Tuto] POPUP persistante de notification en DHTML

Skip to content

Post new topic Reply to topic Goto page: <  1, 2, 319, 20, 2123, 24, 25  >

[Tuto] POPUP persistante de notification en DHTML
Author Message
bz3alex


Joined: 06 Sep 2008
Posts: 96

PostPosted: Sat 12 Sep 2009 - 11:19    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

PublicitéSupprimer les publicités ?
Previous post review:

bz3alex wrote:
Bonjour,

J'aimerais que mon pop-up soit à chaque fois centrer en milieu de page que dois je faire ? Car si je fais ça :


Code: Sélectionner - Agrandir var startX = 250 //set x offset of bar in pixels
var startY = 250 //set y offset of bar in pixels
 


Lorsque je mets par exempe ma fenetre en plein écran et bien le pop-up lui ne bouge pas ...

Merci!


MAJ :

Voici ce que j'ai réussi à faire en pop-up :
- http://www.team-renaissance.fr/index.php?theme=test

Mais dans les 3 boutons en bas j'ai un soucis, "Ne plus afficher"
Lorsque l'on clique dessus il disparait bien ! puisque j'ai tout simplement reprit la fonction de ce tuto, mais moi j'aimerais vraiment qu'il ne s'affiche plus lors de toute la visite c'est à dire que le visiteur puisse naviguer de page en page sans avoir le pop-up qui s'affiche constament ...

Merci !


Up !!!!!!!!
Forum
Author Message
aine
Membre


Offline
Membre

Joined: 26 May 2009
Posts: 8
Niveau:
Point(s): 7
Moyenne: 0.88

PostPosted: Sun 13 Sep 2009 - 19:45    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Bonjour,
j'ai bien suivis le Tuto nouveau message MP persistant même si il n'est pas lu
J'ai beau essayer ca avec la lettre mais ca marche pas? qu'est ce que j'ai pas fait comme bon? merci
fanathitude wrote:



altair wrote:




Ouvrir overall_header.tpl

Ajouter avant </head>

Code: Sélectionner - Agrandir




<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 = 10 //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 closebar1(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar1").style.visibility="hidden"
}

function staticbar1(){
barheight=document.getElementById("topbar1").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("topbar1");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar1, false);
else if (window.attachEvent)
window.attachEvent("onload", staticbar1);
else if (document.getElementById)
(window.onload=staticbar1);

</script>





Ajoutez également avant </head>

Code: Sélectionner - Agrandir




<style type="text/css">
#topbar1 {
position:absolute;
background-color : #eaedf4; 
border : 1px solid #9893C6;
-moz-border-radius: 12px;
padding: 4px 0px 14px 0px;
width: 360px;
visibility: hidden;
z-index: 20;
opacity:.80; filter:alpha(opacity=80); -moz-opacity:0.8; -khtml-opacity:0.8;
}
</style>








Variante 2 : avec une image



Ajoutez après <body>

Code: Sélectionner - Agrandir




<!-- IF S_USER_LEVEL == "ANONYMOUS" -->   

<div align="center" id="topbar1" style="opacity:.80; filter:alpha(opacity=80); -moz-opacity:0.8;">
<span><a href="" onclick="closebar1(); return false">
<img src="http://img42.xooimage.com/files/1/0/9/close-67f4aa.gif" align="right" border="0">
</a></span>
<table border="0" width="100%" style="border-collapse: collapse">
 <tr>
  <td><img src="http://img2.xooimage.com/votre-image.gif" border="0"></td>
  <td align="center"><span style="color:#3253A4;"><b> Bienvenue humble visiteur <br />
Veuillez vous <a href="/profile.php?mode=register">inscrire</a>
 ou vous <a href="/login.php">connecter</a></b></span></td>
 </tr>
</table></div> 

<!-- ENDIF -->  





à remplacer dans le code par l'adresse de votre image
Code: Sélectionner - Agrandir




http://img2.xooimage.com/votre-image.gif










bonjour fais ceci cela marche pas pourquoi????








_______________________
Merci à l'équipe de xooit.


Forum
Author Message
HBK


Offline
Guest




PostPosted: Mon 12 Oct 2009 - 18:20    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

mais c'est quoi sa:
</head>


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Mon 12 Oct 2009 - 18:31    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

bonjour

c'est une balise

tu dois la chercher dans panneau admin
thème
modifier les template
overall header
_______________________


Forum
Author Message
HBK


Offline
Guest




PostPosted: Tue 13 Oct 2009 - 12:41    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Je trouve pas voilà tout mon template:

Code: Sélectionner - Agrandir
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="http://img8.xooimage.com/files/s/u/subsilver-30daa.css" type="text/css" -->
<style type="text/css">
<!--
/*
  The original subSilver Theme for phpBB version 2+
  Created by subBlue design
  http://www.subBlue.com
  NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
  theme administration centre. When you have finalised your style you could cut the final CSS code
  and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
 background-color: {T_BODY_BGCOLOR};
 scrollbar-face-color: {T_TR_COLOR2};
 scrollbar-highlight-color: {T_TD_COLOR2};
 scrollbar-shadow-color: {T_TR_COLOR2};
 scrollbar-3dlight-color: {T_TR_COLOR3};
 scrollbar-arrow-color:  {T_BODY_LINK};
 scrollbar-track-color: {T_TR_COLOR1};
 scrollbar-darkshadow-color: {T_TH_COLOR1};
}
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover  { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border:0; }
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
/*
  This is for the table cell above the Topics, Post & Last posts on the index.php page
  By default this is the fading out gradiated silver background.
  However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
  background-color: {T_TD_COLOR2};
  background-image: url(http://img5.xooimage.com/files/c/e/cellpic2-30da7.jpg);
  background-repeat: repeat-y;
}
/* Header cells - the blue and silver gradient backgrounds */
th {
 color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
 background-color: {T_BODY_LINK}; height: 25px;
 background-image: url(http://img2.xooimage.com/files/c/e/cellpic3-30da8.gif);
}
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
   background-image: url(http://img2.xooimage.com/files/c/e/cellpic1-30da9.gif);
   background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
/*
  Setting additional nice inner borders for the main table cells.
  The names indicate which sides the border will be on.
  Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
 height: 29px;
 border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
 font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
 background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid;
}
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow  { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right  { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft   { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
th.thTop  { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
 font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
 text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
/* The register, login, search etc links at the top of the page */
.mainmenu  { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu  { text-decoration: none; color : {T_BODY_LINK};  }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Forum category titles */
.cattitle  { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle  { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
/* Forum title: Text and link to the forums used in: index.php */
.forumlink  { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink  { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav   { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav   { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover  { text-decoration: underline; }
/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2 { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT}; }
a.topictitle:link   { text-decoration: none; color : {T_BODY_LINK}; }
a.topictitle:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.topictitle:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name   { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
/* Location, number of posts, post date etc */
.postdetails  { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
/* Quote & Code blocks */
.code {
 font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
 background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
 border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
.quote {
 font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
 background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
 border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
/* Copyright and bottom info */
.copyright  { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright  { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
/* Form elements */
input,textarea, select {
 color : {T_BODY_TEXT};
 font: normal {T_FONTSIZE2}px {T_FONTFACE1};
 border-color: {T_BODY_TEXT};
}
/* The text input fields background colour */
input.post, textarea.post, select {
 background-color : {T_TD_COLOR2};
 border-width:1px;
}
input { text-indent : 2px; }
/* The buttons used for bbCode styling in message post */
input.button {
 background-color : {T_TR_COLOR1};
 color : {T_BODY_TEXT};
 font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
/* The main submit button option */
input.mainoption {
 background-color : {T_TD_COLOR1};
 font-weight : bold;
 border-width:1px;
}
/* None-bold submit button */
input.liteoption {
 background-color : {T_TD_COLOR1};
 font-weight : normal;
 border-width:1px;
}
/* This is the line in the posting page which shows the rollover
  help line. This is actually a text box, but if set to be the same
  colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("http://img10.xooimage.com/files/f/o/formie-30d7c.css");
-->
</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
 if ( {PRIVATE_MESSAGE_NEW_FLAG} )
 {
  window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
 }
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
 <tr>
  <td class="bodyline">
<div style="text-align:center"><a href="{U_INDEX}"><img src="http://img8.xooimage.com/files/f/c/1/fed10nr0-1--13f5957.jpg" border="0" alt="{L_INDEX}" vspace="1" /></a><br /><br />
<span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}</span><br /><br /></div>
<div style="text-align:center">
    <table cellspacing="0" cellpadding="2" border="0" style="margin:auto">
     <tr>
      <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="http://img1.xooimage.com/files/i/n/interrogation-1--2e754.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="http://img9.xooimage.com/files/i/c/icon_mini_search-30d7d.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="http://img8.xooimage.com/files/i/c/icon_mini_members-30d7e.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="http://img3.xooimage.com/files/i/c/icon_mini_groups-30d7f.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
      <!-- BEGIN switch_user_logged_out -->
      &nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="http://img5.xooimage.com/files/i/c/icon_mini_register-30d80.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>&nbsp;
      <!-- END switch_user_logged_out -->
      </td>
     </tr>
     <tr>
      <td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="http://img2.xooimage.com/files/i/c/icon_mini_profile-30d81.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="http://img8.xooimage.com/files/i/c/icon_mini_message-30d82.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="http://img4.xooimage.com/files/i/c/icon_mini_login-30d83.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
     </tr>
    </table>
</div>
  <br />

 


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Tue 13 Oct 2009 - 12:43    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

ici

Code: Sélectionner - Agrandir

</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>

_______________________


Forum
Author Message
HBK


Offline
Guest




PostPosted: Tue 13 Oct 2009 - 17:44    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

ok et aussi,
il y a ça:

Ouvrir overall_header.tpl

Ajouter avant </head>

.....
Et après
ajouter également après
head
......
Que mettre en premier???


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Wed 14 Oct 2009 - 09:49    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

avant </head>


tu mets tout ça

Code: Sélectionner - Agrandir

<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 = 10 //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 closebar1(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar1").style.visibility="hidden"
}

function staticbar1(){
barheight=document.getElementById("topbar1").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("topbar1");
stayTopLeft();
}

if (window.addEventListener)
window.addEventListener("load", staticbar1, false);
else if (window.attachEvent)
window.attachEvent("onload", staticbar1);
else if (document.getElementById)
(window.onload=staticbar1);

</script>
    <style type="text/css">
    #topbar1 {
    position:absolute;
    background-color : #eaedf4;
    border : 1px solid #9893C6;
    -moz-border-radius: 12px;
    padding: 4px 0px 14px 0px;
    width: 360px;
    visibility: hidden;
    z-index: 20;
    opacity:.80; filter:alpha(opacity=80); -moz-opacity:0.8; -khtml-opacity:0.8;
    }
    </style>


c'est tout
_______________________


Forum
Author Message
HBK


Offline
Guest




PostPosted: Wed 14 Oct 2009 - 14:47    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Sa marche pas voilà mon template:


Code: Sélectionner - Agrandir
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css">
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<!-- link rel="stylesheet" href="http://img8.xooimage.com/files/s/u/subsilver-30daa.css" type="text/css" -->
<style type="text/css">
<!--
/*
  The original subSilver Theme for phpBB version 2+
  Created by subBlue design
  http://www.subBlue.com
  NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
  theme administration centre. When you have finalised your style you could cut the final CSS code
  and place it in an external file, deleting this section to save bandwidth.
*/
/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
 background-color: {T_BODY_BGCOLOR};
 scrollbar-face-color: {T_TR_COLOR2};
 scrollbar-highlight-color: {T_TD_COLOR2};
 scrollbar-shadow-color: {T_TR_COLOR2};
 scrollbar-3dlight-color: {T_TR_COLOR3};
 scrollbar-arrow-color:  {T_BODY_LINK};
 scrollbar-track-color: {T_TR_COLOR1};
 scrollbar-darkshadow-color: {T_TH_COLOR1};
}
/* General font families for common tags */
font,th,td,p { font-family: {T_FONTFACE1} }
a:link,a:active,a:visited { color : {T_BODY_LINK}; }
a:hover  { text-decoration: underline; color : {T_BODY_HLINK}; }
hr { height: 0px; border: solid {T_TR_COLOR3} 0px; border-top-width: 1px;}
/* This is the border line & background colour round the entire page */
.bodyline { background-color: {T_TD_COLOR2}; border: 1px {T_TH_COLOR1} solid; }
/* This is the outline round the main forum tables */
.forumline { background-color: {T_TD_COLOR2}; border:0; }
/* Main table cell colours and backgrounds */
td.row1 { background-color: {T_TR_COLOR1}; }
td.row2 { background-color: {T_TR_COLOR2}; }
td.row3 { background-color: {T_TR_COLOR3}; }
/*
  This is for the table cell above the Topics, Post & Last posts on the index.php page
  By default this is the fading out gradiated silver background.
  However, you could replace this with a bitmap specific for each forum
*/
td.rowpic {
  background-color: {T_TD_COLOR2};
  background-image: url(http://img5.xooimage.com/files/c/e/cellpic2-30da7.jpg);
  background-repeat: repeat-y;
}
/* Header cells - the blue and silver gradient backgrounds */
th {
 color: {T_FONTCOLOR3}; font-size: {T_FONTSIZE2}px; font-weight : bold;
 background-color: {T_BODY_LINK}; height: 25px;
 background-image: url(http://img2.xooimage.com/files/c/e/cellpic3-30da8.gif);
}
td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
   background-image: url(http://img2.xooimage.com/files/c/e/cellpic1-30da9.gif);
   background-color:{T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid; height: 28px;
}
/*
  Setting additional nice inner borders for the main table cells.
  The names indicate which sides the border will be on.
  Don't worry if you don't understand this, just ignore it :-)
*/
td.cat,td.catHead,td.catBottom {
 height: 29px;
 border-width: 0px 0px 0px 0px;
}
th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
 font-weight: bold; border: {T_TD_COLOR2}; border-style: solid; height: 28px;
}
td.row3Right,td.spaceRow {
 background-color: {T_TR_COLOR3}; border: {T_TH_COLOR3}; border-style: solid;
}
th.thHead,td.catHead { font-size: {T_FONTSIZE3}px; border-width: 1px 1px 0px 1px; }
th.thSides,td.catSides,td.spaceRow  { border-width: 0px 1px 0px 1px; }
th.thRight,td.catRight,td.row3Right  { border-width: 0px 1px 0px 0px; }
th.thLeft,td.catLeft   { border-width: 0px 0px 0px 1px; }
th.thBottom,td.catBottom  { border-width: 0px 1px 1px 1px; }
th.thTop  { border-width: 1px 0px 0px 0px; }
th.thCornerL { border-width: 1px 0px 0px 1px; }
th.thCornerR { border-width: 1px 1px 0px 0px; }
/* The largest text used in the index page title and toptic title etc. */
.maintitle {
 font-weight: bold; font-size: 22px; font-family: "{T_FONTFACE2}",{T_FONTFACE1};
 text-decoration: none; line-height : 120%; color : {T_BODY_TEXT};
}
/* General text */
.gen { font-size : {T_FONTSIZE3}px; }
.genmed { font-size : {T_FONTSIZE2}px; }
.gensmall { font-size : {T_FONTSIZE1}px; }
.gen,.genmed,.gensmall { color : {T_BODY_TEXT}; }
a.gen,a.genmed,a.gensmall { color: {T_BODY_LINK}; text-decoration: none; }
a.gen:hover,a.genmed:hover,a.gensmall:hover { color: {T_BODY_HLINK}; text-decoration: underline; }
/* The register, login, search etc links at the top of the page */
.mainmenu  { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT} }
a.mainmenu  { text-decoration: none; color : {T_BODY_LINK};  }
a.mainmenu:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Forum category titles */
.cattitle  { font-weight: bold; font-size: {T_FONTSIZE3}px ; letter-spacing: 1px; color : {T_BODY_LINK}}
a.cattitle  { text-decoration: none; color : {T_BODY_LINK}; }
a.cattitle:hover{ text-decoration: underline; }
/* Forum title: Text and link to the forums used in: index.php */
.forumlink  { font-weight: bold; font-size: {T_FONTSIZE3}px; color : {T_BODY_LINK}; }
a.forumlink  { text-decoration: none; color : {T_BODY_LINK}; }
a.forumlink:hover{ text-decoration: underline; color : {T_BODY_HLINK}; }
/* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
.nav   { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
a.nav   { text-decoration: none; color : {T_BODY_LINK}; }
a.nav:hover  { text-decoration: underline; }
/* titles for the topics: could specify viewed link colour too */
.topictitle,h1,h2 { font-weight: bold; font-size: {T_FONTSIZE2}px; color : {T_BODY_TEXT}; }
a.topictitle:link   { text-decoration: none; color : {T_BODY_LINK}; }
a.topictitle:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.topictitle:hover { text-decoration: underline; color : {T_BODY_HLINK}; }
/* Name of poster in viewmsg.php and viewtopic.php and other places */
.name   { font-size : {T_FONTSIZE2}px; color : {T_BODY_TEXT};}
/* Location, number of posts, post date etc */
.postdetails  { font-size : {T_FONTSIZE1}px; color : {T_BODY_TEXT}; }
/* The content of the posts (body of text) */
.postbody { font-size : {T_FONTSIZE3}px; line-height: 18px}
a.postlink:link { text-decoration: none; color : {T_BODY_LINK} }
a.postlink:visited { text-decoration: none; color : {T_BODY_VLINK}; }
a.postlink:hover { text-decoration: underline; color : {T_BODY_HLINK}}
/* Quote & Code blocks */
.code {
 font-family: {T_FONTFACE3}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR2};
 background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
 border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
.quote {
 font-family: {T_FONTFACE1}; font-size: {T_FONTSIZE2}px; color: {T_FONTCOLOR1}; line-height: 125%;
 background-color: {T_TD_COLOR1}; border: {T_TR_COLOR3}; border-style: solid;
 border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
}
/* Copyright and bottom info */
.copyright  { font-size: {T_FONTSIZE1}px; font-family: {T_FONTFACE1}; color: {T_FONTCOLOR1}; letter-spacing: -1px;}
a.copyright  { color: {T_FONTCOLOR1}; text-decoration: none;}
a.copyright:hover { color: {T_BODY_TEXT}; text-decoration: underline;}
/* Form elements */
input,textarea, select {
 color : {T_BODY_TEXT};
 font: normal {T_FONTSIZE2}px {T_FONTFACE1};
 border-color: {T_BODY_TEXT};
}
/* The text input fields background colour */
input.post, textarea.post, select {
 background-color : {T_TD_COLOR2};
 border-width:1px;
}
input { text-indent : 2px; }
/* The buttons used for bbCode styling in message post */
input.button {
 background-color : {T_TR_COLOR1};
 color : {T_BODY_TEXT};
 font-size: {T_FONTSIZE2}px; font-family: {T_FONTFACE1};
}
/* The main submit button option */
input.mainoption {
 background-color : {T_TD_COLOR1};
 font-weight : bold;
 border-width:1px;
}
/* None-bold submit button */
input.liteoption {
 background-color : {T_TD_COLOR1};
 font-weight : normal;
 border-width:1px;
}
/* This is the line in the posting page which shows the rollover
  help line. This is actually a text box, but if set to be the same
  colour as the background no one will know ;)
*/
.helpline { background-color: {T_TR_COLOR2}; border-style: none; }
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("http://img10.xooimage.com/files/f/o/formie-30d7c.css");
-->
</style>
<!-- BEGIN switch_enable_pm_popup -->
<script language="Javascript" type="text/javascript">
<!--
 if ( {PRIVATE_MESSAGE_NEW_FLAG} )
 {
  window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
 }
//-->
</script>
<!-- END switch_enable_pm_popup -->
<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 = 10 //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 closebar1(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar1").style.visibility="hidden"
}
function staticbar1(){
barheight=document.getElementById("topbar1").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("topbar1");
stayTopLeft();
}
if (window.addEventListener)
window.addEventListener("load", staticbar1, false);
else if (window.attachEvent)
window.attachEvent("onload", staticbar1);
else if (document.getElementById)
(window.onload=staticbar1);
</script>
    <style type="text/css">
    #topbar1 {
    position:absolute;
    background-color : #eaedf4;
    border : 1px solid #9893C6;
    -moz-border-radius: 12px;
    padding: 4px 0px 14px 0px;
    width: 360px;
    visibility: hidden;
    z-index: 20;
    opacity:.80; filter:alpha(opacity=80); -moz-opacity:0.8; -khtml-opacity:0.8;
    }
    </style>

</head>
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
<a name="top"></a>
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center">
 <tr>
  <td class="bodyline">
<div style="text-align:center"><a href="{U_INDEX}"><img src="http://img8.xooimage.com/files/f/c/1/fed10nr0-1--13f5957.jpg" border="0" alt="{L_INDEX}" vspace="1" /></a><br /><br />
<span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}</span><br /><br /></div>
<div style="text-align:center">
    <table cellspacing="0" cellpadding="2" border="0" style="margin:auto">
     <tr>
      <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="http://img1.xooimage.com/files/i/n/interrogation-1--2e754.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="http://img9.xooimage.com/files/i/c/icon_mini_search-30d7d.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="http://img8.xooimage.com/files/i/c/icon_mini_members-30d7e.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="http://img3.xooimage.com/files/i/c/icon_mini_groups-30d7f.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
      <!-- BEGIN switch_user_logged_out -->
      &nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="http://img5.xooimage.com/files/i/c/icon_mini_register-30d80.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>&nbsp;
      <!-- END switch_user_logged_out -->
      </td>
     </tr>
     <tr>
      <td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="http://img2.xooimage.com/files/i/c/icon_mini_profile-30d81.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp; &nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="http://img8.xooimage.com/files/i/c/icon_mini_message-30d82.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp; &nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="http://img4.xooimage.com/files/i/c/icon_mini_login-30d83.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;</span></td>
     </tr>
    </table>
</div>
  <br />


 


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Wed 14 Oct 2009 - 14:53    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

il faut aussi ajouter le code après

Code: Sélectionner - Agrandir
<body>


sinon c'est normal de ne rien avoir
lis bien le tuto
_______________________


Forum
Author Message
Aranord


Offline
Guest




PostPosted: Thu 15 Oct 2009 - 11:00    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Hello, j'ai brièvement lus votre tuto, ce que je voudrais c'est un code pour afficher mon Teamspeak mais je n'y arrive pas Sad

donc un popup transparent comme celui qui ouvre le loging mais qui ouvre se code :

<script type="text/javascript">
<!--
var ouvert = 1;
var style = "classic";
var couleur_fond = "FFFFFF";
var couleur_texte = "666666";
var largeur = 390;
var hauteur = 350;
var ip = "chol.serveurts.com";
var port = 8732;
var query = 51865;
var lang = "fr";
var taille_police = 12;
var voir_salons = 1;
//-->
</script>
<script type="text/javascript" src="http://www.ts2-serveur.com/web_script/webscript.js"></script>

dés que l'on se log sur mon forum merci d'avance


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Thu 15 Oct 2009 - 11:08    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

bonjour

au lieu de mettre ça
Code: Sélectionner - Agrandir

<!-- IF S_USER_LEVEL == "ANONYMOUS" -->   

<div align="center" id="topbar1">
<span><a href="" onclick="closebar1(); return false">
<img src="http://img44.xooimage.com/files/5/0/9/button-close-focused-676560.png" style="margin-left:326px;"  border="0">
</a></span>
<span style="color:#3253A4;"><b> Bienvenue humble visiteur <br />
Veuillez vous <a href="/profile.php?mode=register">inscrire</a>
 ou vous <a href="/login.php">connecter</a></b></span><br /></div>
 
<!-- ENDIF --> 


tu mets comme ça
Code: Sélectionner - Agrandir

<!-- IF S_USER_LEVEL == "USER" -->   

<div align="center" id="topbar1">
<span><a href="" onclick="closebar1(); return false">
<img src="http://img44.xooimage.com/files/5/0/9/button-close-focused-676560.png" style="margin-left:326px;"  border="0">
</a></span>
<span style="color:#3253A4;"><b> Bienvenue humble visiteur <br />
Veuillez vous <a href="/profile.php?mode=register">inscrire</a>
 ou vous <a href="/login.php">connecter</a></b></span><br /></div>
 
<!-- ENDIF --> 

_______________________


Forum
Author Message
Aranord


Offline
Guest




PostPosted: Fri 16 Oct 2009 - 09:31    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Bonjour, merci, mais et mon code je le met ou ?
Par ce que j'ai beau essayer de le mettre a la place de "bienvenue humble visiteur" ca marche pas Sad


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Fri 16 Oct 2009 - 09:33    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

à la place de ça
Code: Sélectionner - Agrandir

span><a href="" onclick="closebar1(); return false">
<img src="http://img44.xooimage.com/files/5/0/9/button-close-focused-676560.png" style="margin-left:326px;"  border="0">
</a></span>
<span style="color:#3253A4;"><b> Bienvenue humble visiteur <br />
Veuillez vous <a href="/profile.php?mode=register">inscrire</a>
 ou vous <a href="/login.php">connecter</a></b></span><br />

_______________________


Forum
Author Message
séb13


Offline
Guest




PostPosted: Sun 25 Oct 2009 - 20:30    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

Bonjour,
C'est un excellent tuto que je viens de découvrir et ça marche impécable!!! Mais, juste une petite question, est-il possible de centrer la pop up sur l'écran de l'utilisateur???
Merci.


Author Message
themalin
Membre


Offline
Membre

Joined: 19 Apr 2006
Posts: 8,897
Point(s): 9,101
Moyenne: 1.02
Mac Firefox (ou l'un de ses dérivés : Minefield/Pale Moon/...)

PostPosted: Sun 25 Oct 2009 - 20:33    Post subject: [Tuto] POPUP persistante de notification en DHTML Reply with quote

bonjour

normalement tu as déjà le code pour centrer la fenêtre
_______________________


Forum
Author Message
Contenu Sponsorisé





PostPosted: Today at 21:00    Post subject: [Tuto] POPUP persistante de notification en DHTML

Display posts from previous:   
Reply to topic Page 20 of 25 Goto page: <  1, 2, 319, 20, 2123, 24, 25  >




Portal | Index | Administration Panel | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Propulsé par p h p B B © 2016 p h p B B Group |
 
© 2003-2013 Xooit.com - Contact - Mentions légales - CGU - Charte - CNIL : 1381401