Topic: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Requests SHAKE TEXT Tag

[shake]text blablabla[/shake]

can make this tag ?

example:

<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {
    if (ie || ns4 || ns6) {
        if (ie) {
            trembleobject=eval("document.all."+idoftrembleobject+".style")
        }
        if (ns6) {
            trembleobject=idoftrembleobject
        }
        
        dotremble()
    }
}
function dotremble() {
    posleft*=-1
    if (ie) {
        trembleobject.posLeft+=posleft  
    }
    if (ns6) {
        var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
        document.getElementById(trembleobject).style.left=newpos
    }
    var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>

<div id="tremblebox" style="position:relative">
<span id="trembletext" style="position:absolute;left:280px;top:30px;">
<font size=2 color=black face=Verdana>Shake word on this.</font>
</span>
</div>

Save this code to .html

and see text test result

can make this tag ?




sorry my bad english smile

2 (edited by MadHatter 2006-11-01 14:43)

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

add the script section to the head of your include/template/main.tpl.

open up include/parser.php  scroll to the bottom and add:

function parse_shake($text) {
    $shake = str_replace('[shake]', '<div id="tremblebox" style="position:relative"><span id="trembletext" style="position:absolute;left:280px;top:30px;"><font size=2 color=black face=Verdana>', $text);
    $shake = str_replace('[/shake]', '</font></span></div>', $shake);
    return $shake;
}

then look for function parse_message.  inside that function, scroll down till you see: // Deal with newlines, tabs and multiple spaces then after it add:

$text = parse_shake($text);

then save or re-upload the altered text back to the server.

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Moved to Modifications

4 (edited by FruitCake 2006-11-02 14:23)

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Thank You smile:)




it doesn't work.....no code error, nothing

sorry my bad english

see images smile

http://img443.imageshack.us/img443/1270/shake1jz8.jpg

text not shake /ahead space text

++++++++++++++++++++++++++++++++++++++++++++++++

http://img187.imageshack.us/img187/1650/shake2tw0.jpg

blank..... not have text


please help me smile

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

did you make sure to add

<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {
    if (ie || ns4 || ns6) {
        if (ie) {
            trembleobject=eval("document.all."+idoftrembleobject+".style")
        }
        if (ns6) {
            trembleobject=idoftrembleobject
        }
        
        dotremble()
    }
}
function dotremble() {
    posleft*=-1
    if (ie) {
        trembleobject.posLeft+=posleft  
    }
    if (ns6) {
        var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
        document.getElementById(trembleobject).style.left=newpos
    }
    var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>

to the head section of your template?

if you did, then check to make sure all the code is correct (view page source).

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {
    if (ie || ns4 || ns6) {
        if (ie) {
            trembleobject=eval("document.all."+idoftrembleobject+".style")
        }
        if (ns6) {
            trembleobject=idoftrembleobject
        }
        
        dotremble()
    }
}
function dotremble() {
    posleft*=-1
    if (ie) {
        trembleobject.posLeft+=posleft  
    }
    if (ns6) {
        var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
        document.getElementById(trembleobject).style.left=newpos
    }
    var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>
</head>
<body>

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
            <pun_title>
            <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<pun_announcement>

<pun_main>

<pun_footer>

</div>
</div>

</body>
</html>

true ?

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

and what does the source look like when you view source on a preview?

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Have

<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {...................

in view source

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {
    if (ie || ns4 || ns6) {
        if (ie) {
            trembleobject=eval("document.all."+idoftrembleobject+".style")
        }
        if (ns6) {
            trembleobject=idoftrembleobject
        }
        
        dotremble()
    }
}
function dotremble() {
    posleft*=-1
    if (ie) {
        trembleobject.posLeft+=posleft  
    }
    if (ns6) {
        var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
        document.getElementById(trembleobject).style.left=newpos
    }
    var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>
<title>FLC Labs / ????? Shake Tag</title>

<link rel="stylesheet" type="text/css" href="style/VbStyle-Sand.css" />
<script type="text/javascript">
<!--
function process_form(the_form)
{
    var element_names = new Object()
    element_names["req_message"] = "Message"

    if (document.all || document.getElementById)
    {
        for (i = 0; i < the_form.length; ++i)
        {
            var elem = the_form.elements[i]
            if (elem.name && elem.name.substring(0, 4) == "req_")
            {
                if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
                {
                    alert("\"" + element_names[elem.name] + "\" is a required field in this form.")
                    elem.focus()
                    return false
                }
            }
        }
    }

    return true
}
// -->
</script>
</head>
<body>

<div id="punwrap">

<div id="punviewtopic" class="pun">............................

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

yep, you already posted that code, but the parts I was after were where it actually shows the bbcode replacement (in the post)

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

include/template/main.tpl

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<pun_char_encoding>" />
<pun_head>
<script>

var ie=document.all?1:0
var ns6=document.getElementById&&!document.all?1:0
var ns4=document.layers?1:0
var posleft=1
var idoftrembleobject="trembletext"
var trembleobject

function starttremble() {
    if (ie || ns4 || ns6) {
        if (ie) {
            trembleobject=eval("document.all."+idoftrembleobject+".style")
        }
        if (ns6) {
            trembleobject=idoftrembleobject
        }
        
        dotremble()
    }
}
function dotremble() {
    posleft*=-1
    if (ie) {
        trembleobject.posLeft+=posleft  
    }
    if (ns6) {
        var newpos=parseInt(document.getElementById(trembleobject).style.left)+posleft
        document.getElementById(trembleobject).style.left=newpos
    }
    var timer=setTimeout("dotremble()",20)
}
onload=starttremble
</script>
</head>
<body>

<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
            <pun_title>
            <pun_desc>
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<pun_announcement>

<pun_main>

<pun_footer>

</div>
</div>

</body>
</html>

include/parser.php

Download parser.php Now
http://www.filefactory.com/file/e5f53d/

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

hmm

do you have a link that I can see it myself. I haven't actually tried this code as bbcode, and I'm too lazy to put it on my forums to test out (I don't use the punbb provided templates and mine are a little more involved than just adding the script to the head section of a file).

I need to see it (or the html generated code produced by punbb when you submit / preview a post w/ the shake codes in them).

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

a question regarding the bbcode [img]:
Is it possible to have something like.

<a href="http://www.yourside.com"><img src="http://www.yourside.com/images/photo01.jpg" width="XXX" height="YYY" alt="Photo01" title=""></a>

The poor horseman without horses
www.galopp-sport.eu

http://claimid.com/jlangrock
[img]http://claimid.com/images/hcard.gif[/img]

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

jlangrock wrote:

a question regarding the bbcode [url]:
Is it possible to have something like.

<a href="http://www.yourside.com"><img src="http://www.yourside.com/images/photo01.jpg" width="XXX" height="YYY" alt="Photo01" title=""></a>

You posted this @ punres.org as well. Which is not a problem... but putting both posts on other topics really does not help your case.

Start a new topic... wink

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Sorry,
I have to learn about the different forums and how the are structured. Finally I posted it in the German forum too and there I got the quickest answer. At punres.org I summits the answer. Different forums have a different approach, that my learning curve. But the software and the community is great.

there is so much to learn, unfortunately you have to learn it parallel because every minute there are new thoughts and new ideas.

The poor horseman without horses
www.galopp-sport.eu

http://claimid.com/jlangrock
[img]http://claimid.com/images/hcard.gif[/img]

Re: Requests SHAKE TEXT Tag [shake]text blablabla[/shake]

Hay peer's did you get this to work im trusting to do this But im having alot of truble can i get some help witht this? Thank you