Anchor Link MyCode
RateU Offline
Administrator
*******
Posts: 2,327
Joined: Mar 2010
Post: #1
Anchor Link MyCode
This is a simple example using MyCode for anchor link.
Because I use Easy MyCodes plugin, so this example will use it.

Create MyCode:
  1. Anchor Link
    This is link to go to a specified anchor name.
    • Title: Anchor Link
    • MyCode Pattern:

      Code:
      [al={ALPHADIGIT}]{TEXT}[/al]

      Modify it as our needs.

    • Replacement:

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

      Modify it as our needs.

  2. Anchor Name
    • Title: Anchor Name
    • MyCode Pattern:

      Code:
      [an={ALPHADIGIT}]{TEXT}[/an]

      Modify it as our needs.

    • Replacement:

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

      We can use ID in the replacement above:

      Code:
      <a name="$1" id="$1"></a>$2

      Modify it as our needs.



That is our anchor link. Please make sure that we use unique name/id for our anchor links in a page.

Live Demo:
http://www.14.mynie.co.cc/showthread.php?tid=402

We can use the anchor link from other page/site to go to a specified anchor name in a thread.
Example:
http://www.14.mynie.co.cc/showthread.php...#variation
The link above will lead us directly to the variation anchor name in the thread.

Because I'm still learning, please tell me if there is something wrong with the MyCode above Smile

03-18-2011 07:33 AM
Find all posts by this user Quote this message in a reply
Shemo Offline
Member
***
Posts: 184
Joined: Jan 2008
Post: #2
RE: Anchor Link MyCode
nice mod.  

I'll have to try this out on my political forum!
03-21-2011 03:46 PM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 63
Joined: Nov 2012
Post: #3
RE: Anchor Link MyCode
Can any help how to put code in post?
i try many thing but not succeed.

like [al=http://abc.com/thread-3-post-5.html#1. test]1. test [/al][an=abc.com/thread-3-post-5.html#1. test]1. test[an]

please guide.
09-14-2016 05:23 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,338
Joined: Jan 2008
Post: #4
RE: Anchor Link MyCode
Don't use "http://" or # symbols.

My Blog
04-02-2017 06:33 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: