Site:Developer stuff/Extending TOC

From Feast upon the Word (http://feastupontheword.org). Copyright, Feast upon the Word.
< Site:Developer stuff
Revision as of 02:19, 12 September 2005 by Matthewfaulconer (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This code was written in response the following enhancement requestion on the feedback page.

Make the table of contents so that it shows a list of all articles in each chapter rather than going directly to the article for the first verses and requiring users to click "next" to get to the verse they want.

Note: I haven't fixed the "What links here" for these new links that were created. In other words, if you go to the page it won't list the TOC link to it--though it should. This needs to be fixed next.

Here is a clip of the first part of the code:

<nowiki>
INSERT INTO cur (cur_namespace, cur_title, cur_text, cur_user, cur_user_text, cur_counter, cur_timestamp, cur_random, cur_touched, inverse_timestamp) 
VALUES (0,'Genesis_1', 'Empty',  2, 'Matthewfaulconer', 1, '20050912041847', '', '20050912041847','79949087958152'); UPDATE cur SET cur_text=concat('', '* [[Gen_1:1-5 | Verses 1-5]]\n') WHERE cur_namespace=0 and cur_title='Genesis_1';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_1:6-10 | Verses 6-10]]\n') WHERE cur_namespace=0 and cur_title='Genesis_1';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_1:11-15 | Verses 11-15]]\n') WHERE cur_namespace=0 and cur_title='Genesis_1';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_1:16-20 | Verses 16-20]]\n') WHERE cur_namespace=0 and cur_title='Genesis_1';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_1:21-25 | Verses 21-25]]\n') WHERE cur_namespace=0 and cur_title='Genesis_1';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_1:26-31 | Verses 26-31]]\n\nTo see the entire commentary for Genesis 1 on one page, click [[Genesis_1_All|here]].') WHERE cur_namespace=0 and cur_title='Genesis_1';
INSERT INTO cur (cur_namespace, cur_title, cur_text, cur_user, cur_user_text, cur_counter, cur_timestamp, cur_random, cur_touched, inverse_timestamp) 
VALUES (0,'Genesis_2', 'Empty',  2, 'Matthewfaulconer', 1, '20050912041847', '', '20050912041847','79949087958152'); UPDATE cur SET cur_text=concat('', '* [[Gen_2:1-5 | Verses 1-5]]\n') WHERE cur_namespace=0 and cur_title='Genesis_2';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_2:6-10 | Verses 6-10]]\n') WHERE cur_namespace=0 and cur_title='Genesis_2';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_2:11-15 | Verses 11-15]]\n') WHERE cur_namespace=0 and cur_title='Genesis_2';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_2:16-20 | Verses 16-20]]\n') WHERE cur_namespace=0 and cur_title='Genesis_2';
UPDATE cur SET cur_text=concat(cur_text, '* [[Gen_2:21-25 | Verses 21-25]]\n\nTo see the entire commentary for Genesis 2 on one page, click [[Genesis_2_All|here]].') WHERE cur_namespace=0 and cur_title='Genesis_2';
<nowiki>
</nowiki></pre>