MyBB Community Forums
Jump Code - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: Jump Code (/thread-54838.html)



Jump Code - Eric - 2009-08-15

Well, I'm all for styling posts, and this Jump Code can be used alongside the CSS code to create things like this in posts:

http://www.pokecommunity.com/showthread.php?t=188006 (Just look at the quick jump box)

So, here's how you make the links jump like that.

We'll be creating two MyCodes, so one after the other.

Start a new code,

Put this in regular expression:

\[a-id=(.*?)\](.*?)\[/a-id\]

And this in Replacement:

<a href="#$1">$2</a>


There's our first code. Now for our second.

Put this in regular expression:

\[a-name=(.*?)\](.*?)\[/a-name\]

And put this in Replacement:

<a name="$1">$2</a>


Now, in your post, you can use them like this:

[a-id=Jump]Click this to jump.[/a-id]





[a-name=Jump]This is where you end up.[/a-name]

Hope some of you guys liked this. Wink


RE: Jump Code - faviouz - 2009-08-15

Heh, interesting. Nice job.


RE: Jump Code - duyen - 2009-08-15

Doesn't work when you have more than one of the same ID, so any troll could easily break this without anybody noticing.


RE: Jump Code - Eric - 2009-08-15

Lmao, it's funny how you guys always point out the negatives. Maybe I shouldn't even post MyCodes anymore?

(But thanks for the positive feedback faviouz)


RE: Jump Code - duyen - 2009-08-15

I point out the bugs as a courtesy, I couldn't care one way or another if you post mycodes.