Table of Contents Creator
Download Latest version: 1.6.1 (updated on 27 January 2010)
Features | Screenshot | Download | Configuration | FAQ | Comments | Demo
Version 1.6 now released! This release is a complete rewrite of the orginal code. It is now faster, uses less memory, is more robust and above all is extremely flexible. New features may now be added in a future release with minimal risk. TOCC has expanded rapidly since the original release and unfortunately the code was starting to resemble a plate of spaghetti. This release is the result of three very long weekends. Please refer to the change log for further details.
The following new features have been added. This release is all about giving more control to your visitors…
- Hierarchial categories are now supported.
- Child elements can now be dynamically expanded or collapsed by a vistor.
- The table of contents can now be dynamically sorted in several different orders by a visitor.
- All summaries can be dynamically shown or hidden by a visitor.
Have a play by viewing this site’s Table of Contents.
Please Help! Assistance in interpretation, the creation of new icon sets or just suggesting great new features would be greatly appreciated. All assistance will be acknowledged on the TOCC settings page with a link provided to your site. Please register your interest via the Contact Me page or as a comment below. Thank you.
If you find the plugin useful, please vote for it here.
Features
Table of Contents Creator (TOCC) automatically generates a dynamic site wide table of contents that is always up-to-date. All entries are navigable making your site extremely SEO friendly. TOCC can be configured to display static pages, blog posts and forum comments. TOCC may also include anchor tags marked with a special class within the table of contents. This feature allows links to articles, downloads or even other sites to appear within the table of contents as if they are part of your site’s navigation. One more great feature of TOCC is the automatic summary generator. A short summary describing each page or comment can be automatically created and added to each page or post item in the table of contents. The summary is a great way for people to quickly determine what each page or post is about without wasting valuable time. Finally, the way in which the table of contents is generated is extremely configurable and even contains a choice of several icon themes.
To generate a table of contents, simply include the <!--toc-creator--> tag on any page, or use the handy page creation feature located on the plugin admin page.
Note that the table of contents is automatically generated every time it is displayed and as such it is always up to date! New comments, pages, blogs and blog catagories will automatically appear as soon as they are published.
You never need to lift a finger. TOCC will do all the work for you!
Content generated by the Table of Contents Creator plugin is validated XHTML compliant.
Download
Latest version: 1.6.1
Requires at least: Wordpress 2.7
Tested up to 2.9.1
The plugin can alternatively be downloaded from the WordPress plugin repository.
You are free to use the plugin under terms specified by GPL.
Installation
- Download the installation file from here, extract it into your plugin folder and activate it.
- Edit the TOCC settings using the admin page located under settings.
- Place
<!-- toc-creator -->anywhere on a page or use the page generator on the admin page. Use the HTML editor when placing the tag.
Anchor Links
Anchors can be displayed within the table of contents. To include an anchor, simply add class="tocc" to any anchor tag. Anchor links will be displayed under the page in which they were located.
The Summarizer
The Summarizer will display a page or post summary below each item in the table of contents. It is set by default to automatically acquire the summary from one of several different sources, however it may be configured to retrieve summaries from one source only. Currently, TOCC interrogates the following sources:
- The All in One SEO plugin. This plugin is used by many to produce SEO friendly META descriptions.
- Any custom configurable page or post META tag,
- The post or page excerpt.
- The post ot page content.
The Summarizer uses jQuery textual effects to slowly scroll summaries and includes options for the reader to displaying all summaries, hide all summaries or display individual summaries. All buttons dynamically change on hover and are theme sensitive.
Examples
Table of Contents With “Professional” Icon Theme

Table of Contents Showing Collapsed Children and “Square” Icon Theme

Table of Contents Without Icons

Table of Contents using “Handdrawn” Icon Theme and Expanded Options Menu

Example Configuration

Configuration
TOCC is configured with defaults that will suffice the needs of most users. There are loads of configuration options though that you can tweak to help blend the table of contents with you blog style and personal tastes. None of the options break anything and are, for the most part, self explanatory. If you run into trouble, click on the option text within the plugin settings page to display detailed help.
All available options are detailed below…
General Options- Table of Contents Title: This text entered here will be displayed at the top of the table of content page. Leave blank to display no title. Include any required formatting tags.
- Icon Theme: Select the icon theme used to display next to each table of contents entry. Icon themes are a set of icons that are related in look and style. Icons are used to differentiate pages, links, blog categories, blog entries and form comments. Select none to inhibit the displaying of icons.
- Default Sort Order: Selects the default sort order for pages and posts. The sort order can be overridden by a vistor using the options menu.
- Date Format: Used to set the date display format when showing blog or forum comment dates. See http://php.net/manual/en/function.date.php for format string details.
- Show Separate Lists: Displays the page list, blog posts and forum comments as separate lists under a configurable title. See the settings below for Page Title, Blog Title and Forum Comments Title. The title strings may contain HTML formatting tags.
- Show Options Menu: Displays a menu at the top of the table of contents page allowing vistors to format the table of contents. Options include expand and contract child elements, show or hide summaries and sort the table of contents.
- Option Menu Item Texts: This is the text used for each option menu item. It is settable so that the menu can be easily modified to reflect the blogs host language. Ensure that the menu items appear in the same order. Commas are used to delimit each menu item and should therefore not be used in a menu item description.
- Options Menu Border Color: A small options menu is displayed to each visitor allowing them to sort the table of contents, expand or collapse child elements and display or hide summaries. This option defines the color used for the menu border and separator bars. HTML color codes can be found here. Dont forget to include the leading hash.
- Allow Children to be Expanded and Collapsed: Allows parent elements, such as a page with sub pages or a category with posts, to expand or collapse the child elements similar to a tree view in Windows Explorer.
- Hide Children by Default: Hides all children by default. This option will only be used if the above option is selected.
- Author Prefix: The text to be displayed before the authors name.
- More Prompt: If enabled, the more prompt is displayed at the bottom of the blog posts and forum comments lists if not all posts or comments are displayed. clicking the link will display a new page showing all available posts or comments. This enables a smaller subset of the posts and/or comments to be displayed on the main site-map allowing greater readability.
- Show Author Credit: Displays a small unobtrusive acknowledgement at the bottom of the table of contents. Please consider leaving the acknowledgement enabled as a token of appreciation for the hours spent developing this plugin.
- Show Summary: If enabled, a small summary is automatically created for each page or post. The summary may be hidden by default allowing visitors to dynamically show or hide summaries as required. Summaries may be extracted from All in One SEO descriptions, post excerpts, post or page body text or custom META tags.
- Extract Summary From: Determines where the page or post summary is to extracted from. If Auto is selected, a number of different methods are examined in hierarchial order to obtain the first non-blank description. Other valid options include All in One SEO description tags (requires the All in One SEO plugin to be installed), Post Excerpt, Page or Post Body and Custom META. The option below can be used to configure the custom META tag.
- Custom Summary Extraction META: Defines the custom META tag if selected above. Wordpress allows custom fields to be added to a page or post. The custom fields are displayed as META tags in the post or page header and can be used by search engines. If you do not use the All in One SEO plugin, it is a good idea to create a custom Description META and include a brief description of the post in the value field.
- Summary Length Limit: Sets the maximum number of characters to display for each summary. Set to 0 to disable this option. It is a good idea to keep this short to reduce page load times if the table of contents contains many pages or posts.
- Display ellipses if Summary Exceeds Limit: If set, ellipses (…) will be displayed if the extracted summary exceeds the above summary length limit.
- Hide Summaries by Default: Select this option to avoid cluttering the table of contents by hiding all summaries by default. Summaries may be displayed by the visitors on an as-required basis.
- Allow Individual Summaries to be Shown or Hidden: If selected, visitors will have the option of displaying or hiding summaries for individual posts or pages. A small icon will be displayed next to the post or page.
- Show Static Pages: Show static pages within the table of contents. Note that the pages will be sorted in menu order. Use the order attribute of each page (settable via page edit) to set the menu order.
- Page Title: This text is used as the page list heading. The page list heading is only displayed if the separate page, blog post and forum comment lists option is checked. See General Settings for more information.
- Page Depth: Determines the page depth to display. For example if set to 1, all parent pages will be shown and the immediate children of each parent page will also be shown. Set to 0 to show parent pages only.
- Link Class: If set, any <a> tags assigned to this class will be shown as a list item under the page in which the link was found. To use, add class=”linkclass” to each <a> tag you wish to display in the table of contents. Leave blank to disable this option.
- Show Page Author: Displays the author of the page.
- Show Page Date: Displays the creation date of the page.
- Exclude Pages: Select one or more pages to exclude from the table of content. By default, all pages are enabled.
- Show Blog Posts: Show blog entries within the table of contents. Blog entries will automatically be separated by category.
- Blog Title: This is a mock page name used for sites that do not have a static post page. See the Wordpress Settings/Reading option for more details. The blog title is also used if static pages are not displayed or page lists, blog posts and forum comments are separately displayed.
- Show Posts Total: Displays the total number of posts in brackets for each category next to each category listing.
- Number of Blog Posts: Determines the maximum number of blog entries to display in each category. Set to a value equal to or less than zero to display all posts.
- Show as Flat List: If selected the blog categories will not be displayed as an indented hierarchial list, but instead as a flat list.
- Show More Prompt: Displays a link at the bottom of the posts list to display more posts. The link will only be displayed if the current number of posts is limited (see the option above). The link text is set in the general options section.
- Show Posts Warning: Displays a message after the blog page name to alert the reader that only the latest n posts are shown. This text is not shown if all posts are displayed (by entering 0 in the “Number of Blog Entries” setting below).
- Post Warning Text: The message to display if the post warning is enabled. Use
{x}as a place holder for the number of blog entries being displayed. - Show Post Author: Displays the author of the post.
- Show Post Date: Displays the creation date of the post.
- Exclude Categories: Select one or more categories to exclude from the table of content. By default, all categories are enabled.
- Show Forum Comments: Show forum comments within the table of contents. The latest forum comments will be shown first. Note that currently this option only works with Forum Server and WP-Forum.
- Forum Title: This text is used as the forum list heading. The forum list heading is only displayed if the option is checked to separate the page, blog post and forum comment lists. See General Settings for more information.
- Forum Page Name: This is the name of the WordPress page that is used as a place holder to display the forum. The page name is required so that the plugin can display the forum comments underneath the correct page name. The forum page typically consists only of a tag such as
<!--VASTHTML-->. - Number of Forum Comments: Determines the maximum number of forum comments to display. The latest comments will be displayed first. Set to 0 to display all comments (not recommended).
- Show More Prompt: Displays a link at the bottom of the comments list to display more comments. The link will only be displayed if the current number of comments is limited (see the option above). The link text is set in the general options section.
- Show Comments Warning: Displays a message after the forum page name to alert the reader that only the latest n comments are shown. This text is not shown if all comments are displayed (by entering 0 in the “Number of Forum Comments” setting below).
- Comment Warning Text: The message to display if the comment warning is enabled. Use
{x}as a place holder for the number of commebt entries being displayed. - Show Comment Author: Displays the author of the comment.
- Show Comment Date: Displays the creation date of the comment.
FAQs
When I add a new page or post, do I need to tell TOCC?
No. TOCC will automatically add new pages, blog categories and entries, forum comments and links to the table of contents. A new table of contents is generated every time the page is displayed.
Where does the Summarizer get its text from?
The Summarizer is a great feature of TOCC that automatically produces a short summary of each page or post. It first attempts to retrieve the summary from the All in One SEO Plugin. If none was found, it then looks inside a custom META tag, then the post excerpt, then the post content. If all this fails, a message is displayed indicating that no description exists for this page or post. The summary is then stripped of any HTML tags and truncated to a configurable length before it is displayed.
Why is it that some static pages don’t display in the table of contents?
Private pages are not included in the table of contents. Furthermore, you can inhibit pages from displaying using the admin settings page.
What is an anchor link?
Anchor links are <a> tags that have been marked with a special class. By default, any anchor tag that include the text ‘class=”tocc”‘ will be included as a link in the table of contents. Note that the class identifier can be changed via the admin settings page.
Can I edit the way the table of contents is displayed?
Definitely! There are many options on the admin settings page that allow you to individualise the way the the TOC is displayed. TOCC also ships with a tocc.css file that can be customised to display different icons, text colors and so on. All individual elements within the TOC can be formatted within the css file.
Revision History
1.0- Initial public release.
- Posts will now be displayed if there is no static post page. Prior to this release, a static blog page was required.
- Now shows blog entries if blog page or static pages are excluded from the table of contents.
- Now show forum comments if forum page or static pages are excluded from the table of contents.
- Added option to remove author acknowledgment.
- Now displays a message indicating the last number of posts if the number of posts exceeds the selectable maximum number of displayed posts.
- Now displays a message indicating the latest number of forum comments.
- Fixed incorrect <div> nesting when static pages are excluded.
- Fixed bug where anchor links would be displayed even though static pages were disabled.
- Fixed bug where forum page would always default back to the first page in the settings editor.
- Now allow extended help to be displayed if the option is disabled. This my be help the user to determine why the option is disabled in the first place.
- Modified default settings to disable icons and show all blog entries (looks more professional).
- Now shows blog entries as list items if icons are not selected. This provides better intergration with existing site themes and looks better when icons are not displayed.
- Now uses configurable blog title if not displaying static pages. The blog title may be left blank.
- Removed excessive use of nested <div> tag. This may have caused an issue with oulder browsers.
- Now ensure blog posts are sorted by date rather than rely on Wordpress defaults (as this may change in later Wordpress versions).
- Split the show posts/comments warning option into individual forum and blog sections.
- New option (on by default) to show total number of posts in each category.
- Renamed function
display_poststotocc_display postsand moved out of hook function as it conflicted with a function of the same name when display category posts. This update is a must for anyone using version 1.1 or 1.2 of this plugin!
get_posts()method used to retrieve wordpress blog posts sometimes return incorrect (empty) results. I have therefore implemented a new method to directly retrieve posts from the database. Retrieval falls back to get_post if no posts were found using the database method.- Removed bullets from forum comments and blog posts when displaying icons.
- Hardcoded title formatting removed and added by default to the title. A blank title tag is now also allowed.
- Additional desscriptions added to settings page to guide users on the use of the
create pageandupdate optionsbuttons. - Added options to show blog and forum last update date and author.
- Added date format specifier for blog and forum last update dates.
- Added forum and blog author prefix text setting (for blogs using a language other than English)
- Added forum and blog warning text setting (for blogs using a language other than English)
- Added optional formatting to CSS file (such as removing bullets, adding anchor decoration etc). Instructions included in the CSS file.
- Added ability to determine previous version during upgrade. This will allow future versions to tweak existing settings to match the look and functionality of previous versions.
- Post count now pulled from database as $cat->count does not match the number of posts pulled from the database in some (rare) cases.
- Modified post retrieval query slightly as it sometimes got confused with posts that have multiple categories.
- Modified internal English strings be i18n Wordpress translation compatible.
- Added translation “please help” message to the settings page.
- Added option to select one of five different icon sets. Icons sets now include none, handdrawn (original), blue, square and bling. None selected by default, except when upgrading and show icons checkbox was selected. In this case, handdrawn is automatically selected to ensure that existing site maps retain the current look.
- The settings page now utilises collapsible menues as the number of options was becoming too large and overwhelming to display all at once.
- Added option (off by default) to show all entries as list items if not displaying icons. Currently only blog posts and forum comments are displayed as list items. Enabling this option allows easier integration into some themes.
- Fixed display issues with IE6. Found bug in IE6 render engine that stopped the icons from being displayed if the list item consists entirely of an anchor tag. Added a space to the end of all list items fixes this bug. Thank’s Microsoft, can I have mny day back now?
- Added option to display pages, posts and forum comments as separate lists each with individual headings. Heading texts can also be set.
- Added option to display a “more” prompt at the end of the blog post and forum comments if not all of the posts or comments are shown. When clicked, the link will display a page of all posts or forum comments.
- Removed translational strings from add_option_page function as I suspect this may cause a race condition on initial activation (ie after an upgrade) that may every now and again causes a momentary server failure message. The message goes away after refreshing the page.
- Added CSS2 bullet clearing when displaying icons.
- Post anchor links now link to post permalink instead of the post number.
- Added Italian language file by Carlo Politi.
- Added Professional icon set (recommended by Bryan Brazil).
- Changed IDs to CLASSES to ensure XHTML 1.0 Strict (thanks Bryan).
- Added an uninstall script to remove all options when the plugin is deleted.
- Fixed bug causing options to default to “blank” on initial install.
- Fixed fault causing author acknowledgment to dispay at full text height.
- Optimized use of Wordpress actions. The plugin now loads the localization file only when needed and all global code has been removed (except for action hooks).
- Resolved issue where default options would periodically not translate on new plugin install.
- Added special debug mode (activated by typing DEBUG_ON in TOC Title) to output all option settings as a hidden comment on the TOC page.
- Updated admin settings page to a more “Wordpress” like theme.
- Fixed bug in tocc_plugin_options() function that stopped the admin page loading on some systems. Thank you very much Michael E. Chancey Jr. for pointing out the bug and offering a fix.
- Added “Settings” link to plugin menu.
- Modified css file to remove CSS2 style bullets when displaying icons.
- Brand new feature added – The Summarizer. This new feature allow you to display post or page summaries under each table of content item. The summaries are automatically generated using All in One SEO tags, post exceprts, body content or META tags. Summaries are displayed or hidden using fancy jQuery scroll effects. The Summarizer is also uber configurable. Readers may hide or display summaries using themed icons. BIG THANK YOU to Scott for suggesting this feature!
- Fixed a small issue that stopped table of contents from correctly validating as XHTML.
- Added an “Are you sure?” warning when the restore defautls button is selected.
- Dynamically add toc.css and java script headers to pages with table of contents tag only (instead of all pages).
- TOCC pages generated with the create page option are now add to the end of an ordered page list (position 9999). This ensures that the page is displayed last in most theme menus. Comments are also now closed by default.
- Removed reliance on PHP5. Four lines of code accessed objects in a way that was not compatible with PHP4.
- Added space between Summarizer option span elements to fix rendering issue with some browsers.
- Added mozilla inline block replacement to fix rendering issues in Firefox 2.0 and lower.
- Replaced text Summarizer icons with mostly transparent icons to best suit more background colors.
- Hierarchial blog categories are now supported. An option has been included to display categories as a flat list as per previous versions.
- New feature to dynamically display or hide child elements similar to the way Windows Explorer works.
- New options menu allowing a visitor to hide/expand child elements, show/hide all summaries and sort the table of contents in several different orders.
- Added ability to display page author and/or page date for static pages.
- Updated Italian translation to include Summarizer options thanks to Carlo Politi.
- Stripped Worpress caption tags and plugin square bracket activation tags from page and post summaries. This was causing Summarizer display porblems with caption tags and the contact form plugin.
- Moved all tocc options into a single associative array resulting in smaller and easier to follow code with less calls to the option table.
- The php code has now been fully commented.
- The code used to generate the TOC HTML code has been completely rewritten. The resulting HTML is now a lot neater and no longer uses div elements. All list item types are now fully customizable using CSS. The lists are also now truely hierarchial.
- Added a new classes to items with children, the active page item, date text, author text, expandable items and option menu items allowing greater flexibility when custom styling with css.
- CSS file has been completely rewritten so that it is easier to override and customize.
- Many function parameters are now passed by reference thus reducing overall memory requirements and CPU usage.
- All formatting now moved from source code to the css file.
- Added nonce and admin check to all TOCC administration panel settings changes (for security purposes).
- If no author URL is configured in the WP user section, the author link will default to the author post summary page.
- Add Spanish (castilian) translation by Fernando J. Echevarrieta (echeva).
Upcoming Features
The following is a list of features that will be implemented in the next revsion. If you would like any additional features, please feel free to leave a comment below.
List post subcategories as indented categories under the parent category. At present, all categories are shown as a fla list ordered by name.Comment the code to Wordpress commenting standards.- Dynamic (reader) list manipulation including: grouping by author (as suggested by iplnts)
and sort options (as suggested by Scott) such as sorting by category, post name, publish date etc. - Sidebar widget allowing a the TOC to be placed in the sidebar.
- Add ability to use text instead of icons for individual summary expansion/contraction.
- Summarizer elsipses to start at end of the last word.
- Fix bug in IE6 where options pane momentarily expands horizontally when hiding or displaying.
- Fix bug in IE6 where transparent PNG icons are shown with a grey background – make all PNG icons GIFs.
Acknowledgements
I wish to acknowledge the valuable assistance offered by the following people:
- Carlo Politi for providing and updating the Italian translation file.
- Fernando J. Echevarrieta (echeva) for providing the Spanish (Castilian) translation file.
- Scott for suggesting and helping test the new Summarizer feature.
- Steadman Uhlich for assisting with major version pre-release testing and vailidation’, ‘tocc’)
Please help. Your help would be greatly appreciated if you could assist in translating this plugin, help test new releases or suggest new features.
Comments
Please let me know what you think. Leave a comment if you have a requested feature, found a bug or need some help. All are welcome.








Working on setting up a site for a friend, and have a small issue with TOCC. It found all his articles except for those in a category called Childrens Stories.
If you go here: http://www.peteradamsalomon.com/?page_id=91
You can see what I’m talking about.. It generates the TOC quite beautifully.. But, if you pull down the comments on the right, you’ll see that Childrens Stories is there, but it is not on the TOC page.
Any ideas would be greatly appreciated.
thanks
Hi Derwood,
It would be appreciated if you can please do a couple things to help me find the fault…
1) Upgrade to version 1.6.1 and see whether this fixes the problem.
2) In the Blog Options section, please select the option “Show as flat list” and see whether this fixes the problem.
3) If the above does not work, in the General Options section type “DEBUG_ON” (without quotes and all in caps as shown) in the Table of Contents Title and press the Update Options button. This will not make any noticable changes to your page, but will hide a lot of debug information in a comment in your page’s source code. I can use this info to help debug.
4) If all else fails, would it be possible for you to supply me with a hierarchial representation of you category structure (found under posts/categories).
Please let me know how you went.
Mark.
Mark,
A quick update.. I updated to 1.6.1 tonight, and that had no effect. However, when I changed the setting to Show As Flat List, that started showing the Childrens Stories section.
If you need me to do more, please let me know.. I’ll help out however I can.
Hi Derwood. Thanks for the update and thanks for trying the steps I sent you. Setting to Flat list has identified a single function as the problem, so this has helped me a lot. Is your table of contents now good enough to wait for the next release before I fix the problem? if not, I will make the fix a priority.
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/mybeste6/public_html/ics/member/wp-content/plugins/table-of-contents-creator/table_of_contents_creator.php on line 644
That’s the error I am now getting. This just started. It was working fine an hour ago and now – it’s not. I installed two other plugins and then saw this. I deactivated those to see if that would change anything but it didn’t.
What do I do here?
- Andi
Hi Andi,
You are the second person to report this problem. Can you please upgrade to version 1.6.1 and see if the TOC works. If you see strange entries, this means the new code I have implemented has trapped a possible culprit. It will help heaps if you could then please send me a link to your site to help debug the problem.
Thanks,
Mark.
I’d be happy to… I don’t see a way to upgrade to 1.6.1. Is there a download link?
ahh just found it!
Hi Mark the 1.6.1 version worked. It showed up in the update panel and voila… working again! I’m so glad because this is a GREAT plugin. The styling is beautiful and you’ve done an amazing job here.
Thanks Andi. Your comments are very much appreciated.
Hi Mark!
Pardon!!! Something went wrong with the inserted links…I’ve inserted a pre code tag which doesn’t worked on this commenting page, and see our previous comment conversation thread on the comment-page-2 #comment-390!
Hi iplnts. Welcome back.
The author link uses the author URL as specified in the WP admin user panel. I have released a new version (1.6.1) that uses your suggestion (?author=authorID) if the author URL is blank. Hopefully this fixes your problem and gives you a more functional sitemap.
BTW, I plan to release author sorting in the next revision
Cheers,
Mark.
Hi Mark!
Thanks for releasing this little modification, and I’m awaiting for the author sorting too
Further good work for you!
iplnts
Hi Mark,
BTW: Could you help – where to find the 1.6.1 version?
Does this home download link contain that?
(it is only a .zip without a version number, and WP official site contains only the 1.6.0 yet)
Hi Mark!
(I’m here again and sorry for lost the thread)
What’s a great change in 1.6.0! Thank you for these improvements.
Only tiny remark:
However it is not so big problem, owing to when showing the author there is a link in which the author name is written. That author name..
There is not sorting options for the author, it’d be also useful
Unfortunately, the empty href will point to that page on which the table of contents appears. But, if you’d provide on that link href the ?author=authorID the link would point out to that particular author summary page. In this way there is not such a big need for the sorting the TOC by author. Someone can jump to that details in straight. But, it is true it won’t sow the sorted authors’ TOC summary.
— Back to the lost thread #
My Firefox extension is on the AMO repository:
here is the link:
https://addons.mozilla.org/en-US/firefox/addon/13625
and take a look on how the TOC is in working on my support page
http://editandnote.ritty.hu/
This extension is in very infant stage and requires some re-work and there are very much of inherent ideas about its improvement, however unfortunately I’ve not time to deal with it momentarily.
But a possible suggestion for you : This type of PAGE TOC manipulation would also be very useful WP Plugin too, I think. If you have enough time and think also would be useful, pls write a WP Page TOC/outline plugin. Use my code getting from this FF extension for ideas as you wish. It is free also. Download the extension simply rename the xpi to zip and see the en_toolbar.js
Let me know at my email anything about it.
—-
About the theme hack. I’m using Atahualpa theme with which I’m completely satisfied. I feel its ideas and think very good. A little bit else than the normal theme structure, but very flexible and completely user customizable. Only one can know how to do it. Must be very familiar with the CSS and also a little bit the WP things. It is/was a challenge for me again. I was rather engaged in tweaking some plugins working them together.
Thanks again for your plugin considering and making these ideas to be workable.
iplnts
I am using Wordpress 2.91 and Thesis 1.6 and unfortunatelty I am unable to create a TOC. Used the button to have it created…manually tried to do it using the deactivate-visual-editor plugin on a new post and inserted the TOC code. Just the title of the page comes up on the new page. Notice that tested up until Wordpress 2.9. Anyone else experiencing this? Was really looking forward to getting this up and working. Have over 100 posts on this blog. Is there a limit to do TOC?
Hi Cheri,
No there shouldn’t be a limit. I’ve seen some sites with thousands of posts that work fine with TOCC. I’ve had a few complaints of this type with the current version. May I suggest downloading the latest work in progress version. It is complete but I am waiting on a translation before I officially release it. The WIP version is available here… http://markbeljaars.com/download/wip/plugins/table-of-contentents-creator.zip
To install it, you need to unistall the previous version of TOCC, then click add new plugin and select the upload link.
There has been one reported bug in the WIP version that it does not display all posts, however I am yet to veryify this as it works on all my test sites.
The problem with wordpress is the huge number of variations when you concider WP version, theme, PHP version and to some extent the host OS.
Please let me know if it works for you.
Thanks,
Mark.
TOCC – an excellent table of contents widget. Can this also generate a TOC for a single page or a single post? I am running a word press made up of mostly pages, and some are long. Can a TOC be added to the top or sidebar?
thanks
philip
Hi Philip.
TOCC is not really designed for single pages, however the next release (1.6.0) can be adapted to display anchor lists for single pages or posts. This version is finsihed but I am waiting on a translation before I officially release it. In version 1.6.0, the current page has an “active” class. The tocc.css could be modified to hide all other pages by default, and only show the active page. This is not ideal as the HTML file will be larger than required (and thus take longer to serve). The source code can be modified slightly to only serve the active page list. I can help you out with this if required.
TOCC does not run natively as a widget yet, but in version 1.6.0 there is a single PHP function call that can be used to call the plugin. There’s a great plugin called “Executable PHP widget” that is only a few handfuls of lines long that will enable you to call a PHP function from a textbox. I am planning on including sidebar widget functionality in 1.6.1 (the architecture is already in place).
Finally, TOCC 1.6.0 does not display summaries for anchors. In version 1.6.1 I am planning on implementing a special tag for anchors that can be used to hold a summary. I can expedite this functionality if you require it.
Mark.
Thanks Mark. Your Table of Contents is very good and thanks for the search engine optimization information.
Thanks Cristina. Very nice of you to say so
Hi Kyle,
Yes, the problem has been resolved and the fix will be available in version 1.6.0. Release of this version has taken a little longer than expected as it required a near complete rewrite of the code. V1.6.0 is almost ready for release and is nearing test completion. Unfortunately I cannot release it though as it requires some changes to the translation files first. In the interim, the development version can be downloaded from http://markbeljaars.com/download/wip/plugins/table-of-contentents-creator.zip. It is stable and works on several test sites. See the site map of this site for an example.
To use it, download the zip, uninstall the old version and then use the upload link on add new plugin page.
There are a few surprises in V1.6.0 including:
- Hierarchial sub-category support
- Windows Explorer style collapse and expand of sub-pages or categories
- Smaller HTML code, less memory usage and less CPU usage
Features to be added in the next couple of days (before release):
- Settings pulldown (similar to Google top right) allowing: expand all; collapse all; hide summaries; show summaries;sort by post date; sort by menu order;sort alphabetically
Please let me know if V1.6.0 does not fix your problems.
Hi Mark,
I think your SW is GREAT! What a nice plugin for WP.
It does everything you said it would. Worked like a charm on WP v2.85 with PHP4.
BUT…I just updated my WP on the site to the new v 2.9.1 and PHP5….
And…TOCG stopped working (the contents no longer show on the TOCG generated page.
I uninstalled the plugin. Checked the version numbers. Downloaded directly from the WP site (installed via WP admin page) and the dashboard works and even the page generator feature generated a NEW SITE MAP page on my site (I deleted the others and cleared my cache). But…even though there is a new Site Map Page…and the short code shows in the HTML view…there is NO content on the page. Nothing at all. Just blank.
What can I do?
Hi Steady. Can you please point me towards the broken page? I browsed around your site listed in your signature and found http://photomentors.com/site-map-7/, but this page does not have the required trigger tag. Is it possible that one of your plugins is stripping the comment? I have several Wordpress blogs running on 2.9.1 and PHP5 and TOCC works, so this behaviour is very strange.
Hi Mark,
Thank you for your timely response.
I very much want to get this to work again as I think you made a great plugin. I was really pleased with it and was directing people to that page so they could see the rapidly expanding content of my new site. So, I hope I can get it to work again.
You asked if one of the plugins was stripping the comment. I am a newbie so don’t know. The only thing I installed after my upgrade to php5 and WP v. 2.9.1 was a fresh install of NextGen Gallery plugin.
Today, I tried to create the site map page again (fresh page). Here is what I did:
and still no listings of links to be seen. The HTML view of the page shows “” on the HTML edit window (of the page) but the visual view is still blank and the page when viewed in my browser is still blank.
I deactivated TOCC, deleted the Site Map 7 page, cleared my cache, reactivated TOCC, clicked on the “create page” button or site map button on TOCC, visited the new Site Map page (site map
I looked on the page (in the HTML edit view on WP) and the trigger shows as “” but the page still shows as blank when viewed on browser. I cleared cache each time to view it fresh and click refresh button of my browser each time.
Does it matter if the page url shows as “http://photomentors.com/site-map-8/” with the “-8″ part of the url?
So the new site map page is: http://photomentors.com/site-map-8/
Any suggestions?
Hi Steady. If I browse to your blog and select “view source” from within Firefox, the resulting source page does not include the TOCC tag. Something must therefore be stripping the tag before the page is shown. To see whether this is a problem with TOCC or another plugin, can you please change the tag from <!– toc-creator –> to somthing different like &llt;!– our-little-test –>. View the source from the resulting page and see whether the comment exists or not. If it does not, comments are definitely being removed by something. If it does exist, it may be that TOCC is replacing the comment with an empty string. This small action will help us slowly try to nut down where the bug lives. In the meantime, would it be possible for you to send me a list of your plugins. Better off emailing them to me at “imarket.admin at gmail dot com” (replace at with @ and dot with . – email addresses are written this way to throw off automated email address finders used by spammers) as publically listing your plugins may create a security risk.
Also try adding some text to your TOCC page. Maybe add <p> tags around the TOCC tag or temporarily include some text before and after the tag. This will tell us if WP itself is trying to be smart and not serve any pages with no HTML content.
One more thing you could also try if it is not too much trouble is to deactivate all plugins except TOCC and see whether TOCC works then. If it does, slowly activate each plugin one at a time until we find the culprit. If we find that it is another plugin, I will install the plugin on my tets blog and try to find a way to make TOCC and the offender play well together.
BTW, your website is very professional and looks great for a “newbie”. Well done.
Well I just noticed that the 2nd depth list items are not actual children (nested lists) inside their parent. I also noticed every parent is it’s own list and not part of just one top level list. If at least the parent’s children were nested, and the parent link had an active class for when I am on that page. I could show the children for any parent with an “active” class, and hide the children of all the others. Does this make sense?
I originally thought nested lists were a no go in XHTML. However http://www.w3schools.com/xhtml/xhtml_html.asp explains that it can be done as long as the nest is within an open a <li> tag. I will add children lists and sub-category nesting in the next release.
As for the active class, yep I will do this as well. I assume you only need this functionality if you are running TOCC in a sidebar??
Yes, nested lists are our friends! I was planning on using the TOCC in the sidebar, acting as my main navigation actually. I also had a question about this because I tried to place the tocc comment code inside the sidebar.php file and it didn’t end up rendering anything.
Hi Klebism,
Just a quick update to let you know I haven’t forgotten your request. The code is nearing completion and will be released soon. Please check out http://beginnerchess.org/site-map-4/ for an example of the new version showing nested lists. It took a while to make the list XHTML compliant in all configurations, but I got there eventually.
Mark.
*on the “li” tag. (yikes… not able to type any example markup.)
He he. I always have the same problem with comment filtering as well. If you use < and > for angle left and right brackets, it should work. I’ll give it a try… <li>
Anyways, yes I would be more than happy to add a class if you wish. Is it for CSS formatting purposes? If so, does adding your formatting to #tocc li {blah} work?
Mark.
*So would it be possible to have an active class set on the in the toc?