Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Printer Friendly version?

(Page 2 of 2)
> >
Quote Reply
Re: [pcmania] Printer Friendly version? In reply to
That would involve setting a hook on "create_detailed_changed" and "create_detailed_staggered"

Try to add the following in Install.pm (sub install)
Code:
$mgr->install_hooks ( 'SecondDetailed', [ ['create_detailed_changed', 'PRE', 'Plugins::SecondDetailed::create_second_detailed', 'FIRST'] ]);
$mgr->install_hooks ( 'SecondDetailed', [ ['create_detailed_staggered', 'PRE', 'Plugins::SecondDetailed::create_second_detailed', 'FIRST'] ]);

I haven't tested this, but it might work. Tell me how it goes.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Printer Friendly version? In reply to
Hi Yogi,

I keep getting errors when I add the above to my install.pm file, I can't even download it to the plugin section of LinkSQL, can you please add the above lines to your Plugin file and upload it here so I can download it and test it?

Thanks again,
PCMANIAK
Quote Reply
Re: [pcmania] Printer Friendly version? In reply to
OK here is the new plugin, as an attachement (I couldn't edit the old post...)

Anyway, it was straightforward (as I said, add the two lines to sub install in Install.pm, surely that cannot be so difficult...)

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Printer Friendly version? In reply to
Yogi,

your plugin works very well. Is there any way to get this plugin added to the list of plugins for LSQL on GT? so that it shows up in the download manager? I just think that would be nice, so other folks can use this resource that you have shared. Just a thought.

Last edited by:

Evoir: Jun 6, 2002, 1:39 PM
Quote Reply
Re: [yogi] Printer Friendly version? In reply to
Yogi,

I could not make this work in Dynamic mode - any ideas?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] Printer Friendly version? In reply to
This plugin doesn't work in dynamic mode. But since you own the PageBuilder plugin, you can just use that plugin to create a 'link' type page which contains your printer-friendly layout.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Printer Friendly version? In reply to
Yogi,

Thanks - worked it out - it is perfect - seems I am still not fully aware of the power of PageBuilder..


Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Dec 27, 2002, 11:33 PM
Quote Reply
Re: [yogi] Printer Friendly version? In reply to
Can this plugin be modified to create the second detailed page based on the Title of the link? I know a redirect rule can do a similar thing, but this plugin would be more elegant.

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Printer Friendly version? In reply to
You can use the pagebuilder plugin to create as many detailed pages as you like. It would require a bit of code change to allow the title to be used as the file name, though.

I personally find rewrite rules more elegant.Cool

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [BLOOD] Printer Friendly version? In reply to
Hum.... why not try a simpler method ? Check out the option at http://www.needscripts.com/Resource/1084.html and let me know if you are interested, I would be glad to point you in right+freeware direction.

Vishal
-------------------------------------------------------
Quote Reply
Re: [pcmania] Printer Friendly version? In reply to
I agree. This makes sense. But wont this be content duplication in the eyes of search engines or is it alright ?
>> Nakul Goyal (SEO, Link Building Expert)
Web Site Promotion
Tips 'n' Tricks
SEO News


Quote Reply
Re: [nakulgoyal] Printer Friendly version? In reply to
The option I am using won't be considered dupilicate content for search engines. :)

Vishal
-------------------------------------------------------
Quote Reply
Re: Printer Friendly version? In reply to
Sorry to bring up such an old thread...

Got it working great.
Anyone know how to build the second page in another directory? Id like to have it under webroot... :)

Hope someone has done this before.

Thanks in advance,

Juan Carlos
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Anyone noticed that installing this plugin breaks the breadcrumb line in BOTH detailed.html and detailed2.html pages... ??
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Hi,

I would recommend probably just using mod_rewrite (as its never a good idea to have too many files in your root folder =)).

You got an example of these pages? (so I can come up with a rewrite for you =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Printer Friendly version? In reply to
Hi Andy, thanks for your time, again.

The pages are located in:
http://www.domain.com/Detailed/4.html and http://www.domain.com/Detailed/4-2.html

They are not linked to each other. One has reserved info, the other shows 100% info.

Ideally I would like the -2.html to be created outside of webroot. Or actually, you know what... a simple cut and paste would also work and would probably be much simpler... How do I make a .bat file in linux with the cut and paste commands?

Sometimes a simpler method is easier...

What about the breadcrumbs? Any clue on that? I verified that installing that second page plugin breaks it, and uninstalling it makes it work again.

Juan Carlos
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Hi,

In the SecondDetailed.pm file, try changing:

Code:
$page = $CFG->{build_detail_path} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
$url = $CFG->{build_detail_url} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
..to:

Code:
$page = $CFG->{build_root_path} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
$url = $CFG->{build_root_url} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};

That shoudl do the trick :)

Quote:
What about the breadcrumbs? Any clue on that? I verified that installing that second page plugin breaks it, and uninstalling it makes it work again.

The breadcrumbs on the normal page, or the second detailed page?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Printer Friendly version? In reply to
both detailed pages break..

I test the code right now.
Thanks
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Mmm.. not sure, would need to test it out at some point, to see whats going on.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Printer Friendly version? In reply to
Andy wrote:

Code:
$page = $CFG->{build_root_path} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
$url = $CFG->{build_root_url} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};


Ok, made the change and it builds on the http://www.domain.com/page-2.html path.
I want it outside the web server.
So the path would be something like /home/me/somedirectory/page-2.html and not in /home/me/domain.com/public_html/page-2.html

Make sense?
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Hi,

Just change:
Code:
$page = $CFG->{build_root_path} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
$url = $CFG->{build_root_url} . "/" . $link->{'ID'} . '-2' . $CFG->{build_extension}
;

...to:

Code:
$page = "/home/me/somedirectory/" . $link->{'ID'} . '-2' . $CFG->{build_extension};
$url = "/home/me/somedirectory/" . $link->{'ID'} . '-2' . $CFG->{build_extension};

Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Printer Friendly version? In reply to
Worked great Andy, thank you.

Only if the breadcrumbs would work too.... At least in the original detailed page...

Juan Carlos
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
This modified .pm file should make the breadcrumb available :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Printer Friendly version? In reply to
Hi Andy,
Thanks, but it breaks. Maybe because the second detailed is building it outside the webroot?
Here is what it says:

Bareword found where operator expected at SecondDetailed.pm line 79, near "/home/jcgorosp"
(Missing operator before jcgorosp?)
Bareword found where operator expected at SecondDetailed.pm line 80, near "/home/jcgorosp"
(Missing operator before jcgorosp?)
syntax error at SecondDetailed.pm line 79, near "/home/jcgorosp"
Global symbol "$url" requires explicit package name at SecondDetailed.pm line 80.
syntax error at SecondDetailed.pm line 80, near "/home/jcgorosp"
SecondDetailed.pm had compilation errors.

Thanks
Quote Reply
Re: [Gorospe] Printer Friendly version? In reply to
Please PM me your .pm file, and I'll take a quick look :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
> >