On 8/23/2010 2:23 PM, Scott Race wrote: > I think I am having a problem with the htdig seach templates. On my > old installation, I had a bunch of .html files in /etc/htdig - > short.html, wrapper.html, etc....those files do not exist on my new > installation.
IIRC, I had the same problem when I updated htdig from 3.1.6 to 3.2.0b6 > I copied them over from the old server to the new, rebooted, but same > issue with a blank search page. I checked the /etc/htdig/htdig.conf > file and it says the common directory is /usr/share/htdig - that > directory does not exist for me. > > So I hacked my .conf file in /usr/local/mailman/htdig to point > directly to the templates that I copied over: > > > template_map: Long long /etc/htdig/long.html \ Short short > /etc/htdig/short.html > > template_name: short > > > I do indeed get search results now. The results are not pretty - > images don't appear and a few other problems - but - I get > something. > > Any basic tips to fix my templates or maybe what might be wrong with > my common_dir variable? You need a common_dir. It doesn't matter what its name is. Mine is /opt/www/share/htdig, but what ever it is it needs to contain things similar to mine [m...@sbh16 ~]$ ls -l /opt/www/share/htdig total 6072 -rw-r--r-- 1 root root 76 Dec 26 2008 bad_words -rw-r--r-- 1 root root 922950 Dec 26 2008 english.0 -rw-r--r-- 1 root root 5756 Dec 26 2008 english.aff -rw-r--r-- 1 root root 190 Dec 26 2008 footer.html -rw-r--r-- 1 root root 877 Dec 26 2008 header.html -rw-r--r-- 1 root root 194 Dec 26 2008 long.html -rw-r--r-- 1 root root 1390 Dec 26 2008 nomatch.html -rw-r--r-- 1 root root 2228224 Dec 26 2008 root2word.db -rw-r--r-- 1 root root 67 Dec 26 2008 short.html -rw-r--r-- 1 root root 14480 Dec 26 2008 synonyms -rw-r--r-- 1 root root 90112 Dec 26 2008 synonyms.db -rw-r--r-- 1 root root 1261 Dec 26 2008 syntax.html -rw-r--r-- 1 root root 2899968 Dec 26 2008 word2root.db -rw-r--r-- 1 root root 1087 Dec 26 2008 wrapper.html [m...@sbh16 ~]$ You also need the graphics in the directory accessed by HTDIG_FILES_URL. In my case, this directory is /opt/www/htdocs/htdig/, HTDIG_FILES_URL is the default '/htdig/' and I have Alias /htdig/ "/opt/www/htdocs/htdig/" in httpd.conf. The contents of this directory are [m...@sbh16 ~]$ ls -l /opt/www/htdocs/htdig/ total 124 -rw-r--r-- 1 root root 781 Dec 26 2008 button10.gif -rw-r--r-- 1 root root 1527 Dec 26 2008 button10.png -rw-r--r-- 1 root root 755 Dec 26 2008 button1.gif -rw-r--r-- 1 root root 1428 Dec 26 2008 button1.png -rw-r--r-- 1 root root 785 Dec 26 2008 button2.gif -rw-r--r-- 1 root root 1518 Dec 26 2008 button2.png -rw-r--r-- 1 root root 745 Dec 26 2008 button3.gif -rw-r--r-- 1 root root 1404 Dec 26 2008 button3.png -rw-r--r-- 1 root root 786 Dec 26 2008 button4.gif -rw-r--r-- 1 root root 1534 Dec 26 2008 button4.png -rw-r--r-- 1 root root 780 Dec 26 2008 button5.gif -rw-r--r-- 1 root root 1519 Dec 26 2008 button5.png -rw-r--r-- 1 root root 791 Dec 26 2008 button6.gif -rw-r--r-- 1 root root 1538 Dec 26 2008 button6.png -rw-r--r-- 1 root root 796 Dec 26 2008 button7.gif -rw-r--r-- 1 root root 1522 Dec 26 2008 button7.png -rw-r--r-- 1 root root 784 Dec 26 2008 button8.gif -rw-r--r-- 1 root root 1529 Dec 26 2008 button8.png -rw-r--r-- 1 root root 784 Dec 26 2008 button9.gif -rw-r--r-- 1 root root 1526 Dec 26 2008 button9.png -rw-r--r-- 1 root root 587 Dec 26 2008 buttonl.gif -rw-r--r-- 1 root root 1328 Dec 26 2008 buttonl.png -rw-r--r-- 1 root root 576 Dec 26 2008 buttonr.gif -rw-r--r-- 1 root root 1329 Dec 26 2008 buttonr.png -rw-r--r-- 1 root root 1822 Dec 26 2008 htdig.gif -rw-r--r-- 1 root root 2857 Dec 26 2008 htdig.png -rw-r--r-- 1 root root 1315 Dec 26 2008 search.html -rw-r--r-- 1 root root 53 Dec 26 2008 star_blank.gif -rw-r--r-- 1 root root 151 Dec 26 2008 star_blank.png -rw-r--r-- 1 root root 89 Dec 26 2008 star.gif -rw-r--r-- 1 root root 195 Dec 26 2008 star.png [m...@sbh16 ~]$ In addition, you need a template from which the individual archives/private/LIST/htdig/LIST.conf files are made. The patches install this in $prefix/templates/en/htdig.conf.txt. I do not change this but rather make a sitewide edited template in $prefix/templates/site/en/htdig.conf.txt. Attached is a patch to make my version. The differences between my version and the base are - addition of common_dir - adjust to suit - removal of redundant slash following %(htdig_url)s - collapsing of the button1.gif through button10.gif names to button%%d.gif Note that editing this template only affects subsequently created lists or archives subsequently rebuilt with "bin/arch --wipe". For existing lists, you either have to rebuild the archive or edit the $var-prefix/archives/private/LIST/htdig/LIST.conf file. -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
--- mmp/templates/en/htdig_conf.txt 2010-07-11 11:50:15.000000000 -0700 +++ mmp/templates/site/en/htdig_conf.txt 2009-09-18 08:36:56.000000000 -0700 @@ -8,6 +8,7 @@ # %(htdig_extras)s database_dir: %(databases)s +common_dir: /opt/www/share/htdig start_url: %(starturl)s limit_urls_to: ${start_url} local_urls: %(urlpath)s=%(filepath)s @@ -27,27 +28,9 @@ template_map: Long long ${common_dir}/long.html \ Short short ${common_dir}/short.html template_name: short -next_page_text: <img src="%(htdig_url)s/buttonr.gif" border="0" align="middle" width="30" height="30" alt="next"> +next_page_text: <img src="%(htdig_url)sbuttonr.gif" border="0" align="middle" width="30" height="30" alt="next"> no_next_page_text: -prev_page_text: <img src="%(htdig_url)s/buttonl.gif" border="0" align="middle" width="30" height="30" alt="prev"> +prev_page_text: <img src="%(htdig_url)sbuttonl.gif" border="0" align="middle" width="30" height="30" alt="prev"> no_prev_page_text: -page_number_text: '<img src="%(htdig_url)s/button1.gif" border="0" align="middle" width="30" height="30" alt="1">' \ - '<img src="%(htdig_url)s/button2.gif" border="0" align="middle" width="30" height="30" alt="2">' \ - '<img src="%(htdig_url)s/button3.gif" border="0" align="middle" width="30" height="30" alt="3">' \ - '<img src="%(htdig_url)s/button4.gif" border="0" align="middle" width="30" height="30" alt="4">' \ - '<img src="%(htdig_url)s/button5.gif" border="0" align="middle" width="30" height="30" alt="5">' \ - '<img src="%(htdig_url)s/button6.gif" border="0" align="middle" width="30" height="30" alt="6">' \ - '<img src="%(htdig_url)s/button7.gif" border="0" align="middle" width="30" height="30" alt="7">' \ - '<img src="%(htdig_url)s/button8.gif" border="0" align="middle" width="30" height="30" alt="8">' \ - '<img src="%(htdig_url)s/button9.gif" border="0" align="middle" width="30" height="30" alt="9">' \ - '<img src="%(htdig_url)s/button10.gif" border="0" align="middle" width="30" height="30" alt="10">' -no_page_number_text: '<img src="%(htdig_url)s/button1.gif" border="2" align="middle" width="30" height="30" alt="1">' \ - '<img src="%(htdig_url)s/button2.gif" border="2" align="middle" width="30" height="30" alt="2">' \ - '<img src="%(htdig_url)s/button3.gif" border="2" align="middle" width="30" height="30" alt="3">' \ - '<img src="%(htdig_url)s/button4.gif" border="2" align="middle" width="30" height="30" alt="4">' \ - '<img src="%(htdig_url)s/button5.gif" border="2" align="middle" width="30" height="30" alt="5">' \ - '<img src="%(htdig_url)s/button6.gif" border="2" align="middle" width="30" height="30" alt="6">' \ - '<img src="%(htdig_url)s/button7.gif" border="2" align="middle" width="30" height="30" alt="7">' \ - '<img src="%(htdig_url)s/button8.gif" border="2" align="middle" width="30" height="30" alt="8">' \ - '<img src="%(htdig_url)s/button9.gif" border="2" align="middle" width="30" height="30" alt="9">' \ - '<img src="%(htdig_url)s/button10.gif" border="2" align="middle" width="30" height="30" alt="10">' +page_number_text: '<img src="%(htdig_url)sbutton%%d.gif" border="0" align="middle" width="30" height="30" alt="%%d">' 10 '<em>%%d</em>' +no_page_number_text: '<img src="%(htdig_url)sbutton%%d.gif" border="2" align="middle" width="30" height="30" alt="%%d">' 10 '<strong>%%d</strong>'
------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org