Anchor Link MyCode
RateU Offline
Administrator
*******
Posts: 2,350
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...http://www.14.mynie.co.cc/showthread.php?tid=402
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

« Next Oldest | Next Newest »

Messages In This Thread
Anchor Link MyCode - RateU - 03-18-2011 07:33 AM
RE: Anchor Link MyCode - Shemo - 03-21-2011, 03:46 PM
RE: Anchor Link MyCode - WINBOY - 09-14-2016, 05:23 PM
RE: Anchor Link MyCode - ZiNgA BuRgA - 04-02-2017, 06:33 PM

 Standard Tools
Forum Jump: