[SOLVED] Table of Contents Using heading tags?

Post

Posted
Rating:
#3916 (In Topic #773)
Avatar
Standard member
mythus is in the usergroup ‘Community saint’
Greetings,

For some reason I remember Chris saying that the comcode contents (Table of Contents) block can work using the html heading tags, ie


Code

Stuff




Instead of relying on the comcode Title tags…


Code

[title=2]Stuff[/title]


I've yet to see this work. Did I perhaps remember this incorrectly? Likely I did. Is there a way to make the Table of Contents use html headings?

Last edit: by mythus



Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
 
"Those who want help should first be willing to give help."
Online now: No Back to the top

Post

Posted
Rating:
#3933
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

It should work.

Actually I just tested and couldn't get it not to work. I tried with plain Comcode, and WYSIWYG HTML, both with and without Comcode conversion enabled (btw, don't enable Comcode conversion to test unless you really want it).

Here's an example of HTML that worked:

Code

[contents][/contents]

<h2>Foo</h2>

<h3>Bar</h3>

<h2>Test</h2>

I'm not denying the issue, but I'll need a failing test case like this to debug.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3935
Avatar
Standard member
mythus is in the usergroup ‘Community saint’
Man, I wish it worked like that for me… Would make fixing/rebuilding my site after my old server went up in flames so much easier…

Here's screenshots showing you the issues I'm having…

Screenshot_20180208_164320.png

Screenshot_20180208_164350.png

Screenshot_20180208_164441.png

 


Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
 
"Those who want help should first be willing to give help."
Online now: No Back to the top

Post

Posted
Rating:
#3937
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Please post the HTML code (e.g. from the WYSIWYG source view) inside a code tag, I need to be able to copy and paste it to reproduce.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3938
Avatar
Standard member
mythus is in the usergroup ‘Community saint’
Here you go.

Code

<input class="cms_keep_ui_controlled" readonly="readonly" size="45" style="cursor: pointer;" title="[contents][/contents]" type="button" value="contents Comcode tag (dbl-click to edit/delete)" /><br />
<br />
Profession is what your character does for a living. Your character&#39;s profession is initially decided upon during the <a class="user_link" href="http://www.legendsofnorova.net/ocportal/index.php?page=wiki&amp;type=browse&amp;id=12&amp;keep_wiki_root=20">Character Origins</a> part of Character Creation and shows the job that your character is currently doing when you have started actually playing your character. If you have chosen not to make use of Character Origins then you do not need to worry about using Professions, unless of course you wish to do so. If you have used Character Origins to help create your character, then you need to read this page to better understand how your character&#39;s profession affects your character&#39;s growth and development.<br />
<br />
<a class="user_link" href="#top" rel="nofollow nofollow" target="_top">Back to top</a>

<h2 id="what-all-does-profession-affect">What all does Profession affect?</h2>
You already know from character origins that your character&#39;s profession gives your character a weekly salary. It might have also given your character some other bonuses. That&#39;s not all that your character&#39;s profession affects though. Your character&#39;s profession also affects the following:<br />
&nbsp;
<ul>
   <li>The rate and which your character learns and masters skills: skills that fall into your character&#39;s profession will be easier for your character to learn and master while others may be more difficult</li>
   <li>The effectiveness of the skills your character uses: skills that fall in your character&#39;s profession might be more effective while others might be less effective</li>
   <li>How effective your character is with certain weapons: your profession might make your character better with daggers than other characters not sharing your profession, for example</li>
   <li>How effective your character is with certain armor: perhaps that heavy armor doesn&#39;t slow your character down as much because of your character&#39;s profession</li>
</ul>
Since your character&#39;s profession is chosen during creation, it is treated as a life profession. This means that you cannot change your character&#39;s profession later &#111;n, so you should carefully consider the benefits and negatives of your character&#39;s profession. Luckily your character&#39;s profession doesn&#39;t prevent you from using other skills or equipment. Instead, it may make them more difficult to use or master.<br />
<br />
<a class="user_link" href="#top" rel="nofollow nofollow" target="_top">Back to top</a>


Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
 
"Those who want help should first be willing to give help."
Online now: No Back to the top

Post

Posted
Rating:
#3939
Avatar
Standard member
mythus is in the usergroup ‘Community saint’
I have discovered the culprit...

The id="namehere" inside of the h2 tag is confusing the contents comcode. Removing that bit makes it work.

So either I have to apply the title=2 comcode tags to my headers, go through the larger work of removing the header id's, or hope that the great and all-powerful Chris has a better solution lol. Sigh...


Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
 
"Those who want help should first be willing to give help."
Online now: No Back to the top

Post

Posted
Rating:
#3940
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
I should be able to fix pretty easily assuming it reproduces, will tell you soon.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
Item has a rating of 5 (Liked by mythus)
#3941
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Fixed in https://github.com/ocproducts/composr/commit/37715143016fc4fc7d6c8780b07a0a6e3d32c69c

It is probably safe to copy the latest of these 2 files to fix it…
sources/comcode_from_html.php
sources/comcode_renderer.php

But take backups of the replaced files first.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3942
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Also note this will erase any IDs etc on those tags, as it has to forcibly convert any headers to Comcode, which doesn't support those properties.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3943
Avatar
Standard member
mythus is in the usergroup ‘Community saint’
Hey it works now! Awesome! Thanks Chris, as always, you rock.


Like ocPortal? Want to thank Chris and gang somehow? Then help out in the chat room! It really needs your help! Just open it in a tab everytime you open your web browser, and when you hear a "ding", check it out!
 
"Those who want help should first be willing to give help."
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,052 topics, 7,195 posts, 10,830 members
  • Our newest member is Customcollective
Back to Top