|
Geek Article and Review System GARS is the mega popular system for turning forums into articles, tutorials, or even reviews. |
Advertisement | |
Learn how to remove ads |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding Post Reference to TOC Links for Anchoring to Text Start
I am using GARS to function as a literature repository. I love it! While formatting an especially large article with an extensive TOC, I investigated being able to default the view to the beginning of the article text when jumping via the TOC. I discovered that if I affix the post reference to the end of the url, it will do just what I want.
For instance, the normal URL gererated is: http://www.ligotti.net/showthread.php?t=1131&garpg=9 This results in the first image view attached. If I manually change this URL in the address box of the browser to: http://www.ligotti.net/showthread.ph...rpg=9#post6615 It results in the second image view attached (just what I want). This allows for maximixing the view area without instantly scrolling down to read the content every time. You can jump through the TOC with ease, even with long articles. Note that at the time of creating this post the article is being edited within a secure admin directory, therefore it can not be accessed by others. My question is: How can I edit the template to default the TOC links into including the post reference within the URL? |
#2
|
||||
|
||||
hey, cool idea. Edit the geek/mods/display/toc.php module to enter the $post['postid']
|
#3
|
|||
|
|||
I see the showthre.php URL strings below, but I am not sure about the format and exact placement for adding $post['postid']. Can someone help?
PHP Code:
__________________
THOMAS LIGOTTI ONLINE A Shining Brainless Beacon Of Elegant Mutations And Cunning Annihilations |
#4
|
||||
|
||||
ok, there is a better way. Edit the gars_pb template and put the following where you want the page to jump to:
<a name="contentstart"></a> Then append #contentstart to the end of the URL bits. That will be easier. HTHs |
#5
|
|||
|
|||
Works like a charm! I also amended GARS_navigation to do the same. I'll post the revisions I made later in case someone else is interested. If you have long documents and are using the TOC, it is an awesome tweak.
__________________
THOMAS LIGOTTI ONLINE A Shining Brainless Beacon Of Elegant Mutations And Cunning Annihilations |
#6
|
||||
|
||||
Its a great overall suggestion. I may roll it into the standard feature set.
Thanks! |
#7
|
|||
|
|||
OK, this is my finished result:
http://www.ligotti.net/showthread.php?t=1136 This is a soon to be published book (permission granted), resulting in an extremely long article which has been broken down into chapters and sub-chapters. If you click on TOC items, it will consistently show the beginning of the content at the top of the browser screen. Switching between sections allows for a clean display with maximum content viewable. Check out the footnotes for another effect that I have integrated, being cross-indexed hyperlinks that allow you to toggle between the reference and the footnotes. Note that the document is for "those for whom philosophical and literary works of pessimism, nihilism, and defeatism are essential to their being." You have been forewarned! And here are the revisions made: OPEN gars_pb template FIND: PHP Code:
Code:
<a name="contentstart"> OPEN geek/mods/gars/display/toc.php (or your custom path): FIND: PHP Code:
PHP Code:
PHP Code:
PHP Code:
__________________
THOMAS LIGOTTI ONLINE A Shining Brainless Beacon Of Elegant Mutations And Cunning Annihilations Last edited by Dr. Bantham; 06-01-2008 at 12:43 PM.. Reason: Filename Typo |
#8
|
||||
|
||||
As an FYI, I integrated this functionality into 2.1.8 however the page anchor is a tad bit higher (it shows the header).
Thanks! |
#9
|
||||
|
||||
Nice work!
Susan and James |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Remove links in certain post? | John D | Geek Auto-Linker | 4 | 04-23-2008 04:56 PM |
Adding to vBa Links | Bluestrike2 | Geek Advertising Banner System | 6 | 02-10-2007 02:28 PM |
adding moderation text | benj | Geek Article and Review System | 1 | 09-13-2006 09:05 AM |
I need to show the text links of tuts on a non vb page | nbento | Geek Article and Review System | 3 | 06-07-2006 03:49 PM |
GAL Linking Text Inside Links | chet | Geek Auto-Linker | 5 | 05-01-2006 06:10 PM |