Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Enhancements to the /sitemap page. New configuration options to add optional entries to the /sitemap page. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
6898b3e73040889d57b5ca2917cf302c |
| User & Date: | drh 2018-08-31 10:47:27.218 |
Context
|
2018-08-31
| ||
| 10:57 | Fix to the configuration page for the License link in /sitemap. check-in: ace123b7ad user: drh tags: trunk | |
| 10:47 | Enhancements to the /sitemap page. New configuration options to add optional entries to the /sitemap page. check-in: 6898b3e730 user: drh tags: trunk | |
|
2018-08-30
| ||
| 21:20 | Merge the email.c-to-alerts.c refactor. check-in: fc5c7d2625 user: drh tags: trunk | |
Changes
Changes to src/alerts.c.
| ︙ | ︙ | |||
1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
const char *mtime;
const char *sctime;
int eErr = 0;
char *zErr = 0;
if( alert_webpages_disabled() ) return;
login_check_credentials();
if( zName==0 && login_is_individual() ){
zName = db_text(0, "SELECT hex(subscriberCode) FROM subscriber"
" WHERE suname=%Q", g.zLogin);
}
if( zName==0 || !validate16(zName, -1) ){
cgi_redirect("subscribe");
return;
| > > > > | 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 |
const char *mtime;
const char *sctime;
int eErr = 0;
char *zErr = 0;
if( alert_webpages_disabled() ) return;
login_check_credentials();
if( !g.perm.EmailAlert ){
login_needed(g.anon.EmailAlert);
return;
}
if( zName==0 && login_is_individual() ){
zName = db_text(0, "SELECT hex(subscriberCode) FROM subscriber"
" WHERE suname=%Q", g.zLogin);
}
if( zName==0 || !validate16(zName, -1) ){
cgi_redirect("subscribe");
return;
|
| ︙ | ︙ |
Changes to src/configure.c.
| ︙ | ︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
{ "background-image", CONFIGSET_SKIN },
{ "timeline-block-markup", CONFIGSET_SKIN },
{ "timeline-max-comment", CONFIGSET_SKIN },
{ "timeline-plaintext", CONFIGSET_SKIN },
{ "adunit", CONFIGSET_SKIN },
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
{ "adunit-omit-if-user", CONFIGSET_SKIN },
#ifdef FOSSIL_ENABLE_TH1_DOCS
{ "th1-docs", CONFIGSET_TH1 },
#endif
#ifdef FOSSIL_ENABLE_TH1_HOOKS
{ "th1-hooks", CONFIGSET_TH1 },
#endif
| > > > > | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
{ "background-image", CONFIGSET_SKIN },
{ "timeline-block-markup", CONFIGSET_SKIN },
{ "timeline-max-comment", CONFIGSET_SKIN },
{ "timeline-plaintext", CONFIGSET_SKIN },
{ "adunit", CONFIGSET_SKIN },
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
{ "adunit-omit-if-user", CONFIGSET_SKIN },
{ "sitemap-docidx", CONFIGSET_SKIN },
{ "sitemap-download", CONFIGSET_SKIN },
{ "sitemap-license", CONFIGSET_SKIN },
{ "sitemap-contact", CONFIGSET_SKIN },
#ifdef FOSSIL_ENABLE_TH1_DOCS
{ "th1-docs", CONFIGSET_TH1 },
#endif
#ifdef FOSSIL_ENABLE_TH1_HOOKS
{ "th1-hooks", CONFIGSET_TH1 },
#endif
|
| ︙ | ︙ |
Changes to src/login.c.
| ︙ | ︙ | |||
787 788 789 790 791 792 793 |
style_load_one_js_file("login.js");
}
@ </div>
free(zCaptcha);
}
@ </form>
}
| | | > | | | | | | | | | | | | | | > | 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 |
style_load_one_js_file("login.js");
}
@ </div>
free(zCaptcha);
}
@ </form>
}
if( login_is_individual() ){
if( g.perm.EmailAlert && alert_enabled() ){
@ <hr>
@ <p>Configure <a href="%R/alerts">Email Alerts</a>
@ for user <b>%h(g.zLogin)</b></p>
}
if( g.perm.Password ){
@ <hr>
@ <p>Change Password for user <b>%h(g.zLogin)</b>:</p>
form_begin(0, "%R/login");
@ <table>
@ <tr><td class="form_label">Old Password:</td>
@ <td><input type="password" name="p" size="30" /></td></tr>
@ <tr><td class="form_label">New Password:</td>
@ <td><input type="password" name="n1" size="30" /></td></tr>
@ <tr><td class="form_label">Repeat New Password:</td>
@ <td><input type="password" name="n2" size="30" /></td></tr>
@ <tr><td></td>
@ <td><input type="submit" value="Change Password" /></td></tr>
@ </table>
@ </form>
}
}
style_footer();
}
/*
** Attempt to find login credentials for user zLogin on a peer repository
** with project code zCode. Transfer those credentials to the local
|
| ︙ | ︙ |
Changes to src/setup.c.
| ︙ | ︙ | |||
884 885 886 887 888 889 890 891 892 893 894 895 896 897 |
@ to a documentation page (ex: "/doc/tip/index.wiki") or to "/timeline".</p>
@
@ <p>Note: To avoid a redirect loop or other problems, this entry must
@ begin with "/" and it must specify a valid page. For example,
@ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the
@ leading "/".</p>
@ <p>(Property: "index-page")
@ <hr />
onoff_attribute("Use HTML as wiki markup language",
"wiki-use-html", "wiki-use-html", 0, 0);
@ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
@ but all other wiki formatting will be ignored. This option is helpful
@ if you have chosen to use a rich HTML editor for wiki markup such as
@ TinyMCE.</p>
| > > > > > > > > > > > > > > > > > > > > > > > | 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 |
@ to a documentation page (ex: "/doc/tip/index.wiki") or to "/timeline".</p>
@
@ <p>Note: To avoid a redirect loop or other problems, this entry must
@ begin with "/" and it must specify a valid page. For example,
@ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the
@ leading "/".</p>
@ <p>(Property: "index-page")
@ <hr>
@ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page.
@ Often these are filled in with links like
@ "/doc/trunk/doc/<i>filename</i>.md" so that they refer to
@ embedded documentation, or like "/wiki/<i>pagename</i>" to refer
@ to wiki pages.
@ Leave blank to omit.
@ <p>
entry_attribute("Documentation Index", 40, "sitemap-docidx", "smdocidx",
"", 0);
@ (Property: sitemap-docidx)<br>
entry_attribute("Download", 40, "sitemap-download", "smdownload",
"", 0);
@ (Property: sitemap-download)<br>
entry_attribute("Copyright", 40, "sitemap-copyright", "smcopyright",
"", 0);
@ (Property: sitemap-copyright)<br>
entry_attribute("Contact", 40, "sitemap-contact", "smcontact",
"", 0);
@ (Property: sitemap-contact)
entry_attribute("Purchase", 40, "sitemap-purchase", "smcontact",
"", 0);
@ (Property: sitemap-purchase)
@ <hr />
onoff_attribute("Use HTML as wiki markup language",
"wiki-use-html", "wiki-use-html", 0, 0);
@ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
@ but all other wiki formatting will be ignored. This option is helpful
@ if you have chosen to use a rich HTML editor for wiki markup such as
@ TinyMCE.</p>
|
| ︙ | ︙ |
Changes to src/sitemap.c.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 |
** List some of the web pages offered by the Fossil web engine. This
** page is intended as a supplement to the menu bar on the main screen.
** That is, this page is designed to hold links that are omitted from
** the main menu due to lack of space.
*/
void sitemap_page(void){
int srchFlags;
login_check_credentials();
srchFlags = search_restrict(SRCH_ALL);
style_header("Site Map");
style_adunit_config(ADUNIT_RIGHT_OK);
| > > > > > > > > > > > > < | > | | | < | | > > | > > | > > | > > | > > > < < < < | | | < < < < < < < < < | > > > | | > > > | > > > > > > > | > | > > > > | > | > > > > > > > > > > > > > > > > > > > > > > > | > > | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
** List some of the web pages offered by the Fossil web engine. This
** page is intended as a supplement to the menu bar on the main screen.
** That is, this page is designed to hold links that are omitted from
** the main menu due to lack of space.
*/
void sitemap_page(void){
int srchFlags;
int inSublist = 0;
int i;
const struct {
const char *zTitle;
const char *zProperty;
} aExtra[] = {
{ "Documentation", "sitemap-docidx" },
{ "Download", "sitemap-download" },
{ "License", "sitemap-license" },
{ "Contact", "sitemap-contact" },
};
login_check_credentials();
srchFlags = search_restrict(SRCH_ALL);
style_header("Site Map");
style_adunit_config(ADUNIT_RIGHT_OK);
@ <ul>
@ <li>%z(href("%R/home"))Home Page</a>
for(i=0; i<sizeof(aExtra)/sizeof(aExtra[0]); i++){
char *z = db_get(aExtra[i].zProperty,0);
if( z==0 ) continue;
if( !inSublist ){
@ <ul>
inSublist = 1;
}
@ <li>%z(href("%s",z))%s(aExtra[i].zTitle)</li>
}
if( srchFlags & SRCH_DOC ){
if( !inSublist ){
@ <ul>
inSublist = 1;
}
@ <li>%z(href("%R/docsrch"))Documentation Search</a></li>
}
if( inSublist ){
@ </ul>
inSublist = 0;
}
@ </li>
if( g.perm.Read ){
@ <li>%z(href("%R/tree"))File Browser</a></li>
@ <ul>
@ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view,
@ Trunk Check-in</a></li>
@ <li>%z(href("%R/tree?type=flat"))Flat-view</a></li>
@ <li>%z(href("%R/fileage?name=trunk"))File ages for Trunk</a></li>
@ <li>%z(href("%R/uvlist"))Unversioned Files</a>
@ </ul>
}
if( g.perm.Read ){
@ <li>%z(href("%R/timeline?n=200"))Project Timeline</a></li>
@ <ul>
@ <li>%z(href("%R/reports"))Activity Reports</a></li>
@ <li>%z(href("%R/timeline?n=all&namechng"))File name changes</a></li>
@ <li>%z(href("%R/timeline?n=all&forks"))Forks</a></li>
@ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
@ check-ins</a></li>
@ </ul>
}
if( g.perm.Read ){
@ <li>%z(href("%R/brlist"))Branches</a></li>
@ <ul>
@ <li>%z(href("%R/taglist"))Tags</a></li>
@ <li>%z(href("%R/leaves"))Leaf Check-ins</a></li>
@ </ul>
@ </li>
}
if( srchFlags ){
@ <li>%z(href("%R/search"))Search</a></li>
}
if( g.perm.RdForum ){
@ <li>%z(href("%R/forum"))Forum</a>
@ <ul>
@ <li>%z(href("%R/timeline?y=f"))Recent activity</a></li>
@ </ul>
}
if( g.perm.RdTkt ){
@ <li>%z(href("%R/reportlist"))Tickets</a>
@ <ul>
if( srchFlags & SRCH_TKT ){
@ <li>%z(href("%R/tktsrch"))Ticket Search</a></li>
}
@ <li>%z(href("%R/timeline?y=t"))Recent activity</a></li>
@ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
@ </ul>
@ </li>
}
if( g.perm.RdWiki ){
@ <li>%z(href("%R/wikihelp"))Wiki</a>
@ <ul>
if( srchFlags & SRCH_WIKI ){
@ <li>%z(href("%R/wikisrch"))Wiki Search</a></li>
}
@ <li>%z(href("%R/wcontent"))List of Wiki Pages</a></li>
@ <li>%z(href("%R/timeline?y=w"))Recent activity</a></li>
@ <li>%z(href("%R/wiki?name=Sandbox"))Sandbox</a></li>
@ <li>%z(href("%R/attachlist"))List of Attachments</a></li>
@ </ul>
@ </li>
}
if( !g.zLogin ){
@ <li>%z(href("%R/login"))Login</a>
if( login_self_register_available(0) ){
@ <ul>
@ <li>%z(href("%R/register"))Create a new account</a></li>
inSublist = 1;
}
}else {
@ <li>%z(href("%R/logout"))Logout</a>
if( g.perm.Password ){
@ <ul>
@ <li>%z(href("%R/logout"))Change Password</a></li>
inSublist = 1;
}
}
if( alert_enabled() && g.perm.EmailAlert ){
if( !inSublist ){
inSublist = 1;
@ <ul>
}
if( login_is_individual() ){
@ <li>%z(href("%R/alerts"))Email Alerts</a></li>
}else{
@ <li>%z(href("%R/subscribe"))Subscribe to Email Alerts</a></li>
}
}
if( inSublist ){
@ </ul>
inSublist = 0;
}
@ </li>
if( g.perm.Read ){
@ <li>%z(href("%R/stat"))Repository Status</a>
@ <ul>
@ <li>%z(href("%R/hash-collisions"))Collisions on hash prefixes</a></li>
if( g.perm.Admin ){
@ <li>%z(href("%R/urllist"))List of URLs used to access
@ this repository</a></li>
}
@ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
@ <li>%z(href("%R/timewarps"))List of "Timewarp" Check-ins</a></li>
@ </ul>
@ </li>
}
@ <li>Help
@ <ul>
@ <li>%z(href("%R/wiki_rules"))Wiki Formatting Rules</a></li>
@ <li>%z(href("%R/md_rules"))Markdown Formatting Rules</a></li>
@ <li>%z(href("%R/help"))List of All Commands and Web Pages</a></li>
@ <li>%z(href("%R/test-all-help"))All "help" text on a single page</a></li>
@ <li>%z(href("%R/mimetype_list"))Filename suffix to mimetype map</a></li>
@ </ul></li>
if( g.perm.Admin ){
@ <li>%z(href("%R/setup"))Administration Pages</a>
@ <ul>
|
| ︙ | ︙ |