From: Alex M. <alex@OWAL.co.uk> - 2003-01-07 16:42:44
|
Hi folks, I want to modify one of my slash virtual sites so that when it displays a line of the form Author: Ian Banks it gets automatically converted to Author: <a href="http://mysite.com/cgibin/blah.pl?Ian+Banks">Ian Banks</a> I want to do this for a number of attributes including Title, Publisher, and so on. My problem is that I thought I could do this by modifying article.pl However it looks like article.pl doesnt actually use the article bodytext. It merely specifies the story id and then gets slashDisplay to do the displaying. I can't modify slashDisplay to do this since it is used by other virtual sites which may not want this functionality - or more likely will have their own modifications. Any ideas with this? Perhaps I should add an (optional) callback to slashdisplay which filtered the bodytext? Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/ |
From: Alex M. <alex@OWAL.co.uk> - 2003-01-07 17:14:51
|
Are you suggesting Patrick that I add a callback in Slash.pm which I can call from template-toolkit and the template for displaying an article.... hmmmm, that just might work..... Hmmmm.... Alex At 18:04 07/01/03, Patrick Galbraith wrote: >Have you tried creating a template specifically for that site? You may >have to have a separate theme for this particular site, even it it >merely has just one template that makes it different from the other >sites. It will most likely be a template for article.pl (pagename being >'article'). > >Hope this helps (I'm a little rusty at this). > >On Tue, 7 Jan 2003, Alex >McLintock wrote: > > > Hi folks, > > > > I want to modify one of my slash virtual sites so that when it displays a > > line of the form > > > > Author: Ian Banks > > > > it gets automatically converted to > > > > Author: <a href="http://mysite.com/cgibin/blah.pl?Ian+Banks">Ian Banks</a> > > > > I want to do this for a number of attributes including Title, Publisher, > > and so on. > > > > My problem is that I thought I could do this by modifying article.pl > > However it looks like article.pl doesnt actually use the article bodytext. > > It merely specifies the story id and then gets slashDisplay to do the > > displaying. > > > > I can't modify slashDisplay to do this since it is used by other virtual > > sites which may not want this functionality - or more likely will have > > their own modifications. > > > > Any ideas with this? > > > > Perhaps I should add an (optional) callback to slashdisplay which filtered > > the bodytext? > > > > Alex > > > > > > Available for java/perl/C++/web development in London, UK or nearby. > Apache > > FOP, Cocoon, > > Turbine, Struts,XSL:FO, XML, Tomcat, First meeting > free.http://www.OWAL.co.uk/ > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Slashcode-general mailing list > > Sla...@li... > > https://lists.sourceforge.net/lists/listinfo/slashcode-general > > > >-- >Patrick Galbraith >Senior Software Developer >pat...@t-... >pa...@pa... cap...@sl... Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/ |
From: Alex M. <alex@OWAL.co.uk> - 2003-01-07 18:51:56
|
You have helped but I can't solve my problem without creating some perl code somewhere.... I need to manipulate the actual text of the story and this is not something you can do in the template. You cannot write arbitrary perl code in the template - but you can call functions defined elsewhere. What I have done is to create a new function in Slash.pm which is being called in my template. That seems to be working fine.... Alex McLintock At 19:09 07/01/03, you wrote: >No, what I mean is that you probably will need a custom template for that >site. No modification to the code, just a separate template (which is one >of the main reasons behind templates - to not have to modify code). Is >this site using the default theme? If so, you'll need to create a separate >them that just contains that one template, or just remember to always save >your customised template (if you don't want to go to the trouble of >creating a whole new theme). I think this is what you want. When you view >the source, what template is this change needed in (the html comments will >show you this). Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/ |
From: shane <sh...@lo...> - 2003-01-07 17:54:08
|
On Tuesday 07 January 2003 11:47, Alex McLintock wrote: > > I can't modify slashDisplay to do this since it is used by other virtual > sites which may not want this functionality - or more likely will have > their own modifications. slashDisplay gets it's own constants. So you could wrap the behavior inside a constant, and that would keep your other virtual hosts happy. just define a constant var for that site that would enable the code to do the behavior that you want. sub slashDisplay { my($name, $data, $opt) = @_; my(@comments, $err, $ret, $out, $origSection, $origPage, $tempdata, $tempname, $user, $slashdb, $constants); return unless $name; $constants = getCurrentStatic(); etc etc Shane |
From: Eric D. <eri...@ja...> - 2003-01-20 08:10:23
|
I just upgraded to the latest CVS T_2_3_0_68 and I am getting this error in my apache logs when trying to submit a story. [Mon Jan 20 08:03:12 2003] [error] /article.pl:Apache::ROOTwww_2ejazz_2dsax_2ecom::article_2epl:/usr/local/slash/site/www.jazz-sax.com/htdocs/article.pl:67:ID 97, display;article;default : undef error - strip_paramattr: filter not found [Mon Jan 20 08:03:12 2003] [error] Which was called by:Apache::ROOTwww_2ejazz_2dsax_2ecom::article_2epl:/usr/local/slash/site/www.jazz-sax.com/htdocs/article.pl:102:ID 97, display;article;default : undef error - strip_paramattr: filter not found [Mon Jan 20 08:03:38 2003] [error] /article.pl:Apache::ROOTwww_2ejazz_2dsax_2ecom::article_2epl:/usr/local/slash/site/www.jazz-sax.com/htdocs/article.pl:67:ID 97, display;article;default : undef error - strip_urlattr: filter not found [Mon Jan 20 08:03:38 2003] [error] Which was called by:Apache::ROOTwww_2ejazz_2dsax_2ecom::article_2epl:/usr/local/slash/site/www.jazz-sax.com/htdocs/article.pl:102:ID 97, display;article;default : undef error - strip_urlattr: filter not found Seems like strip_urlattr and strip_paramattr were not documented in the upgrades file. What are these set at? Thanks |
From: Chris N. <pu...@os...> - 2003-01-20 13:44:39
|
At 00:10 -0800 2003.01.20, Eric Dannewitz wrote: >Seems like strip_urlattr and strip_paramattr were not documented in the >upgrades file. What are these set at? Slash::Display and Slash::Utility::Data have been modified also, adding those new filters. It looks like you didn't get those updated on your server, or you need to stop/start Apache ... ? We usually don't put things like that in the upgrades file. -- Chris Nandor pu...@po... http://pudge.net/ Open Source Development Network pu...@os... http://osdn.com/ |
From: Eric D. <eri...@ja...> - 2003-01-20 19:21:24
|
Thanks. You know, actually what it was was that my system had a number of different directories going for perl libraries, and Apache was using a directory that had an older version of Slash.pm or the Utility.pm file. I deleted that directory, recomplied slash and redid Mod_perl and Apache and it fixed the problem. No more errors. Everything works. Chris Nandor wrote: >At 00:10 -0800 2003.01.20, Eric Dannewitz wrote: > > >>Seems like strip_urlattr and strip_paramattr were not documented in the >>upgrades file. What are these set at? >> >> > >Slash::Display and Slash::Utility::Data have been modified also, adding >those new filters. It looks like you didn't get those updated on your >server, or you need to stop/start Apache ... ? > >We usually don't put things like that in the upgrades file. > > > -- ----- Bureaucrats cut red tape, lengthwise Eric Dannewitz - Adventurer, saxophonist, good-timer (crook? quite possibly), clarinetist, manic self-publicist, part-time flautist(flutist?), macintosher, and often thought to be completely out to lunch. http://www.jazz-sax.com |