PDA

View Full Version : SMF/ PHP Can Someone Help?



z0mg beast
October 16th, 2010, 14:03
Well I am trying to add this, (from here ~ Only the registered members can see the link.!)

<!-- Vote Popup -->
<div id="bgbtm">
<script type="text/javascript"><!--
function getInternetExplorerVersion()
{
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer')
{
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat( RegExp.$1 );
}
return rv;
}

function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function createCookie(name,value,min) {
if (min) {
var date = new Date();
date.setTime(date.getTime()+(min*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}


window.onload = function vote_popup() {

var ver = getInternetExplorerVersion();
if(navigator.appName == 'Microsoft Internet Explorer' && ver < 7.0)
{
return;
}

dsrvote = readCookie('dsrvote');

if (dsrvote == null) {
document.getElementById('vote_popup').style.displa y = "block";
}

}

function hide_vote_popup() {
createCookie('dsrvote','yes','1440');
document.getElementById('vote_popup').style.displa y = "none";
document.getElementById('vote_popup').innerHTML = "";
alert("Please vote next time!");
};
// --></script>


<div id="vote_popup" style="background: transparent url(Only the registered members can see the link.) repeat scroll 0% 0%; width: 100%; height: 100%; position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; color: #f0f0f0; font-size: 9px; text-align: center; z-index: 99999; display: none;">
<div style="margin-top: 300px; width: 470px; margin-left: auto; margin-right: auto; display: block; background-color: "><span style="color: white; font-size: medium;"> </span> <span style="color: white; font-size: large;"><strong>Please Do Not Forget To Vote</strong> </span>
<br>
<br>
<span style="color: red; font-size: small;"></span>
<p><a onclick="createCookie('MSvote','yes','720);" href="Only the registered members can see the link."> <img style="border-color:" title="vote" src="Only the registered members can see the link." border="0" alt="" /> </a><br /> <br /><span onclick="hide_vote_popup();"> <span style="cursor: pointer; font-family: Tahoma; font-size: x-small;"> <span style="font-size: small;">Remind Me Later</span> </span> </span></p>

but I have no idea what my index or portal page is, nor where exactly to add it (like after a <?) idk so can someone plz help?

z0mg beast
October 22nd, 2010, 01:32
anyone?

Faab234
October 22nd, 2010, 09:14
Inside the body tags:


<body></body>

z0mg beast
October 22nd, 2010, 20:28
im confused.

Wise Old Man
October 24th, 2010, 07:23
You're going to need basic php/css knowledge for that. You just need to add that inside the <head> tag and then make the div in your stylesheet. Something like:


#vote_popup {
height:100px;
width:500px;
float:left;
}

Faab234
October 24th, 2010, 10:25
Add it inside the body tags.

z0mg beast
October 24th, 2010, 22:19
there are no body tags. i am using smf btw.

Wise Old Man
October 24th, 2010, 22:35
You're going to need basic php/css knowledge for that. You just need to add that inside the <head> tag and then make the div in your stylesheet. Something like:


#vote_popup {
height:100px;
width:500px;
float:left;
}

Actually the block code is already there so you're not going to need to do this..
Put it inside of the head tags if there aren't any <body> tags which there should be..

z0mg beast
October 24th, 2010, 22:38
Can you help me over teamviewer?
add my msn: jkatzjk96@hotmail.com , becuse this kinda confuses me.