Thread: [Lurker-users] prevent languages being generated
Brought to you by:
terpstra
From: Adrian B. <ad...@sm...> - 2010-03-18 16:25:25
|
Hi there, I've spent a while going through the documentation and even the code but I'm stuck. I'd like to stop lurker from generating all the languages in message/ and thread/ - I just want English. Is this possible? I've tried: - setting all languages except "en" to "no" in /etc/lurker/ui/lang.xml - removing all languages except "en" in /etc/lurker/ui/lang.xml - removing all language files from /etc/lurker/ui except en.xml Still no joy :-( I'm trying to cut down how much we backup. Thanks, Adrian -- bitcube.co.uk - Expert Linux infrastructure consultancy Puppet, Debian, Red Hat, Ubuntu, CentOS |
From: Wesley W. T. <we...@te...> - 2010-03-18 23:51:59
|
On Thu, Mar 18, 2010 at 9:08 AM, Adrian Bridgett <ad...@sm...> wrote: > Hi there, I've spent a while going through the documentation and even > the code but I'm stuck. > > I'd like to stop lurker from generating all the languages in message/ > and thread/ - I just want English. Is this possible? > Am I understanding correctly that you want lurker to refuse requests for pages rendered with the UI elements in other languages? Removing say the de.xml file will just make lurker fall back to English for .de.html files. Setting 'no' in lang.xml will just remove it from the language drop-down menu. You can't (easily) stop lurker from creating files that people request. However, if you set the languages to 'no' in lang.xml, presumably people will stop loading pages in other languages. If you have files appearing in other languages in your cache, it's because someone is actually loading pages in that language (or google found them). That said, you might want to reconsider disabling the feature as people are actually using it. Still no joy :-( I'm trying to cut down how much we backup. > Don't backup anything in the lurker >CACHE< folder. It will all be regenerated on demand from the database. Also, if you have a lot of files in your cache folder, you might want to confirm you run lurker-prune from a cron job. That said, if you still really want to forbid lurker from generating pages with a non-en.html extension, you will need to edit the C++. In render/main.cpp go to line 130 and add something along the lines of: if (out.language != "en") error("Bad language", out.language, "Only English is allowed."); |
From: Adrian B. <ad...@sm...> - 2010-03-19 07:15:12
|
On Thu, Mar 18, 2010 at 16:21:09 -0700 (-0700), Wesley W. Terpstra wrote: > On Thu, Mar 18, 2010 at 9:08 AM, Adrian Bridgett <ad...@sm...> wrote: [snip] > Am I understanding correctly that you want lurker to refuse requests for > pages rendered with the UI elements in other languages? Many thanks for such a fast and helpful reply :-) Not quite. I should have explained more clearly. Currently (lacking any better information) I backup everything lurker touches: 7916 /var/www/lurker/attach 84 /var/www/lurker/imgs 4 /var/www/lurker/index.html 256 /var/www/lurker/list 0 /var/www/lurker/lurker.docroot 4 /var/www/lurker/mbox 85148 /var/www/lurker/message (pruned somewhat) 125132 /var/www/lurker/mindex 4 /var/www/lurker/search 68 /var/www/lurker/splash 66024 /var/www/lurker/thread (pruned somewhat) 0 /var/www/lurker/ui 4 /var/www/lurker/zap 63164 /var/lib/lurker/ > If you have files appearing in other languages in your cache, it's because > someone is actually loading pages in that language (or google found them). > That said, you might want to reconsider disabling the feature as people are > actually using it. Both message and thread directories contain *.ja.html, *.de.html etc - I would like to stop these from being created. I can't figure out how to disable it though (ah, your instructions for main.cpp - excellent - that's what I was after). FYI lurker.conf says: archive[en] = Hampshire LUG Mailing List Archive group = lists heading = Mailing Lists list = hampshire title = Hampshire LUG language = en address = ham...@ma... link = http://mailman.lug.org.uk/mailman/listinfo/hampshire description = Hampshire Linux User Group Mailing List. This is the new public mailing list which replaced a closed mailing list in November 2006. > Don't backup anything in the lurker >CACHE< folder. It will all be > regenerated on demand from the database. Also, if you have a lot of files in > your cache folder, you might want to confirm you run lurker-prune from a > cron job. Looking at the lurker-prune manpage it sees to say the whole of /var/www/lurker is the cache? Is that correct? To be honest if I can drop the message/mindex/thread folders from teh backups that'd make a huge difference (just backing it up to home). lurker-prune is being called - all files are less than a day old. Maybe it's just google scanning it all. > That said, if you still really want to forbid lurker from generating pages > with a non-en.html extension, you will need to edit the C++. In > render/main.cpp go to line 130 and add something along the lines of: > > if (out.language != "en") error("Bad language", out.language, "Only English > is allowed."); Fabulous, thanks! Adrian -- bitcube.co.uk - Expert Linux infrastructure consultancy Puppet, Debian, Red Hat, Ubuntu, CentOS |
From: Wesley W. T. <we...@te...> - 2010-03-20 16:23:27
|
On Fri, Mar 19, 2010 at 12:14 AM, Adrian Bridgett <ad...@sm...> wrote: > Not quite. I should have explained more clearly. Currently (lacking > any better information) I backup everything lurker touches: > > 7916 /var/www/lurker/attach > 84 /var/www/lurker/imgs > 4 /var/www/lurker/index.html > 256 /var/www/lurker/list > 0 /var/www/lurker/lurker.docroot > 4 /var/www/lurker/mbox > 85148 /var/www/lurker/message (pruned somewhat) > 125132 /var/www/lurker/mindex > 4 /var/www/lurker/search > 68 /var/www/lurker/splash > 66024 /var/www/lurker/thread (pruned somewhat) > 0 /var/www/lurker/ui > 4 /var/www/lurker/zap > 63164 /var/lib/lurker/ > The things you need to backup: /var/lib/lurker <-- the actual database /var/www/lurker/ui <-- the frontend /var/www/lurker/imgs <-- the icons The rest is all just cache. Looking at the lurker-prune manpage it sees to say the whole of > /var/www/lurker is the cache? Is that correct? Mostly. See above. > To be honest if I can > drop the message/mindex/thread folders from teh backups that'd make a > huge difference (just backing it up to home). > It would also mean there is very little benefit to disabling foreign languages. |
From: Adrian B. <ad...@sm...> - 2010-03-20 16:49:40
|
On Sat, Mar 20, 2010 at 09:23:19 -0700 (-0700), Wesley W. Terpstra wrote: > The things you need to backup: > /var/lib/lurker <-- the actual database > /var/www/lurker/ui <-- the frontend > /var/www/lurker/imgs <-- the icons > The rest is all just cache. That's fab :-) I really appreciate all your help! My ADSL provider will now stop yelling at me. Adrian -- bitcube.co.uk - Expert Linux infrastructure consultancy Puppet, Debian, Red Hat, Ubuntu, CentOS |