Print Tag

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
brownrl
Forum Members
Forum Members
Posts: 74
Joined: Thu Sep 23, 2004 11:06 am

Print Tag

Post by brownrl »

Hello All,

I made small change to the print tag ( function.print.php ). I was having issue using the tag when wanting to make a print of a news article and I would guess if using other modules as well. I would assume this more than likely doesn't work if you are using clean URLs...

Comment out near line 68 where you have:

#$page_url = $gCms->config['root_url'].'/index.php?'....

and put this below to rebuild the URL "better"?

Code: Select all

                foreach( $_GET as $k => $v )
                {
                        $page_url .= "&".$k."=".$v;
                }

                $page_url = ereg_replace( "^&" , "?" , $page_url );
                $page_url = $page_url . "&print=true";
For now I haven't thought about how safe this is or wether I reinvented the wheel. Can someone from CMS org take a look and let us know if this code is something that should or shouldn't be done.


Regards
Rob
Post Reply

Return to “Modules/Add-Ons”