Hello.
I installed tp and musiconica theme on SMF. TP is a great modification.
My question:
I want the slide lef bar. For example my phpbb forum.
http://www.caraudioturkey.com/forum/
I can do this on phpbb. But it doesn't work on smf.
How can I do it?
I try this index.template.php code.
http://www.pgtasarim.com/tema/crip.txt
I must admit... that is really annoying.. cool, but annoying.
ZTN
But my advertisment agree is sliding ads. If do this, i convert phpbb to smf.
I must do this. :)
I have seen it before on other sites, never seen it on a TP/SMF site.
There is a mod here that allows members to move blocks wherever they want.
Floating Blocks or something.
That might be adaptable, look in the block code snippits here. It won't do what you need out of the box, but somebody might be able to help.
What is the script on the current site that enables that?
That would be a good place to start.
ZTN
I am sure this will have to be done by hard coding it into the template. If you'd like can you post the code and stuff that this script requires and I'll see what I can do?
The javascript code:
The code fonction, find <div id="sponsoraddiv"> div, and slide this....
<script language="JavaScript" type="text/javascript">
var persistclose=0
var startX = 13
var startY = 0
var verticalpos="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("sponsorAdDiv").style.visibility="hidden"
}
function staticbar(){
barheight=document.getElementById("sponsorAdDiv").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("sponsorAdDiv");
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>
I try left bar codes into div, but i did'nt see any changes. Sorry for my English. :(
// TinyPortal integrated bars
echo '
<div id="sponsorAdDiv">';
if($context['TPortal']['leftbar'])
{
echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; background-color: transparent; padding-top: 4px;" valign="top">
<div id="leftbarHeader"', empty($options['collapse_leftbar']) ? '' : ' style="display: none;"', ' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
TPortal_sidebar('left');
echo '</div></td>';
}
echo ' </div>';
echo '<td width="100%" align="left" valign="top" style="padding-top: 10px; padding-bottom: 10px;">';
if($context['TPortal']['centerbar'])
echo '<div>' , TPortal_sidebar('center') , '</div></div>';
}
could you wrap "code" tags around the script?
It's hard to read, and it wont work properly in a post as it is.
Where does it have the javascript code in your other site? In the <head> tags? Or anywhere in the page?
G60 ask me, I had no idea how..never saw a TP site do the slide
moon walk rather.. :P
After </head> code... So between <head> xxx x x x </head>
Hello.
I added to style css.
#sponsorAdDiv {position:absolute; }
Then left bar is sliding... :)
Sweet! Congrats on getting that working!
WoW... I'll have to take a look at this.
Maybe it could be added to the snippits somehow?!?