Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 3 Days, 23 Hours, 29 Minutes ago Bookmarking within a post
#1
Solved: 3 Days, 23 Hours, 29 Minutes ago
Hey guys i'm new to mybb forums 

This might be a stupid question but how do i create a bookmark within a post?, for example.

I have index at the top of my post If i click item 1 it takes me to that paragraph in the post other words make a clickable index.

1. Item 1
2. Item 2 

1. Item 1 
some content 

2. Item 2
Some content 

Thanks for the help in advance
Reply
#2
Solved: 3 Days, 23 Hours, 29 Minutes ago
What you want seems to be something like a TOC in which each title is linked to a heading anchored in the post content.

AFAIK, MyBB doesn't support this feature natively and it's also a bit difficult for plugins to achieve this.
Worth a try.
Reply
#3
Solved: 3 Days, 23 Hours, 29 Minutes ago
You can achieve this using a custom MyCode, e.g.:

Regular Expression:
\[ANAME=(.*?)\](.*?)\[/ANAME\]
Replacement:
<a name="$1">$2</a>

With this MyCode you can create URLs in your TOC and link to the same thread URL with an anchor appended. Then use this new MyCode to create an named link to the Title of your content:

TOC:
[URL=https://example.com/thread-123.html#toc1]Item 1[/URL]
[URL=https://example.com/thread-123.html#toc2]Item 2[/URL]
[URL=https://example.com/thread-123.html#toc3]Item 3[/URL]
...
[ANAME=toc1]Title of item 1[ANAME]
Content to item 1

[ANAME=toc2]Title of item 2[ANAME]
Content to item 2

...

That should fit your needs.

[ExiTuS]
Reply
#4
Solved: 3 Days, 23 Hours, 29 Minutes ago
Thanks a mil guys will give it a go Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)