From: Alex M. <alex@OWAL.co.uk> - 2003-04-02 10:22:47
|
Hi folks, I would like to amend index.pl so that I can display the most recent 30 headlines and have them as links to the articles. Has anyone done this or should I go ahead and enhance my own copy of index.pl I doubt it will be that hard.... Anybody else want the same feature? Alex McLintock http://news.DiverseBooks.com http://www.diversedvd.com http://www.owal.co.uk/news/ Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ |
From: shane <sh...@lo...> - 2003-04-02 11:46:54
|
On Wednesday 02 April 2003 05:30, Alex McLintock wrote: > Hi folks, > > I would like to amend index.pl so that I can display the most recent 30 > headlines and have them as links to the articles. > Has anyone done this or should I go ahead and enhance my own copy of > index.pl I doubt it will be that hard.... Why would you amend/modify index.pl? Why not instead write a plugin that creates either a box, or template, with the information you want in it (in this case, a list of story titles). Then just include the block/template into the index;index;default template. Shane |
From: Patrick G. <pa...@pa...> - 2003-04-02 18:11:40
|
Check out the Page plugin - it can do this an more... ;) It's an alternative index page and gives you the option of just displaying the titles and no paragraph or vice versa, as well as displaying stories for each topic in separate parts of the page. (shameless plug - I wrote it when I worked for OSDN for the Foundries and it's now used on the dev channels website). I know that there have been even further enhancements to it by krow and the rest of the team. good luck, Patrick On Wed, 2 Apr 2003, Alex McLintock wrote: > Hi folks, > > I would like to amend index.pl so that I can display the most recent 30 > headlines and have them as links to the articles. > Has anyone done this or should I go ahead and enhance my own copy of index.pl > I doubt it will be that hard.... > > Anybody else want the same feature? > > Alex McLintock > http://news.DiverseBooks.com > http://www.diversedvd.com > http://www.owal.co.uk/news/ > > > > Available for java/perl/C++/web development in London, UK or nearby. > Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP > http://www.OWAL.co.uk/ > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Slashcode-general mailing list > Sla...@li... > https://lists.sourceforge.net/lists/listinfo/slashcode-general > -- Patrick Galbraith Senior Software Developer pga...@cl... pa...@pa... cap...@sl... |
From: shane <sh...@lo...> - 2003-04-02 23:59:12
|
On Wednesday 02 April 2003 13:32, Patrick Galbraith wrote: > Check out the Page plugin - it can do this an more... ;) It's an > alternative index page and gives you the option of just displaying the > titles and no paragraph or vice versa, as well as displaying stories for > each topic in separate parts of the page. > > (shameless plug - I wrote it when I worked for OSDN for the Foundries and > it's now used on the dev channels website). I know that there have been > even further enhancements to it by krow and the rest of the team. Speaking of the page plugin. Has anyone been able to get to use page.pl as the script for the index section of your site with current cvs? I tried - I can routinely get it to work under a section of a site. But just not the index. No errors or anything that I could find. Looking at the src the templates being called are still name;index;default. Any suggestions? Thanks, Shane |
From: Brian A. <br...@ta...> - 2003-04-03 00:18:44
|
On Wed, 2003-04-02 at 15:58, shane wrote: > Speaking of the page plugin. Has anyone been able to get to use page.pl as the > script for the index section of your site with current cvs? devchannel.org and a few other OSDN sites do. > I tried - I can routinely get it to work under a section of a site. But just > not the index. No errors or anything that I could find. Looking at the src > the templates being called are still name;index;default. name;page;default The name of the page is "page", aka page.pl. Make sure you also update the section information so that the default handler is page.pl. -Brian -- _______________________________________________________ Brian "Krow" Aker, br...@ta... Slashdot Senior Developer Seattle, Washington http://krow.net/ http://askbrian.org/ _______________________________________________________ You can't grep a dead tree. |
From: shane <sh...@lo...> - 2003-04-03 00:48:40
|
On Wednesday 02 April 2003 18:59, Brian Aker wrote: > On Wed, 2003-04-02 at 15:58, shane wrote: > > Speaking of the page plugin. Has anyone been able to get to use page.pl > > as the script for the index section of your site with current cvs? > > devchannel.org and a few other OSDN sites do. > > > I tried - I can routinely get it to work under a section of a site. But > > just not the index. No errors or anything that I could find. Looking at > > the src the templates being called are still name;index;default. > > name;page;default > > The name of the page is "page", aka page.pl. Make sure you also update > the section information so that the default handler is page.pl. Yes, I realize that the name of the template being called *should* be name;page;defaut when the default handler is changed to page.pl. But it hasn't been. After the switch to page.pl , when I restart apache, and then hit the site, and look at the html src, it's still start template: ID 131, fancybox;misc;default which is exactly what I was referring to in the initial message to the listserv (sorry, should've been more clear) mysql> select * from sections where section='index'; +----+---------+----------+-------+------+-------+-----+----------+-----------+ | id | section | artcount | title | qid | issue | url | hostname | cookiedomain | index_handler | writestatus | type | rewrite | last_update | defaultdisplaystatus | defaulttopic | defaultsection | defaultsubsection | defaultcommentstatus | +----+---------+----------+-------+------+-------+-----+----------+--+ | 15 | index | 15 | Index | NULL | 0 | | | | page.pl | dirty | collected | 3600 | 20030403004427 | 0 | 1 | articles | 0 | enabled | Any suggestions? Thanks, Shane |
From: Brian A. <br...@ta...> - 2003-04-03 00:55:15
|
On Wed, 2003-04-02 at 16:48, shane wrote: > Yes, I realize that the name of the template being called *should* be > name;page;defaut when the default handler is changed to page.pl. > > But it hasn't been. After the switch to page.pl , when I restart apache, and > then hit the site, and look at the html src, it's still > > start template: ID 131, fancybox;misc;default Right, the way it works is this: 1) First check to see if a specific page name exists. 2) Then check using "misc" for the page name. So at this point it is defaulting to misc. > mysql> select * from sections where section='index'; > +----+---------+----------+-------+------+-------+-----+----------+-----------+ > | id | section | artcount | title | qid | issue | url | hostname | > cookiedomain | index_handler | writestatus | type | rewrite | > last_update | defaultdisplaystatus | defaulttopic | defaultsection | > defaultsubsection | defaultcommentstatus | > +----+---------+----------+-------+------+-------+-----+----------+--+ > | 15 | index | 15 | Index | NULL | 0 | | | > | page.pl | dirty | collected | 3600 | 20030403004427 | > 0 | 1 | articles | 0 | enabled > | > > Any suggestions? That looks good, I still suspect that its a page naming issue. -Brian -- _______________________________________________________ Brian "Krow" Aker, br...@ta... Slashdot Senior Developer Seattle, Washington http://krow.net/ http://askbrian.org/ _______________________________________________________ You can't grep a dead tree. |
From: shane <sh...@lo...> - 2003-04-03 01:06:34
|
On Wednesday 02 April 2003 19:36, Brian Aker wrote: > On Wed, 2003-04-02 at 16:48, shane wrote: > > Yes, I realize that the name of the template being called *should* be > > name;page;defaut when the default handler is changed to page.pl. > > > > But it hasn't been. After the switch to page.pl , when I restart apache, > > and then hit the site, and look at the html src, it's still > > > > start template: ID 131, fancybox;misc;default > > Right, the way it works is this: > 1) First check to see if a specific page name exists. > 2) Then check using "misc" for the page name. > So at this point it is defaulting to misc. > >[...sql output ripped] > > > > Any suggestions? > > That looks good, I still suspect that its a page naming issue. Page naming issue? I guess I don't understand. Is it a bug? Is it something that I've configured wrong or not config'd? Because it's still calling all the templates index;index;default , etc. It doesn't seem like it's ever calling page.pl. It seem like it's ignoring the indexhandler when currentsection eq 'index'. Though, for any section that I've created, that's other then 'index', it'll work just fine and page.pl will be run. Thanks, Shane |
From: Brian A. <br...@ta...> - 2003-04-03 01:23:31
|
On Wed, 2003-04-02 at 17:06, shane wrote: > Page naming issue? I guess I don't understand. Is it a bug? Is it something > that I've configured wrong or not config'd? I suspect its template names. > Because it's still calling all the templates index;index;default , etc. It > doesn't seem like it's ever calling page.pl. It seem like it's ignoring the > indexhandler when currentsection eq 'index'. Though, for any section that > I've created, that's other then 'index', it'll work just fine and page.pl > will be run. Does http://sitename.com/page.pl work? And what sort of message is freshenup giving when it goes over the section (just set the section and restart slashd to make sure it runs). -Brian -- _______________________________________________________ Brian "Krow" Aker, br...@ta... Slashdot Senior Developer Seattle, Washington http://krow.net/ http://askbrian.org/ _______________________________________________________ You can't grep a dead tree. |
From: shane <sh...@lo...> - 2003-04-03 02:13:32
|
On Wednesday 02 April 2003 20:04, Brian Aker wrote: > On Wed, 2003-04-02 at 17:06, shane wrote: > > Page naming issue? I guess I don't understand. Is it a bug? Is it > > something that I've configured wrong or not config'd? > > I suspect its template names. > > > Because it's still calling all the templates index;index;default , etc. > > It doesn't seem like it's ever calling page.pl. It seem like it's > > ignoring the indexhandler when currentsection eq 'index'. Though, for any > > section that I've created, that's other then 'index', it'll work just > > fine and page.pl will be run. > > Does http://sitename.com/page.pl work? yes. http://www.lottadot.com/page.pl > And what sort of message is freshenup giving when it goes over the > section (just set the section and restart slashd to make sure it runs). tail -100 Subroutine _make_cchp_file redefined at /usr/local/slash/site/www.lottadot.com/t asks/freshenup.pl line 182. Subroutine _read_and_unlink_cchp_file redefined at /usr/local/slash/site/www.lot tadot.com/tasks/freshenup.pl line 206. Subroutine galLog redefined at /usr/local/slash/site/www.lottadot.com/tasks/last logins_task.pl line 72. "my" variable $backupdb masks earlier declaration in same scope at /usr/local/sl ash/site/www.lottadot.com/tasks/relocount_run_count.pl line 20. Thu Apr 3 02:02:17 2003 processed /usr/local/slash/site/www.lottadot.com/tasks; 28 successful (adminmail.pl calleria_task.pl clean_blobs.pl daily.pl daily_arch ive.pl daily_forget.pl expire.pl flush_formkeys.pl freshenup.pl galleria_task.pl lastcommentstask.pl lastlogins_task.pl message_delete.pl message_delivery.pl ne w_headfoot.pl new_motd.pl open_backend.pl p2f_cheesy.pl p2f_hof_topics.pl refres h_authors_cache.pl refresh_uncommon.pl relocount_run_count.pl rss_submit.pl run_ moderatord.pl run_portald.pl set_recent_topics.pl spamarmor.pl zoo_run_people_lo g.pl); 0 failed Thu Apr 3 02:02:18 2003 first task will be freshenup.pl in -1 secs Thu Apr 3 02:02:18 2003 freshenup.pl forked; new_headfoot.pl 1s late Thu Apr 3 02:02:20 2003 [freshenup.pl] begin (26035) that didn't show much. so i ran it by hand: [root@hobbes logs]# runtask -u lottadot freshenup.pl Thu Apr 3 02:02:44 2003 runtask freshenup.pl begin Thu Apr 3 02:02:48 2003 runtask index.pl virtual_user=lottadot ssi=yes section='index' bytes=69359 Thu Apr 3 02:02:48 2003 runtask freshenup.pl end: (ran in 4.42s) and got a boatload of errrors. Some of them: Thu Apr 3 02:03:37 2003 [freshenup.pl] index.pl virtual_user=lottadot ssi=yes section='index' bytes=69359 Thu Apr 3 02:03:42 2003 [freshenup.pl] index.pl virtual_user=lottadot ssi=yes section='articles' bytes=6444 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main line 39 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main lin e 39 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main line 39 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main lin e 39 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main line 39 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main lin e 39 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display.pm:204:Failed templat e lookup on 'storylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Di splay line 233 Which was called by:Slash::Page:/usr/local/lib/perl5/site_perl/5.6.1/Slash/Page.pm:309:Failed template lookup on 's torylink;page[misc];default[default]', callers: Slash::Page line 309, Slash::Page line 179, Slash::Display line 233 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Pag e line 309, Slash::Page line 179 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'storylink;page[misc];default[default]', callers: Slash::Display line 233, Slash::Page line 30 9, Slash::Page line 179 Error in library:Slash::Display::Provider:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Slash/Display/Provider.pm :81:Failed template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main line 39 Which was called by:Template::Context:/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/Template/Context.pm:133:Faile d template lookup on 'topicbar;page[misc];index[default]', callers: Slash::Display line 233, main line 31, main lin e 39 Thu Apr 3 02:03:48 2003 [freshenup.pl] page.pl virtual_user=lottadot ssi=yes section='index' bytes=60858 mysql> select tpid,name from templates where page='page'; +------+----------------+ | tpid | name | +------+----------------+ | 322 | index | | 356 | data | | 357 | storyTitleOnly | +------+----------------+ 3 rows in set (0.01 sec) So something's defintely going on w/ slashd/freshenup... here's the links that should show the page plugin as index: <URL: http://www.lottadot.com/index.shtml > <URL: http://www.lottadot.com/ > and if you were to login: <URL: http://www.lottadot.com/index.pl > <URL: http://www.lottadot.com/page.pl > Thanks, Shane |